diff --git a/.github/workflows/submit-develop.yml b/.github/workflows/submit-develop.yml index 4534bc5..ca34b52 100644 --- a/.github/workflows/submit-develop.yml +++ b/.github/workflows/submit-develop.yml @@ -5,7 +5,7 @@ on: branches: [ 'develop' ] env: - GODOT_VERSION: 4.4 + GODOT_VERSION: 4.5 VERSION_FILE: project.godot VERSION_REGEX: config\/version=\"\K[0-9.\-A-z]* diff --git a/.github/workflows/verify-develop.yml b/.github/workflows/verify-develop.yml index 448c384..fb9825d 100644 --- a/.github/workflows/verify-develop.yml +++ b/.github/workflows/verify-develop.yml @@ -5,7 +5,7 @@ on: branches: [ 'develop' ] env: - GODOT_VERSION: 4.4 + GODOT_VERSION: 4.5 VERSION_FILE: project.godot VERSION_REGEX: config\/version=\"\K[0-9.\-A-z]* diff --git a/addons/datatable/scripts/datatable_row.gd b/addons/datatable/scripts/datatable_row.gd index 7015aa4..49a8f7e 100644 --- a/addons/datatable/scripts/datatable_row.gd +++ b/addons/datatable/scripts/datatable_row.gd @@ -1,3 +1,4 @@ +@abstract class_name DatatableRow extends Resource ## Row schema definition for usage with [Datatable] resources. ## diff --git a/addons/persistent_data/scripts/metadata_section.gd b/addons/persistent_data/scripts/metadata_section.gd index 6466b12..d5f601d 100644 --- a/addons/persistent_data/scripts/metadata_section.gd +++ b/addons/persistent_data/scripts/metadata_section.gd @@ -1,3 +1,4 @@ +@abstract class_name MetadataSection extends PersistentDataSection func _init(file: PersistentDataFile): diff --git a/addons/persistent_data/scripts/persistent_data_file.gd b/addons/persistent_data/scripts/persistent_data_file.gd index 8ab0465..95666ea 100644 --- a/addons/persistent_data/scripts/persistent_data_file.gd +++ b/addons/persistent_data/scripts/persistent_data_file.gd @@ -1,3 +1,4 @@ +@abstract class_name PersistentDataFile extends Node enum DeserialisationResult { @@ -9,8 +10,8 @@ enum DeserialisationResult { var metadata_section: MetadataSection var save_sections: Dictionary = {} -func get_file_name() -> String: - return "user://persistent_data.save" +@abstract +func get_file_name() -> String func register_metadata(metadata: MetadataSection): metadata_section = metadata diff --git a/addons/persistent_data/scripts/persistent_data_section.gd b/addons/persistent_data/scripts/persistent_data_section.gd index 4210560..a60d488 100644 --- a/addons/persistent_data/scripts/persistent_data_section.gd +++ b/addons/persistent_data/scripts/persistent_data_section.gd @@ -1,3 +1,4 @@ +@abstract class_name PersistentDataSection const DeserialisationResult = PersistentDataFile.DeserialisationResult diff --git a/assets/actions/scripts/character_action_navigate_callback.gd b/assets/actions/scripts/character_action_navigate_callback.gd index 467ae04..2ef760b 100644 --- a/assets/actions/scripts/character_action_navigate_callback.gd +++ b/assets/actions/scripts/character_action_navigate_callback.gd @@ -21,4 +21,4 @@ func on_abort(): nav_to_action.abort() func on_nav_complete(): - Utils.log_warn("No callback on completed navigation") + Log.warn("No callback on completed navigation") diff --git a/assets/actions/scripts/world_character_action.gd b/assets/actions/scripts/world_character_action.gd index 232faaf..f02a022 100644 --- a/assets/actions/scripts/world_character_action.gd +++ b/assets/actions/scripts/world_character_action.gd @@ -4,7 +4,7 @@ class_name WorldCharacterAction extends Node3D func run_action(character: Character): if not character_action: - Utils.log_warn("CharacterActions", "World action, ", name, ", has undefined action") + Log.warn("CharacterActions", "World action, ", name, ", has undefined action") return if "target_pos" in character_action: diff --git a/assets/character/scripts/character.gd b/assets/character/scripts/character.gd index a8f6b15..2bf9bc5 100644 --- a/assets/character/scripts/character.gd +++ b/assets/character/scripts/character.gd @@ -1,3 +1,4 @@ +@abstract class_name Character extends CharacterBody3D @export var character_id: StringName diff --git a/assets/character/scripts/character_action.gd b/assets/character/scripts/character_action.gd index df0905a..04df3e8 100644 --- a/assets/character/scripts/character_action.gd +++ b/assets/character/scripts/character_action.gd @@ -1,3 +1,4 @@ +@abstract class_name CharacterAction extends Resource signal started diff --git a/assets/common/scripts/game_manager.gd b/assets/common/scripts/game_manager.gd index dbd778f..b46c834 100644 --- a/assets/common/scripts/game_manager.gd +++ b/assets/common/scripts/game_manager.gd @@ -30,7 +30,7 @@ var scanner_attr: SoilAttr: var game_world: GameWorld: set(world): - Utils.log_info("Initialisation", "Game world registered") + Log.info("Initialisation", "Game world registered") game_world = world func _ready(): @@ -216,7 +216,7 @@ func get_crop_health(zone_id: String, cell: Vector2i, seed_id: String) -> float: func plant_crop(seed_id: String, cell: Vector2i, zone_id: String = current_zone.zone_id): if not crops_dt.has(seed_id): - Utils.log_error("Crops", seed_id, " is an invalid item id to plant") + Log.error("Crops", seed_id, " is an invalid item id to plant") return Savegame.zones.crops[zone_id][cell] = { "seed_id": seed_id, @@ -270,13 +270,13 @@ func valid_item(item_id: String) -> bool: func get_item_details(item_id: String) -> ItemConfigRow: if not valid_item(item_id): - Utils.log_warn("Item", item_id, " is not a valid item type") + Log.warn("Item", item_id, " is not a valid item type") return null return items_dt.get_row(item_id) as ItemConfigRow func get_item_count(item_id: String): if not valid_item(item_id): - Utils.log_warn("Item", item_id, " is not a valid item type") + Log.warn("Item", item_id, " is not a valid item type") return 0 if not Savegame.player.inventory.has(item_id): return 0 @@ -287,10 +287,10 @@ func change_item_count(item_id: String, change: int): func set_item_count(item_id: String, value: int): if not valid_item(item_id): - Utils.log_warn("Item", item_id, " is not a valid item type") + Log.warn("Item", item_id, " is not a valid item type") return if value < 0: - Utils.log_warn("Item", "Cannot have fewer than 0 of any ", item_id) + Log.warn("Item", "Cannot have fewer than 0 of any ", item_id) return if get_item_count(item_id) == 0 and value > 0 and not Savegame.player.hotbar.has(item_id): @@ -300,7 +300,7 @@ func set_item_count(item_id: String, value: int): Savegame.player.hotbar.erase(item_id) hotbar_updated.emit() - Utils.log_info("Item", "Setting ", item_id, " count to ", value) + Log.info("Item", "Setting ", item_id, " count to ", value) if value == 0: Savegame.player.inventory.erase(item_id) else: diff --git a/assets/common/scripts/game_world.gd b/assets/common/scripts/game_world.gd index 69ebf79..ad01d81 100644 --- a/assets/common/scripts/game_world.gd +++ b/assets/common/scripts/game_world.gd @@ -15,16 +15,16 @@ func _ready(): load_level(entrypoint_scene, {}, entrypoint_transition_scene) func load_level(scene_path: String, args: Dictionary = {}, transition_scene_path: String = default_transition_scene): - Utils.log_info("Levels", "Began loading level at ", scene_path) + Log.info("Levels", "Began loading level at ", scene_path) var error: Error = ResourceLoader.load_threaded_request(scene_path) if error != OK: - Utils.log_error("Levels", "Failed to request load of level at ", scene_path) + Log.error("Levels", "Failed to request load of level at ", scene_path) return var transition_scene: TransitionScreen = ResourceLoader.load(transition_scene_path).instantiate() transition.add_child(transition_scene) transition_scene.begin_transition() - Utils.log_info("Levels", "Began transition \"", transition_scene.name, "\"") + Log.info("Levels", "Began transition \"", transition_scene.name, "\"") if not transition_scene.began(): await transition_scene.transition_began @@ -38,20 +38,20 @@ func load_level(scene_path: String, args: Dictionary = {}, transition_scene_path var new_scene = ResourceLoader.load_threaded_get(scene_path).instantiate() level_args = args scene.add_child(new_scene) - Utils.log_info("Levels", "Finished loading level \"", new_scene.name, "\"", " with args ", args) + Log.info("Levels", "Finished loading level \"", new_scene.name, "\"", " with args ", args) transition_scene.end_transition() - Utils.log_info("Levels", "Ended transition \"", transition_scene.name, "\"") + Log.info("Levels", "Ended transition \"", transition_scene.name, "\"") if not transition_scene.ended(): await transition_scene.transition_ended Utils.queue_free_children(transition) - Utils.log_info("Levels", "Displaying level \"", new_scene.name, "\"") + Log.info("Levels", "Displaying level \"", new_scene.name, "\"") var check_status = func(): var status = ResourceLoader.load_threaded_get_status(scene_path) match status: ResourceLoader.THREAD_LOAD_INVALID_RESOURCE, ResourceLoader.THREAD_LOAD_FAILED: - Utils.log_error("Levels", "Failed to load level at ", scene_path) + Log.error("Levels", "Failed to load level at ", scene_path) timer.stop() timer.queue_free() ResourceLoader.THREAD_LOAD_LOADED: diff --git a/assets/common/scripts/log.gd b/assets/common/scripts/log.gd new file mode 100644 index 0000000..e12d6ed --- /dev/null +++ b/assets/common/scripts/log.gd @@ -0,0 +1,10 @@ +class_name Log + +static func info(category_name: String, ...args: Array): + print("LOG_INFO_" + category_name + ": " + "".join(args)) + +static func warn(category_name: String, ...args: Array): + push_warning("LOG_WARN_" + category_name + ": ", "".join(args)) + +static func error(category_name: String, ...args: Array): + push_error("LOG_ERROR_" + category_name + ": ", "".join(args)) diff --git a/assets/common/scripts/log.gd.uid b/assets/common/scripts/log.gd.uid new file mode 100644 index 0000000..69cf2ed --- /dev/null +++ b/assets/common/scripts/log.gd.uid @@ -0,0 +1 @@ +uid://cr1v85vtdl0wj diff --git a/assets/common/scripts/transition_screen.gd b/assets/common/scripts/transition_screen.gd index 778ce33..c719ebd 100644 --- a/assets/common/scripts/transition_screen.gd +++ b/assets/common/scripts/transition_screen.gd @@ -1,3 +1,4 @@ +@abstract class_name TransitionScreen extends Control enum TransitionState { @@ -24,8 +25,8 @@ func began() -> bool: func ended() -> bool: return state == TransitionState.ENDED -func begin_transition(): - pass +@abstract +func begin_transition() -func end_transition(): - pass +@abstract +func end_transition() diff --git a/assets/common/scripts/utils.gd b/assets/common/scripts/utils.gd index b9da4af..00d773d 100644 --- a/assets/common/scripts/utils.gd +++ b/assets/common/scripts/utils.gd @@ -2,18 +2,6 @@ class_name Utils const VERSION_CONFIG_SETTING: String = "application/config/version" -static func push_info(arg1 = "", arg2 = "", arg3 = "", arg4 = "", arg5 = "", arg6 = "", arg7 = "", arg8 = ""): - print(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) - -static func log_info(category_name: String, arg1 = "", arg2 = "", arg3 = "", arg4 = "", arg5 = "", arg6 = "", arg7 = ""): - push_info("LOG_INFO_" + category_name + ": ", arg1, arg2, arg3, arg4, arg5, arg6, arg7) - -static func log_warn(category_name: String, arg1 = "", arg2 = "", arg3 = "", arg4 = "", arg5 = "", arg6 = "", arg7 = ""): - push_warning("LOG_WARN_" + category_name + ": ", arg1, arg2, arg3, arg4, arg5, arg6, arg7) - -static func log_error(category_name: String, arg1 = "", arg2 = "", arg3 = "", arg4 = "", arg5 = "", arg6 = "", arg7 = ""): - push_error("LOG_ERROR_" + category_name + ": ", arg1, arg2, arg3, arg4, arg5, arg6, arg7) - static func get_version() -> String: return ProjectSettings.get_setting(VERSION_CONFIG_SETTING) diff --git a/assets/content/crops/models/beans/crop_beans_decayed_mesh.res b/assets/content/crops/models/beans/crop_beans_decayed_mesh.res index cbd6ff8..6ba3509 100644 Binary files a/assets/content/crops/models/beans/crop_beans_decayed_mesh.res and b/assets/content/crops/models/beans/crop_beans_decayed_mesh.res differ diff --git a/assets/content/crops/models/beans/crop_beans_growing_mesh.res b/assets/content/crops/models/beans/crop_beans_growing_mesh.res index 5012096..88e3d7c 100644 Binary files a/assets/content/crops/models/beans/crop_beans_growing_mesh.res and b/assets/content/crops/models/beans/crop_beans_growing_mesh.res differ diff --git a/assets/content/crops/models/beans/crop_beans_grown_mesh.res b/assets/content/crops/models/beans/crop_beans_grown_mesh.res index 4fdc480..29c4be6 100644 Binary files a/assets/content/crops/models/beans/crop_beans_grown_mesh.res and b/assets/content/crops/models/beans/crop_beans_grown_mesh.res differ diff --git a/assets/content/crops/models/beans/crop_beans_planted_mesh.res b/assets/content/crops/models/beans/crop_beans_planted_mesh.res index 3be689e..0a3cd01 100644 Binary files a/assets/content/crops/models/beans/crop_beans_planted_mesh.res and b/assets/content/crops/models/beans/crop_beans_planted_mesh.res differ diff --git a/assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res b/assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res index 5bd0756..38704f3 100644 Binary files a/assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res and b/assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res differ diff --git a/assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res b/assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res index 5a35a03..3ac7ff3 100644 Binary files a/assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res and b/assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res differ diff --git a/assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res b/assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res index e96959b..a3f5db4 100644 Binary files a/assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res and b/assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res differ diff --git a/assets/content/crops/models/crops.glb.import b/assets/content/crops/models/crops.glb.import index e6e2249..9d51787 100644 --- a/assets/content/crops/models/crops.glb.import +++ b/assets/content/crops/models/crops.glb.import @@ -15,9 +15,11 @@ dest_files=["res://.godot/imported/crops.glb-3428bdf7f963797caab05b9543c2298e.sc nodes/root_type="" nodes/root_name="" +nodes/root_script=null nodes/apply_root_scale=true nodes/root_scale=1.0 nodes/import_as_skeleton_bones=false +nodes/use_name_suffixes=true nodes/use_node_type_suffixes=true meshes/ensure_tangents=true meshes/generate_lods=true @@ -32,6 +34,9 @@ animation/trimming=false animation/remove_immutable_tracks=true animation/import_rest_as_RESET=false import_script/path="" +materials/extract=0 +materials/extract_format=0 +materials/extract_path="" _subresources={ "materials": { "@MATERIAL:0": { @@ -55,7 +60,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/beans/crop_beans_decayed_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/beans/crop_beans_decayed_mesh.res", +"save_to_file/path": "uid://bg873106r6ixn" }, "crops_beans_growing": { "generate/lightmap_uv": 0, @@ -64,7 +70,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/beans/crop_beans_growing_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/beans/crop_beans_growing_mesh.res", +"save_to_file/path": "uid://b0jngyu7u6e5l" }, "crops_beans_grown": { "generate/lightmap_uv": 0, @@ -73,7 +80,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/beans/crop_beans_grown_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/beans/crop_beans_grown_mesh.res", +"save_to_file/path": "uid://t3pxin8sr1x0" }, "crops_beans_planted": { "generate/lightmap_uv": 0, @@ -82,7 +90,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/beans/crop_beans_planted_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/beans/crop_beans_planted_mesh.res", +"save_to_file/path": "uid://cwrwhwvri4nd7" }, "crops_cabbage_decayed": { "generate/lightmap_uv": 0, @@ -91,7 +100,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res", +"save_to_file/path": "uid://brcnvfrcto6ht" }, "crops_cabbage_growing": { "generate/lightmap_uv": 0, @@ -100,7 +110,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res", +"save_to_file/path": "uid://bxmojc1f18kr5" }, "crops_cabbage_grown": { "generate/lightmap_uv": 0, @@ -109,7 +120,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res", +"save_to_file/path": "uid://dg4il6g1tffb7" }, "crops_sapling": { "generate/lightmap_uv": 0, @@ -118,7 +130,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/sapling/crop_sapling_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/sapling/crop_sapling_mesh.res", +"save_to_file/path": "uid://qdu57h0ophf0" }, "crops_sunflower_decayed": { "generate/lightmap_uv": 0, @@ -127,7 +140,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/sunflower/crop_sunflower_decayed_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/sunflower/crop_sunflower_decayed_mesh.res", +"save_to_file/path": "uid://bjlcjg64rf51w" }, "crops_sunflower_growing": { "generate/lightmap_uv": 0, @@ -136,7 +150,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/sunflower/crop_sunflower_growing_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/sunflower/crop_sunflower_growing_mesh.res", +"save_to_file/path": "uid://bepob0nxulltv" }, "crops_sunflower_grown": { "generate/lightmap_uv": 0, @@ -145,7 +160,8 @@ _subresources={ "lods/normal_merge_angle": 60.0, "lods/normal_split_angle": 25.0, "save_to_file/enabled": true, -"save_to_file/path": "res://assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res" +"save_to_file/fallback_path": "res://assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res", +"save_to_file/path": "uid://bxitj73jnhhln" } } } diff --git a/assets/content/crops/models/sapling/crop_sapling_mesh.res b/assets/content/crops/models/sapling/crop_sapling_mesh.res index eee014f..ea000f7 100644 Binary files a/assets/content/crops/models/sapling/crop_sapling_mesh.res and b/assets/content/crops/models/sapling/crop_sapling_mesh.res differ diff --git a/assets/content/crops/models/sunflower/crop_sunflower_decayed_mesh.res b/assets/content/crops/models/sunflower/crop_sunflower_decayed_mesh.res index bce3091..f1edd22 100644 Binary files a/assets/content/crops/models/sunflower/crop_sunflower_decayed_mesh.res and b/assets/content/crops/models/sunflower/crop_sunflower_decayed_mesh.res differ diff --git a/assets/content/crops/models/sunflower/crop_sunflower_growing_mesh.res b/assets/content/crops/models/sunflower/crop_sunflower_growing_mesh.res index d853266..0212e0e 100644 Binary files a/assets/content/crops/models/sunflower/crop_sunflower_growing_mesh.res and b/assets/content/crops/models/sunflower/crop_sunflower_growing_mesh.res differ diff --git a/assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res b/assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res index 05d6374..a227ed7 100644 Binary files a/assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res and b/assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res differ diff --git a/assets/content/zones/campfire/campfire_zone.tscn b/assets/content/zones/campfire/campfire_zone.tscn index 72967df..e2ddad0 100644 --- a/assets/content/zones/campfire/campfire_zone.tscn +++ b/assets/content/zones/campfire/campfire_zone.tscn @@ -84,7 +84,6 @@ albedo_color = Color(1, 0.0509804, 1, 0.501961) [sub_resource type="Resource" id="Resource_usxt2"] script = ExtResource("18_r7x46") -target_pos = Vector3(0, 0, 0) metadata/_custom_type_script = "uid://xr4uc6y6sb6p" [sub_resource type="BoxShape3D" id="BoxShape3D_b700l"] @@ -95,7 +94,6 @@ size = Vector3(15, 2, 1) [sub_resource type="Resource" id="Resource_mytsu"] script = ExtResource("18_r7x46") -target_pos = Vector3(0, 0, 0) metadata/_custom_type_script = "uid://xr4uc6y6sb6p" [node name="MainZone" type="Node3D"] @@ -2742,7 +2740,7 @@ height_mappings = { 3128: 6.0, 3129: 8.0, 3130: 8.0, -3143: -0.72369, +3143: -0.7236900000000001, 3144: -0.987349, 3145: -2.6, 3146: -2.6, @@ -5466,7 +5464,7 @@ height_mappings = { 8034: 0.532631, 8035: 0.65024, 8036: 0.5, -8037: 0.632299, +8037: 0.6322990000000001, 8038: 0.3, 8039: 0.3, 8040: 0.601833, @@ -5612,7 +5610,7 @@ height_mappings = { 8238: 0.5, 8239: 1.0, 8240: 1.0, -8241: 0.853408, +8241: 0.8534080000000001, 8242: 0.863858, 8243: 0.660095, 8244: 0.544201, diff --git a/assets/datatables/tables/characters_dt.tres b/assets/datatables/tables/characters_dt.tres index fbd7b5e..4f7dfe0 100644 --- a/assets/datatables/tables/characters_dt.tres +++ b/assets/datatables/tables/characters_dt.tres @@ -72,9 +72,6 @@ metadata/_custom_type_script = "uid://gsqbibwv6vfm" [sub_resource type="Resource" id="Resource_mscjv"] script = ExtResource("2_ynwby") -display_name = "" -dialogue_script = "" -appointments = Dictionary[int, ExtResource("1_ynwby")]({}) metadata/_custom_type_script = "uid://gsqbibwv6vfm" [resource] diff --git a/assets/datatables/tables/crops_dt.tres b/assets/datatables/tables/crops_dt.tres index 964bc30..d21e4fa 100644 --- a/assets/datatables/tables/crops_dt.tres +++ b/assets/datatables/tables/crops_dt.tres @@ -21,7 +21,6 @@ point_count = 5 [sub_resource type="Resource" id="Resource_86ah0"] script = ExtResource("1_kus3k") -attribute = 0 change = 0.015 requirement = SubResource("Curve_humno") @@ -32,7 +31,6 @@ point_count = 5 [sub_resource type="Resource" id="Resource_asfnx"] script = ExtResource("1_kus3k") attribute = 1 -change = 0.0 requirement = SubResource("Curve_5pv46") [sub_resource type="Resource" id="Resource_cwhgx"] @@ -60,7 +58,6 @@ point_count = 6 [sub_resource type="Resource" id="Resource_5ouad"] script = ExtResource("1_kus3k") -attribute = 0 change = -0.02 requirement = SubResource("Curve_u1hvp") @@ -71,7 +68,6 @@ point_count = 5 [sub_resource type="Resource" id="Resource_lijbi"] script = ExtResource("1_kus3k") attribute = 1 -change = 0.0 requirement = SubResource("Curve_638ju") [sub_resource type="Resource" id="Resource_0ym1e"] @@ -103,7 +99,6 @@ point_count = 4 [sub_resource type="Resource" id="Resource_gvguh"] script = ExtResource("1_kus3k") -attribute = 0 change = -0.01 requirement = SubResource("Curve_igrab") @@ -146,7 +141,6 @@ point_count = 5 [sub_resource type="Resource" id="Resource_lbs68"] script = ExtResource("1_kus3k") -attribute = 0 change = -0.015 requirement = SubResource("Curve_gnk15") @@ -157,7 +151,6 @@ point_count = 5 [sub_resource type="Resource" id="Resource_wv1b4"] script = ExtResource("1_kus3k") attribute = 1 -change = 0.0 requirement = SubResource("Curve_arkny") [sub_resource type="Resource" id="Resource_d7ttb"] @@ -166,7 +159,6 @@ crop_id = "organic_waste" name = "Weed" planting_radius = 1.0 effect_radius = 2.0 -growth_required = 0 attributes = Array[ExtResource("1_kus3k")]([SubResource("Resource_gu36k"), SubResource("Resource_lbs68"), SubResource("Resource_wv1b4")]) mesh_planted = "res://assets/content/crops/models/sapling/crop_sapling_mesh.res" mesh_growing = "res://assets/content/crops/models/sapling/crop_sapling_mesh.res" @@ -175,16 +167,6 @@ mesh_decayed = "res://assets/content/crops/models/sapling/crop_sapling_mesh.res" [sub_resource type="Resource" id="Resource_77sp7"] script = ExtResource("2_8ljxm") -crop_id = "" -name = "" -planting_radius = 0.0 -effect_radius = 0.0 -growth_required = 0 -attributes = Array[ExtResource("1_kus3k")]([]) -mesh_planted = "" -mesh_growing = "" -mesh_grown = "" -mesh_decayed = "" [resource] script = ExtResource("4_knr68") diff --git a/assets/datatables/tables/items_dt.tres b/assets/datatables/tables/items_dt.tres index e9d7ce9..8095d0c 100644 --- a/assets/datatables/tables/items_dt.tres +++ b/assets/datatables/tables/items_dt.tres @@ -42,7 +42,6 @@ tooltip = "Spreads Nutrients in the soil" script = ExtResource("1_vtgnq") name = "Organic Waste" icon_path = "res://assets/content/icons/organic_waste.svg" -action_type = 0 tooltip = "Add to the compost bin" [sub_resource type="Resource" id="Resource_uh3ae"] @@ -56,7 +55,6 @@ tooltip = "Scan soil attributes" script = ExtResource("1_vtgnq") name = "Sunflower" icon_path = "res://assets/content/icons/sunflower_crop.svg" -action_type = 0 tooltip = "Add to the compost bin" [sub_resource type="Resource" id="Resource_infmi"] @@ -75,10 +73,6 @@ tooltip = "Water the soil" [sub_resource type="Resource" id="Resource_w8udp"] script = ExtResource("1_vtgnq") -name = "" -icon_path = "" -action_type = 0 -tooltip = "" [resource] script = ExtResource("2_j0kc7") diff --git a/assets/datatables/tables/levels_dt.tres b/assets/datatables/tables/levels_dt.tres index a0defd4..adfd08c 100644 --- a/assets/datatables/tables/levels_dt.tres +++ b/assets/datatables/tables/levels_dt.tres @@ -30,8 +30,6 @@ path = "res://assets/content/zones/peninsula/peninsula_zone.tscn" [sub_resource type="Resource" id="Resource_6hi01"] script = ExtResource("1_3bvtj") -name = "" -path = "" [resource] script = ExtResource("2_orl7c") diff --git a/assets/debug/common/scripts/debug_section.gd b/assets/debug/common/scripts/debug_section.gd index bc039ab..c7198ab 100644 --- a/assets/debug/common/scripts/debug_section.gd +++ b/assets/debug/common/scripts/debug_section.gd @@ -1,3 +1,4 @@ +@abstract class_name DebugSection extends Control func on_opened(): diff --git a/assets/environment/materials/terrain.tres b/assets/environment/materials/terrain.tres index 0e991b6..01bf76c 100644 --- a/assets/environment/materials/terrain.tres +++ b/assets/environment/materials/terrain.tres @@ -16,8 +16,8 @@ fractal_gain = 0.0 [sub_resource type="NoiseTexture2D" id="NoiseTexture2D_kn7e1"] width = 1024 height = 1024 -color_ramp = SubResource("Gradient_jy6f2") noise = SubResource("FastNoiseLite_p8kcj") +color_ramp = SubResource("Gradient_jy6f2") [resource] render_priority = 0 @@ -27,4 +27,3 @@ shader_parameter/radiation_texture = SubResource("NoiseTexture2D_kn7e1") shader_parameter/soil_light_color = Color(0.31, 0.24025, 0.1426, 1) shader_parameter/soil_dark_color = Color(0.45, 0.23715, 0.063, 1) shader_parameter/radiation_color = Color(0.2408, 0.86, 0.086, 1) -shader_parameter/sun_dir = Vector3(0, 0, 0) diff --git a/assets/menus/scripts/main_menu_ui.gd b/assets/menus/scripts/main_menu_ui.gd index a65ccaf..b51aa8a 100644 --- a/assets/menus/scripts/main_menu_ui.gd +++ b/assets/menus/scripts/main_menu_ui.gd @@ -8,7 +8,7 @@ extends Control func _ready() -> void: Savegame.load_file() - Utils.log_info("Deserialisation", "Operation completed") + Log.info("Deserialisation", "Operation completed") if not Savegame.metadata_section.has_valid_data(): continue_btn.visible = false new_game_btn.pressed.connect(on_new_game_btn_pressed) diff --git a/assets/persistence/savegame.gd b/assets/persistence/savegame.gd index 8e971eb..dff2a56 100644 --- a/assets/persistence/savegame.gd +++ b/assets/persistence/savegame.gd @@ -17,4 +17,4 @@ const ZonesData = preload("res://assets/persistence/zones_data.gd") func save_file(): super() - Utils.log_info("Serialisation", "Saved game to disk as ", get_file_name()) + Log.info("Serialisation", "Saved game to disk as ", get_file_name()) diff --git a/assets/persistence/zone_layouts.gd b/assets/persistence/zone_layouts.gd index 26388e6..a156c9d 100644 --- a/assets/persistence/zone_layouts.gd +++ b/assets/persistence/zone_layouts.gd @@ -11,4 +11,4 @@ const ZonesData = preload("res://assets/persistence/zones_data.gd") func save_file(): super() - Utils.log_info("Serialisation", "Saved initial zones to disk as ", get_file_name()) + Log.info("Serialisation", "Saved initial zones to disk as ", get_file_name()) diff --git a/assets/validation/dialogue_script_validation.gd b/assets/validation/dialogue_script_validation.gd index ab08c2f..ba7e599 100644 --- a/assets/validation/dialogue_script_validation.gd +++ b/assets/validation/dialogue_script_validation.gd @@ -1,6 +1,4 @@ -class_name DialogueScriptValidation extends ValidationManager.Validation - -const Utils = preload("res://assets/common/scripts/utils.gd") +class_name DialogueScriptValidation extends Validations.Validation func get_name() -> String: return "DialogueScriptValidation" @@ -9,7 +7,7 @@ func run_validations() -> bool: var result: bool = true var dialogue_scripts = find_dialogue_scripts_in_dir("res://assets") for script in dialogue_scripts: - Utils.push_info(" - Validating ", script, "...") + print(" - Validating ", script, "...") var dialogue_script: DialogueScript = DialogueScript.new(script) if not DialogueValidator.validate_script(dialogue_script): result = false diff --git a/assets/validation/validation.gd b/assets/validation/validation.gd deleted file mode 100644 index d412bdb..0000000 --- a/assets/validation/validation.gd +++ /dev/null @@ -1,27 +0,0 @@ -class_name ValidationManager - -const Utils = preload("res://assets/common/scripts/utils.gd") -var validations = [DialogueScriptValidation] - -func run_all_validations() -> bool: - Utils.push_info("Running all validations...") - var result = true - for validation in validations: - var v = validation.new() - Utils.push_info("- Running validation for ", v.get_name(), "...") - if not v.run_validations(): - push_error(" VALIDATION FAILED") - result = false - if result: - Utils.push_info("All validations passed!") - else: - push_error("Some validations failed - see above for more info.") - return result - -class Validation: - - func get_name() -> String: - return "Validation" - - func run_validations() -> bool: - return true diff --git a/assets/validation/validations.gd b/assets/validation/validations.gd new file mode 100644 index 0000000..ed0fb27 --- /dev/null +++ b/assets/validation/validations.gd @@ -0,0 +1,34 @@ +@tool +class_name Validations extends EditorScript + +func _run(): + var manager = ValidationManager.new() + manager.run_all_validations() + +class ValidationManager: + + var validations = [DialogueScriptValidation] + + func run_all_validations() -> bool: + print("Running all validations...") + var result = true + for validation in validations: + var v = validation.new() + print("- Running validation for ", v.get_name(), "...") + if not v.run_validations(): + push_error(" VALIDATION FAILED") + result = false + if result: + print("All validations passed!") + else: + push_error("Some validations failed - see above for more info.") + return result + +@abstract +class Validation: + + @abstract + func get_name() -> String + + @abstract + func run_validations() -> bool diff --git a/assets/validation/validation.gd.uid b/assets/validation/validations.gd.uid similarity index 100% rename from assets/validation/validation.gd.uid rename to assets/validation/validations.gd.uid diff --git a/assets/zones/scripts/zone.gd b/assets/zones/scripts/zone.gd index 6f883e3..4bc7bac 100644 --- a/assets/zones/scripts/zone.gd +++ b/assets/zones/scripts/zone.gd @@ -31,7 +31,7 @@ func _ready(): var spawn_location: StringName = GameManager.game_world.level_args.get("spawn_location", "default") var spawn = find_player_spawn(spawn_location) if not spawn: - Utils.log_error("Zones", "Failed to find spawner for location ", spawn_location) + Log.error("Zones", "Failed to find spawner for location ", spawn_location) return spawn_position = spawn.global_position spawn_rotation = spawn.global_rotation @@ -90,7 +90,7 @@ func refresh_appointment_spawners(intial_check: bool = false): for row in characters_dt: var appointment: Dictionary = get_active_appointment(row.value) if appointment.is_empty(): - Utils.log_warn("Zones", "Received invalid appointment config for \"", row.key, "\"") + Log.warn("Zones", "Received invalid appointment config for \"", row.key, "\"") continue if appointment.details.zone_id == zone_id: @@ -98,7 +98,7 @@ func refresh_appointment_spawners(intial_check: bool = false): if changed_now: var traversal: ZoneTraversalTrigger = find_zone_traversal_for_exit(appointment.previous.zone_id) if not traversal: - Utils.log_warn("Zones", "Failed to find exit for zone \"", appointment.previous.zone_id, "\"") + Log.warn("Zones", "Failed to find exit for zone \"", appointment.previous.zone_id, "\"") continue run_appointent_spawner(appointment.details.spawner_id, row.key, {"override_spawn_pos": traversal.global_position}) run_appointent_spawner(appointment.details.spawner_id, row.key) @@ -108,7 +108,7 @@ func refresh_appointment_spawners(intial_check: bool = false): continue var traversal: ZoneTraversalTrigger = find_zone_traversal_for_exit(appointment.details.zone_id) if not traversal: - Utils.log_warn("Zones", "Failed to find exit for zone \"", appointment.details.zone_id, "\"") + Log.warn("Zones", "Failed to find exit for zone \"", appointment.details.zone_id, "\"") continue var action := CharacterActionNavigateTo.new() action.configure(character, {"target_pos": traversal.global_position}) @@ -137,6 +137,6 @@ func get_active_appointment(row: CharacterConfigRow) -> Dictionary: func run_appointent_spawner(spawner_id: StringName, character_id: StringName, spawn_options: Dictionary = {}): var spawner: AppointmentSpawner = find_appointment_spawner(spawner_id) if not spawner: - Utils.log_warn("Zones", "Failed to find spawner \"", spawner_id, "\"") + Log.warn("Zones", "Failed to find spawner \"", spawner_id, "\"") return spawner.run_spawn(character_id, spawn_options) diff --git a/export_presets.cfg b/export_presets.cfg index 461c2a4..7c5831a 100644 --- a/export_presets.cfg +++ b/export_presets.cfg @@ -9,9 +9,11 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="./build/macos/Sunflower.app" +export_path="build/macos/Sunflower.app" +patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" +seed=0 encrypt_pck=false encrypt_directory=false script_export_mode=2 @@ -32,9 +34,11 @@ application/short_version="0.0" application/version="0.0.0" application/copyright="Copyright Caps Collective" application/copyright_localized={} -application/min_macos_version="10.12" +application/min_macos_version_x86_64="10.12" +application/min_macos_version_arm64="11.00" application/export_angle=0 display/high_res=true +shader_baker/enabled=false application/additional_plist_content="" xcode/platform_build="14C18" xcode/sdk_version="13.1" @@ -70,6 +74,7 @@ codesign/entitlements/app_sandbox/files_music=0 codesign/entitlements/app_sandbox/files_movies=0 codesign/entitlements/app_sandbox/files_user_selected=0 codesign/entitlements/app_sandbox/helper_executables=[] +codesign/entitlements/additional="" codesign/custom_options=PackedStringArray() notarization/notarization=0 privacy/microphone_usage_description="" @@ -247,6 +252,7 @@ open \"{temp_dir}/{exe_name}.app\" --args {cmd_args}" ssh_remote_deploy/cleanup_script="#!/usr/bin/env bash kill $(pgrep -x -f \"{temp_dir}/{exe_name}.app/Contents/MacOS/{exe_name} {cmd_args}\") rm -rf \"{temp_dir}\"" +application/min_macos_version="10.12" [preset.1] @@ -259,9 +265,11 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="./build/Windows/Sunflower.exe" +export_path="build/windows/Sunflower.exe" +patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" +seed=0 encrypt_pck=false encrypt_directory=false script_export_mode=2 @@ -274,6 +282,7 @@ debug/export_console_wrapper=1 binary_format/embed_pck=false texture_format/s3tc_bptc=true texture_format/etc2_astc=false +shader_baker/enabled=false binary_format/architecture="x86_64" codesign/enable=false codesign/timestamp=true @@ -328,9 +337,11 @@ custom_features="" export_filter="all_resources" include_filter="" exclude_filter="" -export_path="./build/Linux/Sunflower" +export_path="build/linux/Sunflower.x86_64" +patches=PackedStringArray() encryption_include_filters="" encryption_exclude_filters="" +seed=0 encrypt_pck=false encrypt_directory=false script_export_mode=2 @@ -343,6 +354,7 @@ debug/export_console_wrapper=1 binary_format/embed_pck=false texture_format/s3tc_bptc=true texture_format/etc2_astc=false +shader_baker/enabled=false binary_format/architecture="x86_64" ssh_remote_deploy/enabled=false ssh_remote_deploy/host="user@host_ip" diff --git a/project.godot b/project.godot index a06f37e..473bd75 100644 --- a/project.godot +++ b/project.godot @@ -11,9 +11,9 @@ config_version=5 [application] config/name="Sunflower" -config/version="0.1.11" +config/version="0.1.12" run/main_scene="res://assets/common/scenes/game_world.tscn" -config/features=PackedStringArray("4.4", "Forward Plus") +config/features=PackedStringArray("4.5", "Forward Plus") config/icon="res://assets/common/icons/application_icon.svg" [autoload] diff --git a/scripts/run_validations.gd b/scripts/run_validations.gd index f977d07..fc14d37 100644 --- a/scripts/run_validations.gd +++ b/scripts/run_validations.gd @@ -1,9 +1,9 @@ #!/usr/bin/env -S godot -s extends SceneTree -const ValidationManager = preload("res://assets/validation/validation.gd") +const Validations = preload("res://assets/validation/validations.gd") func _init(): - var manager = ValidationManager.new() + var manager = Validations.ValidationManager.new() var result = manager.run_all_validations() quit(0 if result else 1)