Skip to content

Commit

Permalink
chore: storing version and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
StraToN committed Oct 7, 2024
1 parent a23f097 commit 0b7193c
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 26 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [4.0.0-alpha.268](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.268) (2024-10-07)



## [4.0.0-alpha.267](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.267) (2024-10-07)


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ func _on_event_finished(
return_code,
event.name
)

if finished_event.name == EVENT_LOAD \
and escoria.current_state == escoria.GAME_STATE.LOADING:
escoria.save_manager.is_loading_game = false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -427,16 +427,16 @@ func save_game(p_savegame: ESCSaveGame) -> void:
for room_obj in room_objects:
if room_obj.room_global_id.empty():
continue

var room_objects_dict = {}
for obj_id in room_obj.objects:
var obj: ESCObject = room_obj.objects[obj_id]
var obj_json_to_save: Dictionary = obj.get_save_data()
if not obj_json_to_save.empty():
room_objects_dict[obj_id] = obj_json_to_save

p_savegame.objects[room_obj.room_global_id] = room_objects_dict

p_savegame.objects[room_obj.room_global_id] = room_objects_dict

# Add in reserved objects (music, speech, sound), too.
var reserved_objects: Dictionary = reserved_objects_container.objects
for obj_global_id in reserved_objects:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func get_save_data() -> Dictionary:

if self.global_id == "player" and not is_instance_valid(self.node):
return save_data

save_data["active"] = self.active
save_data["interactive"] = self.interactive
save_data["state"] = self.state
Expand Down
4 changes: 2 additions & 2 deletions addons/escoria-core/game/core-scripts/esc_item.gd
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func _ready():
)

terrain = escoria.room_terrain

if escoria.object_manager.get_object(global_id).state == ESCObject.STATE_DEFAULT \
and get_animation_player() != null:
escoria.object_manager.get_object(global_id) \
Expand All @@ -238,7 +238,7 @@ func _ready():
._movable.last_dir = animations.get_direction_id_from_animation_name(
get_animation_player().get_animation()
)


if !is_trigger:
if not self.is_connected(
Expand Down
24 changes: 12 additions & 12 deletions addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func load_game(id: int):

if global_value is String and global_value.empty():
global_value = "''"

if not k.begins_with("i/"):
load_statements.append(
ESCCommand.new("%s %s %s true" %
Expand All @@ -349,16 +349,16 @@ func load_game(id: int):
]
)
)

## OBJECTS
var camera_target_to_follow

for room_id in save_game.objects.keys():

var room_objects: Array = save_game.objects[room_id].keys()

if room_id in ESCObjectManager.RESERVED_OBJECTS:

if save_game.objects[room_id]["state"] in [
"default",
"off"
Expand All @@ -378,13 +378,13 @@ func load_game(id: int):
save_game.objects[room_id]["playback_position"]
])
)


else:
if room_id == save_game.main.last_scene_global_id:

for object_global_id in save_game.objects[room_id].keys():

if save_game.objects[room_id][object_global_id].has("active"):
load_statements.append(ESCCommand.new("%s %s %s" \
% [
Expand All @@ -404,7 +404,7 @@ func load_game(id: int):
]
)
)

if not save_game.objects[room_id][object_global_id]["state"].empty():
if save_game.objects[room_id][object_global_id].has("state"):
load_statements.append(ESCCommand.new("%s %s %s true" \
Expand Down Expand Up @@ -453,7 +453,7 @@ func load_game(id: int):

if object_global_id == escoria.object_manager.CAMERA:
camera_target_to_follow = save_game.objects[room_id][object_global_id]["target"]


## TERRAIN NAVPOLYS
for room_name in save_game.terrain_navpolys.keys():
Expand All @@ -467,7 +467,7 @@ func load_game(id: int):
)
)
break

## SCHEDULED EVENTS
if save_game.events.has("sched_events") \
and not save_game.events.sched_events.empty():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func apply_settings() -> void:
ESCProjectSettingsManager.TEXT_LANG
)
)

escoria.game_scene.apply_custom_settings(custom_settings)


Expand Down
2 changes: 1 addition & 1 deletion addons/escoria-core/game/esc_logger.gd
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class ESCLoggerBase:
_log_level = _level_map[ESCProjectSettingsManager.get_setting(
ESCProjectSettingsManager.LOG_LEVEL
).to_upper()]




Expand Down
4 changes: 2 additions & 2 deletions addons/escoria-core/game/main.gd
Original file line number Diff line number Diff line change
Expand Up @@ -273,11 +273,11 @@ func hide_ui() -> void:
func hide_current_scene() -> void:
if escoria.main.current_scene != null:
escoria.main.current_scene.hide()

func show_ui() -> void:
if escoria.main.current_scene != null:
escoria.main.current_scene.game.show_ui()

func show_current_scene() -> void:
if escoria.main.current_scene != null:
escoria.main.current_scene.show()
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ func refresh_savegames():
$VBoxContainer/ScrollContainer/slots.add_child(
new_slot
)

var datetime_string = "%02d/%02d/%02d %02d:%02d" % [
save.date["day"],
save.date["month"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ func refresh_savegames():
for save in saves_array:
new_slot = slot_ui_scene.instance()
_slots.add_child(new_slot)

datetime_string = "%02d/%02d/%02d %02d:%02d" % [
save.date["day"],
save.date["month"],
save.date["year"],
save.date["hour"],
save.date["minute"],
]

new_slot.set_slot_name_date(save["name"], datetime_string)
new_slot.connect("pressed", self, "_on_slot_pressed", [int(save["slotnumber"])])

Expand Down

0 comments on commit 0b7193c

Please sign in to comment.