add sticky builder menu.

pull/18/head
Wade 2025-05-07 13:42:47 +07:00
parent 1f2a5efb51
commit f78871b8e5
45 changed files with 620 additions and 125 deletions

@ -2,6 +2,7 @@ extends Node
signal population_update(count:int)
signal receive_data_from_browser(args)
signal set_structure(structure:Structure)
var current_scene = null

@ -21,4 +21,9 @@ func receive_data_from_browser(args) -> void:
# Emit the signal to notify other nodes
EventBus.receive_data_from_browser.emit(args)
func set_structure(structure:Structure) -> void:
# Emit the signal to notify other nodes
EventBus.set_structure.emit(structure)

@ -1,17 +1,17 @@
[gd_resource type="Resource" script_class="MissionData" load_steps=5 format=3 uid="uid://cua0khnbyusip"]
[ext_resource type="Script" uid="uid://be2nkvjhpebhi" path="res://scripts/mission/mission_objective.gd" id="1_objective"]
[ext_resource type="Resource" uid="uid://dqqe3iofnleup" path="res://structures/pavement-fountain.tres" id="2_hfe31"]
[ext_resource type="Script" uid="uid://cjaik5ku37xqx" path="res://scripts/mission/mission_data.gd" id="2_mission"]
[ext_resource type="Resource" uid="uid://cntgl86ianngh" path="res://structures/building-small-a.tres" id="3_building_a"]
[sub_resource type="Resource" id="Resource_objective1"]
script = ExtResource("1_objective")
type = 1
type = 0
target_count = 3
current_count = 0
description = "Build 3 Type A houses to unlock all building types"
completed = false
structure = ExtResource("3_building_a")
structure = ExtResource("2_hfe31")
[resource]
script = ExtResource("2_mission")
@ -53,7 +53,7 @@ companion_dialog = {
}
}
unlocked_items = Array[String](["res://structures/building-small-a.tres", "res://structures/building-small-b.tres", "res://structures/building-small-c.tres", "res://structures/building-garage.tres", "res://structures/road-straight.tres"])
starting_structures = Array[String](["res://structures/building-small-a.tres", "res://structures/building-small-b.tres"])
starting_structures = Array[String](["res://structures/building-small-a.tres", "res://structures/pavement-fountain.tres"])
open_react_graph = false
open_react_table = false
react_data = {}

@ -218,6 +218,3 @@ text = "Power: 0"
[connection signal="pressed" from="MainButton" to="." method="_on_main_button_pressed"]
[connection signal="pressed" from="SelectionPanel/MarginContainer/VBoxContainer/HBoxContainer/CloseButton" to="." method="hide_panel"]
[connection signal="text_changed" from="SelectionPanel/MarginContainer/VBoxContainer/SearchBar" to="." method="_on_search_text_changed"]
[connection signal="pressed" from="SelectionPanel/MarginContainer/VBoxContainer/FilterButtons/AllButton" to="." method="_on_filter_button_pressed" binds= ["All"]]
[connection signal="pressed" from="SelectionPanel/MarginContainer/VBoxContainer/FilterButtons/GroundButton" to="." method="_on_filter_button_pressed" binds= ["Ground"]]
[connection signal="pressed" from="SelectionPanel/MarginContainer/VBoxContainer/FilterButtons/BuildingButton" to="." method="_on_filter_button_pressed" binds= ["Buildings"]]

