style: apply gdformat formatting across the entire project
Auto-format all GDScript files using gdformat from gdtoolkit. This is a baseline formatting pass to ensure consistent style: - Normalizes indentation and spacing - Wraps long lines to 100 characters - Removes trailing whitespace - Standardizes blank lines between functions 68 files reformatted, 8 files left unchanged (3rd-party addon files with parse errors excluded).
This commit is contained in:
+30
-25
@@ -17,6 +17,7 @@ var wood_priority := 1.0
|
||||
var safety_priority := 1.0
|
||||
var knowledge_priority := 1.0
|
||||
|
||||
|
||||
func update_modifiers() -> void:
|
||||
food_modifier = 1.0
|
||||
wood_modifier = 1.0
|
||||
@@ -30,15 +31,15 @@ func update_modifiers() -> void:
|
||||
safety_modifier = 2.0
|
||||
if knowledge > 25:
|
||||
knowledge_modifier = 0.75
|
||||
|
||||
debug_log("FoodMod=%s SafetyMod=%s KnowledgeMod=%s" %
|
||||
[
|
||||
food_modifier,
|
||||
safety_modifier,
|
||||
knowledge_modifier
|
||||
]
|
||||
|
||||
debug_log(
|
||||
(
|
||||
"FoodMod=%s SafetyMod=%s KnowledgeMod=%s"
|
||||
% [food_modifier, safety_modifier, knowledge_modifier]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
|
||||
func update_priorities() -> void:
|
||||
food_priority = 1.0
|
||||
wood_priority = 1.0
|
||||
@@ -68,6 +69,7 @@ func update_priorities() -> void:
|
||||
if debug_logs:
|
||||
print(get_priority_summary())
|
||||
|
||||
|
||||
func apply_resource_delta(resource_id: StringName, amount: float) -> void:
|
||||
match resource_id:
|
||||
&"food":
|
||||
@@ -87,6 +89,7 @@ func apply_resource_delta(resource_id: StringName, amount: float) -> void:
|
||||
update_modifiers()
|
||||
update_priorities()
|
||||
|
||||
|
||||
func apply_npc_task(npc: SimNPC) -> void:
|
||||
if npc.is_dead:
|
||||
return
|
||||
@@ -123,27 +126,29 @@ func apply_npc_task(npc: SimNPC) -> void:
|
||||
update_modifiers()
|
||||
update_priorities()
|
||||
|
||||
func get_summary() -> String:
|
||||
|
||||
return "Village | food: %s | wood: %s | safety: %s | knowledge: %s | priorities F/W/S/K: %s/%s/%s/%s" % [
|
||||
round(food),
|
||||
round(wood),
|
||||
round(safety),
|
||||
round(knowledge),
|
||||
food_priority,
|
||||
wood_priority,
|
||||
safety_priority,
|
||||
knowledge_priority
|
||||
]
|
||||
func get_summary() -> String:
|
||||
return (
|
||||
"Village | food: %s | wood: %s | safety: %s | knowledge: %s | priorities F/W/S/K: %s/%s/%s/%s"
|
||||
% [
|
||||
round(food),
|
||||
round(wood),
|
||||
round(safety),
|
||||
round(knowledge),
|
||||
food_priority,
|
||||
wood_priority,
|
||||
safety_priority,
|
||||
knowledge_priority
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
func get_priority_summary() -> String:
|
||||
return "Priorities | food: %s | wood: %s | safety: %s | knowledge: %s" % [
|
||||
food_priority,
|
||||
wood_priority,
|
||||
safety_priority,
|
||||
knowledge_priority
|
||||
]
|
||||
return (
|
||||
"Priorities | food: %s | wood: %s | safety: %s | knowledge: %s"
|
||||
% [food_priority, wood_priority, safety_priority, knowledge_priority]
|
||||
)
|
||||
|
||||
|
||||
func debug_log(message: String) -> void:
|
||||
if debug_logs:
|
||||
|
||||
Reference in New Issue
Block a user