Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/submit-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]*

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/verify-develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]*

Expand Down
1 change: 1 addition & 0 deletions addons/datatable/scripts/datatable_row.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name DatatableRow extends Resource
## Row schema definition for usage with [Datatable] resources.
##
Expand Down
1 change: 1 addition & 0 deletions addons/persistent_data/scripts/metadata_section.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name MetadataSection extends PersistentDataSection

func _init(file: PersistentDataFile):
Expand Down
5 changes: 3 additions & 2 deletions addons/persistent_data/scripts/persistent_data_file.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name PersistentDataFile extends Node

enum DeserialisationResult {
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions addons/persistent_data/scripts/persistent_data_section.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name PersistentDataSection

const DeserialisationResult = PersistentDataFile.DeserialisationResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
2 changes: 1 addition & 1 deletion assets/actions/scripts/world_character_action.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions assets/character/scripts/character.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name Character extends CharacterBody3D

@export var character_id: StringName
Expand Down
1 change: 1 addition & 0 deletions assets/character/scripts/character_action.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name CharacterAction extends Resource

signal started
Expand Down
14 changes: 7 additions & 7 deletions assets/common/scripts/game_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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():
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand All @@ -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):
Expand All @@ -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:
Expand Down
14 changes: 7 additions & 7 deletions assets/common/scripts/game_world.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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:
Expand Down
10 changes: 10 additions & 0 deletions assets/common/scripts/log.gd
Original file line number Diff line number Diff line change
@@ -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))
1 change: 1 addition & 0 deletions assets/common/scripts/log.gd.uid
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
uid://cr1v85vtdl0wj
9 changes: 5 additions & 4 deletions assets/common/scripts/transition_screen.gd
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
@abstract
class_name TransitionScreen extends Control

enum TransitionState {
Expand All @@ -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()
12 changes: 0 additions & 12 deletions assets/common/scripts/utils.gd
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Binary file modified assets/content/crops/models/beans/crop_beans_decayed_mesh.res
Binary file not shown.
Binary file modified assets/content/crops/models/beans/crop_beans_growing_mesh.res
Binary file not shown.
Binary file modified assets/content/crops/models/beans/crop_beans_grown_mesh.res
Binary file not shown.
Binary file modified assets/content/crops/models/beans/crop_beans_planted_mesh.res
Binary file not shown.
Binary file modified assets/content/crops/models/cabbage/crop_cabbage_decayed_mesh.res
Binary file not shown.
Binary file modified assets/content/crops/models/cabbage/crop_cabbage_growing_mesh.res
Binary file not shown.
Binary file modified assets/content/crops/models/cabbage/crop_cabbage_grown_mesh.res
Binary file not shown.
38 changes: 27 additions & 11 deletions assets/content/crops/models/crops.glb.import
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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": {
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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"
}
}
}
Expand Down
Binary file modified assets/content/crops/models/sapling/crop_sapling_mesh.res
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified assets/content/crops/models/sunflower/crop_sunflower_grown_mesh.res
Binary file not shown.
8 changes: 3 additions & 5 deletions assets/content/zones/campfire/campfire_zone.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand All @@ -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"]
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
Loading