@ -1,4 +1,4 @@
[gd_scene load_steps=38 format=3 uid="uid://vgwrcfy1qawf"]
[gd_scene load_steps=39 format=3 uid="uid://vgwrcfy1qawf"]
[ext_resource type="Script" uid="uid://c37h6na3e4twn" path="res://scripts/builder.gd" id="1_jybm7"]
[ext_resource type="Environment" uid="uid://jbptgqvstei3" path="res://scenes/main-environment.tres" id="1_yndf3"]
@ -17,7 +17,7 @@
[ext_resource type="PackedScene" uid="uid://dmsy06s02tcw4" path="res://scenes/generic_text_panel.tscn" id="13_7i6dj"]
[ext_resource type="Resource" uid="uid://bh65eqgid4kxy" path="res://structures/building-small-c.tres" id="13_kf5aa"]
[ext_resource type="Script" uid="uid://ctqqmg4ydlbse" path="res://scripts/mission/mission_ui.gd" id="13_xvw5w"]
[ext_resource type="Script" uid="uid://n26k1k7243dd" path="res://resources/generic_text_panel.resource.gd" id="14_76jlq"]
[ext_resource type="Script" uid="uid://bt3emc1vt40gq" path="res://resources/generic_text_panel.resource.gd" id="14_76jlq"]
[ext_resource type="Script" uid="uid://dnquivpg0ead" path="res://scripts/mission/learning_panel.gd" id="14_q2ymb"]
[ext_resource type="Resource" uid="uid://dqqe3iofnleup" path="res://structures/pavement-fountain.tres" id="14_t5ykj"]
[ext_resource type="Resource" uid="uid://dveu4dnue0d54" path="res://structures/road-intersection.tres" id="15_e755i"]
@ -29,6 +29,7 @@
[ext_resource type="PackedScene" uid="uid://b4s46k58ddpyc" path="res://scenes/sound_panel.tscn" id="21_sound_panel"]
[ext_resource type="Resource" uid="uid://dtal0tl2ee336" path="res://structures/store.tres" id="21_y11qv"]
[ext_resource type="PackedScene" uid="uid://btfwonjc8uj0w" path="res://scenes/mission_select_menu.tscn" id="24_ro3en"]
[ext_resource type="PackedScene" uid="uid://h4a5rdfug811" path="res://scenes/sticky_builder.tscn" id="25_qkpxi"]
[ext_resource type="Script" uid="uid://cjaik5ku37xqx" path="res://scripts/mission/mission_data.gd" id="26_tel4y"]
[ext_resource type="Resource" uid="uid://cua0khnbyusip" path="res://mission/unit_1.02/unlock_buildings.tres" id="27_qkpxi"]
@ -177,6 +178,12 @@ resource_data = ExtResource("14_76jlq")
[node name="MissionSelectMenu" parent="CanvasLayer" instance=ExtResource("24_ro3en")]
visible = false
[node name="StickyBuilder" parent="CanvasLayer" instance=ExtResource("25_qkpxi")]
offset_left = 7.0
offset_top = 124.0
offset_right = -2.0
offset_bottom = -23.0
[node name="MissionManager" type="Node" parent="." node_paths=PackedStringArray("mission_ui", "builder")]
script = ExtResource("10_oe3re")
missions = Array[ExtResource("26_tel4y")]([ExtResource("27_qkpxi")])

