diff --git a/tile_map.gd b/tile_map.gd index 0d4512e..d7fe002 100644 --- a/tile_map.gd +++ b/tile_map.gd @@ -100,7 +100,7 @@ func _on_mouse_handler_clicked(): func show_info_building(): var tile = local_to_map(get_global_mouse_position()) - if Dic[str(tile)]["Placed"]: + if Dic.has(str(tile)) and Dic[str(tile)]["Placed"]: Triggerer.trigger("show_info", Dic[str(tile)]) func select_building(data): @@ -119,13 +119,15 @@ func drag_building(data): func release_mouse(): if Drag_Mode and Building_Mode: place_building() - Drag_Mode = false func place_building(): var tile = local_to_map(get_global_mouse_position()) - Building_Mode = false - Dic[str(tile)]["Placed"] = true + if Dic.has(str(tile)): + Building_Mode = false + Dic[str(tile)]["Placed"] = true + + Drag_Mode = false func _on_mouse_handler_rclicked(): diff --git a/ui/essence_icon.png.import b/ui/essence_icon.png.import new file mode 100644 index 0000000..cd738c0 --- /dev/null +++ b/ui/essence_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://baxweme4kyald" +path="res://.godot/imported/essence_icon.png-2ff4decd1d74f99d981c04fec76d6306.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ui/essence_icon.png" +dest_files=["res://.godot/imported/essence_icon.png-2ff4decd1d74f99d981c04fec76d6306.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 diff --git a/ui/stone_icon.png b/ui/stone_icon.png index 7bbcf6d..8cc0962 100644 Binary files a/ui/stone_icon.png and b/ui/stone_icon.png differ diff --git a/ui/stone_icon.png.import b/ui/stone_icon.png.import new file mode 100644 index 0000000..6fb102b --- /dev/null +++ b/ui/stone_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://cngxjjfl3i0b3" +path="res://.godot/imported/stone_icon.png-71774b19e906290b7d47dfd58bfc7e58.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ui/stone_icon.png" +dest_files=["res://.godot/imported/stone_icon.png-71774b19e906290b7d47dfd58bfc7e58.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 diff --git a/ui/wood_icon.png.import b/ui/wood_icon.png.import new file mode 100644 index 0000000..d195c2b --- /dev/null +++ b/ui/wood_icon.png.import @@ -0,0 +1,34 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://c554jwofq0tdf" +path="res://.godot/imported/wood_icon.png-2710b2152aec1c69f3e7c85f9132128c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://ui/wood_icon.png" +dest_files=["res://.godot/imported/wood_icon.png-2710b2152aec1c69f3e7c85f9132128c.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