Merge branch 'develop' into issue-98
This commit is contained in:
@@ -45,9 +45,25 @@ func set_state(p_state: String, immediate: bool = false):
|
||||
var actual_animator
|
||||
if animation_node.has_animation(p_state):
|
||||
if immediate:
|
||||
escoria.logger.debug(
|
||||
"State \"%s\" set. Matching immediate animation executing." % [
|
||||
p_state
|
||||
]
|
||||
)
|
||||
animation_node.seek_end(p_state)
|
||||
else:
|
||||
escoria.logger.debug(
|
||||
"State \"%s\" set. Matching non-immediate animation executing." % [
|
||||
p_state
|
||||
]
|
||||
)
|
||||
animation_node.play(p_state)
|
||||
else:
|
||||
escoria.logger.debug(
|
||||
"State \"%s\" set. No matching animation found." % [
|
||||
p_state
|
||||
]
|
||||
)
|
||||
|
||||
|
||||
# Set the active value, thus hiding or showing the object
|
||||
|
||||
@@ -164,7 +164,11 @@ func save_game_crash():
|
||||
# - p_savename: name of the savegame
|
||||
func _do_save_game(p_savename: String) -> ESCSaveGame:
|
||||
var save_game = ESCSaveGame.new()
|
||||
save_game.escoria_version = escoria.ESCORIA_VERSION
|
||||
|
||||
var plugin_config = ConfigFile.new()
|
||||
plugin_config.load("res://addons/escoria-core/plugin.cfg")
|
||||
save_game.escoria_version = plugin_config.get_value("plugin", "version")
|
||||
|
||||
save_game.game_version = escoria.project_settings_manager.get_setting(
|
||||
escoria.project_settings_manager.GAME_VERSION
|
||||
)
|
||||
@@ -383,7 +387,10 @@ func load_game(id: int):
|
||||
# Save the game settings in the settings file.
|
||||
func save_settings():
|
||||
var settings_res := ESCSaveSettings.new()
|
||||
settings_res.escoria_version = escoria.ESCORIA_VERSION
|
||||
var plugin_config = ConfigFile.new()
|
||||
plugin_config.load("res://addons/escoria-core/plugin.cfg")
|
||||
|
||||
settings_res.escoria_version = plugin_config.get_value("plugin", "version")
|
||||
settings_res.text_lang = escoria.settings.text_lang
|
||||
settings_res.voice_lang = escoria.settings.voice_lang
|
||||
settings_res.speech_enabled = escoria.settings.speech_enabled
|
||||
|
||||
@@ -24,9 +24,6 @@ enum GAME_STATE {
|
||||
}
|
||||
|
||||
|
||||
# Escoria version number
|
||||
const ESCORIA_VERSION = "0.1.0"
|
||||
|
||||
# Audio bus indices.
|
||||
const BUS_MASTER = "Master"
|
||||
const BUS_SFX = "SFX"
|
||||
|
||||
@@ -34,11 +34,12 @@ func refresh_savegames():
|
||||
$VBoxContainer/ScrollContainer/slots.remove_child(slot)
|
||||
|
||||
var saves_list = escoria.save_manager.get_saves_list()
|
||||
for i in saves_list.size():
|
||||
var save_data = saves_list[i+1]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
$VBoxContainer/ScrollContainer/slots.add_child(
|
||||
new_slot
|
||||
)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])
|
||||
for i in range(saves_list.keys().max() + 1):
|
||||
if saves_list.has(i):
|
||||
var save_data = saves_list[i]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
$VBoxContainer/ScrollContainer/slots.add_child(
|
||||
new_slot
|
||||
)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i])
|
||||
|
||||
@@ -34,12 +34,13 @@ func refresh_savegames():
|
||||
_slots.remove_child(slot)
|
||||
|
||||
var saves_list = escoria.save_manager.get_saves_list()
|
||||
for i in saves_list.size():
|
||||
var save_data = saves_list[i+1]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
_slots.add_child(new_slot)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i+1])
|
||||
for i in range(saves_list.keys().max() + 1):
|
||||
if saves_list.has(i):
|
||||
var save_data = saves_list[i]
|
||||
var new_slot = slot_ui_scene.instance()
|
||||
_slots.add_child(new_slot)
|
||||
new_slot.set_slot_name_date(save_data["name"], save_data["date"])
|
||||
new_slot.connect("pressed", self, "_on_slot_pressed", [i])
|
||||
|
||||
var datetime = OS.get_datetime()
|
||||
var datetime_string = "%02d/%02d/%02d %02d:%02d" % [
|
||||
|
||||
Reference in New Issue
Block a user