@ -0,0 +1,89 @@
[gd_scene load_steps=9 format=3 uid="uid://h4a5rdfug811"]
[ext_resource type="Texture2D" uid="uid://x76da5uk737u" path="res://sprites/sticky_builder_icons/residential.png" id="1_mhep0"]
[ext_resource type="Texture2D" uid="uid://ebradvwxmo3s" path="res://sprites/sticky_builder_icons/commercial.png" id="2_jwyv3"]
[ext_resource type="Script" uid="uid://dpud3hbf66hn7" path="res://scenes/ui/sticky_builder/pop-up-menu-generator.gd" id="2_sqdls"]
[ext_resource type="Texture2D" uid="uid://b6iwpx5ct6rfn" path="res://sprites/sticky_builder_icons/industrial.png" id="4_ebilp"]
[ext_resource type="Texture2D" uid="uid://b8dtgbrvgfv6t" path="res://sprites/sticky_builder_icons/landscape.png" id="5_46yqr"]
[ext_resource type="Texture2D" uid="uid://dnbpauf3umjin" path="res://sprites/sticky_builder_icons/roads.png" id="6_46yqr"]
[ext_resource type="Texture2D" uid="uid://c1moa65wd6m5f" path="res://sprites/sticky_builder_icons/power_plant.png" id="6_r3beh"]
[sub_resource type="Theme" id="Theme_r3beh"]
[node name="StickyBuilder" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Panel" type="Panel" parent="."]
layout_mode = 0
offset_right = 154.0
offset_bottom = 242.0
theme = SubResource("Theme_r3beh")
[node name="VBoxContainer" type="VBoxContainer" parent="Panel"]
layout_mode = 2
offset_right = 148.0
offset_bottom = 224.0
[node name="Row_1_HBoxContainer" type="HBoxContainer" parent="Panel/VBoxContainer"]
layout_mode = 2
[node name="Roads" type="MenuButton" parent="Panel/VBoxContainer/Row_1_HBoxContainer"]
layout_mode = 2
tooltip_text = "Residential Structures"
icon = ExtResource("6_46yqr")
item_count = 1
popup/item_0/text = "Residential"
popup/item_0/id = 0
script = ExtResource("2_sqdls")
[node name="Residential" type="MenuButton" parent="Panel/VBoxContainer/Row_1_HBoxContainer"]
layout_mode = 2
tooltip_text = "Residential Structures"
icon = ExtResource("1_mhep0")
item_count = 1
popup/item_0/text = "Residential"
popup/item_0/id = 0
script = ExtResource("2_sqdls")
filter_type = 1
[node name="Row_2_HBoxContainer2" type="HBoxContainer" parent="Panel/VBoxContainer"]
layout_mode = 2
[node name="Commercial" type="MenuButton" parent="Panel/VBoxContainer/Row_2_HBoxContainer2"]
layout_mode = 2
tooltip_text = "Commercial Structures"
icon = ExtResource("2_jwyv3")
script = ExtResource("2_sqdls")
filter_type = 2
[node name="Industrial" type="MenuButton" parent="Panel/VBoxContainer/Row_2_HBoxContainer2"]
layout_mode = 2
tooltip_text = "Residential Structures"
icon = ExtResource("4_ebilp")
item_count = 1
popup/item_0/text = "Residential"
popup/item_0/id = 0
script = ExtResource("2_sqdls")
filter_type = 3
[node name="Row_3_HBoxContainer3" type="HBoxContainer" parent="Panel/VBoxContainer"]
layout_mode = 2
[node name="Power" type="MenuButton" parent="Panel/VBoxContainer/Row_3_HBoxContainer3"]
layout_mode = 2
tooltip_text = "Commercial Structures"
icon = ExtResource("6_r3beh")
script = ExtResource("2_sqdls")
filter_type = 6
[node name="Landscape" type="MenuButton" parent="Panel/VBoxContainer/Row_3_HBoxContainer3"]
layout_mode = 2
tooltip_text = "Commercial Structures"
icon = ExtResource("5_46yqr")
script = ExtResource("2_sqdls")
filter_type = 5

@ -0,0 +1,141 @@
extends MenuButton
class_name MenuItemGenerator
# Export a filter type property that uses the Structure.StructureType enum
@export var filter_type: Structure.StructureType
# Private variable to store loaded structures
var _structures = []
# Icons for locked/unlocked status (set these in _ready)
var _lock_icon: Texture2D
var _unlock_icon: Texture2D
func _ready():
# Connect the signal for item selection
get_popup().id_pressed.connect(_on_item_selected)
# Add to group for easy refreshing of all structure menus
add_to_group("structure_menus")
# Load icons (you'll need to create or find these icons)
_lock_icon = load("res://sprites/sticky_builder_icons/lock.png") if ResourceLoader.exists("res://sprites/sticky_builder_icons/lock.png") else null
if(_lock_icon):
_lock_icon = _get_scaled_icon(_lock_icon,32)
# Load all structures and populate the menu
_load_structures()
_populate_menu()
# Load all structure resources from the structures directory
func _load_structures():
_structures.clear()
var dir = DirAccess.open("res://structures")
if not dir:
push_error("Failed to access the structures directory")
return
dir.list_dir_begin()
var file_name = dir.get_next()
while file_name != "":
if not dir.current_is_dir() and file_name.ends_with(".tres"):
var structure = load("res://structures/" + file_name)
# Only add structures that match our filter type
if structure is Structure and structure.type == filter_type:
_structures.append(structure)
file_name = dir.get_next()
# Sort structures by size category first (small to large), then by title
_structures.sort_custom(func(a, b):
# First compare by size category
if a.size_category != b.size_category:
return a.size_category < b.size_category
# If same size category, sort by title
return a.title < b.title)
# Populate the menu with the loaded structures
func _populate_menu():
var popup = get_popup()
popup.clear()
var current_size_category = -1
for i in range(_structures.size()):
var structure = _structures[i]
# Add separator between size categories
if structure.size_category != current_size_category:
if i > 0:
popup.add_separator()
current_size_category = structure.size_category
# Add size category header (optional)
#var category_name = ""
#match current_size_category:
#Structure.SizeCategory.SMALL: category_name = "Small"
#Structure.SizeCategory.MEDIUM: category_name = "Medium"
#Structure.SizeCategory.LARGE: category_name = "Large"
#
#if category_name != "":
#popup.add_item(category_name, -1)
#popup.set_item_disabled(popup.item_count - 1, true)
# Add the structure item with price in the name
var item_text = structure.title
if structure.price > 0:
item_text += " ($" + str(structure.price) + ")"
# Add lock/unlock icon if we're showing all structures
if not structure.unlocked:
if _lock_icon:
popup.add_icon_item(_lock_icon, item_text)
popup.set_item_disabled(popup.item_count - 1, true)
else:
popup.add_item(item_text, i)
# Handle the menu item selection
func _on_item_selected(id: int):
if id >= 0 and id < _structures.size():
var selected_structure = _structures[id]
# Get the original structure index in the builder's structure array
var structure_resource_path = selected_structure.resource_path
Globals.set_structure(selected_structure)
# Method to manually refresh the menu items
func refresh():
_load_structures()
_populate_menu()
# Method to unlock a structure by resource path and refresh the menu
func unlock_structure(resource_path: String):
var structure = load(resource_path)
if structure is Structure and not structure.unlocked:
structure.unlocked = true
structure.resource_changed.emit()
# Save the resource
ResourceSaver.save(structure, resource_path)
# Refresh the menu
refresh()
return true
return false
func _get_scaled_icon(texture: Texture2D, target_height: int) -> Texture2D:
if texture == null:
return null
var img = texture.get_image()
var scale = target_height / float(img.get_height())
var new_width = int(img.get_width() * scale)
img.resize(new_width, target_height, Image.INTERPOLATE_LANCZOS)
var new_texture = ImageTexture.create_from_image(img)
return new_texture

@ -89,6 +89,10 @@ func _ready():
plane = Plane(Vector3.UP, Vector3.ZERO)
hud_manager = get_node_or_null("/root/Main/CanvasLayer/HUD")
# Connect event bus for emitting structure menu stuff
EventBus.set_structure.connect(action_structure_toggle)
# Create invalid placement material
invalid_placement_material = StandardMaterial3D.new()
invalid_placement_material.albedo_color = Color(1, 0, 0, 0.5) # Semi-transparent red
@ -179,7 +183,7 @@ func _process(delta):
# Controls
action_rotate() # Rotates selection 90 degrees
action_structure_toggle() # Toggles between structures
#action_structure_toggle() # Toggles between structures
action_save() # Saving
action_load() # Loading
@ -329,7 +333,7 @@ func action_build(gridmap_position, can_place: bool):
# For power plants, we handle them specially
var is_power_plant = structures[index].model.resource_path.contains("power_plant")
# For grass and trees (terrain), we need special handling
var is_terrain = structures[index].type == Structure.StructureType.TERRAIN
var is_terrain = structures[index].type == Structure.StructureType.LANDSCAPE
# Check if we're in mission 3 (when we should use construction workers)
var use_worker_construction = true
@ -484,7 +488,7 @@ func action_demolish(gridmap_position):
elif is_terrain:
# Find the terrain structure index
for i in range(structures.size()):
if structures[i].type == Structure.StructureType.TERRAIN:
if structures[i].type == Structure.StructureType.LANDSCAPE:
structure_index = i
break
@ -529,61 +533,15 @@ func action_rotate():
# Toggle between structures to build
func action_structure_toggle():
# Original keyboard controls
if Input.is_action_just_pressed("structure_next"):
print("\nE key pressed - attempting to switch to next structure")
# First, collect all unlocked structure indices in order
var unlocked_indices = []
for i in range(_structures.size()):
var structure = _structures[i]
if structure.model:
if structure.unlocked:
unlocked_indices.append(i)
if unlocked_indices.is_empty():
print("WARNING: No unlocked structures available!")
return
# Find the next unlocked structure
var current_pos = unlocked_indices.find(index)
if current_pos == -1:
# If current index is not in unlocked list, start from beginning
index = unlocked_indices[0]
print("Current structure not unlocked, starting from first unlocked: ", index)
else:
# Move to next structure, wrapping around to start if at end
index = unlocked_indices[(current_pos + 1) % unlocked_indices.size()]
print("Moving to next unlocked structure: ", index)
func action_structure_toggle(structure:Structure):
var found_index = _structures.find(structure)
if not found_index:
print("No structure found!")
else:
index = found_index
update_structure()
if Input.is_action_just_pressed("structure_previous"):
print("\nQ key pressed - attempting to switch to previous structure")
# First, collect all unlocked structure indices in order
var unlocked_indices = []
for i in range(_structures.size()):
var structure = _structures[i]
if structure.model:
if structure.unlocked:
unlocked_indices.append(i)
if unlocked_indices.is_empty():
print("WARNING: No unlocked structures available!")
return
# Find the previous unlocked structure
var current_pos = unlocked_indices.find(index)
if current_pos == -1:
# If current index is not in unlocked list, start from end
index = unlocked_indices[-1]
print("Current structure not unlocked, starting from last unlocked: ", index)
else:
# Move to previous structure, wrapping around to end if at start
index = unlocked_indices[(current_pos - 1 + unlocked_indices.size()) % unlocked_indices.size()]
print("Moving to previous unlocked structure: ", index)
update_structure()
# Update the structure visual in the 'cursor'
func update_structure():
@ -1150,7 +1108,7 @@ func place_structure(structure_index: int, position: Vector3, rotation: float =
var is_road = structures[index].type == Structure.StructureType.ROAD
var is_residential = structures[index].type == Structure.StructureType.RESIDENTIAL_BUILDING
var is_power_plant = structures[index].model.resource_path.contains("power_plant")
var is_terrain = structures[index].type == Structure.StructureType.TERRAIN
var is_terrain = structures[index].type == Structure.StructureType.LANDSCAPE
if is_road:
# For roads, we'll need to track in our data without using the GridMap

@ -44,7 +44,7 @@ func _ready():
# Get references to panels
controls_panel = get_node_or_null("/root/Main/CanvasLayer/ControlsPanel")
sound_panel = get_node_or_null("/root/Main/CanvasLayer/SoundPanel")
structure_menu = get_node_or_null("/root/Main/CanvasLayer/StructureMenu")
# structure_menu = get_node_or_null("/root/Main/CanvasLayer/StructureMenu")
# Setup mission select button
if mission_select_button:
@ -56,8 +56,8 @@ func _ready():
# Setup mission select menu
_setup_mission_select_menu()
# Setup structure menu
_setup_structure_menu()
# # Setup structure menu
# _setup_structure_menu()
# Wait a frame to ensure all nodes are ready
await get_tree().process_frame

@ -224,7 +224,7 @@ static func send_open_table(table_data: Dictionary):
if (window.parent) {
console.log('Sending missionStarted message to parent window');
window.parent.postMessage({
type: 'stemCity_missionStarted',
type: 'open_react_table',
data: %s,
source: 'godot-game',
timestamp: Date.now()
@ -237,7 +237,7 @@ static func send_open_table(table_data: Dictionary):
}
})();
""" % message_json
if Engine.has_singleton("JavaScriptBridge"):
var js = Engine.get_singleton("JavaScriptBridge")
js.eval(script)

@ -107,10 +107,9 @@ func start_construction(position: Vector3, structure_index: int, rotation_basis
# Place plot marker (outline/transparent version of the building)
var plot
var structure = builder.structures[structure_index]
# Use the actual structure model for the transparent preview if available
if structure_index >= 0 and structure_index < builder.structures.size():
var structure = builder.structures[structure_index]
plot = structure.model.instantiate()
print("Created plot using structure model: ", structure.model.resource_path)
else:
@ -139,8 +138,9 @@ func start_construction(position: Vector3, structure_index: int, rotation_basis
construction_sites[position]["plot"] = plot
# Always spawn a worker for construction
_spawn_worker_for_construction(position)
print("=== Construction Started ===\n")
if structure.spawn_builder:
_spawn_worker_for_construction(position)
print("=== Construction Started ===\n")
# Send building_selected dialog to learning companion if available in the current mission
if mission_manager and mission_manager.current_mission and mission_manager.learning_companion_connected:
@ -155,7 +155,6 @@ func start_construction(position: Vector3, structure_index: int, rotation_basis
# For power plant mission (mission 5), send a special dialog
if structure_index >= 0 and structure_index < builder.structures.size():
var structure = builder.structures[structure_index]
if structure.model.resource_path.contains("power_plant") and mission.id == "5":
const JSBridge = preload("res://scripts/javascript_bridge.gd")
if JSBridge.has_interface() and mission.companion_dialog.has("building_selected"):

@ -303,7 +303,7 @@ func _on_learning_panel_closed_for_react() -> void:
JSBridge.send_open_graph(current_mission.react_data)
elif current_mission.open_react_table:
print("Opening React table with data:", current_mission.react_table_data)
JSBridge.send_open_table(current_mission.react_table_data)
JSBridge.send_open_table({"table_data":current_mission.react_table_data, "description": current_mission.intro_text})
# We're now using current_mission directly, so no need to clear anything
@ -457,7 +457,9 @@ func _on_structure_placed(structure_index, position):
# Handle structure-based objectives
if current_objective.type == ObjectiveType.BUILD_STRUCTURE:
# Check if the structure matches the objective's required structure exactly
if current_objective.structure and structure.model and current_objective.structure.resource_path == structure.model.resource_path:
print(current_objective.structure.resource_path)
print(structure.model.resource_path)
if current_objective.structure and structure.model and current_objective.structure.resource_path == structure.resource_path:
# For buildings, we'll update progress after construction completes
if structure.type == Structure.StructureType.RESIDENTIAL_BUILDING:
# Connect to the construction_completed signal if it exists

@ -7,21 +7,28 @@ enum StructureType {
COMMERCIAL_BUILDING,
INDUSTRIAL_BUILDING,
SPECIAL_BUILDING,
DECORATION,
TERRAIN,
LANDSCAPE,
POWER_PLANT
}
enum SizeCategory {
SMALL,
MEDIUM,
LARGE
}
@export_subgroup("Gameplay")
@export var title: String = ""
@export var type:StructureType
@export var price:int # Price of the structure when building
@export var size_category: SizeCategory
@export_subgroup("Model")
@export var model:PackedScene # Model of the structure
@export_subgroup("Gameplay")
@export var type:StructureType
@export var price:int # Price of the structure when building
@export_subgroup("Population")
@export var population_count:int = 0 # How many residents this structure adds

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://ebradvwxmo3s"
path="res://.godot/imported/commercial.png-c7351ecf8f43d4710e78aada7553faea.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/commercial.png"
dest_files=["res://.godot/imported/commercial.png-c7351ecf8f43d4710e78aada7553faea.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b6iwpx5ct6rfn"
path="res://.godot/imported/industrial.png-337a1ff1161d1fe85c77f2960366bd99.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/industrial.png"
dest_files=["res://.godot/imported/industrial.png-337a1ff1161d1fe85c77f2960366bd99.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b8dtgbrvgfv6t"
path="res://.godot/imported/landscape.png-4100953829b90500e627ab137eb8b831.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/landscape.png"
dest_files=["res://.godot/imported/landscape.png-4100953829b90500e627ab137eb8b831.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

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://qct4wg050b8t"
path="res://.godot/imported/lock.jpg-1d14c2fcd1b6c530830e6d171b854c03.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/lock.jpg"
dest_files=["res://.godot/imported/lock.jpg-1d14c2fcd1b6c530830e6d171b854c03.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bhirwotya28tp"
path="res://.godot/imported/lock.png-3bb15a91918dca57b868d97e7e5c1760.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/lock.png"
dest_files=["res://.godot/imported/lock.png-3bb15a91918dca57b868d97e7e5c1760.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c1moa65wd6m5f"
path="res://.godot/imported/power_plant.png-3169ad219b01a6309d8edadae8e53f70.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/power_plant.png"
dest_files=["res://.godot/imported/power_plant.png-3169ad219b01a6309d8edadae8e53f70.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://x76da5uk737u"
path="res://.godot/imported/residential.png-a0a319ba8916f7a485ae6c08054fb548.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/residential.png"
dest_files=["res://.godot/imported/residential.png-a0a319ba8916f7a485ae6c08054fb548.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

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnbpauf3umjin"
path="res://.godot/imported/roads.png-e7ed12eaeee16a42d36da0f2ccc77851.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://sprites/sticky_builder_icons/roads.png"
dest_files=["res://.godot/imported/roads.png-e7ed12eaeee16a42d36da0f2ccc77851.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,15 +5,16 @@
[resource]
script = ExtResource("2_jrinw")
title = ""
model = ExtResource("1_gyclk")
type = 1
title = "Small Garage"
type = 4
price = 70
size_category = 0
model = ExtResource("1_gyclk")
population_count = 0
kW_usage = 0.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
spawn_builder = false
unlocked = true
spawn_builder = true
description = "Garage"
thumbnail = "res://sprites/updated/garage.png"

@ -5,15 +5,16 @@
[resource]
script = ExtResource("2_q3i1h")
title = "Residential Building"
model = ExtResource("1_v5apy")
title = "Small Residential"
type = 1
price = 50
size_category = 0
model = ExtResource("1_v5apy")
population_count = 1
kW_usage = 1.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
unlocked = true
spawn_builder = false
description = "A small residential building that can house 1 person. Perfect for getting your city started!"
thumbnail = "res://sprites/updated/building-small-a.png"

@ -5,15 +5,16 @@
[resource]
script = ExtResource("2_a2t3e")
title = "Residential Building B"
model = ExtResource("1_klt7o")
title = "Medium Residential"
type = 1
price = 60
size_category = 1
model = ExtResource("1_klt7o")
population_count = 1
kW_usage = 1.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
unlocked = true
spawn_builder = false
description = "A slightly larger residential building that can house 1 person. A good upgrade from the basic house!"
thumbnail = "res://sprites/updated/building-small-b.png"

@ -5,15 +5,16 @@
[resource]
script = ExtResource("2_rkiq0")
title = ""
model = ExtResource("1_6yyww")
title = "Large Residential"
type = 1
price = 70
size_category = 2
model = ExtResource("1_6yyww")
population_count = 5
kW_usage = 1.0
kW_production = 0.0
selector_scale = 2.8
unlocked = false
unlocked = true
spawn_builder = true
description = "A spacious multi-story apartment complex that comfortably houses 5 citizens, providing efficient population growth for your expanding city."
thumbnail = "res://sprites/updated/building-small-c.png"

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_b2sah")
title = "Trees"
model = ExtResource("1_nbdd1")
type = 6
title = "Tall Trees"
type = 5
price = 25
size_category = 0
model = ExtResource("1_nbdd1")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_pnpij")
title = ""
model = ExtResource("1_lcgc1")
type = 6
title = "Small Trees"
type = 5
price = 25
size_category = 0
model = ExtResource("1_lcgc1")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_1i4lf")
title = ""
model = ExtResource("1_2n0ef")
type = 6
title = "Grass"
type = 5
price = 10
size_category = 0
model = ExtResource("1_2n0ef")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_wqyte")
title = ""
model = ExtResource("1_r2n53")
type = 6
title = "Fountain"
type = 5
price = 10
size_category = 0
model = ExtResource("1_r2n53")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_i48go")
title = ""
model = ExtResource("1_gudnj")
type = 6
title = "Pavement"
type = 0
price = 10
size_category = 0
model = ExtResource("1_gudnj")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -6,9 +6,10 @@
[resource]
script = ExtResource("3_oloyn")
title = "Power Plant"
model = ExtResource("1_r8n8k")
type = 7
type = 6
price = 5000
size_category = 0
model = ExtResource("1_r8n8k")
population_count = 0
kW_usage = 0.0
kW_production = 40.0

@ -6,9 +6,10 @@
[resource]
script = ExtResource("3_oloyn")
title = "Road Corner"
model = ExtResource("1_r8n8k")
type = 0
price = 25
size_category = 0
model = ExtResource("1_r8n8k")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_3eq5k")
title = ""
model = ExtResource("1_pnjl2")
title = "Intersection"
type = 0
price = 25
size_category = 0
model = ExtResource("1_pnjl2")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_xa71m")
title = ""
model = ExtResource("1_ku0rj")
title = "Split"
type = 0
price = 25
size_category = 0
model = ExtResource("1_ku0rj")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -5,10 +5,11 @@
[resource]
script = ExtResource("2_470aq")
title = ""
model = ExtResource("1_i07jw")
title = "Post Lighting"
type = 0
price = 25
size_category = 0
model = ExtResource("1_i07jw")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -6,9 +6,10 @@
[resource]
script = ExtResource("1_5fmmh")
title = "Road"
model = ExtResource("1_ump1f")
type = 0
price = 25
size_category = 0
model = ExtResource("1_ump1f")
population_count = 0
kW_usage = 0.0
kW_production = 0.0

@ -1,14 +1,15 @@
[gd_resource type="Resource" script_class="Structure" load_steps=3 format=3 uid="uid://dtal0tl2ee336"]
[ext_resource type="PackedScene" uid="uid://h0vrvst3cumo" path="res://models/store.glb" id="1_3ue71"]
[ext_resource type="PackedScene" uid="uid://rdfjckc8h1dp" path="res://models/store.glb" id="1_3ue71"]
[ext_resource type="Script" uid="uid://uxn26t1x4ehr" path="res://scripts/structure.gd" id="2_7fhbk"]
[resource]
script = ExtResource("2_7fhbk")
title = "Store"
model = ExtResource("1_3ue71")
type = 2
price = 70
size_category = 0
model = ExtResource("1_3ue71")
population_count = 0
kW_usage = 1.0
kW_production = 0.0