-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Krystian Jandy
committed
Oct 14, 2023
1 parent
9dc903c
commit a361af5
Showing
30 changed files
with
712 additions
and
94 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,4 +39,4 @@ | |
"suffix": ".gd", | ||
"tests": [], | ||
"unit_test_name": null | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -482,4 +482,4 @@ func get_scene_script_object(scene): | |
|
||
node_idx += 1 | ||
|
||
return to_return | ||
return to_return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://5pq2gi5lihnn" | ||
path="res://.godot/imported/bin.png-50ddeb5072c240279418245d92f9d814.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://addons/lynx_nodes/utils/icons/bin.png" | ||
dest_files=["res://.godot/imported/bin.png-50ddeb5072c240279418245d92f9d814.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://dymxgco2w8mdk" | ||
path="res://.godot/imported/information.png-f7bc1290fcb30f248bc76b6b6e4542b1.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://addons/lynx_nodes/utils/icons/information.png" | ||
dest_files=["res://.godot/imported/information.png-f7bc1290fcb30f248bc76b6b6e4542b1.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://df3bkrrtrsypx" | ||
path="res://.godot/imported/map.png-c370e3587c91d4d5c2727c9a027a46b5.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://addons/lynx_nodes/utils/icons/map.png" | ||
dest_files=["res://.godot/imported/map.png-c370e3587c91d4d5c2727c9a027a46b5.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
[remap] | ||
|
||
importer="texture" | ||
type="CompressedTexture2D" | ||
uid="uid://bnrohp1hv8ugw" | ||
path="res://.godot/imported/remove.png-1c33a507190c7dd20d9e4f3071c88a30.ctex" | ||
metadata={ | ||
"vram_texture": false | ||
} | ||
|
||
[deps] | ||
|
||
source_file="res://addons/lynx_nodes/utils/icons/remove.png" | ||
dest_files=["res://.godot/imported/remove.png-1c33a507190c7dd20d9e4f3071c88a30.ctex"] | ||
|
||
[params] | ||
|
||
compress/mode=0 | ||
compress/high_quality=false | ||
compress/lossy_quality=0.7 | ||
compress/hdr_compression=1 | ||
compress/normal_map=0 | ||
compress/channel_pack=0 | ||
mipmaps/generate=false | ||
mipmaps/limit=-1 | ||
roughness/mode=0 | ||
roughness/src_normal="" | ||
process/fix_alpha_border=true | ||
process/premult_alpha=false | ||
process/normal_map_invert_y=false | ||
process/hdr_as_srgb=false | ||
process/hdr_clamp_exposure=false | ||
process/size_limit=0 | ||
detect_3d/compress_to=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
extends Node | ||
|
||
@onready var get_agent_http_request = get_node("GetAgentHTTPRequest") | ||
@onready var agent_panel = get_node("/root/Scene/CanvasLayer/UI/AgentPanel") | ||
var json = JSON.new() | ||
|
||
func get_agent(agent_id: String): | ||
if self.get_agent_http_request.get_http_client_status() not in Globals.BUSY_HTTP_STATUSES: | ||
var url = "%splayer-agents/%s/%s" % [Globals.SERVER_ADDRESS, str(Globals.USER_ID), agent_id] | ||
var result = self.get_agent_http_request.request( | ||
url, | ||
[], | ||
HTTPClient.METHOD_GET | ||
) | ||
if result != OK: | ||
push_error("[ERROR] Could not GET Agent: %s" % [result]) | ||
|
||
|
||
func _on_get_agent_http_request_request_completed(result, response_code, headers, body): | ||
if response_code == 200: | ||
json.parse(body.get_string_from_utf8()) | ||
var agent = json.get_data() | ||
self.agent_panel.display(agent) | ||
return | ||
|
||
|
||
func _on_ui_get_agent_requested(agent_id: int): | ||
self.get_agent(str(agent_id)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
extends Node | ||
|
||
@onready var get_agents_http_request = get_node("GetAgentsHTPPRequest") | ||
@onready var agents = get_node("/root/Scene/CanvasLayer/UI/Agents") | ||
var json = JSON.new() | ||
|
||
func get_agents(): | ||
if self.get_agents_http_request.get_http_client_status() not in Globals.BUSY_HTTP_STATUSES: | ||
var url = "%splayer-agents/%s" % [Globals.SERVER_ADDRESS, str(Globals.USER_ID)] | ||
var result = self.get_agents_http_request.request( | ||
url, | ||
[], | ||
HTTPClient.METHOD_GET | ||
) | ||
if result != OK: | ||
push_error("[ERROR] Could not GET Agents: %s" % [result]) | ||
|
||
func _on_get_agents_htpp_request_request_completed(result, response_code, headers, body): | ||
var agents = [] | ||
if response_code == 200: | ||
json.parse(body.get_string_from_utf8()) | ||
agents = json.get_data() | ||
|
||
self.agents.populate(agents) | ||
|
||
func _on_ui_get_agents_requested(): | ||
self.get_agents() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
extends Node | ||
|
||
@onready var get_resources_http_request = get_node("GetResourcesHTTPRequest") | ||
@onready var resources_panel = get_node("/root/Scene/CanvasLayer/UI/ResourcesPanel") | ||
var json = JSON.new() | ||
|
||
func _ready(): | ||
self.get_resources() | ||
|
||
func get_resources(): | ||
if get_resources_http_request.get_http_client_status() not in Globals.BUSY_HTTP_STATUSES: | ||
var url = "%splayer-resources/%s" % [Globals.SERVER_ADDRESS, str(Globals.USER_ID)] | ||
print(url) | ||
var result = self.get_resources_http_request.request( | ||
url, | ||
[], | ||
HTTPClient.METHOD_GET | ||
) | ||
if result != OK: | ||
push_error("[ERROR] Could not GET Resources: %s" % [result]) | ||
|
||
func _on_get_resources_http_request_request_completed(result, response_code, headers, body): | ||
if response_code == 200: | ||
json.parse(body.get_string_from_utf8()) | ||
var response = json.get_data() | ||
self.resources_panel.update_resources(json.get_data()) |
Oops, something went wrong.