Compare commits
60 commits
place_buil
...
main
Author | SHA1 | Date | |
---|---|---|---|
|
439cbf5767 | ||
|
02e05b95b2 | ||
|
974efa76cf | ||
|
72b0bf1d1e | ||
|
88c082ac2a | ||
|
b47cce1e53 | ||
|
24aa4aea4b | ||
|
444bacb717 | ||
|
d3c4e6bafb | ||
|
72f22731bf | ||
|
1ce23e1e28 | ||
|
268d4748d0 | ||
|
2a409b5465 | ||
|
8406db2a6a | ||
|
327bad2637 | ||
|
30dcc356e8 | ||
|
60338da019 | ||
|
0b8addb1dc | ||
|
4c2ae4da13 | ||
|
3047e14916 | ||
|
14046cef33 | ||
|
21720ecc11 | ||
|
f75456cfde | ||
|
e14a0ee010 | ||
|
0c5120b07d | ||
|
01e58dc8f6 | ||
|
6162455a71 | ||
|
ea2cf5787e | ||
|
3dcccf2001 | ||
|
413960ed70 | ||
|
9fc1776517 | ||
|
098a43c452 | ||
|
5969b56b75 | ||
|
4ac76453e1 | ||
|
c7140911a7 | ||
|
d2a51dd9b3 | ||
|
0e7a03da82 | ||
|
2ca7fe9d40 | ||
|
d994deb90f | ||
|
ac3b0682be | ||
|
7cfc81b16c | ||
|
4cada48a71 | ||
|
586b3f55dc | ||
d489f3f966 | |||
|
ffcb7de8c5 | ||
|
c30cc68db8 | ||
|
e1753a1587 | ||
|
8bb05c7400 | ||
|
9b6fd32480 | ||
d0b11b7c6e | |||
d3c3920be3 | |||
182eed7bca | |||
|
e116ac4769 | ||
06e3b6e229 | |||
|
df83dce3a6 | ||
83b519823f | |||
|
ce1f1f3900 | ||
b53dcdb43f | |||
|
be26043aaa | ||
b3ebf482b5 |
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
# Godot 4+ specific ignores
|
# Godot 4+ specific ignores
|
||||||
.godot/
|
.godot/
|
||||||
/android/
|
/android/
|
||||||
|
builds/
|
BIN
Ac437_IBM_BIOS.ttf
Normal file
34
Ac437_IBM_BIOS.ttf.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://d0or8uewq7xxw"
|
||||||
|
path="res://.godot/imported/Ac437_IBM_BIOS.ttf-7a48879b7e6558f138531588615d399b.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Ac437_IBM_BIOS.ttf"
|
||||||
|
dest_files=["res://.godot/imported/Ac437_IBM_BIOS.ttf-7a48879b7e6558f138531588615d399b.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=1
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=1
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
332
BuildingLevel.gd
Normal file
|
@ -0,0 +1,332 @@
|
||||||
|
extends TileMapLayer
|
||||||
|
|
||||||
|
@export var building_spots: Array[Vector2i]
|
||||||
|
@export var tree_spots: Array[Vector2i]
|
||||||
|
@export var rock_spots: Array[Vector2i]
|
||||||
|
@export var th_spots: Array[Vector2i]
|
||||||
|
@export var level: int
|
||||||
|
var ruins_spots: Array[Vector2i]
|
||||||
|
var error_pings: Dictionary
|
||||||
|
|
||||||
|
var building_data = {}
|
||||||
|
var last_tile
|
||||||
|
var last_text
|
||||||
|
var last_food_text
|
||||||
|
var last_water_text
|
||||||
|
var rand = 0
|
||||||
|
|
||||||
|
const NAME_ICON = preload("res://NameIcon.tscn")
|
||||||
|
const RESOURCE_GAIN = preload("res://ResourceGain.tscn")
|
||||||
|
const ERROR_PING = preload("res://ErrorPing.tscn")
|
||||||
|
|
||||||
|
var building_to_tile_map = {
|
||||||
|
"tents": {
|
||||||
|
"source": 8,
|
||||||
|
"atlas": 0
|
||||||
|
},
|
||||||
|
"quarter": {
|
||||||
|
"source": 8,
|
||||||
|
"atlas": 1
|
||||||
|
},
|
||||||
|
"house": {
|
||||||
|
"source": 8,
|
||||||
|
"atlas": 2
|
||||||
|
},
|
||||||
|
"essencecompressor": {
|
||||||
|
"source": 9,
|
||||||
|
"atlas": 2
|
||||||
|
},
|
||||||
|
"woodcutter": {
|
||||||
|
"source": 9,
|
||||||
|
"atlas": 1
|
||||||
|
},
|
||||||
|
"stoneminer": {
|
||||||
|
"source": 9,
|
||||||
|
"atlas": 0
|
||||||
|
},
|
||||||
|
"foodgathering": {
|
||||||
|
"source": 7,
|
||||||
|
"atlas": 2
|
||||||
|
},
|
||||||
|
"foodprocessing": {
|
||||||
|
"source": 7,
|
||||||
|
"atlas": 3
|
||||||
|
},
|
||||||
|
"waterprocessor": {
|
||||||
|
"source": 7,
|
||||||
|
"atlas": 1
|
||||||
|
},
|
||||||
|
"waterpump": {
|
||||||
|
"source": 7,
|
||||||
|
"atlas": 0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
var tile = local_to_map(get_global_mouse_position())
|
||||||
|
var building_mode = Persister.get_value("building_mode")
|
||||||
|
|
||||||
|
for spot in building_spots:
|
||||||
|
if not building_data.has(spot) and not tree_spots.has(spot) and not rock_spots.has(spot) and not th_spots.has(spot) and not ruins_spots.has(spot):
|
||||||
|
erase_cell(spot)
|
||||||
|
|
||||||
|
if last_tile != tile:
|
||||||
|
if last_text and is_instance_valid(last_text) and last_text.selected:
|
||||||
|
last_text._deselect()
|
||||||
|
if last_food_text and is_instance_valid(last_food_text) and last_food_text.selected:
|
||||||
|
last_food_text._deselect()
|
||||||
|
if last_water_text and is_instance_valid(last_water_text) and last_water_text.selected:
|
||||||
|
last_water_text._deselect()
|
||||||
|
|
||||||
|
rand = randi_range(0, 1)
|
||||||
|
|
||||||
|
if not Persister.get_value("building_mode") and Persister.get_value("flood_level", PersisterEnums.Scope.UNKNOWN, 0) < level:
|
||||||
|
if rock_spots.has(tile):
|
||||||
|
last_text = NAME_ICON.instantiate()
|
||||||
|
last_text.text = "[center]Rock"
|
||||||
|
last_text.position = map_to_local(tile) + Vector2(-25, -10)
|
||||||
|
add_sibling(last_text)
|
||||||
|
elif tree_spots.has(tile):
|
||||||
|
last_text = NAME_ICON.instantiate()
|
||||||
|
last_text.text = "[center]Tree"
|
||||||
|
last_text.position = map_to_local(tile) + Vector2(-25, -10)
|
||||||
|
add_sibling(last_text)
|
||||||
|
elif th_spots.has(tile):
|
||||||
|
last_text = NAME_ICON.instantiate()
|
||||||
|
last_text.text = "[center]Town Hall"
|
||||||
|
last_text.position = map_to_local(tile) + Vector2(-25, -30)
|
||||||
|
add_sibling(last_text)
|
||||||
|
last_food_text = NAME_ICON.instantiate()
|
||||||
|
last_food_text.text = "[center]%d Food" % [Persister.get_value("food")]
|
||||||
|
last_food_text.position = map_to_local(tile) + Vector2(-25, -20)
|
||||||
|
add_sibling(last_food_text)
|
||||||
|
last_water_text = NAME_ICON.instantiate()
|
||||||
|
last_water_text.text = "[center]%d Water" % [Persister.get_value("water")]
|
||||||
|
last_water_text.position = map_to_local(tile) + Vector2(-25, -10)
|
||||||
|
add_sibling(last_water_text)
|
||||||
|
elif ruins_spots.has(tile):
|
||||||
|
last_text = NAME_ICON.instantiate()
|
||||||
|
last_text.text = "[center]Ruins"
|
||||||
|
last_text.position = map_to_local(tile) + Vector2(-25, -10)
|
||||||
|
add_sibling(last_text)
|
||||||
|
elif building_data.has(tile):
|
||||||
|
last_text = NAME_ICON.instantiate()
|
||||||
|
last_text.text = "[center]%s" % [Data.data.buildings[building_data[tile].key].name]
|
||||||
|
last_text.position = map_to_local(tile) + Vector2(-25, -10)
|
||||||
|
add_sibling(last_text)
|
||||||
|
|
||||||
|
for coords in building_data:
|
||||||
|
var building = building_data[coords]
|
||||||
|
if building.has("workers") and building.workers > 0 and (not Data.data.buildings[building.key].has("needs") or (Persister.get_value(Data.data.buildings[building.key].needs, PersisterEnums.Scope.UNKNOWN, 0) > 0)):
|
||||||
|
building.progress += delta * building.efficiency / 100.0
|
||||||
|
|
||||||
|
if building.progress >= Data.data.buildings[building.key].time:
|
||||||
|
if Data.data.buildings[building.key].has("needs"):
|
||||||
|
Persister.change_value(Data.data.buildings[building.key].needs, -1)
|
||||||
|
Persister.change_value(Data.data.buildings[building.key].resource, Data.data.buildings[building.key].amount)
|
||||||
|
var gain = RESOURCE_GAIN.instantiate()
|
||||||
|
gain.text = "[center]+1 %s" % [Data.data.buildings[building.key].resourcename]
|
||||||
|
gain.position = map_to_local(coords) + Vector2(-60, -5)
|
||||||
|
add_sibling(gain)
|
||||||
|
building.progress -= Data.data.buildings[building.key].time
|
||||||
|
|
||||||
|
if building.has("workers"):
|
||||||
|
var close_bonus = 1.0
|
||||||
|
|
||||||
|
if building.workers == 0 and not error_pings.has(coords):
|
||||||
|
var new_ping = ERROR_PING.instantiate()
|
||||||
|
new_ping.type = "workers"
|
||||||
|
new_ping.position = map_to_local(coords) + Vector2(2, -10)
|
||||||
|
add_sibling(new_ping)
|
||||||
|
error_pings[coords] = new_ping
|
||||||
|
elif building.workers != 0 and error_pings.has(coords) and error_pings[coords].type == "workers":
|
||||||
|
error_pings[coords].queue_free()
|
||||||
|
error_pings.erase(coords)
|
||||||
|
|
||||||
|
if building.key == "woodcutter":
|
||||||
|
if tree_spots.size() == 0:
|
||||||
|
close_bonus = 0
|
||||||
|
else:
|
||||||
|
var min_distance = INF
|
||||||
|
for tree in tree_spots:
|
||||||
|
var distance = tree.distance_to(coords)
|
||||||
|
|
||||||
|
if distance < min_distance:
|
||||||
|
min_distance = distance
|
||||||
|
|
||||||
|
if min_distance > 5:
|
||||||
|
close_bonus = 0
|
||||||
|
else:
|
||||||
|
close_bonus = 1 - (min_distance / 5)
|
||||||
|
elif building.key == "stoneminer":
|
||||||
|
if rock_spots.size() == 0:
|
||||||
|
close_bonus = 0
|
||||||
|
else:
|
||||||
|
var min_distance = INF
|
||||||
|
for tree in rock_spots:
|
||||||
|
var distance = tree.distance_to(coords)
|
||||||
|
|
||||||
|
if distance < min_distance:
|
||||||
|
min_distance = distance
|
||||||
|
|
||||||
|
if min_distance > 5:
|
||||||
|
close_bonus = 0
|
||||||
|
else:
|
||||||
|
close_bonus = 1 - (min_distance / 5)
|
||||||
|
elif building.key == "waterpump":
|
||||||
|
var water_level = Persister.get_value("flood_level", PersisterEnums.Scope.UNKNOWN, 0)
|
||||||
|
|
||||||
|
var amount = level - water_level
|
||||||
|
|
||||||
|
if amount > 3:
|
||||||
|
close_bonus = 0
|
||||||
|
else:
|
||||||
|
close_bonus = (3 - amount)
|
||||||
|
|
||||||
|
building.efficiency = (100 + Persister.get_value("conduit_bonus", PersisterEnums.Scope.UNKNOWN, 0)) * building.workers * 0.5 * close_bonus
|
||||||
|
|
||||||
|
if building.efficiency == 0 and not building.workers == 0 and not error_pings.has(coords):
|
||||||
|
var new_ping = ERROR_PING.instantiate()
|
||||||
|
new_ping.type = "resources"
|
||||||
|
new_ping.position = map_to_local(coords) + Vector2(2, -10)
|
||||||
|
add_sibling(new_ping)
|
||||||
|
error_pings[coords] = new_ping
|
||||||
|
elif (building.efficiency != 0 or building.workers == 0) and error_pings.has(coords) and error_pings[coords].type == "resources":
|
||||||
|
error_pings[coords].queue_free()
|
||||||
|
error_pings.erase(coords)
|
||||||
|
|
||||||
|
last_tile = tile
|
||||||
|
|
||||||
|
if not building_mode:
|
||||||
|
return
|
||||||
|
|
||||||
|
if building_spots.has(tile) and not rock_spots.has(tile) and not tree_spots.has(tile) and not th_spots.has(tile) and not building_data.has(tile) and not ruins_spots.has(tile):
|
||||||
|
var build_data = building_to_tile_map[Persister.get_value("building_key")]
|
||||||
|
set_cell(tile, build_data["source"], Vector2i(build_data["atlas"],rand), 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
Triggerer.listen("flood_level", _on_flood_level)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_flood_level(data):
|
||||||
|
var value = int(data.value)
|
||||||
|
|
||||||
|
if value >= level:
|
||||||
|
for coords in building_data:
|
||||||
|
var building = building_data[coords]
|
||||||
|
var build_data = Data.data.buildings[building.key]
|
||||||
|
var bttm = building_to_tile_map[building.key]
|
||||||
|
|
||||||
|
var atlas = bttm.atlas
|
||||||
|
var source
|
||||||
|
|
||||||
|
match build_data.type:
|
||||||
|
"utility":
|
||||||
|
source = 11
|
||||||
|
"housing":
|
||||||
|
source = 12
|
||||||
|
"production":
|
||||||
|
source = 10
|
||||||
|
|
||||||
|
if building.has("workers"):
|
||||||
|
Persister.change_value("avail_population", building.workers)
|
||||||
|
elif build_data.type == "housing":
|
||||||
|
Persister.change_value("max_population", -build_data.amount)
|
||||||
|
|
||||||
|
ruins_spots.push_back(coords)
|
||||||
|
set_cell(coords, source, Vector2i(atlas,building.rand), 0)
|
||||||
|
building_data.clear()
|
||||||
|
|
||||||
|
for error_ping in error_pings:
|
||||||
|
error_pings[error_ping].queue_free()
|
||||||
|
error_pings.clear()
|
||||||
|
|
||||||
|
|
||||||
|
func kill_citizen():
|
||||||
|
for coords in building_data:
|
||||||
|
var building = building_data[coords]
|
||||||
|
|
||||||
|
if building.has("workers") and building.workers > 0:
|
||||||
|
building.workers -= 1
|
||||||
|
return true
|
||||||
|
|
||||||
|
return false
|
||||||
|
|
||||||
|
|
||||||
|
func pick_block():
|
||||||
|
if Persister.get_value("win") or Persister.get_value("lose"):
|
||||||
|
return
|
||||||
|
|
||||||
|
var tile = local_to_map(get_global_mouse_position())
|
||||||
|
|
||||||
|
if building_data.has(tile):
|
||||||
|
var data = Data.data.buildings[building_data[tile].key]
|
||||||
|
if (not data.cost.has("wood") or int(data.cost.wood) <= Persister.get_value("wood")) and (not data.cost.has("stone") or int(data.cost.stone) <= Persister.get_value("stone")):
|
||||||
|
Persister.persist_data("building_mode", true)
|
||||||
|
Persister.persist_data("building_key", building_data[tile].key)
|
||||||
|
|
||||||
|
|
||||||
|
func destroy(tile: Vector2i):
|
||||||
|
if building_data.has(tile):
|
||||||
|
var building = building_data[tile]
|
||||||
|
var build_data = Data.data.buildings[building.key]
|
||||||
|
if building.has("workers"):
|
||||||
|
Persister.change_value("avail_population", building.workers)
|
||||||
|
elif build_data.type == "housing":
|
||||||
|
Persister.change_value("max_population", -build_data.amount)
|
||||||
|
building_data.erase(tile)
|
||||||
|
ruins_spots = ruins_spots.filter(func(coords): return coords != tile)
|
||||||
|
if error_pings.has(tile):
|
||||||
|
error_pings[tile].queue_free()
|
||||||
|
error_pings.erase(tile)
|
||||||
|
|
||||||
|
|
||||||
|
func place_building():
|
||||||
|
if Persister.get_value("win") or Persister.get_value("lose"):
|
||||||
|
return
|
||||||
|
|
||||||
|
var tile = local_to_map(get_global_mouse_position())
|
||||||
|
if building_spots.has(tile) and not building_data.has(tile) and not tree_spots.has(tile) and not rock_spots.has(tile) and not th_spots.has(tile):
|
||||||
|
Persister.persist_data("building_mode", false)
|
||||||
|
building_data[tile] = {
|
||||||
|
"key": Persister.get_value("building_key"),
|
||||||
|
"rand": rand,
|
||||||
|
"level": level,
|
||||||
|
"coords": tile
|
||||||
|
}
|
||||||
|
|
||||||
|
var build_data = Data.data.buildings[Persister.get_value("building_key")]
|
||||||
|
var cost = build_data.cost
|
||||||
|
|
||||||
|
if cost.has("wood"):
|
||||||
|
Persister.change_value("wood", -int(cost.wood))
|
||||||
|
if cost.has("stone"):
|
||||||
|
Persister.change_value("stone", -int(cost.stone))
|
||||||
|
|
||||||
|
if build_data.type == "housing":
|
||||||
|
Persister.change_value("max_population", int(build_data.amount))
|
||||||
|
building_data[tile].max_population = int(build_data.amount)
|
||||||
|
elif build_data.name != "Conduit":
|
||||||
|
building_data[tile].workers = 0
|
||||||
|
building_data[tile].max_workers = 6
|
||||||
|
building_data[tile].efficiency = 100 + Persister.get_value("conduit_bonus", PersisterEnums.Scope.UNKNOWN, 0)
|
||||||
|
building_data[tile].progress = 0
|
||||||
|
else:
|
||||||
|
Persister.change_value("conduit_bonus", 20)
|
||||||
|
|
||||||
|
Persister.persist_data("drag_mode", false)
|
||||||
|
|
||||||
|
|
||||||
|
func show_info_building():
|
||||||
|
var tile = local_to_map(get_global_mouse_position())
|
||||||
|
if building_data.has(tile):
|
||||||
|
Triggerer.trigger("show_info", building_data[tile])
|
||||||
|
elif ruins_spots.has(tile):
|
||||||
|
Triggerer.trigger("show_info", {
|
||||||
|
"key": "ruins",
|
||||||
|
"coords": tile,
|
||||||
|
"level": level
|
||||||
|
})
|
18
CloudParticles.tscn
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://dfflehr042w4"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://d4abji2r2gx7i" path="res://cloud.png" id="1_r8347"]
|
||||||
|
|
||||||
|
[node name="CPUParticles2D" type="CPUParticles2D"]
|
||||||
|
modulate = Color(1, 1, 1, 0.0588235)
|
||||||
|
position = Vector2(-120.54, 140)
|
||||||
|
amount = 16
|
||||||
|
lifetime = 15.0
|
||||||
|
preprocess = 15.0
|
||||||
|
texture = ExtResource("1_r8347")
|
||||||
|
emission_shape = 3
|
||||||
|
emission_rect_extents = Vector2(1, 180)
|
||||||
|
spread = 5.0
|
||||||
|
gravity = Vector2(0, 0)
|
||||||
|
initial_velocity_min = 50.0
|
||||||
|
initial_velocity_max = 100.0
|
||||||
|
scale_amount_min = 0.4
|
13
ErrorPing.tscn
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://ctpkwdh7lprae"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://error_ping.gd" id="1_5564w"]
|
||||||
|
|
||||||
|
[node name="ErrorPing" type="ColorRect"]
|
||||||
|
z_index = 1
|
||||||
|
offset_left = -2.0
|
||||||
|
offset_top = -2.0
|
||||||
|
offset_right = 2.0
|
||||||
|
offset_bottom = 2.0
|
||||||
|
pivot_offset = Vector2(2, 2)
|
||||||
|
color = Color(1, 0.121569, 0.113725, 1)
|
||||||
|
script = ExtResource("1_5564w")
|
14
FloodIcon.tscn
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://s88w3sskto6k"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://d035h7upxrw3h" path="res://theme.tres" id="1_elk14"]
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel"]
|
||||||
|
modulate = Color(0.52549, 0.517647, 0.482353, 1)
|
||||||
|
clip_contents = false
|
||||||
|
offset_left = 9.0
|
||||||
|
offset_top = 5.0
|
||||||
|
offset_right = 26.0
|
||||||
|
offset_bottom = 16.0
|
||||||
|
theme = ExtResource("1_elk14")
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
text = "A"
|
360
InfoWindow.tscn
Normal file
|
@ -0,0 +1,360 @@
|
||||||
|
[gd_scene load_steps=8 format=3 uid="uid://byyyhq3x8t2d8"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://d035h7upxrw3h" path="res://theme.tres" id="1_emusj"]
|
||||||
|
[ext_resource type="Script" path="res://info_window.gd" id="1_oy31s"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cd205j7rs5ph7" path="res://ui/buildingmeny.png" id="3_wsa04"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://gaiht2weca4g" path="res://parts/buildings/images/woodcutter.png" id="4_sb142"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dykc1mgg5uopw" path="res://components/Cursor/MouseHandler.tscn" id="5_38jqb"]
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_fnpfc"]
|
||||||
|
size = Vector2(15, 16)
|
||||||
|
|
||||||
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_2wrr4"]
|
||||||
|
size = Vector2(41, 16)
|
||||||
|
|
||||||
|
[node name="InfoWindow" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 6
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -226.0
|
||||||
|
offset_top = -133.0
|
||||||
|
offset_right = -13.0
|
||||||
|
offset_bottom = 133.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 2
|
||||||
|
pivot_offset = Vector2(109, 129)
|
||||||
|
theme = ExtResource("1_emusj")
|
||||||
|
script = ExtResource("1_oy31s")
|
||||||
|
|
||||||
|
[node name="ColorRect" type="TextureRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
texture = ExtResource("3_wsa04")
|
||||||
|
|
||||||
|
[node name="ColorRect2" type="ColorRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = 2.0
|
||||||
|
offset_right = -2.0
|
||||||
|
offset_bottom = -2.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 0.231373)
|
||||||
|
|
||||||
|
[node name="Icon" type="TextureRect" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -16.0
|
||||||
|
offset_top = 14.0
|
||||||
|
offset_right = 16.0
|
||||||
|
offset_bottom = 46.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
texture = ExtResource("4_sb142")
|
||||||
|
|
||||||
|
[node name="Title" type="RichTextLabel" parent="."]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -119.5
|
||||||
|
offset_top = 53.0
|
||||||
|
offset_right = 120.5
|
||||||
|
offset_bottom = 83.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/outline_size = 6
|
||||||
|
theme_override_font_sizes/normal_font_size = 16
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]Test Title"
|
||||||
|
|
||||||
|
[node name="Subtitle" type="RichTextLabel" parent="."]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -83.5
|
||||||
|
offset_top = 75.0
|
||||||
|
offset_right = 83.5
|
||||||
|
offset_bottom = 105.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]Test Title"
|
||||||
|
|
||||||
|
[node name="Description" type="RichTextLabel" parent="."]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -83.5
|
||||||
|
offset_top = 105.0
|
||||||
|
offset_right = 83.5
|
||||||
|
offset_bottom = 177.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
|
||||||
|
[node name="ColorRect5" type="ColorRect" parent="."]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.647059)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 4
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = 192.0
|
||||||
|
offset_top = -128.0
|
||||||
|
offset_right = 208.0
|
||||||
|
offset_bottom = -112.0
|
||||||
|
grow_vertical = 2
|
||||||
|
pivot_offset = Vector2(8, 9)
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ColorRect5"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = 5.0
|
||||||
|
offset_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]X"
|
||||||
|
|
||||||
|
[node name="MouseHandler3" parent="ColorRect5" instance=ExtResource("5_38jqb")]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="ColorRect5/MouseHandler3"]
|
||||||
|
position = Vector2(8, 8)
|
||||||
|
shape = SubResource("RectangleShape2D_fnpfc")
|
||||||
|
|
||||||
|
[node name="ResourceAllocation" type="Control" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = 3.0
|
||||||
|
offset_top = 16.0
|
||||||
|
offset_right = 69.0
|
||||||
|
offset_bottom = 56.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("1_emusj")
|
||||||
|
|
||||||
|
[node name="RichTextLabel2" type="RichTextLabel" parent="ResourceAllocation"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -36.0
|
||||||
|
offset_top = -3.0
|
||||||
|
offset_right = 36.0
|
||||||
|
offset_bottom = 21.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]X/X"
|
||||||
|
|
||||||
|
[node name="ColorRect2" type="ColorRect" parent="ResourceAllocation"]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.647059)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 4
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_top = -8.0
|
||||||
|
offset_right = 16.0
|
||||||
|
offset_bottom = 8.0
|
||||||
|
grow_vertical = 2
|
||||||
|
pivot_offset = Vector2(7.5, 8)
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ResourceAllocation/ColorRect2"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = 6.0
|
||||||
|
offset_bottom = 2.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]-"
|
||||||
|
|
||||||
|
[node name="MouseHandler" parent="ResourceAllocation/ColorRect2" instance=ExtResource("5_38jqb")]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="ResourceAllocation/ColorRect2/MouseHandler"]
|
||||||
|
position = Vector2(8, 8)
|
||||||
|
shape = SubResource("RectangleShape2D_fnpfc")
|
||||||
|
|
||||||
|
[node name="ColorRect3" type="ColorRect" parent="ResourceAllocation"]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.647059)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 6
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -16.0
|
||||||
|
offset_top = -8.0
|
||||||
|
offset_bottom = 8.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 2
|
||||||
|
pivot_offset = Vector2(8.5, 8)
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ResourceAllocation/ColorRect3"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = 6.0
|
||||||
|
offset_bottom = 2.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]+"
|
||||||
|
|
||||||
|
[node name="MouseHandler2" parent="ResourceAllocation/ColorRect3" instance=ExtResource("5_38jqb")]
|
||||||
|
position = Vector2(-50, 0)
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="ResourceAllocation/ColorRect3/MouseHandler2"]
|
||||||
|
position = Vector2(58, 8)
|
||||||
|
shape = SubResource("RectangleShape2D_fnpfc")
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ResourceAllocation"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -86.0
|
||||||
|
offset_top = -4.0
|
||||||
|
offset_right = -14.0
|
||||||
|
offset_bottom = 20.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "Workers"
|
||||||
|
|
||||||
|
[node name="Description2" type="RichTextLabel" parent="ResourceAllocation"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -119.5
|
||||||
|
offset_top = 46.0
|
||||||
|
offset_right = 47.5
|
||||||
|
offset_bottom = 118.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]STATUS: STOPPED"
|
||||||
|
|
||||||
|
[node name="Description3" type="RichTextLabel" parent="ResourceAllocation"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -119.5
|
||||||
|
offset_top = 61.0
|
||||||
|
offset_right = 47.5
|
||||||
|
offset_bottom = 133.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]EFFICIENCY: 0%"
|
||||||
|
|
||||||
|
[node name="ColorRect4" type="ColorRect" parent="ResourceAllocation"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 5
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
offset_left = -105.5
|
||||||
|
offset_top = 78.0
|
||||||
|
offset_right = 33.5
|
||||||
|
offset_bottom = 80.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
|
||||||
|
[node name="ColorRect6" type="ColorRect" parent="."]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.647059)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 7
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 1.0
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -20.5
|
||||||
|
offset_top = -28.0
|
||||||
|
offset_right = 20.5
|
||||||
|
offset_bottom = -12.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 0
|
||||||
|
pivot_offset = Vector2(8, 9)
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ColorRect6"]
|
||||||
|
clip_contents = false
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = -11.0
|
||||||
|
offset_top = 5.0
|
||||||
|
offset_right = 14.0
|
||||||
|
offset_bottom = 1.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]Destroy"
|
||||||
|
|
||||||
|
[node name="DestroyHandler" parent="ColorRect6" instance=ExtResource("5_38jqb")]
|
||||||
|
|
||||||
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="ColorRect6/DestroyHandler"]
|
||||||
|
position = Vector2(20.5, 8)
|
||||||
|
shape = SubResource("RectangleShape2D_2wrr4")
|
||||||
|
|
||||||
|
[connection signal="clicked" from="ColorRect5/MouseHandler3" to="." method="_on_mouse_handler_3_clicked"]
|
||||||
|
[connection signal="hovered" from="ColorRect5/MouseHandler3" to="." method="_on_mouse_handler_3_hovered"]
|
||||||
|
[connection signal="unhovered" from="ColorRect5/MouseHandler3" to="." method="_on_mouse_handler_3_unhovered"]
|
||||||
|
[connection signal="clicked" from="ResourceAllocation/ColorRect2/MouseHandler" to="." method="_on_mouse_handler_clicked"]
|
||||||
|
[connection signal="hovered" from="ResourceAllocation/ColorRect2/MouseHandler" to="." method="_on_mouse_handler_hovered"]
|
||||||
|
[connection signal="unhovered" from="ResourceAllocation/ColorRect2/MouseHandler" to="." method="_on_mouse_handler_unhovered"]
|
||||||
|
[connection signal="clicked" from="ResourceAllocation/ColorRect3/MouseHandler2" to="." method="_on_mouse_handler_2_clicked"]
|
||||||
|
[connection signal="hovered" from="ResourceAllocation/ColorRect3/MouseHandler2" to="." method="_on_mouse_handler_2_hovered"]
|
||||||
|
[connection signal="unhovered" from="ResourceAllocation/ColorRect3/MouseHandler2" to="." method="_on_mouse_handler_2_unhovered"]
|
||||||
|
[connection signal="clicked" from="ColorRect6/DestroyHandler" to="." method="_on_destroy_handler_clicked"]
|
||||||
|
[connection signal="hovered" from="ColorRect6/DestroyHandler" to="." method="_on_destroy_handler_hovered"]
|
||||||
|
[connection signal="unhovered" from="ColorRect6/DestroyHandler" to="." method="_on_destroy_handler_unhovered"]
|
5
Level.gd
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
position = (Vector2(320, 180) - get_global_mouse_position()) / 40
|
BIN
MxPlus_IBM_VGA_9x8.ttf
Normal file
34
MxPlus_IBM_VGA_9x8.ttf.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://ci8skg28ntp1b"
|
||||||
|
path="res://.godot/imported/MxPlus_IBM_VGA_9x8.ttf-574b37241f4f9381c81f9d827f41a7f2.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://MxPlus_IBM_VGA_9x8.ttf"
|
||||||
|
dest_files=["res://.godot/imported/MxPlus_IBM_VGA_9x8.ttf-574b37241f4f9381c81f9d827f41a7f2.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=1
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=1
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
18
NameIcon.tscn
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://vlp1qstcv4no"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://d035h7upxrw3h" path="res://theme.tres" id="1_yw1uq"]
|
||||||
|
[ext_resource type="Script" path="res://name_icon.gd" id="2_tyt57"]
|
||||||
|
|
||||||
|
[node name="NameIcon" type="RichTextLabel"]
|
||||||
|
z_index = 10
|
||||||
|
clip_contents = false
|
||||||
|
offset_left = 280.0
|
||||||
|
offset_top = 104.0
|
||||||
|
offset_right = 332.0
|
||||||
|
offset_bottom = 121.0
|
||||||
|
pivot_offset = Vector2(25, 4)
|
||||||
|
theme = ExtResource("1_yw1uq")
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]Rock"
|
||||||
|
script = ExtResource("2_tyt57")
|
6
Night.tscn
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
[gd_scene format=3 uid="uid://v4qfjewow3cb"]
|
||||||
|
|
||||||
|
[node name="Night" type="ColorRect"]
|
||||||
|
offset_right = 640.0
|
||||||
|
offset_bottom = 360.0
|
||||||
|
color = Color(0.121569, 0, 0.25098, 0.690196)
|
BIN
Qubi.ttf
Normal file
34
Qubi.ttf.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="font_data_dynamic"
|
||||||
|
type="FontFile"
|
||||||
|
uid="uid://cq86fc0y2nf47"
|
||||||
|
path="res://.godot/imported/Qubi.ttf-ea5af37698a332827bba1729dadf0f79.fontdata"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://Qubi.ttf"
|
||||||
|
dest_files=["res://.godot/imported/Qubi.ttf-ea5af37698a332827bba1729dadf0f79.fontdata"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
Rendering=null
|
||||||
|
antialiasing=1
|
||||||
|
generate_mipmaps=false
|
||||||
|
disable_embedded_bitmaps=true
|
||||||
|
multichannel_signed_distance_field=false
|
||||||
|
msdf_pixel_range=8
|
||||||
|
msdf_size=48
|
||||||
|
allow_system_fallback=true
|
||||||
|
force_autohinter=false
|
||||||
|
hinting=1
|
||||||
|
subpixel_positioning=1
|
||||||
|
oversampling=0.0
|
||||||
|
Fallbacks=null
|
||||||
|
fallbacks=[]
|
||||||
|
Compress=null
|
||||||
|
compress=true
|
||||||
|
preload=[]
|
||||||
|
language_support={}
|
||||||
|
script_support={}
|
||||||
|
opentype_features={}
|
105
ResourceAllocation.tscn
Normal file
|
@ -0,0 +1,105 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://bsj3th0rsn7a8"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://d035h7upxrw3h" path="res://theme.tres" id="1_5kjyf"]
|
||||||
|
[ext_resource type="Script" path="res://resource_allocation.gd" id="2_d6ufs"]
|
||||||
|
|
||||||
|
[node name="ResourceAllocation" type="Control"]
|
||||||
|
layout_mode = 3
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -33.0
|
||||||
|
offset_top = 30.0
|
||||||
|
offset_right = 33.0
|
||||||
|
offset_bottom = 70.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
theme = ExtResource("1_5kjyf")
|
||||||
|
script = ExtResource("2_d6ufs")
|
||||||
|
|
||||||
|
[node name="RichTextLabel2" type="RichTextLabel" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -36.0
|
||||||
|
offset_top = -3.0
|
||||||
|
offset_right = 36.0
|
||||||
|
offset_bottom = 21.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]X/X"
|
||||||
|
|
||||||
|
[node name="ColorRect2" type="ColorRect" parent="."]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.647059)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 4
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_top = -8.0
|
||||||
|
offset_right = 16.0
|
||||||
|
offset_bottom = 8.0
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ColorRect2"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = 6.0
|
||||||
|
offset_bottom = 2.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]-"
|
||||||
|
|
||||||
|
[node name="ColorRect3" type="ColorRect" parent="."]
|
||||||
|
self_modulate = Color(1, 1, 1, 0.647059)
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 6
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -16.0
|
||||||
|
offset_top = -8.0
|
||||||
|
offset_bottom = 8.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
grow_vertical = 2
|
||||||
|
color = Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="ColorRect3"]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 15
|
||||||
|
anchor_right = 1.0
|
||||||
|
anchor_bottom = 1.0
|
||||||
|
offset_left = 2.0
|
||||||
|
offset_top = 6.0
|
||||||
|
offset_bottom = 2.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]+"
|
||||||
|
|
||||||
|
[node name="RichTextLabel" type="RichTextLabel" parent="."]
|
||||||
|
layout_mode = 1
|
||||||
|
anchors_preset = 8
|
||||||
|
anchor_left = 0.5
|
||||||
|
anchor_top = 0.5
|
||||||
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -86.0
|
||||||
|
offset_top = -4.0
|
||||||
|
offset_right = -14.0
|
||||||
|
offset_bottom = 20.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "Workers"
|
18
ResourceGain.tscn
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
[gd_scene load_steps=3 format=3 uid="uid://d0sou8ksu22pm"]
|
||||||
|
|
||||||
|
[ext_resource type="Theme" uid="uid://d035h7upxrw3h" path="res://theme.tres" id="1_aw2u1"]
|
||||||
|
[ext_resource type="Script" path="res://resource_gain.gd" id="2_enpvk"]
|
||||||
|
|
||||||
|
[node name="NameIcon" type="RichTextLabel"]
|
||||||
|
z_index = 10
|
||||||
|
clip_contents = false
|
||||||
|
offset_left = 243.0
|
||||||
|
offset_top = 104.0
|
||||||
|
offset_right = 369.0
|
||||||
|
offset_bottom = 121.0
|
||||||
|
pivot_offset = Vector2(62, 4)
|
||||||
|
theme = ExtResource("1_aw2u1")
|
||||||
|
theme_override_constants/outline_size = 3
|
||||||
|
bbcode_enabled = true
|
||||||
|
text = "[center]Rock"
|
||||||
|
script = ExtResource("2_enpvk")
|
247
TIleSet.tres
Normal file
|
@ -0,0 +1,247 @@
|
||||||
|
[gd_resource type="TileSet" load_steps=29 format=3 uid="uid://dhy53lakrlutm"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bvn5lewpp7pmd" path="res://iso_tile.png" id="1_sa4j6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bsrh0u02bckhy" path="res://iso_building.png" id="2_bubm3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://dbbhhs5aiuejw" path="res://tiles_ruined_collectors.png" id="3_7x1fh"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bdmao1k7ngu2m" path="res://basic_tiles.png" id="3_rchy6"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://fa4m6cupo65w" path="res://tiles_ruined_foodwater.png" id="4_axgg8"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://w1abxk1m0fae" path="res://tiles-v3.png" id="4_p6xw0"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cps3axbh7qgc0" path="res://tiles_ruined_houses.png" id="5_16ny2"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cjfpd778ggjer" path="res://select.png" id="5_s3lj1"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cvn1fg4v6kur3" path="res://tilerocks.png" id="6_f8tld"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://8sb6dyux6i44" path="res://townhall.png" id="6_q784e"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://c43udkovhiiv8" path="res://tiletrees.png" id="7_grd50"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://bmxo8xwxghc1k" path="res://tiles_foodwater.png" id="8_tscyy"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cgpbrsl2nlhlr" path="res://tiles_houses.png" id="9_dx80t"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://cc7724klwih07" path="res://tile_collectors.png" id="10_ftm4e"]
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_dxrqb"]
|
||||||
|
texture = ExtResource("1_sa4j6")
|
||||||
|
margins = Vector2i(16, 16)
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_j7eew"]
|
||||||
|
texture = ExtResource("2_bubm3")
|
||||||
|
1:1/0 = 0
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_83p42"]
|
||||||
|
texture = ExtResource("3_7x1fh")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_mrgl4"]
|
||||||
|
texture = ExtResource("4_axgg8")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
3:1/0 = 0
|
||||||
|
3:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
3:0/0 = 0
|
||||||
|
3:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_w6ttr"]
|
||||||
|
texture = ExtResource("5_16ny2")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_jhyw0"]
|
||||||
|
texture = ExtResource("6_q784e")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_w6tof"]
|
||||||
|
texture = ExtResource("3_rchy6")
|
||||||
|
1:3/0 = 0
|
||||||
|
3:3/0 = 0
|
||||||
|
1:6/0 = 0
|
||||||
|
3:6/0 = 0
|
||||||
|
1:7/0 = 0
|
||||||
|
3:7/0 = 0
|
||||||
|
1:1/0 = 0
|
||||||
|
3:1/0 = 0
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_5o051"]
|
||||||
|
texture = ExtResource("4_p6xw0")
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0/y_sort_origin = 3
|
||||||
|
1:3/0 = 0
|
||||||
|
1:3/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:3/0/y_sort_origin = 3
|
||||||
|
3:3/0 = 0
|
||||||
|
3:3/0/texture_origin = Vector2i(0, 4)
|
||||||
|
3:3/0/y_sort_origin = 3
|
||||||
|
3:1/0 = 0
|
||||||
|
3:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
3:1/0/y_sort_origin = 3
|
||||||
|
5:1/0 = 0
|
||||||
|
5:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
5:1/0/y_sort_origin = 3
|
||||||
|
5:3/0 = 0
|
||||||
|
5:3/0/texture_origin = Vector2i(0, 4)
|
||||||
|
5:3/0/y_sort_origin = 3
|
||||||
|
11:3/0 = 0
|
||||||
|
11:3/0/texture_origin = Vector2i(0, 4)
|
||||||
|
11:3/0/y_sort_origin = 3
|
||||||
|
11:1/0 = 0
|
||||||
|
11:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
11:1/0/y_sort_origin = 3
|
||||||
|
9:1/0 = 0
|
||||||
|
9:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
9:1/0/y_sort_origin = 3
|
||||||
|
7:1/0 = 0
|
||||||
|
7:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
7:1/0/y_sort_origin = 3
|
||||||
|
7:3/0 = 0
|
||||||
|
7:3/0/texture_origin = Vector2i(0, 4)
|
||||||
|
7:3/0/y_sort_origin = 3
|
||||||
|
9:3/0 = 0
|
||||||
|
9:3/0/texture_origin = Vector2i(0, 4)
|
||||||
|
9:3/0/y_sort_origin = 3
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_sneuq"]
|
||||||
|
texture = ExtResource("5_s3lj1")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_l16yl"]
|
||||||
|
texture = ExtResource("6_f8tld")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
3:1/0 = 0
|
||||||
|
3:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
4:1/0 = 0
|
||||||
|
4:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
3:0/0 = 0
|
||||||
|
3:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
4:0/0 = 0
|
||||||
|
4:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_ffqbc"]
|
||||||
|
texture = ExtResource("7_grd50")
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 3)
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 3)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_w46yf"]
|
||||||
|
texture = ExtResource("8_tscyy")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
3:1/0 = 0
|
||||||
|
3:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
3:0/0 = 0
|
||||||
|
3:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_7cbry"]
|
||||||
|
texture = ExtResource("9_dx80t")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[sub_resource type="TileSetAtlasSource" id="TileSetAtlasSource_0vrje"]
|
||||||
|
texture = ExtResource("10_ftm4e")
|
||||||
|
0:0/0 = 0
|
||||||
|
0:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
0:1/0 = 0
|
||||||
|
0:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:1/0 = 0
|
||||||
|
1:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:1/0 = 0
|
||||||
|
2:1/0/texture_origin = Vector2i(0, 4)
|
||||||
|
2:0/0 = 0
|
||||||
|
2:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
1:0/0 = 0
|
||||||
|
1:0/0/texture_origin = Vector2i(0, 4)
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
tile_shape = 1
|
||||||
|
tile_layout = 5
|
||||||
|
tile_size = Vector2i(16, 8)
|
||||||
|
sources/0 = SubResource("TileSetAtlasSource_dxrqb")
|
||||||
|
sources/1 = SubResource("TileSetAtlasSource_j7eew")
|
||||||
|
sources/2 = SubResource("TileSetAtlasSource_w6tof")
|
||||||
|
sources/3 = SubResource("TileSetAtlasSource_5o051")
|
||||||
|
sources/4 = SubResource("TileSetAtlasSource_sneuq")
|
||||||
|
sources/5 = SubResource("TileSetAtlasSource_l16yl")
|
||||||
|
sources/6 = SubResource("TileSetAtlasSource_ffqbc")
|
||||||
|
sources/7 = SubResource("TileSetAtlasSource_w46yf")
|
||||||
|
sources/8 = SubResource("TileSetAtlasSource_7cbry")
|
||||||
|
sources/9 = SubResource("TileSetAtlasSource_0vrje")
|
||||||
|
sources/10 = SubResource("TileSetAtlasSource_83p42")
|
||||||
|
sources/11 = SubResource("TileSetAtlasSource_mrgl4")
|
||||||
|
sources/12 = SubResource("TileSetAtlasSource_w6ttr")
|
||||||
|
sources/13 = SubResource("TileSetAtlasSource_jhyw0")
|
7
addons/laia_highlighter/plugin.cfg
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
[plugin]
|
||||||
|
|
||||||
|
name="Laia Highlighter"
|
||||||
|
description="A highlighter to highting laia scripting files"
|
||||||
|
author="Ategon"
|
||||||
|
version="v1.0.0"
|
||||||
|
script="plugin.gd"
|
81
addons/laia_highlighter/plugin.gd
Normal file
|
@ -0,0 +1,81 @@
|
||||||
|
@tool
|
||||||
|
extends EditorPlugin
|
||||||
|
|
||||||
|
|
||||||
|
var dialogue_highlighter:DialogueHighlighter
|
||||||
|
|
||||||
|
|
||||||
|
func _enter_tree() -> void:
|
||||||
|
dialogue_highlighter = DialogueHighlighter.new()
|
||||||
|
var script_editor = EditorInterface.get_script_editor()
|
||||||
|
print(script_editor)
|
||||||
|
print(dialogue_highlighter)
|
||||||
|
script_editor.register_syntax_highlighter(dialogue_highlighter)
|
||||||
|
print(script_editor.get_current_script())
|
||||||
|
print(script_editor.get_open_scripts())
|
||||||
|
script_editor.goto_line(20)
|
||||||
|
|
||||||
|
|
||||||
|
func _exit_tree() -> void:
|
||||||
|
if is_instance_valid(dialogue_highlighter):
|
||||||
|
var script_editor = EditorInterface.get_script_editor()
|
||||||
|
script_editor.unregister_syntax_highlighter(dialogue_highlighter)
|
||||||
|
dialogue_highlighter = null
|
||||||
|
|
||||||
|
|
||||||
|
class DialogueHighlighter extends EditorSyntaxHighlighter:
|
||||||
|
func _get_name() -> String:
|
||||||
|
return "Laia"
|
||||||
|
|
||||||
|
func _get_supported_languages() -> PackedStringArray:
|
||||||
|
return ["TextFile"]
|
||||||
|
|
||||||
|
func _get_line_syntax_highlighting(line: int) -> Dictionary:
|
||||||
|
var color_map = {}
|
||||||
|
var text_editor = get_text_edit()
|
||||||
|
var str = text_editor.get_line(line)
|
||||||
|
|
||||||
|
# Comment
|
||||||
|
if str.strip_edges().begins_with("#"):
|
||||||
|
color_map[0] = { "color": Color.WEB_GRAY }
|
||||||
|
return color_map
|
||||||
|
|
||||||
|
# Key
|
||||||
|
var regex3 = RegEx.new()
|
||||||
|
regex3.compile("([a-zA-Z0-9_]+:).*")
|
||||||
|
var result3 = regex3.search(str)
|
||||||
|
|
||||||
|
if result3:
|
||||||
|
color_map[result3.get_start(1)] = { "color": Color.SEA_GREEN }
|
||||||
|
color_map[result3.get_end(1)] = { "color": Color.WHITE }
|
||||||
|
|
||||||
|
# Array
|
||||||
|
var regex = RegEx.new()
|
||||||
|
regex.compile("([a-zA-Z0-9_\\-])+\\[\\]")
|
||||||
|
var result = regex.search(str)
|
||||||
|
|
||||||
|
if result:
|
||||||
|
color_map[result.get_start()] = { "color": Color.CYAN }
|
||||||
|
color_map[result.get_end(1)] = { "color": Color.LIGHT_CYAN }
|
||||||
|
|
||||||
|
# Enum
|
||||||
|
var regex4 = RegEx.new()
|
||||||
|
regex4.compile("[a-zA-Z0-9_]+(\\.[a-zA-Z0-9_]+)")
|
||||||
|
var result4 = regex4.search(str)
|
||||||
|
|
||||||
|
if result4:
|
||||||
|
color_map[result4.get_start()] = { "color": Color.ORANGE }
|
||||||
|
color_map[result4.get_start(1)] = { "color": Color.ORANGE_RED }
|
||||||
|
color_map[result4.get_end()] = { "color": Color.WHITE }
|
||||||
|
|
||||||
|
# Color
|
||||||
|
var regex2 = RegEx.new()
|
||||||
|
regex2.compile("#[a-zA-Z0-9]+")
|
||||||
|
var result2 = regex2.search(str)
|
||||||
|
|
||||||
|
if result2:
|
||||||
|
color_map[result2.get_start()] = { "color": Color(result2.get_string()) }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return color_map
|
BIN
background.aseprite
Normal file
BIN
background.png
Normal file
After Width: | Height: | Size: 8.7 KiB |
34
background.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bccyjf2bn3mpj"
|
||||||
|
path="res://.godot/imported/background.png-98289422cd7d93003950872a7b97021f.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://background.png"
|
||||||
|
dest_files=["res://.godot/imported/background.png-98289422cd7d93003950872a7b97021f.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
|
BIN
basic_tiles.png
Normal file
After Width: | Height: | Size: 768 B |
34
basic_tiles.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bdmao1k7ngu2m"
|
||||||
|
path="res://.godot/imported/basic_tiles.png-ab6e820af8e93675a192b178dda8db52.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://basic_tiles.png"
|
||||||
|
dest_files=["res://.godot/imported/basic_tiles.png-ab6e820af8e93675a192b178dda8db52.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
|
8
buildings/Building.tscn
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[gd_scene load_steps=2 format=3 uid="uid://daicnavgi0gpo"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" path="res://buildings/building.gd" id="1_db3yd"]
|
||||||
|
|
||||||
|
[node name="Building" type="Node2D"]
|
||||||
|
script = ExtResource("1_db3yd")
|
||||||
|
|
||||||
|
[node name="Sprite2D" type="Sprite2D" parent="."]
|
12
buildings/building.gd
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@onready var sprite_2d: Sprite2D = $Sprite2D
|
||||||
|
|
||||||
|
var key
|
||||||
|
@onready var data = Data.data.buildings[key]
|
||||||
|
#@onready var image = Data.data.images[key]
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
#sprite_2d.texture = image
|
||||||
|
|
||||||
|
pass
|
BIN
button.aseprite
Normal file
BIN
button.png
Normal file
After Width: | Height: | Size: 135 B |
34
button.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cpawfy44acsxc"
|
||||||
|
path="res://.godot/imported/button.png-234620e182281afdeb4aab4d2ed4f8a7.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://button.png"
|
||||||
|
dest_files=["res://.godot/imported/button.png-234620e182281afdeb4aab4d2ed4f8a7.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
|
46
camera.gd
Normal file
|
@ -0,0 +1,46 @@
|
||||||
|
extends Camera2D
|
||||||
|
|
||||||
|
# Variables to control zoom limits and speed
|
||||||
|
var zoom_min = 0.5
|
||||||
|
var zoom_max = 2.0
|
||||||
|
var zoom_speed = 0.1
|
||||||
|
|
||||||
|
# Variables for panning
|
||||||
|
var is_panning = false
|
||||||
|
var last_mouse_position = Vector2()
|
||||||
|
var pan_speed = 1000
|
||||||
|
|
||||||
|
@onready var camera_target = position
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
position = position.move_toward(camera_target, delta * pan_speed)
|
||||||
|
|
||||||
|
|
||||||
|
func _input(event):
|
||||||
|
if event is InputEventMouseButton:
|
||||||
|
# Zoom in (scroll up)
|
||||||
|
if event.button_index == MOUSE_BUTTON_WHEEL_DOWN:
|
||||||
|
zoom -= Vector2(zoom_speed, zoom_speed)
|
||||||
|
# Zoom out (scroll down)
|
||||||
|
elif event.button_index == MOUSE_BUTTON_WHEEL_UP:
|
||||||
|
zoom += Vector2(zoom_speed, zoom_speed)
|
||||||
|
|
||||||
|
# Clamp the zoom value to stay within zoom_min and zoom_max
|
||||||
|
zoom.x = clamp(zoom.x, zoom_min, zoom_max)
|
||||||
|
zoom.y = clamp(zoom.y, zoom_min, zoom_max)
|
||||||
|
|
||||||
|
# Handle panning with right click
|
||||||
|
if event.button_index == MOUSE_BUTTON_RIGHT:
|
||||||
|
if event.pressed:
|
||||||
|
is_panning = true
|
||||||
|
last_mouse_position = Cursor.mouse_control.position
|
||||||
|
else:
|
||||||
|
is_panning = false
|
||||||
|
|
||||||
|
# Handle panning movement
|
||||||
|
if is_panning and event is InputEventMouseMotion:
|
||||||
|
var mouse_movement = last_mouse_position - Cursor.mouse_control.position
|
||||||
|
camera_target += mouse_movement / zoom.x
|
||||||
|
#global_position += mouse_movement * zoom.x # Adjust movement based on zoom level
|
||||||
|
last_mouse_position = Cursor.mouse_control.position
|
BIN
cloud.aseprite
Normal file
BIN
cloud.png
Normal file
After Width: | Height: | Size: 529 B |
34
cloud.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://d4abji2r2gx7i"
|
||||||
|
path="res://.godot/imported/cloud.png-dee661b88ca2a546a70f524ffe8e0d75.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cloud.png"
|
||||||
|
dest_files=["res://.godot/imported/cloud.png-dee661b88ca2a546a70f524ffe8e0d75.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
|
|
@ -1,7 +1,7 @@
|
||||||
[gd_scene load_steps=4 format=3 uid="uid://qecwga1b4yqn"]
|
[gd_scene load_steps=4 format=3 uid="uid://qecwga1b4yqn"]
|
||||||
|
|
||||||
[ext_resource type="Script" path="res://components/Cursor/cursor.gd" id="1_nmkwm"]
|
[ext_resource type="Script" path="res://components/Cursor/cursor.gd" id="1_nmkwm"]
|
||||||
[ext_resource type="Texture2D" uid="uid://q4wsbkhirtoh" path="res://components/Cursor/cursor.png" id="2_luk0m"]
|
[ext_resource type="Texture2D" uid="uid://dlg0b4gpglj1v" path="res://components/Cursor/cursor_pixel_2.png" id="2_bjcic"]
|
||||||
|
|
||||||
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4cq27"]
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_4cq27"]
|
||||||
|
|
||||||
|
@ -15,8 +15,9 @@ script = ExtResource("1_nmkwm")
|
||||||
shape = SubResource("RectangleShape2D_4cq27")
|
shape = SubResource("RectangleShape2D_4cq27")
|
||||||
|
|
||||||
[node name="Sprite2D" type="Sprite2D" parent="MouseControl"]
|
[node name="Sprite2D" type="Sprite2D" parent="MouseControl"]
|
||||||
scale = Vector2(0.15625, 0.15625)
|
position = Vector2(7, 7)
|
||||||
texture = ExtResource("2_luk0m")
|
texture = ExtResource("2_bjcic")
|
||||||
|
offset = Vector2(3, 3)
|
||||||
|
|
||||||
[connection signal="area_entered" from="MouseControl" to="." method="_on_mouse_control_area_entered"]
|
[connection signal="area_entered" from="MouseControl" to="." method="_on_mouse_control_area_entered"]
|
||||||
[connection signal="area_exited" from="MouseControl" to="." method="_on_mouse_control_area_exited"]
|
[connection signal="area_exited" from="MouseControl" to="." method="_on_mouse_control_area_exited"]
|
||||||
|
|
|
@ -9,16 +9,41 @@ const CURSOR = preload("res://components/Cursor/cursor.png")
|
||||||
var cursor_state = "normal"
|
var cursor_state = "normal"
|
||||||
var rotation_tween
|
var rotation_tween
|
||||||
|
|
||||||
|
var cursor_tween
|
||||||
|
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
Persister.data_persisted.connect(_on_data_persisted)
|
Persister.data_persisted.connect(_on_data_persisted)
|
||||||
Triggerer.listen("fire", _on_fire)
|
|
||||||
|
|
||||||
|
|
||||||
func _on_fire(_data):
|
func _on_fire(_data):
|
||||||
if cursor_state == "ui":
|
if cursor_state == "ui":
|
||||||
return
|
return
|
||||||
|
|
||||||
sprite_2d.scale = Vector2.ONE * 1.25 * 0.156
|
|
||||||
|
|
||||||
|
func _on_release():
|
||||||
|
var overlapping_areas = mouse_control.get_overlapping_areas()
|
||||||
|
overlapping_areas.sort_custom(func(a, b):
|
||||||
|
return a.z_index > b.z_index
|
||||||
|
)
|
||||||
|
|
||||||
|
for area in overlapping_areas:
|
||||||
|
if area.has_method("_on_released"):
|
||||||
|
var current_node = area
|
||||||
|
var hidden = false
|
||||||
|
while current_node:
|
||||||
|
if "modulate" in current_node:
|
||||||
|
if current_node.modulate.a < 1:
|
||||||
|
hidden = true
|
||||||
|
break
|
||||||
|
current_node = current_node.get_parent()
|
||||||
|
|
||||||
|
if hidden:
|
||||||
|
continue
|
||||||
|
|
||||||
|
if not area._on_released():
|
||||||
|
break
|
||||||
|
|
||||||
|
|
||||||
func _on_click():
|
func _on_click():
|
||||||
|
@ -36,6 +61,10 @@ func _on_click():
|
||||||
if current_node.modulate.a < 1:
|
if current_node.modulate.a < 1:
|
||||||
hidden = true
|
hidden = true
|
||||||
break
|
break
|
||||||
|
if "visible" in current_node:
|
||||||
|
if not current_node.visible:
|
||||||
|
hidden = true
|
||||||
|
break
|
||||||
current_node = current_node.get_parent()
|
current_node = current_node.get_parent()
|
||||||
|
|
||||||
if hidden:
|
if hidden:
|
||||||
|
@ -59,6 +88,10 @@ func _on_rclick():
|
||||||
if current_node.modulate.a < 1:
|
if current_node.modulate.a < 1:
|
||||||
hidden = true
|
hidden = true
|
||||||
break
|
break
|
||||||
|
if "visible" in current_node:
|
||||||
|
if not current_node.visible:
|
||||||
|
hidden = true
|
||||||
|
break
|
||||||
current_node = current_node.get_parent()
|
current_node = current_node.get_parent()
|
||||||
|
|
||||||
if hidden:
|
if hidden:
|
||||||
|
@ -69,19 +102,47 @@ func _on_rclick():
|
||||||
|
|
||||||
|
|
||||||
func _process(delta):
|
func _process(delta):
|
||||||
|
if Input.is_action_just_released("lclick"):
|
||||||
|
_on_release()
|
||||||
if Input.is_action_just_pressed("lclick"):
|
if Input.is_action_just_pressed("lclick"):
|
||||||
_on_click()
|
_on_click()
|
||||||
if Input.is_action_just_pressed("rclick"):
|
if Input.is_action_just_pressed("rclick"):
|
||||||
_on_rclick()
|
_on_rclick()
|
||||||
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
Input.set_mouse_mode(Input.MOUSE_MODE_HIDDEN)
|
||||||
mouse_control.position = mouse_control.get_global_mouse_position()
|
mouse_control.position = mouse_control.get_global_mouse_position()
|
||||||
|
|
||||||
|
if not Input.is_action_pressed("lclick"):
|
||||||
|
sprite_2d.rotation = move_toward(sprite_2d.rotation, 0, delta)
|
||||||
|
sprite_2d.scale = sprite_2d.scale.move_toward(Vector2.ONE, delta)
|
||||||
|
else:
|
||||||
|
sprite_2d.scale = sprite_2d.scale.move_toward(Vector2.ONE * 0.9, delta * 2)
|
||||||
|
sprite_2d.rotation = move_toward(sprite_2d.rotation, -0.1, delta * 2)
|
||||||
|
|
||||||
func _on_mouse_control_area_entered(area):
|
func _on_mouse_control_area_entered(area):
|
||||||
if area.has_method("_on_hovered"):
|
if area.has_method("_on_hovered"):
|
||||||
area._on_hovered()
|
var current_node = area
|
||||||
|
var hidden = false
|
||||||
|
while current_node:
|
||||||
|
if "visible" in current_node:
|
||||||
|
if not current_node.visible:
|
||||||
|
hidden = true
|
||||||
|
break
|
||||||
|
current_node = current_node.get_parent()
|
||||||
|
|
||||||
|
if not hidden:
|
||||||
|
area._on_hovered()
|
||||||
|
|
||||||
|
|
||||||
func _on_mouse_control_area_exited(area):
|
func _on_mouse_control_area_exited(area):
|
||||||
if area.has_method("_on_unhovered"):
|
if area.has_method("_on_unhovered"):
|
||||||
area._on_unhovered()
|
var current_node = area
|
||||||
|
var hidden = false
|
||||||
|
while current_node:
|
||||||
|
if "visible" in current_node:
|
||||||
|
if not current_node.visible:
|
||||||
|
hidden = true
|
||||||
|
break
|
||||||
|
current_node = current_node.get_parent()
|
||||||
|
|
||||||
|
if not hidden:
|
||||||
|
area._on_unhovered()
|
||||||
|
|
BIN
components/Cursor/cursor_pixel.png
Normal file
After Width: | Height: | Size: 511 B |
34
components/Cursor/cursor_pixel.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cfhqgy3ueghye"
|
||||||
|
path="res://.godot/imported/cursor_pixel.png-899adaa457ed843c1c5a53f6e1062611.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://components/Cursor/cursor_pixel.png"
|
||||||
|
dest_files=["res://.godot/imported/cursor_pixel.png-899adaa457ed843c1c5a53f6e1062611.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
|
BIN
components/Cursor/cursor_pixel_2-sheet.png
Normal file
After Width: | Height: | Size: 204 B |
34
components/Cursor/cursor_pixel_2-sheet.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://da65ydeo701gm"
|
||||||
|
path="res://.godot/imported/cursor_pixel_2-sheet.png-34d1a4b260030c4f8614c4b528509bf1.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://components/Cursor/cursor_pixel_2-sheet.png"
|
||||||
|
dest_files=["res://.godot/imported/cursor_pixel_2-sheet.png-34d1a4b260030c4f8614c4b528509bf1.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
|
BIN
components/Cursor/cursor_pixel_2.png
Normal file
After Width: | Height: | Size: 204 B |
34
components/Cursor/cursor_pixel_2.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dlg0b4gpglj1v"
|
||||||
|
path="res://.godot/imported/cursor_pixel_2.png-642708b7cfb3eb8b33fd4ecdd3a72582.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://components/Cursor/cursor_pixel_2.png"
|
||||||
|
dest_files=["res://.godot/imported/cursor_pixel_2.png-642708b7cfb3eb8b33fd4ecdd3a72582.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
|
BIN
components/Cursor/cursor_pixel_disabled.png
Normal file
After Width: | Height: | Size: 462 B |
34
components/Cursor/cursor_pixel_disabled.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dnm8kht7kq14y"
|
||||||
|
path="res://.godot/imported/cursor_pixel_disabled.png-4037da17bc38b518657b4499e968b087.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://components/Cursor/cursor_pixel_disabled.png"
|
||||||
|
dest_files=["res://.godot/imported/cursor_pixel_disabled.png-4037da17bc38b518657b4499e968b087.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
|
|
@ -5,6 +5,7 @@ signal clicked
|
||||||
signal hovered
|
signal hovered
|
||||||
signal unhovered
|
signal unhovered
|
||||||
signal rclicked
|
signal rclicked
|
||||||
|
signal released
|
||||||
|
|
||||||
@export var passthrough = false
|
@export var passthrough = false
|
||||||
|
|
||||||
|
@ -18,6 +19,10 @@ func _on_clicked():
|
||||||
clicked.emit()
|
clicked.emit()
|
||||||
return passthrough
|
return passthrough
|
||||||
|
|
||||||
|
func _on_released():
|
||||||
|
released.emit()
|
||||||
|
return passthrough
|
||||||
|
|
||||||
func _on_rclicked():
|
func _on_rclicked():
|
||||||
rclicked.emit()
|
rclicked.emit()
|
||||||
return passthrough
|
return passthrough
|
||||||
|
|
|
@ -46,7 +46,7 @@ func persist_data(key: String, value, category := PersisterEnums.Scope.RUN) -> v
|
||||||
if _persisted[category].has(key) and _persisted[category][key] == value:
|
if _persisted[category].has(key) and _persisted[category][key] == value:
|
||||||
return
|
return
|
||||||
|
|
||||||
_info("Set key <%s> in category {%s} to value |%s|" % [key, _get_category_name(category), value])
|
#_info("Set key <%s> in category {%s} to value |%s|" % [key, _get_category_name(category), value])
|
||||||
_persisted[category][key] = value
|
_persisted[category][key] = value
|
||||||
|
|
||||||
if _triggerer:
|
if _triggerer:
|
||||||
|
|
|
@ -13,7 +13,7 @@ var _connections = {}
|
||||||
|
|
||||||
## Trigger an event to be read in by other objects
|
## Trigger an event to be read in by other objects
|
||||||
func trigger(key: String, data: Dictionary = {}) -> void:
|
func trigger(key: String, data: Dictionary = {}) -> void:
|
||||||
_info("Triggered key ∧%s∧" % [key])
|
#_info("Triggered key ∧%s∧" % [key])
|
||||||
|
|
||||||
data.trigger = key
|
data.trigger = key
|
||||||
|
|
||||||
|
|
BIN
cover Copy.aseprite
Normal file
BIN
cover.aseprite
Normal file
BIN
cover.gif
Normal file
After Width: | Height: | Size: 392 KiB |
BIN
cover.png
Normal file
After Width: | Height: | Size: 337 KiB |
34
cover.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://oosowfc5qql6"
|
||||||
|
path="res://.godot/imported/cover.png-7415a2400197f69905d305dff229e3ab.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cover.png"
|
||||||
|
dest_files=["res://.godot/imported/cover.png-7415a2400197f69905d305dff229e3ab.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
|
BIN
cover2.png
Normal file
After Width: | Height: | Size: 380 KiB |
34
cover2.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b7ko742xcklsn"
|
||||||
|
path="res://.godot/imported/cover2.png-2ef2bf54704d9d001b82b1ad156dc4f6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cover2.png"
|
||||||
|
dest_files=["res://.godot/imported/cover2.png-2ef2bf54704d9d001b82b1ad156dc4f6.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
|
BIN
cover4.png
Normal file
After Width: | Height: | Size: 372 KiB |
34
cover4.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://daol7g1lylsmt"
|
||||||
|
path="res://.godot/imported/cover4.png-19fae104c6b0976f56a020466ca17034.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cover4.png"
|
||||||
|
dest_files=["res://.godot/imported/cover4.png-19fae104c6b0976f56a020466ca17034.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
|
BIN
cover5.png
Normal file
After Width: | Height: | Size: 369 KiB |
34
cover5.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b2c4geob4lf3q"
|
||||||
|
path="res://.godot/imported/cover5.png-0c496ad1d8b7fd577db0c14a195a8435.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cover5.png"
|
||||||
|
dest_files=["res://.godot/imported/cover5.png-0c496ad1d8b7fd577db0c14a195a8435.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
|
BIN
cover6.png
Normal file
After Width: | Height: | Size: 359 KiB |
34
cover6.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://b516bcl3xf6eg"
|
||||||
|
path="res://.godot/imported/cover6.png-e6099f9f4c556f35ef81470604604e2b.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://cover6.png"
|
||||||
|
dest_files=["res://.godot/imported/cover6.png-e6099f9f4c556f35ef81470604604e2b.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
|
3
default_bus_layout.tres
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
[gd_resource type="AudioBusLayout" format=3 uid="uid://dnndw0lm0ddb5"]
|
||||||
|
|
||||||
|
[resource]
|
1
documentation/brackeys-12/.obsidian/app.json
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
1
documentation/brackeys-12/.obsidian/appearance.json
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
{}
|
30
documentation/brackeys-12/.obsidian/core-plugins-migration.json
vendored
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
{
|
||||||
|
"file-explorer": true,
|
||||||
|
"global-search": true,
|
||||||
|
"switcher": true,
|
||||||
|
"graph": true,
|
||||||
|
"backlink": true,
|
||||||
|
"canvas": true,
|
||||||
|
"outgoing-link": true,
|
||||||
|
"tag-pane": true,
|
||||||
|
"properties": false,
|
||||||
|
"page-preview": true,
|
||||||
|
"daily-notes": true,
|
||||||
|
"templates": true,
|
||||||
|
"note-composer": true,
|
||||||
|
"command-palette": true,
|
||||||
|
"slash-command": false,
|
||||||
|
"editor-status": true,
|
||||||
|
"bookmarks": true,
|
||||||
|
"markdown-importer": false,
|
||||||
|
"zk-prefixer": false,
|
||||||
|
"random-note": false,
|
||||||
|
"outline": true,
|
||||||
|
"word-count": true,
|
||||||
|
"slides": false,
|
||||||
|
"audio-recorder": false,
|
||||||
|
"workspaces": false,
|
||||||
|
"file-recovery": true,
|
||||||
|
"publish": false,
|
||||||
|
"sync": false
|
||||||
|
}
|
20
documentation/brackeys-12/.obsidian/core-plugins.json
vendored
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
[
|
||||||
|
"file-explorer",
|
||||||
|
"global-search",
|
||||||
|
"switcher",
|
||||||
|
"graph",
|
||||||
|
"backlink",
|
||||||
|
"canvas",
|
||||||
|
"outgoing-link",
|
||||||
|
"tag-pane",
|
||||||
|
"page-preview",
|
||||||
|
"daily-notes",
|
||||||
|
"templates",
|
||||||
|
"note-composer",
|
||||||
|
"command-palette",
|
||||||
|
"editor-status",
|
||||||
|
"bookmarks",
|
||||||
|
"outline",
|
||||||
|
"word-count",
|
||||||
|
"file-recovery"
|
||||||
|
]
|
22
documentation/brackeys-12/.obsidian/graph.json
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"collapse-filter": true,
|
||||||
|
"search": "",
|
||||||
|
"showTags": false,
|
||||||
|
"showAttachments": false,
|
||||||
|
"hideUnresolved": false,
|
||||||
|
"showOrphans": true,
|
||||||
|
"collapse-color-groups": true,
|
||||||
|
"colorGroups": [],
|
||||||
|
"collapse-display": true,
|
||||||
|
"showArrow": false,
|
||||||
|
"textFadeMultiplier": 0,
|
||||||
|
"nodeSizeMultiplier": 1,
|
||||||
|
"lineSizeMultiplier": 1,
|
||||||
|
"collapse-forces": true,
|
||||||
|
"centerStrength": 0.518713248970312,
|
||||||
|
"repelStrength": 10,
|
||||||
|
"linkStrength": 1,
|
||||||
|
"linkDistance": 250,
|
||||||
|
"scale": 1,
|
||||||
|
"close": true
|
||||||
|
}
|
184
documentation/brackeys-12/.obsidian/workspace.json
vendored
Normal file
|
@ -0,0 +1,184 @@
|
||||||
|
{
|
||||||
|
"main": {
|
||||||
|
"id": "ef31c39114966eaa",
|
||||||
|
"type": "split",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "b4e7c82227a52b85",
|
||||||
|
"type": "tabs",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "716b36a353f94ac0",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "markdown",
|
||||||
|
"state": {
|
||||||
|
"file": "Buildings/Index.md",
|
||||||
|
"mode": "source",
|
||||||
|
"source": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "ced1d8fedf6a4457",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "markdown",
|
||||||
|
"state": {
|
||||||
|
"file": "Buildings/Index.md",
|
||||||
|
"mode": "source",
|
||||||
|
"source": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"currentTab": 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "d0e13a6b9b66e58f",
|
||||||
|
"type": "tabs",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "5d72603a6c3d1821",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "graph",
|
||||||
|
"state": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"direction": "vertical"
|
||||||
|
},
|
||||||
|
"left": {
|
||||||
|
"id": "8a86080a79bb451d",
|
||||||
|
"type": "split",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "19d5807e1472a50d",
|
||||||
|
"type": "tabs",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "f0b9c7182c679066",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "file-explorer",
|
||||||
|
"state": {
|
||||||
|
"sortOrder": "alphabetical"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "9f1fb877abc7d581",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "search",
|
||||||
|
"state": {
|
||||||
|
"query": "",
|
||||||
|
"matchingCase": false,
|
||||||
|
"explainSearch": false,
|
||||||
|
"collapseAll": false,
|
||||||
|
"extraContext": false,
|
||||||
|
"sortOrder": "alphabetical"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "65ac97af6514672d",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "bookmarks",
|
||||||
|
"state": {}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"direction": "horizontal",
|
||||||
|
"width": 300
|
||||||
|
},
|
||||||
|
"right": {
|
||||||
|
"id": "1e79793f6bfbcfff",
|
||||||
|
"type": "split",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "c146cb52be8a309e",
|
||||||
|
"type": "tabs",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "f9536916b6786a64",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "backlink",
|
||||||
|
"state": {
|
||||||
|
"file": "Buildings/Index.md",
|
||||||
|
"collapseAll": false,
|
||||||
|
"extraContext": false,
|
||||||
|
"sortOrder": "alphabetical",
|
||||||
|
"showSearch": false,
|
||||||
|
"searchQuery": "",
|
||||||
|
"backlinkCollapsed": false,
|
||||||
|
"unlinkedCollapsed": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "52a1d2f92e610d22",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "outgoing-link",
|
||||||
|
"state": {
|
||||||
|
"file": "Buildings/Index.md",
|
||||||
|
"linksCollapsed": false,
|
||||||
|
"unlinkedCollapsed": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "d00a5c04180177ac",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "tag",
|
||||||
|
"state": {
|
||||||
|
"sortOrder": "frequency",
|
||||||
|
"useHierarchy": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "76511cc895eea11b",
|
||||||
|
"type": "leaf",
|
||||||
|
"state": {
|
||||||
|
"type": "outline",
|
||||||
|
"state": {
|
||||||
|
"file": "Buildings/Index.md"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"direction": "horizontal",
|
||||||
|
"width": 300,
|
||||||
|
"collapsed": true
|
||||||
|
},
|
||||||
|
"left-ribbon": {
|
||||||
|
"hiddenItems": {
|
||||||
|
"switcher:Open quick switcher": false,
|
||||||
|
"graph:Open graph view": false,
|
||||||
|
"canvas:Create new canvas": false,
|
||||||
|
"daily-notes:Open today's daily note": false,
|
||||||
|
"templates:Insert template": false,
|
||||||
|
"command-palette:Open command palette": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"active": "ced1d8fedf6a4457",
|
||||||
|
"lastOpenFiles": [
|
||||||
|
"Matine before the Great Storm.md",
|
||||||
|
"Buildings/Index.md",
|
||||||
|
"Lore",
|
||||||
|
"Buildings",
|
||||||
|
"Bienvenido.md"
|
||||||
|
]
|
||||||
|
}
|
31
documentation/brackeys-12/Buildings/Index.md
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
## Resource Gathering
|
||||||
|
|
||||||
|
Stone Miner
|
||||||
|
|
||||||
|
Wood Cutter
|
||||||
|
|
||||||
|
Essence Compressor
|
||||||
|
|
||||||
|
## Housing
|
||||||
|
|
||||||
|
Tents
|
||||||
|
|
||||||
|
Quarter
|
||||||
|
|
||||||
|
House
|
||||||
|
|
||||||
|
## Utility
|
||||||
|
|
||||||
|
Water Pump
|
||||||
|
|
||||||
|
Water Processor
|
||||||
|
|
||||||
|
Food Gathering
|
||||||
|
|
||||||
|
Food Processing
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
1. Mantine was a calm region for part of its history; some small cities formed, but growth was slow and dispersed throughout the region.
|
||||||
|
|
||||||
|
3. Two main distinctions happened after a while between the inland and the coast land. The Coast region's economy was purely based on fishing and some farming.
|
||||||
|
4. Having ancient ways of doing so that still remain today.
|
||||||
|
5. The Inland region's discovered some mines, gathering metal and developing ways of smelting and using them; later on, they would create powerful tools mixing magic and machines; this made the Coast Region aware that they were falling behind in research and development. After a while, the region of Medine started to export raw materials to other countries.
|
||||||
|
6. The Queen of Sidone, who only sold some of the overall produced nourishment to Medine, noticed that Medine's relationship with some countries also included reselling what they were buying from them. Which escalated the relationship between both regions. Through decades, both regions were on the brink of a civil war. One of the earliest depictions of diplomacy appeared through this era between the Chancellor of Medine, the main inland city, and the Queen of Sidone. The most tense event from this period occurred when a party of Medine's Army tried getting some steel to Sidone's port, where a ship from another country was waiting. The Queen of Sidone retained this party for a time; she wouldn't allow this to happen without some competition for the crown. While this happened, The Great Storm of Mantine started.
|
18
error_ping.gd
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
extends ColorRect
|
||||||
|
|
||||||
|
var type
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
scale = Vector2.ZERO
|
||||||
|
|
||||||
|
var tween = create_tween()
|
||||||
|
tween.set_ease(Tween.EASE_IN_OUT)
|
||||||
|
tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
tween.set_loops()
|
||||||
|
tween.tween_property(self, "modulate", Color(1, 1, 1, 0.75), 1)
|
||||||
|
tween.tween_property(self, "modulate", Color.WHITE, 1)
|
||||||
|
|
||||||
|
var tween2 = create_tween()
|
||||||
|
tween2.set_ease(Tween.EASE_OUT)
|
||||||
|
tween2.set_trans(Tween.TRANS_BACK)
|
||||||
|
tween2.tween_property(self, "scale", Vector2.ONE, 0.5)
|
106
export_presets.cfg
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
[preset.0]
|
||||||
|
|
||||||
|
name="Web"
|
||||||
|
platform="Web"
|
||||||
|
runnable=true
|
||||||
|
advanced_options=false
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter="*.txt"
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="builds/web/index.html"
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
script_export_mode=2
|
||||||
|
|
||||||
|
[preset.0.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
variant/extensions_support=false
|
||||||
|
variant/thread_support=false
|
||||||
|
vram_texture_compression/for_desktop=true
|
||||||
|
vram_texture_compression/for_mobile=false
|
||||||
|
html/export_icon=true
|
||||||
|
html/custom_html_shell=""
|
||||||
|
html/head_include=""
|
||||||
|
html/canvas_resize_policy=2
|
||||||
|
html/focus_canvas_on_start=true
|
||||||
|
html/experimental_virtual_keyboard=false
|
||||||
|
progressive_web_app/enabled=false
|
||||||
|
progressive_web_app/ensure_cross_origin_isolation_headers=true
|
||||||
|
progressive_web_app/offline_page=""
|
||||||
|
progressive_web_app/display=1
|
||||||
|
progressive_web_app/orientation=0
|
||||||
|
progressive_web_app/icon_144x144=""
|
||||||
|
progressive_web_app/icon_180x180=""
|
||||||
|
progressive_web_app/icon_512x512=""
|
||||||
|
progressive_web_app/background_color=Color(0, 0, 0, 1)
|
||||||
|
|
||||||
|
[preset.1]
|
||||||
|
|
||||||
|
name="Windows Desktop"
|
||||||
|
platform="Windows Desktop"
|
||||||
|
runnable=true
|
||||||
|
advanced_options=false
|
||||||
|
dedicated_server=false
|
||||||
|
custom_features=""
|
||||||
|
export_filter="all_resources"
|
||||||
|
include_filter="*.txt"
|
||||||
|
exclude_filter=""
|
||||||
|
export_path="builds/floodworks-WIN/Floodworks.exe"
|
||||||
|
encryption_include_filters=""
|
||||||
|
encryption_exclude_filters=""
|
||||||
|
encrypt_pck=false
|
||||||
|
encrypt_directory=false
|
||||||
|
script_export_mode=2
|
||||||
|
|
||||||
|
[preset.1.options]
|
||||||
|
|
||||||
|
custom_template/debug=""
|
||||||
|
custom_template/release=""
|
||||||
|
debug/export_console_wrapper=1
|
||||||
|
binary_format/embed_pck=false
|
||||||
|
texture_format/s3tc_bptc=true
|
||||||
|
texture_format/etc2_astc=false
|
||||||
|
binary_format/architecture="x86_64"
|
||||||
|
codesign/enable=false
|
||||||
|
codesign/timestamp=true
|
||||||
|
codesign/timestamp_server_url=""
|
||||||
|
codesign/digest_algorithm=1
|
||||||
|
codesign/description=""
|
||||||
|
codesign/custom_options=PackedStringArray()
|
||||||
|
application/modify_resources=true
|
||||||
|
application/icon=""
|
||||||
|
application/console_wrapper_icon=""
|
||||||
|
application/icon_interpolation=4
|
||||||
|
application/file_version=""
|
||||||
|
application/product_version=""
|
||||||
|
application/company_name=""
|
||||||
|
application/product_name=""
|
||||||
|
application/file_description=""
|
||||||
|
application/copyright=""
|
||||||
|
application/trademarks=""
|
||||||
|
application/export_angle=0
|
||||||
|
application/export_d3d12=0
|
||||||
|
application/d3d12_agility_sdk_multiarch=true
|
||||||
|
ssh_remote_deploy/enabled=false
|
||||||
|
ssh_remote_deploy/host="user@host_ip"
|
||||||
|
ssh_remote_deploy/port="22"
|
||||||
|
ssh_remote_deploy/extra_args_ssh=""
|
||||||
|
ssh_remote_deploy/extra_args_scp=""
|
||||||
|
ssh_remote_deploy/run_script="Expand-Archive -LiteralPath '{temp_dir}\\{archive_name}' -DestinationPath '{temp_dir}'
|
||||||
|
$action = New-ScheduledTaskAction -Execute '{temp_dir}\\{exe_name}' -Argument '{cmd_args}'
|
||||||
|
$trigger = New-ScheduledTaskTrigger -Once -At 00:00
|
||||||
|
$settings = New-ScheduledTaskSettingsSet
|
||||||
|
$task = New-ScheduledTask -Action $action -Trigger $trigger -Settings $settings
|
||||||
|
Register-ScheduledTask godot_remote_debug -InputObject $task -Force:$true
|
||||||
|
Start-ScheduledTask -TaskName godot_remote_debug
|
||||||
|
while (Get-ScheduledTask -TaskName godot_remote_debug | ? State -eq running) { Start-Sleep -Milliseconds 100 }
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue"
|
||||||
|
ssh_remote_deploy/cleanup_script="Stop-ScheduledTask -TaskName godot_remote_debug -ErrorAction:SilentlyContinue
|
||||||
|
Unregister-ScheduledTask -TaskName godot_remote_debug -Confirm:$false -ErrorAction:SilentlyContinue
|
||||||
|
Remove-Item -Recurse -Force '{temp_dir}'"
|
BIN
heavy version.wav
Normal file
24
heavy version.wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://dk2thkxy31doi"
|
||||||
|
path="res://.godot/imported/heavy version.wav-fdc1a92f7e5068e1acde6ae77b88579c.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://heavy version.wav"
|
||||||
|
dest_files=["res://.godot/imported/heavy version.wav-fdc1a92f7e5068e1acde6ae77b88579c.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=2
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
238
info_window.gd
Normal file
|
@ -0,0 +1,238 @@
|
||||||
|
extends Control
|
||||||
|
|
||||||
|
var window_tween
|
||||||
|
|
||||||
|
@onready var icon: TextureRect = $Icon
|
||||||
|
@onready var title: RichTextLabel = $Title
|
||||||
|
@onready var subtitle: RichTextLabel = $Subtitle
|
||||||
|
@onready var description: RichTextLabel = $Description
|
||||||
|
@onready var rich_text_label_2: RichTextLabel = $ResourceAllocation/RichTextLabel2
|
||||||
|
@onready var resource_allocation: Control = $ResourceAllocation
|
||||||
|
@onready var description_3: RichTextLabel = $ResourceAllocation/Description3
|
||||||
|
@onready var color_rect_5: ColorRect = $ColorRect5
|
||||||
|
@onready var color_rect_2: ColorRect = $ResourceAllocation/ColorRect2
|
||||||
|
@onready var color_rect_3: ColorRect = $ResourceAllocation/ColorRect3
|
||||||
|
@onready var color_rect_4: ColorRect = $ResourceAllocation/ColorRect4
|
||||||
|
@onready var description_2: RichTextLabel = $ResourceAllocation/Description2
|
||||||
|
@onready var color_rect_6: ColorRect = $ColorRect6
|
||||||
|
|
||||||
|
var recent_data
|
||||||
|
|
||||||
|
var close_tween
|
||||||
|
var minus_tween
|
||||||
|
var plus_tween
|
||||||
|
var destroy_tween
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
Triggerer.listen("show_info", _show_info_window)
|
||||||
|
Triggerer.listen("hide_info", _hide_info_window)
|
||||||
|
scale = Vector2.ZERO
|
||||||
|
Triggerer.listen("flood_level", _on_flood_level)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_flood_level(data):
|
||||||
|
var value = int(data.value)
|
||||||
|
|
||||||
|
if recent_data and value >= recent_data.level:
|
||||||
|
Triggerer.trigger("hide_info")
|
||||||
|
|
||||||
|
|
||||||
|
func _show_info_window(data):
|
||||||
|
visible = true
|
||||||
|
|
||||||
|
var building_data = Data.data.buildings[data.key]
|
||||||
|
|
||||||
|
|
||||||
|
if window_tween:
|
||||||
|
window_tween.kill()
|
||||||
|
|
||||||
|
window_tween = create_tween()
|
||||||
|
window_tween.set_ease(Tween.EASE_IN)
|
||||||
|
window_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
window_tween.tween_property(self, "scale", Vector2.ZERO, 0.25)
|
||||||
|
window_tween.tween_callback(func():
|
||||||
|
title.text = "[center]%s" % [building_data.name]
|
||||||
|
icon.texture = Data.data.images[data.key]
|
||||||
|
subtitle.text = "[center]%s" % [building_data.short if building_data.has("short") else ""]
|
||||||
|
if data.has("workers"):
|
||||||
|
rich_text_label_2.text = "[center]%d/%d" % [data.workers, data.max_workers]
|
||||||
|
description_3.text = "[center]EFFICIENCY: %d%%" % [data.efficiency]
|
||||||
|
resource_allocation.visible = true
|
||||||
|
else:
|
||||||
|
resource_allocation.visible = false
|
||||||
|
recent_data = data
|
||||||
|
)
|
||||||
|
window_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
window_tween.set_trans(Tween.TRANS_BACK)
|
||||||
|
window_tween.tween_property(self, "scale", Vector2.ONE, 0.5)
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
if Input.is_action_just_pressed("rclick"):
|
||||||
|
_hide_info_window({})
|
||||||
|
|
||||||
|
if recent_data and recent_data.has("progress"):
|
||||||
|
color_rect_4.scale.x = (float(recent_data.progress) / Data.data.buildings[recent_data.key].time)
|
||||||
|
|
||||||
|
if recent_data and recent_data.has("workers") and recent_data.workers > 0:
|
||||||
|
if recent_data.efficiency == 0:
|
||||||
|
description_2.text = "[center]STATUS: NO RESOURCES"
|
||||||
|
else:
|
||||||
|
description_2.text = "[center]STATUS: WORKING"
|
||||||
|
else:
|
||||||
|
description_2.text = "[center]STATUS: STOPPED"
|
||||||
|
|
||||||
|
if recent_data and recent_data.has("workers"):
|
||||||
|
description_3.text = "[center]EFFICIENCY: %d%%" % [recent_data.efficiency]
|
||||||
|
rich_text_label_2.text = "[center]%d/%d" % [recent_data.workers, recent_data.max_workers]
|
||||||
|
|
||||||
|
|
||||||
|
func _hide_info_window(_data):
|
||||||
|
if window_tween:
|
||||||
|
window_tween.kill()
|
||||||
|
|
||||||
|
window_tween = create_tween()
|
||||||
|
window_tween.set_ease(Tween.EASE_IN)
|
||||||
|
window_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
window_tween.tween_property(self, "scale", Vector2.ZERO, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_clicked() -> void:
|
||||||
|
if recent_data.workers > 0:
|
||||||
|
recent_data.workers -= 1
|
||||||
|
Persister.change_value("avail_population", 1)
|
||||||
|
rich_text_label_2.text = "[center]%d/%d" % [recent_data.workers, recent_data.max_workers]
|
||||||
|
|
||||||
|
if minus_tween:
|
||||||
|
minus_tween.kill()
|
||||||
|
|
||||||
|
minus_tween = create_tween()
|
||||||
|
minus_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
minus_tween.tween_property(color_rect_2, "scale", Vector2.ONE * 0.95, 0.125)
|
||||||
|
minus_tween.tween_property(color_rect_2, "scale", Vector2.ONE, 0.125)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_hovered() -> void:
|
||||||
|
if minus_tween:
|
||||||
|
minus_tween.kill()
|
||||||
|
|
||||||
|
minus_tween = create_tween()
|
||||||
|
minus_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
minus_tween.set_trans(Tween.TRANS_BACK)
|
||||||
|
minus_tween.tween_property(color_rect_2, "scale", Vector2.ONE * 1.05, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_unhovered() -> void:
|
||||||
|
if minus_tween:
|
||||||
|
minus_tween.kill()
|
||||||
|
|
||||||
|
minus_tween = create_tween()
|
||||||
|
minus_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
minus_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
minus_tween.tween_property(color_rect_2, "scale", Vector2.ONE, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_2_clicked() -> void:
|
||||||
|
if recent_data.workers < recent_data.max_workers and Persister.get_value("avail_population") > 0:
|
||||||
|
recent_data.workers += 1
|
||||||
|
Persister.change_value("avail_population", -1)
|
||||||
|
rich_text_label_2.text = "[center]%d/%d" % [recent_data.workers, recent_data.max_workers]
|
||||||
|
|
||||||
|
if plus_tween:
|
||||||
|
plus_tween.kill()
|
||||||
|
|
||||||
|
plus_tween = create_tween()
|
||||||
|
plus_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
plus_tween.tween_property(color_rect_3, "scale", Vector2.ONE * 0.95, 0.125)
|
||||||
|
plus_tween.tween_property(color_rect_3, "scale", Vector2.ONE, 0.125)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_2_hovered() -> void:
|
||||||
|
if plus_tween:
|
||||||
|
plus_tween.kill()
|
||||||
|
|
||||||
|
plus_tween = create_tween()
|
||||||
|
plus_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
plus_tween.set_trans(Tween.TRANS_BACK)
|
||||||
|
plus_tween.tween_property(color_rect_3, "scale", Vector2.ONE * 1.05, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_2_unhovered() -> void:
|
||||||
|
if plus_tween:
|
||||||
|
plus_tween.kill()
|
||||||
|
|
||||||
|
plus_tween = create_tween()
|
||||||
|
plus_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
plus_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
plus_tween.tween_property(color_rect_3, "scale", Vector2.ONE, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_3_clicked() -> void:
|
||||||
|
Triggerer.trigger("hide_info")
|
||||||
|
|
||||||
|
if close_tween:
|
||||||
|
close_tween.kill()
|
||||||
|
|
||||||
|
close_tween = create_tween()
|
||||||
|
close_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
close_tween.tween_property(color_rect_5, "scale", Vector2.ONE * 0.95, 0.125)
|
||||||
|
close_tween.tween_property(color_rect_5, "scale", Vector2.ONE, 0.125)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_3_hovered() -> void:
|
||||||
|
if close_tween:
|
||||||
|
close_tween.kill()
|
||||||
|
|
||||||
|
close_tween = create_tween()
|
||||||
|
close_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
close_tween.set_trans(Tween.TRANS_BACK)
|
||||||
|
close_tween.tween_property(color_rect_5, "scale", Vector2.ONE * 1.05, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_mouse_handler_3_unhovered() -> void:
|
||||||
|
if close_tween:
|
||||||
|
close_tween.kill()
|
||||||
|
|
||||||
|
close_tween = create_tween()
|
||||||
|
close_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
close_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
close_tween.tween_property(color_rect_5, "scale", Vector2.ONE, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_destroy_handler_clicked() -> void:
|
||||||
|
Triggerer.trigger("destroy", {"tile": recent_data.coords})
|
||||||
|
Triggerer.trigger("hide_info")
|
||||||
|
|
||||||
|
var data = Data.data.buildings[recent_data.key]
|
||||||
|
|
||||||
|
if data.has("cost"):
|
||||||
|
for key in data.cost:
|
||||||
|
Persister.change_value(key, ceil(data.cost[key]/2))
|
||||||
|
|
||||||
|
if destroy_tween:
|
||||||
|
destroy_tween.kill()
|
||||||
|
|
||||||
|
destroy_tween = create_tween()
|
||||||
|
destroy_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
destroy_tween.tween_property(color_rect_6, "scale", Vector2.ONE * 0.95, 0.125)
|
||||||
|
destroy_tween.tween_property(color_rect_6, "scale", Vector2.ONE, 0.125)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_destroy_handler_hovered() -> void:
|
||||||
|
if destroy_tween:
|
||||||
|
destroy_tween.kill()
|
||||||
|
|
||||||
|
destroy_tween = create_tween()
|
||||||
|
destroy_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
destroy_tween.set_trans(Tween.TRANS_BACK)
|
||||||
|
destroy_tween.tween_property(color_rect_6, "scale", Vector2.ONE * 1.05, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_destroy_handler_unhovered() -> void:
|
||||||
|
if close_tween:
|
||||||
|
close_tween.kill()
|
||||||
|
|
||||||
|
destroy_tween = create_tween()
|
||||||
|
destroy_tween.set_ease(Tween.EASE_OUT)
|
||||||
|
destroy_tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
destroy_tween.tween_property(color_rect_6, "scale", Vector2.ONE, 0.25)
|
BIN
light version final(1).wav
Normal file
24
light version final(1).wav.import
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="wav"
|
||||||
|
type="AudioStreamWAV"
|
||||||
|
uid="uid://dfxndvkdey800"
|
||||||
|
path="res://.godot/imported/light version final(1).wav-a07d786482da1a06a8f63e7795c38e32.sample"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://light version final(1).wav"
|
||||||
|
dest_files=["res://.godot/imported/light version final(1).wav-a07d786482da1a06a8f63e7795c38e32.sample"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
force/8_bit=false
|
||||||
|
force/mono=false
|
||||||
|
force/max_rate=false
|
||||||
|
force/max_rate_hz=44100
|
||||||
|
edit/trim=false
|
||||||
|
edit/normalize=false
|
||||||
|
edit/loop_mode=0
|
||||||
|
edit/loop_begin=0
|
||||||
|
edit/loop_end=-1
|
||||||
|
compress/mode=0
|
106
main.gd
Normal file
|
@ -0,0 +1,106 @@
|
||||||
|
extends Node2D
|
||||||
|
|
||||||
|
@onready var building_levels = [
|
||||||
|
$Node2D/Level2/BuildingLevel2,
|
||||||
|
$Node2D/Level3/BuildingLevel3,
|
||||||
|
$Node2D/Level4/BuildingLevel4,
|
||||||
|
$Node2D/Level5/BuildingLevel5,
|
||||||
|
$Node2D/Node2D/BuildingLevel6
|
||||||
|
]
|
||||||
|
@onready var night: ColorRect = $CanvasLayer/Night
|
||||||
|
var night_tween
|
||||||
|
var timer = 0
|
||||||
|
var timer2 = 0
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
Triggerer.listen("game_started", _on_game_started)
|
||||||
|
Triggerer.listen("destroy", _on_destroy)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_game_started(_data):
|
||||||
|
if night_tween:
|
||||||
|
night_tween.kill()
|
||||||
|
|
||||||
|
night_tween = create_tween()
|
||||||
|
night_tween.set_loops()
|
||||||
|
night_tween.tween_property(night, "modulate", Color.TRANSPARENT, 5)
|
||||||
|
night_tween.tween_interval(15)
|
||||||
|
night_tween.tween_property(night, "modulate", Color.WHITE, 5)
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
if Persister.get_value("win") or Persister.get_value("lose"):
|
||||||
|
return
|
||||||
|
|
||||||
|
if Persister.get_value("population") <= 0:
|
||||||
|
Persister.persist_data("lose", true)
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("mclick"):
|
||||||
|
for build_level in building_levels:
|
||||||
|
build_level.pick_block()
|
||||||
|
|
||||||
|
if Input.is_action_just_released("lclick"):
|
||||||
|
if Persister.get_value("drag_mode") and Persister.get_value("building_mode"):
|
||||||
|
for build_level in building_levels:
|
||||||
|
build_level.place_building()
|
||||||
|
Persister.persist_data("building_mode", false)
|
||||||
|
|
||||||
|
var building_mode = Persister.get_value("building_mode")
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("lclick") and not Persister.get_value("drag_mode"):
|
||||||
|
if building_mode:
|
||||||
|
for build_level in building_levels:
|
||||||
|
build_level.place_building()
|
||||||
|
else:
|
||||||
|
for build_level in building_levels:
|
||||||
|
build_level.show_info_building()
|
||||||
|
Persister.persist_data("building_mode", false)
|
||||||
|
|
||||||
|
if Input.is_action_just_pressed("rclick"):
|
||||||
|
Persister.persist_data("building_mode", false)
|
||||||
|
|
||||||
|
if Persister.get_value("game_started"):
|
||||||
|
timer += delta
|
||||||
|
timer2 += delta
|
||||||
|
|
||||||
|
if timer >= 5:
|
||||||
|
var pop = Persister.get_value("population")
|
||||||
|
var pop_scale = ceil(pop / 5.0)
|
||||||
|
|
||||||
|
if Persister.get_value("food") > pop_scale and Persister.get_value("water") > pop_scale:
|
||||||
|
Persister.change_value("food", -pop_scale)
|
||||||
|
Persister.change_value("water", -pop_scale)
|
||||||
|
if Persister.get_value("population") < Persister.get_value("max_population"):
|
||||||
|
Persister.change_value("population", 1)
|
||||||
|
Persister.change_value("avail_population", 1)
|
||||||
|
elif Persister.get_value("population") > Persister.get_value("max_population"):
|
||||||
|
Persister.change_value("population", -1)
|
||||||
|
|
||||||
|
if Persister.get_value("avail_population") > 0:
|
||||||
|
Persister.change_value("avail_population", -1)
|
||||||
|
else:
|
||||||
|
_kill_citizen()
|
||||||
|
else:
|
||||||
|
Persister.change_value("population", -1)
|
||||||
|
|
||||||
|
if Persister.get_value("avail_population") > 0:
|
||||||
|
Persister.change_value("avail_population", -1)
|
||||||
|
else:
|
||||||
|
_kill_citizen()
|
||||||
|
|
||||||
|
timer -= 5
|
||||||
|
|
||||||
|
|
||||||
|
func _on_destroy(data):
|
||||||
|
var tile = data.tile
|
||||||
|
|
||||||
|
for build_level in building_levels:
|
||||||
|
build_level.destroy(tile)
|
||||||
|
|
||||||
|
|
||||||
|
func _kill_citizen():
|
||||||
|
for build_level in building_levels:
|
||||||
|
var val = build_level.kill_citizen()
|
||||||
|
|
||||||
|
if val:
|
||||||
|
return
|
BIN
mask.aseprite
Normal file
BIN
mask.png
Normal file
After Width: | Height: | Size: 192 B |
34
mask.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://bcj5syslhrfsx"
|
||||||
|
path="res://.godot/imported/mask.png-b945516e6475612c1c4c3b4f8dd0bdc6.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://mask.png"
|
||||||
|
dest_files=["res://.godot/imported/mask.png-b945516e6475612c1c4c3b4f8dd0bdc6.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
|
BIN
meter.aseprite
Normal file
32
meter.gd
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
extends TextureRect
|
||||||
|
|
||||||
|
@onready var globals = Data.data.globals
|
||||||
|
@onready var flood_levels = globals.flood_levels
|
||||||
|
var start_pos = Vector2(9, 5)
|
||||||
|
|
||||||
|
const FLOOD_ICON = preload("res://FloodIcon.tscn")
|
||||||
|
@onready var texture_rect_2: TextureRect = $TextureRect2
|
||||||
|
|
||||||
|
var flood_icons = []
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
var i = 0
|
||||||
|
for level in flood_levels:
|
||||||
|
var new_flood_icon = FLOOD_ICON.instantiate()
|
||||||
|
|
||||||
|
new_flood_icon.position = start_pos + Vector2(i * 30, 0)
|
||||||
|
new_flood_icon.text = level
|
||||||
|
|
||||||
|
flood_icons.push_back(new_flood_icon)
|
||||||
|
|
||||||
|
texture_rect_2.add_child(new_flood_icon)
|
||||||
|
|
||||||
|
i += 1
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
var i = 0
|
||||||
|
for flood_icon in flood_icons:
|
||||||
|
flood_icon.position = start_pos + Vector2(i * 30 - (Persister.get_value("game_time", PersisterEnums.Scope.UNKNOWN, 0) / 1000.0 * 30.0 / 25.0), 0)
|
||||||
|
|
||||||
|
i += 1
|
BIN
meter.png
Normal file
After Width: | Height: | Size: 265 B |
34
meter.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cqmbbg06vdb2r"
|
||||||
|
path="res://.godot/imported/meter.png-ed3ca4a4494efbf7579266c5b98bbd8e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://meter.png"
|
||||||
|
dest_files=["res://.godot/imported/meter.png-ed3ca4a4494efbf7579266c5b98bbd8e.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
|
25
name_icon.gd
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
extends RichTextLabel
|
||||||
|
|
||||||
|
var tween
|
||||||
|
var selected = true
|
||||||
|
|
||||||
|
func _ready() -> void:
|
||||||
|
scale = Vector2.ZERO
|
||||||
|
tween = create_tween()
|
||||||
|
tween.set_ease(Tween.EASE_OUT)
|
||||||
|
tween.set_trans(Tween.TRANS_BACK)
|
||||||
|
tween.tween_property(self, "scale", Vector2.ONE, 0.25)
|
||||||
|
|
||||||
|
|
||||||
|
func _deselect() -> void:
|
||||||
|
selected = false
|
||||||
|
if tween:
|
||||||
|
tween.kill()
|
||||||
|
|
||||||
|
tween = create_tween()
|
||||||
|
tween.set_ease(Tween.EASE_OUT)
|
||||||
|
tween.set_trans(Tween.TRANS_QUAD)
|
||||||
|
tween.tween_property(self, "scale", Vector2.ZERO, 0.25)
|
||||||
|
tween.tween_callback(func():
|
||||||
|
queue_free()
|
||||||
|
)
|
8
parts/buildings/essencecompressor.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
name: Conduit
|
||||||
|
short: Boosts Production
|
||||||
|
type: production
|
||||||
|
boost: 5
|
||||||
|
time: 10
|
||||||
|
cost[]
|
||||||
|
stone: 3
|
||||||
|
wood: 2
|
10
parts/buildings/foodgathering.txt
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
name: Field
|
||||||
|
short: Produces Wheat
|
||||||
|
type: utility
|
||||||
|
resource: wheat
|
||||||
|
resourcename: Wheat
|
||||||
|
time: 3
|
||||||
|
amount: 1
|
||||||
|
max_workers: 6
|
||||||
|
cost[]
|
||||||
|
wood: 2
|
12
parts/buildings/foodprocessing.txt
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
name: Farmhouse
|
||||||
|
short: Turns Wheat to Food
|
||||||
|
type: utility
|
||||||
|
resource: food
|
||||||
|
time: 6
|
||||||
|
amount: 1
|
||||||
|
needs: wheat
|
||||||
|
max_workers: 6
|
||||||
|
resourcename: Food
|
||||||
|
cost[]
|
||||||
|
wood: 4
|
||||||
|
stone: 8
|
7
parts/buildings/house.txt
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
name: House
|
||||||
|
type: housing
|
||||||
|
short: Space for 5 People
|
||||||
|
amount: 5
|
||||||
|
cost[]
|
||||||
|
wood: 18
|
||||||
|
stone: 10
|
BIN
parts/buildings/images/essencecompressor.png
Normal file
After Width: | Height: | Size: 304 B |
34
parts/buildings/images/essencecompressor.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://c3t66sxwk078m"
|
||||||
|
path="res://.godot/imported/essencecompressor.png-a45065e3eea03ba6fb01c8afde8da972.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://parts/buildings/images/essencecompressor.png"
|
||||||
|
dest_files=["res://.godot/imported/essencecompressor.png-a45065e3eea03ba6fb01c8afde8da972.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
|
BIN
parts/buildings/images/foodgathering.png
Normal file
After Width: | Height: | Size: 235 B |
34
parts/buildings/images/foodgathering.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dq1nxn0olq4a2"
|
||||||
|
path="res://.godot/imported/foodgathering.png-64bc2c4bdac412bbc303883b7381019e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://parts/buildings/images/foodgathering.png"
|
||||||
|
dest_files=["res://.godot/imported/foodgathering.png-64bc2c4bdac412bbc303883b7381019e.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
|
BIN
parts/buildings/images/foodprocessing.png
Normal file
After Width: | Height: | Size: 299 B |
34
parts/buildings/images/foodprocessing.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://clqov5mu3bpaw"
|
||||||
|
path="res://.godot/imported/foodprocessing.png-93b159c111f7b301f0dbec88a0beeca7.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://parts/buildings/images/foodprocessing.png"
|
||||||
|
dest_files=["res://.godot/imported/foodprocessing.png-93b159c111f7b301f0dbec88a0beeca7.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
|
BIN
parts/buildings/images/house.png
Normal file
After Width: | Height: | Size: 367 B |
34
parts/buildings/images/house.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dyhnvokmhlapt"
|
||||||
|
path="res://.godot/imported/house.png-1cede27122f87d242275cf359539f076.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://parts/buildings/images/house.png"
|
||||||
|
dest_files=["res://.godot/imported/house.png-1cede27122f87d242275cf359539f076.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
|
BIN
parts/buildings/images/quarter.png
Normal file
After Width: | Height: | Size: 280 B |
34
parts/buildings/images/quarter.png.import
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://dt43okssvt2ay"
|
||||||
|
path="res://.godot/imported/quarter.png-6f5b23f21d2704e7f7b52b6cf64e7c7e.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://parts/buildings/images/quarter.png"
|
||||||
|
dest_files=["res://.godot/imported/quarter.png-6f5b23f21d2704e7f7b52b6cf64e7c7e.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
|