style: rename files
This commit is contained in:
parent
8023498fa7
commit
77490fc067
10 changed files with 15 additions and 17 deletions
|
@ -19,7 +19,7 @@ encrypt_directory=false
|
|||
custom_template/debug=""
|
||||
custom_template/release=""
|
||||
debug/export_console_wrapper=0
|
||||
binary_format/embed_pck=true
|
||||
binary_format/embed_pck=false
|
||||
texture_format/bptc=true
|
||||
texture_format/s3tc=true
|
||||
texture_format/etc=false
|
||||
|
|
|
@ -12,7 +12,7 @@ config_version=5
|
|||
|
||||
config/name="MindustryTools"
|
||||
config/version="0.0.1"
|
||||
run/main_scene="res://src/EnergyTable.tscn"
|
||||
run/main_scene="res://src/energy_table.tscn"
|
||||
config/features=PackedStringArray("4.2", "GL Compatibility")
|
||||
boot_splash/show_image=false
|
||||
boot_splash/fullsize=false
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
extends Control
|
||||
|
||||
const BuildingOptionItem = preload("res://src/BuildingOptionItem.gd")
|
||||
const buildings_json = preload("res://src/Buildings.tres")
|
||||
const buildings_json = preload("res://src/buildings.tres")
|
||||
|
||||
signal selected(item: BuildingOptionItem)
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://bedenbuamujfg"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/BuildingOption.gd" id="1_m7cva"]
|
||||
[ext_resource type="Script" path="res://src/building_option.gd" id="1_m7cva"]
|
||||
|
||||
[node name="BuildingOption" type="HBoxContainer"]
|
||||
size_flags_horizontal = 3
|
|
@ -1,3 +1,5 @@
|
|||
class_name BuildingOptionItem
|
||||
|
||||
var id: int
|
||||
var label: String
|
||||
var energy: int
|
|
@ -1,6 +1,6 @@
|
|||
extends Control
|
||||
|
||||
const table_row = preload("res://src/EnergyTableRow.tscn")
|
||||
const table_row = preload("res://src/energy_table_row.tscn")
|
||||
@onready var table_body = $VBoxContainer/TableBody/VBoxContainer
|
||||
@onready var total_energy_label = $VBoxContainer/TableSummary/HBoxContainer/TotalEnergyLabel
|
||||
|
||||
|
@ -19,9 +19,9 @@ func add_row(data_row: Dictionary):
|
|||
data.append(data_row)
|
||||
|
||||
var instance = table_row.instantiate()
|
||||
if data_row["building_id"]:
|
||||
if data_row.has("building_id"):
|
||||
instance.building_id = data_row["building_id"]
|
||||
if data_row["building_count"]:
|
||||
if data_row.has("building_count"):
|
||||
instance.building_count = data_row["building_count"]
|
||||
table_body.add_child(instance)
|
||||
instance.add_to_group("Persist")
|
||||
|
@ -65,7 +65,6 @@ func save_data():
|
|||
var save_data_file = FileAccess.open("user://energy_table.save", FileAccess.WRITE)
|
||||
var save_nodes = get_tree().get_nodes_in_group("Persist")
|
||||
for node in save_nodes:
|
||||
print(node.name)
|
||||
if node.scene_file_path.is_empty():
|
||||
print("persistent node '%s' is not an instanced scene, skipped" % node.name)
|
||||
continue
|
|
@ -1,6 +1,6 @@
|
|||
[gd_scene load_steps=2 format=3 uid="uid://cbegq3jfbfb6t"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/EnergyTable.gd" id="1_k0c5x"]
|
||||
[ext_resource type="Script" path="res://src/energy_table.gd" id="1_vq16x"]
|
||||
|
||||
[node name="EnergyTable" type="Control"]
|
||||
layout_mode = 3
|
||||
|
@ -9,7 +9,7 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_k0c5x")
|
||||
script = ExtResource("1_vq16x")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 1
|
|
@ -1,7 +1,5 @@
|
|||
extends HBoxContainer
|
||||
|
||||
const BuildingOptionItem = preload("res://src/BuildingOptionItem.gd")
|
||||
|
||||
|
||||
signal deleted(instance: Node)
|
||||
signal total_energy_changed(new_value: int)
|
|
@ -1,16 +1,16 @@
|
|||
[gd_scene load_steps=3 format=3 uid="uid://cvc75dbbiut78"]
|
||||
|
||||
[ext_resource type="Script" path="res://src/EnergyTableRow.gd" id="1_ptpv1"]
|
||||
[ext_resource type="PackedScene" uid="uid://bedenbuamujfg" path="res://src/BuildingOption.tscn" id="2_7rmkk"]
|
||||
[ext_resource type="Script" path="res://src/energy_table_row.gd" id="1_67d5k"]
|
||||
[ext_resource type="PackedScene" uid="uid://bedenbuamujfg" path="res://src/building_option.tscn" id="2_vf51a"]
|
||||
|
||||
[node name="EnergyTableRow" type="HBoxContainer"]
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 35.0
|
||||
grow_horizontal = 2
|
||||
script = ExtResource("1_ptpv1")
|
||||
script = ExtResource("1_67d5k")
|
||||
|
||||
[node name="BuildingOption" parent="." instance=ExtResource("2_7rmkk")]
|
||||
[node name="BuildingOption" parent="." instance=ExtResource("2_vf51a")]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="BuildingCountLineEdit" type="LineEdit" parent="."]
|
Loading…
Add table
Reference in a new issue