From 2e67aa99731418e2da7c27cad5ffcbe3f3e1933e Mon Sep 17 00:00:00 2001 From: StraToN Date: Sun, 10 Jul 2022 18:40:30 +0000 Subject: [PATCH] chore: storing version and changelog --- CHANGELOG.md | 4 ++++ .../core-scripts/behaviors/esc_movable.gd | 4 ++-- .../core-scripts/esc/commands/accept_input.gd | 4 ++-- .../core-scripts/esc/commands/anim_block.gd | 2 +- .../core-scripts/esc/commands/camera_push.gd | 6 ++--- .../esc/commands/camera_set_limits.gd | 2 +- .../esc/commands/camera_set_target.gd | 2 +- .../esc/commands/camera_set_zoom_height.gd | 2 +- .../core-scripts/esc/commands/change_scene.gd | 6 ++--- .../game/core-scripts/esc/commands/custom.gd | 8 +++---- .../core-scripts/esc/commands/dec_global.gd | 2 +- .../esc/commands/enable_terrain.gd | 2 +- .../core-scripts/esc/commands/inc_global.gd | 4 ++-- .../esc/commands/inventory_add.gd | 2 +- .../core-scripts/esc/commands/play_snd.gd | 4 ++-- .../esc/commands/queue_resource.gd | 2 +- .../game/core-scripts/esc/commands/say.gd | 4 ++-- .../core-scripts/esc/commands/sched_event.gd | 2 +- .../core-scripts/esc/commands/set_active.gd | 2 +- .../core-scripts/esc/commands/set_angle.gd | 2 +- .../esc/commands/set_animations.gd | 2 +- .../esc/commands/set_interactive.gd | 2 +- .../core-scripts/esc/commands/set_speed.gd | 2 +- .../core-scripts/esc/commands/set_state.gd | 2 +- .../game/core-scripts/esc/commands/slide.gd | 6 ++--- .../game/core-scripts/esc/commands/spawn.gd | 6 ++--- .../core-scripts/esc/commands/stop_snd.gd | 2 +- .../core-scripts/esc/commands/teleport.gd | 4 ++-- .../core-scripts/esc/commands/teleport_pos.gd | 2 +- .../core-scripts/esc/commands/transition.gd | 4 ++-- .../game/core-scripts/esc/commands/turn_to.gd | 4 ++-- .../game/core-scripts/esc/commands/wait.gd | 2 +- .../game/core-scripts/esc/commands/walk.gd | 4 ++-- .../core-scripts/esc/commands/walk_block.gd | 4 ++-- .../core-scripts/esc/commands/walk_to_pos.gd | 2 +- .../esc/commands/walk_to_pos_block.gd | 2 +- .../core-scripts/esc/esc_action_manager.gd | 6 ++--- .../game/core-scripts/esc/esc_compiler.gd | 14 +++++------ .../core-scripts/esc/esc_globals_manager.gd | 2 +- .../core-scripts/esc/esc_inventory_manager.gd | 2 +- .../core-scripts/esc/esc_object_manager.gd | 6 ++--- .../game/core-scripts/esc/esc_room_manager.gd | 4 ++-- .../core-scripts/esc/types/esc_command.gd | 8 +++---- .../types/esc_command_argument_descriptor.gd | 2 +- .../core-scripts/esc/types/esc_condition.gd | 4 ++-- .../game/core-scripts/esc/types/esc_dialog.gd | 2 +- .../game/core-scripts/esc/types/esc_event.gd | 2 +- .../game/core-scripts/esc/types/esc_group.gd | 2 +- .../game/core-scripts/esc/types/esc_object.gd | 4 ++-- .../game/core-scripts/esc_item.gd | 6 ++--- .../migrations/esc_migration_manager.gd | 6 ++--- .../core-scripts/plugins/escoria_plugin.gd | 6 ++--- .../save_data/esc_save_manager.gd | 2 +- addons/escoria-core/game/esc_autoload.gd | 2 +- addons/escoria-core/game/esc_logger.gd | 24 +++++++++---------- addons/escoria-core/game/escoria.gd | 8 +++---- addons/escoria-core/game/main.gd | 2 +- addons/escoria-core/game/main_scene.gd | 4 ++-- .../game/scenes/dialogs/esc_dialog_player.gd | 2 +- .../game/scenes/inventory/inventory_ui.gd | 2 +- addons/escoria-core/plugin.gd | 10 ++++---- addons/escoria-dialog-simple/plugin.gd | 4 ++-- addons/escoria-ui-9verbs/game.gd | 4 ++-- addons/escoria-ui-simplemouse/game.gd | 2 +- addons/escoria-ui-simplemouse/plugin.gd | 2 +- 65 files changed, 132 insertions(+), 128 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57839319..79b68b38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## [4.0.0-alpha.189](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.189) (2022-07-10) + + + ## [4.0.0-alpha.188](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.188) (2022-06-23) diff --git a/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd b/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd index a9ee7765..d44dbd76 100644 --- a/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd +++ b/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd @@ -177,7 +177,7 @@ func teleport(target: Node) -> void: parent.global_position = target.get_interact_position() escoria.logger.info( self, - "Object %s is teleported to position %s." + "Object %s is teleported to position %s." % [target.name, parent.global_position] ) elif "position" in target: @@ -202,7 +202,7 @@ func teleport(target: Node) -> void: func teleport_to(target: Vector2) -> void: escoria.logger.info( self, - "Object %s teleported to position %s." + "Object %s teleported to position %s." % [parent.global_id, str(target)] ) parent.global_position = target diff --git a/addons/escoria-core/game/core-scripts/esc/commands/accept_input.gd b/addons/escoria-core/game/core-scripts/esc/commands/accept_input.gd index 360d5e10..9a1e6c65 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/accept_input.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/accept_input.gd @@ -46,8 +46,8 @@ func validate(arguments: Array): "[%s]: invalid parameter. %s is not a valid parameter value." + "Should be one of %s" % [ - get_command_name(), - arguments[0], + get_command_name(), + arguments[0], str(SUPPORTED_INPUT_TYPES) ] ) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/anim_block.gd b/addons/escoria-core/game/core-scripts/esc/commands/anim_block.gd index 34c243c8..4c1fb505 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/anim_block.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/anim_block.gd @@ -33,7 +33,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: Object with global id %s not found." + "[%s]: Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_push.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_push.gd index 1e18f0d8..30b0995e 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_push.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_push.gd @@ -50,7 +50,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object global id %s not found." + "[%s]: invalid object. Object global id %s not found." % [get_command_name(), arguments[0]] ) return false @@ -62,8 +62,8 @@ func validate(arguments: Array): "is not one of the accepted types : {allowed_types}" ).format( { - "command_name":get_command_name(), - "t_type":arguments[2], + "command_name":get_command_name(), + "t_type":arguments[2], "allowed_types":SUPPORTED_TRANSITIONS } ) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_limits.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_limits.gd index e65a3dbb..498f9175 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_limits.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_limits.gd @@ -35,7 +35,7 @@ func validate(arguments: Array): if escoria.main.current_scene.camera_limits.size() < arguments[0]: escoria.logger.error( self, - "[%s]: invalid limits id. Camera limit id (%d) is larger than the number of limits defined in this scene (%d)." + "[%s]: invalid limits id. Camera limit id (%d) is larger than the number of limits defined in this scene (%d)." % [ get_command_name(), arguments[0], diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_target.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_target.gd index 4932e1e6..2f4f4f30 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_target.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_target.gd @@ -34,7 +34,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - "[%s]: Invalid object: Object with global id %s not found." + "[%s]: Invalid object: Object with global id %s not found." % [get_command_name(), arguments[1]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom_height.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom_height.gd index 2ad02a8b..39f437a2 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom_height.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom_height.gd @@ -32,7 +32,7 @@ func validate(arguments: Array): if arguments[0] < 0: escoria.logger.error( self, - "[%s]: invalid height. Can't zoom to a negative height (%d)." + "[%s]: invalid height. Can't zoom to a negative height (%d)." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd b/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd index ba0d98f7..528ced3c 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/change_scene.gd @@ -33,7 +33,7 @@ func validate(arguments: Array) -> bool: if not ResourceLoader.exists(arguments[0]): escoria.logger.error( self, - "[%s]: Invalid scene. Scene %s was not found." + "[%s]: Invalid scene. Scene %s was not found." % [get_command_name(), arguments[0]] ) return false @@ -42,7 +42,7 @@ func validate(arguments: Array) -> bool: ): escoria.logger.error( self, - "[%s]: Game scene not found. The path set in 'ui/game_scene' was not found: %s." + "[%s]: Game scene not found. The path set in 'ui/game_scene' was not found: %s." % [ get_command_name(), ESCProjectSettingsManager.get_setting( @@ -59,7 +59,7 @@ func validate(arguments: Array) -> bool: func run(command_params: Array) -> int: escoria.logger.info( self, - "[%s] Changing scene to %s (enable_automatic_transition = %s)." + "[%s] Changing scene to %s (enable_automatic_transition = %s)." % [ get_command_name(), command_params[0], # scene file diff --git a/addons/escoria-core/game/core-scripts/esc/commands/custom.gd b/addons/escoria-core/game/core-scripts/esc/commands/custom.gd index fbd01313..6bd42bc5 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/custom.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/custom.gd @@ -37,7 +37,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object with global id %s not found." + "[%s]: invalid object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false @@ -46,7 +46,7 @@ func validate(arguments: Array): ): escoria.logger.error( self, - "[%s]: invalid node. Object with global id %s has no child node called %s." + "[%s]: invalid node. Object with global id %s has no child node called %s." % [ get_command_name(), arguments[0], @@ -63,7 +63,7 @@ func validate(arguments: Array): ): escoria.logger.error( self, - "[%s]: invalid function. Object with global id %s and node %s has no function called %s." + "[%s]: invalid function. Object with global id %s and node %s has no function called %s." % [ get_command_name(), arguments[0], @@ -95,6 +95,6 @@ func run(command_params: Array) -> int: # Function called when the command is interrupted. func interrupt(): escoria.logger.warn( - self, + self, "[%s] interrupt() function not implemented." % get_command_name() ) diff --git a/addons/escoria-core/game/core-scripts/esc/commands/dec_global.gd b/addons/escoria-core/game/core-scripts/esc/commands/dec_global.gd index 89da8505..98c095a5 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/dec_global.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/dec_global.gd @@ -29,7 +29,7 @@ func validate(arguments: Array): if not escoria.globals_manager.get_global(arguments[0]) is int: escoria.logger.error( self, - "[%s]: invalid global. Global %s isn't an integer value." + "[%s]: invalid global. Global %s isn't an integer value." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/enable_terrain.gd b/addons/escoria-core/game/core-scripts/esc/commands/enable_terrain.gd index 742afa65..63228710 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/enable_terrain.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/enable_terrain.gd @@ -38,7 +38,7 @@ func run(command_params: Array) -> int: else: escoria.logger.error( self, - "[%s]: Can not find terrain node. Terrain node %s could not be found." + "[%s]: Can not find terrain node. Terrain node %s could not be found." % [get_command_name(), name] ) return ESCExecution.RC_ERROR diff --git a/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd b/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd index d1778e0a..1c161aa8 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/inc_global.gd @@ -29,14 +29,14 @@ func validate(arguments: Array): if not escoria.globals_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid global. Global %s does not exist." + "[%s]: invalid global. Global %s does not exist." % [get_command_name(), arguments[0]] ) return false if not escoria.globals_manager.get_global(arguments[0]) is int: escoria.logger.error( self, - "[%s]: invalid global. Global %s isn't an integer value." + "[%s]: invalid global. Global %s isn't an integer value." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/inventory_add.gd b/addons/escoria-core/game/core-scripts/esc/commands/inventory_add.gd index 64cc1957..321fc1ba 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/inventory_add.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/inventory_add.gd @@ -30,7 +30,7 @@ func validate(arguments: Array): if arguments[0].begins_with("i/"): escoria.logger.error( self, - "[%s]: invalid item name. Item name %s cannot start with 'i/'." + "[%s]: invalid item name. Item name %s cannot start with 'i/'." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/play_snd.gd b/addons/escoria-core/game/core-scripts/esc/commands/play_snd.gd index 7a16deae..dad8290f 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/play_snd.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/play_snd.gd @@ -35,14 +35,14 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - "[%s]: invalid sound player. Sound player %s not registered." + "[%s]: invalid sound player. Sound player %s not registered." % [get_command_name(), arguments[1]] ) return false if not ResourceLoader.exists(arguments[0]): escoria.logger.error( self, - "[%s]: invalid parameter. File %s not found." + "[%s]: invalid parameter. File %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/queue_resource.gd b/addons/escoria-core/game/core-scripts/esc/commands/queue_resource.gd index df2ba527..faf37474 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/queue_resource.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/queue_resource.gd @@ -30,7 +30,7 @@ func validate(arguments: Array) -> bool: if not ResourceLoader.exists(arguments[0]): escoria.logger.error( self, - "[%s]: Invalid resource. Resource %s was not found." + "[%s]: Invalid resource. Resource %s was not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/say.gd b/addons/escoria-core/game/core-scripts/esc/commands/say.gd index 0c9d472d..caab21fd 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/say.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/say.gd @@ -66,7 +66,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: Invalid object: Object with global id %s not found." + "[%s]: Invalid object: Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false @@ -74,7 +74,7 @@ func validate(arguments: Array): and arguments[2] == "": escoria.logger.error( self, - "[%s]: Project setting '%s' is not set. Please set a default dialog type." + "[%s]: Project setting '%s' is not set. Please set a default dialog type." % [get_command_name(), ESCProjectSettingsManager.DEFAULT_DIALOG_TYPE] ) return true diff --git a/addons/escoria-core/game/core-scripts/esc/commands/sched_event.gd b/addons/escoria-core/game/core-scripts/esc/commands/sched_event.gd index b8dcf963..2424b590 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/sched_event.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/sched_event.gd @@ -42,7 +42,7 @@ func validate(arguments: Array): .has(arguments[2]): escoria.logger.error( self, - "[%s]: invalid object event. Object with global id %s has no event %s." + "[%s]: invalid object event. Object with global id %s has no event %s." % [ get_command_name(), arguments[1], diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_active.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_active.gd index c2743f03..fce251e0 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_active.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_active.gd @@ -30,7 +30,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object with global id %s not found." + "[%s]: invalid object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_angle.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_angle.gd index 80370e31..5305b0e4 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_angle.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_angle.gd @@ -35,7 +35,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object with global id %s not found." + "[%s]: invalid object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd index 5555e0e3..ae62d2f0 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_animations.gd @@ -29,7 +29,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object with global id %s not found." + "[%s]: invalid object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_interactive.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_interactive.gd index 9d239671..af8f4f3e 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_interactive.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_interactive.gd @@ -29,7 +29,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object with global id %s not found." + "[%s]: invalid object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_speed.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_speed.gd index 5a76738d..6c1698e5 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_speed.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_speed.gd @@ -28,7 +28,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object with global id %s not found." + "[%s]: invalid object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_state.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_state.gd index 41f8ab35..d5b877d6 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_state.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_state.gd @@ -36,7 +36,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid object. Object %s not found." + "[%s]: invalid object. Object %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/slide.gd b/addons/escoria-core/game/core-scripts/esc/commands/slide.gd index 2b6482a1..8ff6bd00 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/slide.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/slide.gd @@ -37,14 +37,14 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. Object with global id %s not found." + "[%s]: invalid first object. Object with global id %s not found." % [get_command_name(), arguments[0]] ) return false if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - "[%s]: invalid second object. Object with global id %s not found." + "[%s]: invalid second object. Object with global id %s not found." % [get_command_name(), arguments[1]] ) return false @@ -78,7 +78,7 @@ func _slide_object( var tween = Tween.new() (escoria.main as Node).add_child(tween) - + tween.connect("tween_completed", self, "_on_tween_completed") var duration = source.node.position.distance_to( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/spawn.gd b/addons/escoria-core/game/core-scripts/esc/commands/spawn.gd index 54261348..f91c9b47 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/spawn.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/spawn.gd @@ -33,21 +33,21 @@ func validate(arguments: Array): or arguments[0] in escoria.object_manager.RESERVED_OBJECTS: escoria.logger.error( self, - "[%s]: global_id (%s) is invalid. The global_id was either empty or is reserved." + "[%s]: global_id (%s) is invalid. The global_id was either empty or is reserved." % [get_command_name(), arguments[0]] ) return false if not ResourceLoader.exists(arguments[1]): escoria.logger.error( self, - "[%s]: Invalid scene path: %s not found." + "[%s]: Invalid scene path: %s not found." % [get_command_name(), arguments[1]] ) return false if arguments[3] and not escoria.object_manager.has(arguments[3]): escoria.logger.error( self, - "[%s]: invalid object: Object with global id %s not found." + "[%s]: invalid object: Object with global id %s not found." % [get_command_name(), arguments[3]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/stop_snd.gd b/addons/escoria-core/game/core-scripts/esc/commands/stop_snd.gd index 8b50e7a6..4b834cbc 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/stop_snd.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/stop_snd.gd @@ -37,7 +37,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid sound player. Sound player %s not registered." + "[%s]: invalid sound player. Sound player %s not registered." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/teleport.gd b/addons/escoria-core/game/core-scripts/esc/commands/teleport.gd index 966d53d4..1f28018b 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/teleport.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/teleport.gd @@ -30,14 +30,14 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. Object to teleport with global id %s not found." + "[%s]: invalid first object. Object to teleport with global id %s not found." % [get_command_name(), arguments[0]] ) return false if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - "[%s]: invalid second object. Destination location to teleport to with global id %s not found." + "[%s]: invalid second object. Destination location to teleport to with global id %s not found." % [get_command_name(), arguments[1]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/teleport_pos.gd b/addons/escoria-core/game/core-scripts/esc/commands/teleport_pos.gd index afdf0379..02976f64 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/teleport_pos.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/teleport_pos.gd @@ -30,7 +30,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. Object to teleport with global id %s not found." + "[%s]: invalid first object. Object to teleport with global id %s not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/transition.gd b/addons/escoria-core/game/core-scripts/esc/commands/transition.gd index eee58812..edfdd840 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/transition.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/transition.gd @@ -32,7 +32,7 @@ func validate(arguments: Array): and not arguments[0].empty(): escoria.logger.error( self, - "[%s]: argument invalid. Transition with name '%s' doesn't exist." + "[%s]: argument invalid. Transition with name '%s' doesn't exist." % [get_command_name(), arguments[0]] ) return false @@ -40,7 +40,7 @@ func validate(arguments: Array): escoria.logger.error( self, "[%s]: argument invalid" + - "Transition type 'in' or 'out' expected, but '%s' was provided." + "Transition type 'in' or 'out' expected, but '%s' was provided." % [get_command_name(), arguments[1]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/turn_to.gd b/addons/escoria-core/game/core-scripts/esc/commands/turn_to.gd index a8c6991b..63ace2f5 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/turn_to.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/turn_to.gd @@ -37,14 +37,14 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: The object to turn with global id %s was not found." + "[%s]: The object to turn with global id %s was not found." % [get_command_name(), arguments[0]] ) return false if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - "[%s]: The object to turn towards with global id %s was not found." + "[%s]: The object to turn towards with global id %s was not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/wait.gd b/addons/escoria-core/game/core-scripts/esc/commands/wait.gd index 6b3c1c5c..d408e6c3 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/wait.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/wait.gd @@ -32,7 +32,7 @@ func validate(arguments: Array): if arguments[0] <= 0.0: escoria.logger.error( self, - "[%s]: argument invalid. %s is an invalid amount of time to wait (must be positive)." + "[%s]: argument invalid. %s is an invalid amount of time to wait (must be positive)." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/walk.gd b/addons/escoria-core/game/core-scripts/esc/commands/walk.gd index bcfc446d..b243f074 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/walk.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/walk.gd @@ -40,14 +40,14 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. The object with global id %s to make walk was not found." + "[%s]: invalid first object. The object with global id %s to make walk was not found." % [get_command_name(), arguments[0]] ) return false if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - ": invalid second object. The object to walk to with global id %s was not found." + ": invalid second object. The object to walk to with global id %s was not found." % [get_command_name(), arguments[1]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/walk_block.gd b/addons/escoria-core/game/core-scripts/esc/commands/walk_block.gd index f5515e9d..c39b5045 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/walk_block.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/walk_block.gd @@ -40,14 +40,14 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. The object to make walk with global id %s was not found." + "[%s]: invalid first object. The object to make walk with global id %s was not found." % [get_command_name(), arguments[0]] ) return false if not escoria.object_manager.has(arguments[1]): escoria.logger.error( self, - "[%s]: invalid second object. The object to walk to with global id %s was not found." + "[%s]: invalid second object. The object to walk to with global id %s was not found." % [get_command_name(), arguments[1]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos.gd b/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos.gd index b1463ef9..d24faccd 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos.gd @@ -39,7 +39,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. The object to make walk with global id %s was not found." + "[%s]: invalid first object. The object to make walk with global id %s was not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos_block.gd b/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos_block.gd index d75992de..4776cd29 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos_block.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/walk_to_pos_block.gd @@ -39,7 +39,7 @@ func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.error( self, - "[%s]: invalid first object. The object to make walk with global id %s was not found." + "[%s]: invalid first object. The object to make walk with global id %s was not found." % [get_command_name(), arguments[0]] ) return false diff --git a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd index 496a5c3d..49e95734 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_action_manager.gd @@ -92,7 +92,7 @@ func do(action: int, params: Array = [], can_interrupt: bool = false) -> void: if not escoria.object_manager.has(params[0]): escoria.logger.error( self, - "Walk action requested for nonexisting object: %s." + "Walk action requested for nonexisting object: %s." % params[0] ) return @@ -104,7 +104,7 @@ func do(action: int, params: Array = [], can_interrupt: bool = false) -> void: if not escoria.object_manager.has(params[1]): escoria.logger.error( self, - "Walk action requested to nonexisting destination object: %s." + "Walk action requested to nonexisting destination object: %s." % params[1] ) return @@ -475,7 +475,7 @@ func perform_inputevent_on_object( """ escoria.logger.info( - self, + self, "%s left-clicked with event %s." % [obj.global_id, event] ) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd index 7e9e5a74..ca260d5a 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_compiler.gd @@ -126,13 +126,13 @@ func _compile(lines: Array, path: String = "") -> Array: while lines.size() > 0: var line = lines.pop_front().strip_edges(false, true) escoria.logger.trace( - self, + self, "Parsing line %s." % line ) if _comment_regex.search(line) or _empty_regex.search(line): # Ignore comments and empty lines escoria.logger.trace( - self, + self, "Line is empty or a comment. Skipping." ) continue @@ -145,7 +145,7 @@ func _compile(lines: Array, path: String = "") -> Array: if _event_regex.search(line): var event = ESCEvent.new(line) escoria.logger.trace( - self, + self, "Line is the event %s." % event.name ) var event_lines = [] @@ -167,7 +167,7 @@ func _compile(lines: Array, path: String = "") -> Array: elif _group_regex.search(line): var group = ESCGroup.new(line) escoria.logger.trace( - self, + self, "Line is a group." ) var group_lines = [] @@ -198,7 +198,7 @@ func _compile(lines: Array, path: String = "") -> Array: var dialog = ESCDialog.new() dialog.load_string(line) escoria.logger.trace( - self, + self, "Line is a dialog." ) var dialog_lines = [] @@ -268,14 +268,14 @@ func _compile(lines: Array, path: String = "") -> Array: "Command \"%s\" cannot be found under folder %s.\nPlease confirm setting \"%s\" is set to the folder where ESC commands are stored." % [ command.name, - ProjectSettings.get_setting(COMMAND_DIRECTORIES), + ProjectSettings.get_setting(COMMAND_DIRECTORIES), ESCProjectSettingsManager.COMMAND_DIRECTORIES ] ) else: escoria.logger.error( self, - "Invalid ESC line detected.\nLine couldn't be compiled: %s." + "Invalid ESC line detected.\nLine couldn't be compiled: %s." % line ) return returned diff --git a/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd index b2245de0..4458a2c1 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd @@ -45,7 +45,7 @@ func register_reserved_global(key: String, value = null) -> void: escoria.logger.error( self, "Can not override reserved global: Global key %s is already " + - "registered as reserved." + "registered as reserved." % key ) var old_value = _globals[key] if _globals.has(key) else "" diff --git a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd index 8a2d3245..28958518 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd @@ -33,7 +33,7 @@ func remove_item(item: String): if not inventory_has(item): escoria.logger.error( self, - "Error removing inventory item: " + + "Error removing inventory item: " + "Trying to remove non-existent item %s." % item ) else: diff --git a/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd index 91655c60..bab78d1b 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_object_manager.gd @@ -140,7 +140,7 @@ func register_object(object: ESCObject, room: ESCRoom = null, force: bool = fals and _object_state_in_room_is_default(object, room_key): escoria.logger.error( self, - "Object with global id '%s' in room %s already registered from node path %s." + "Object with global id '%s' in room %s already registered from node path %s." % [ object.global_id, room_key.room_global_id, @@ -199,7 +199,7 @@ func register_object(object: ESCObject, room: ESCRoom = null, force: bool = fals if get_object(object.global_id) == null: escoria.logger.error( self, - "Object with global id %s in room (%s, %s) not found in Object Manager." + "Object with global id %s in room (%s, %s) not found in Object Manager." % [ object.global_id, room_key.room_global_id, @@ -323,7 +323,7 @@ func unregister_object(object: ESCObject, room_key: ESCRoomObjectsKey) -> void: escoria.logger.debug( self, "Unable to unregister object.\n" + - "Object with global ID %s room (%s, %s) not found. If this was " + "Object with global ID %s room (%s, %s) not found. If this was " % [ "?" if object == null else object.global_id, room_key.room_global_id, diff --git a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd index f60a20f2..68a3445f 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_room_manager.gd @@ -188,7 +188,7 @@ func init_room(room: ESCRoom) -> void: if room.position != Vector2(0,0): escoria.logger.error( self, - "The room node's coordinates must be (0,0) instead of %s." + "The room node's coordinates must be (0,0) instead of %s." % room.position ) @@ -431,7 +431,7 @@ func _run_script_event(event_name: String, room: ESCRoom): if room.compiled_script.events.has(event_name): escoria.logger.debug( self, - "Queuing room script event %s " % event_name + + "Queuing room script event %s " % event_name + "composed of %s statements." % room.compiled_script.events[event_name].statements.size() ) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd index 3e6f8ae9..61140270 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_command.gd @@ -75,8 +75,8 @@ func _init(command_string): ) else: escoria.logger.error( - self, - "Invalid command detected: %s\nCommand regexp didn't match." + self, + "Invalid command detected: %s\nCommand regexp didn't match." % command_string ) @@ -124,14 +124,14 @@ func run() -> int: if command_object.validate(prepared_arguments): escoria.logger.debug( self, - "Running command %s with parameters %s." + "Running command %s with parameters %s." % [self.name, prepared_arguments] ) var rc = command_object.run(prepared_arguments) if rc is GDScriptFunctionState: rc = yield(rc, "completed") escoria.logger.debug( - self, + self, "[%s] Return code: %d." % [self.name, rc] ) return rc diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd index e9bc5de4..c25c5016 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_command_argument_descriptor.gd @@ -142,7 +142,7 @@ func validate(command: String, arguments: Array) -> bool: self, "Argument type did not match descriptor for command \"%s\"\n" % command + - "Argument %d (\"%s\") is of type %s. Expected %s." + "Argument %d (\"%s\") is of type %s. Expected %s." % [ index, arguments[index], diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd index 4e691820..8662f305 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd @@ -60,7 +60,7 @@ func _init(comparison_string: String): "eq": self.comparison = COMPARISON_EQ "gt": self.comparison = COMPARISON_GT "lt": self.comparison = COMPARISON_LT - _: + _: escoria.logger.error( self, "Invalid comparison type detected: %s" % @@ -87,7 +87,7 @@ func _init(comparison_string: String): else: escoria.logger.error( self, - "Invalid comparison detected: %s\nComparison regexp didn't match." + "Invalid comparison detected: %s\nComparison regexp didn't match." % comparison_string ) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_dialog.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_dialog.gd index 8ef261d1..0b89d3d9 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_dialog.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_dialog.gd @@ -50,7 +50,7 @@ func load_string(dialog_string: String): else: escoria.logger.error( self, - "Invalid dialog detected: %s\nDialog regexp didn't match." + "Invalid dialog detected: %s\nDialog regexp didn't match." % dialog_string ) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd index 4a028a1d..9549b3f4 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_event.gd @@ -78,7 +78,7 @@ func _init(event_string: String): else: escoria.logger.error( self, - "Invalid event detected: %s\nEvent regexp didn't match." + "Invalid event detected: %s\nEvent regexp didn't match." % event_string ) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_group.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_group.gd index da339152..5a9a6dc7 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_group.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_group.gd @@ -30,6 +30,6 @@ func _init(group_string: String): else: escoria.logger.error( self, - "Invalid group detected: %s\nGroup regexp didn't match." + "Invalid group detected: %s\nGroup regexp didn't match." % group_string ) diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd index e2376676..7f81da69 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd @@ -58,14 +58,14 @@ func set_state(p_state: String, immediate: bool = false): else: escoria.logger.debug( self, - "State \"%s\" set. Matching non-immediate animation executing." + "State \"%s\" set. Matching non-immediate animation executing." % p_state ) animation_node.play(p_state) else: escoria.logger.debug( self, - "State \"%s\" set. No matching animation found." + "State \"%s\" set. No matching animation found." % p_state ) diff --git a/addons/escoria-core/game/core-scripts/esc_item.gd b/addons/escoria-core/game/core-scripts/esc_item.gd index d509e3e0..8cde1d9b 100644 --- a/addons/escoria-core/game/core-scripts/esc_item.gd +++ b/addons/escoria-core/game/core-scripts/esc_item.gd @@ -399,7 +399,7 @@ func get_interact_position() -> Vector2: if multiple_positions_found: escoria.logger.warn( - self, + self, "Multiple ESClocations found to walk to for object " + "%s. Last one will be used." % global_id) return interact_position @@ -587,8 +587,8 @@ func update_idle(): func get_camera_node(): if has_node(camera_node): escoria.logger.debug( - self, - "Camera node found - directing camera to the camera_node on %s." + self, + "Camera node found - directing camera to the camera_node on %s." % global_id ) return get_node(camera_node) diff --git a/addons/escoria-core/game/core-scripts/migrations/esc_migration_manager.gd b/addons/escoria-core/game/core-scripts/migrations/esc_migration_manager.gd index bd86648a..b401a697 100644 --- a/addons/escoria-core/game/core-scripts/migrations/esc_migration_manager.gd +++ b/addons/escoria-core/game/core-scripts/migrations/esc_migration_manager.gd @@ -31,7 +31,7 @@ func migrate( ) -> ESCSaveGame: escoria.logger.info( self, - "Migrating savegame from version %s to version %s." + "Migrating savegame from version %s to version %s." % [from, to] ) @@ -53,7 +53,7 @@ func migrate( escoria.logger.error( self, "Can not migrate savegame from version %s to version %s." + - " \"To\" version must be later than \"from\" version." + " \"To\" version must be later than \"from\" version." % [from, to] ) @@ -90,7 +90,7 @@ func migrate( # **Returns** A list of version scripts func _find_versions(directory: String, from: String, to: String) -> Array: escoria.logger.trace( - self, + self, "Searching directory %s." % directory ) var versions = [] diff --git a/addons/escoria-core/game/core-scripts/plugins/escoria_plugin.gd b/addons/escoria-core/game/core-scripts/plugins/escoria_plugin.gd index 68ef6a4d..bdc1b405 100644 --- a/addons/escoria-core/game/core-scripts/plugins/escoria_plugin.gd +++ b/addons/escoria-core/game/core-scripts/plugins/escoria_plugin.gd @@ -14,7 +14,7 @@ static func register_ui(plugin: EditorPlugin, game_scene: String) -> bool: ): push_error("Escoria Core must be enabled.") return false - + var game_scene_setting_value = ESCProjectSettingsManager.get_setting( ESCProjectSettingsManager.GAME_SCENE ) @@ -64,7 +64,7 @@ static func register_dialog_manager(plugin: EditorPlugin, manager_class: String) ): push_error("Escoria Core must be enabled.") return false - + var dialog_managers: Array = ESCProjectSettingsManager.get_setting( ESCProjectSettingsManager.DIALOG_MANAGERS ) @@ -78,7 +78,7 @@ static func register_dialog_manager(plugin: EditorPlugin, manager_class: String) ESCProjectSettingsManager.DIALOG_MANAGERS, dialog_managers ) - + return true # Deregister a dialog manager addon diff --git a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd index 270d473d..b8d7592a 100644 --- a/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd +++ b/addons/escoria-core/game/core-scripts/save_data/esc_save_manager.gd @@ -446,7 +446,7 @@ func load_settings() -> Resource: if not file.file_exists(save_settings_path): escoria.logger.warn( self, - "Settings file %s doesn't exist. Using default settings." + "Settings file %s doesn't exist. Using default settings." % save_settings_path ) save_settings() diff --git a/addons/escoria-core/game/esc_autoload.gd b/addons/escoria-core/game/esc_autoload.gd index c6104787..cd29c630 100644 --- a/addons/escoria-core/game/esc_autoload.gd +++ b/addons/escoria-core/game/esc_autoload.gd @@ -45,7 +45,7 @@ var esc_compiler = ESCCompiler.new() # ESC Object Manager var object_manager = ESCObjectManager.new() -# ESC Room Manager +# ESC Room Manager var room_manager = ESCRoomManager.new() # Terrain of the current room diff --git a/addons/escoria-core/game/esc_logger.gd b/addons/escoria-core/game/esc_logger.gd index 52077ad7..be267af6 100644 --- a/addons/escoria-core/game/esc_logger.gd +++ b/addons/escoria-core/game/esc_logger.gd @@ -1,13 +1,13 @@ class ESCLoggerBase: - # Perform emergency savegame + # Perform emergency savegame signal perform_emergency_savegame - + # Valid log levels enum { LOG_ERROR, LOG_WARNING, LOG_INFO, LOG_DEBUG, LOG_TRACE } - + # Log file format const LOG_FILE_FORMAT: String = "log_%s_%s.log" - + # A map of log level names to log level ints var _level_map: Dictionary = { "ERROR": LOG_ERROR, @@ -16,7 +16,7 @@ class ESCLoggerBase: "DEBUG": LOG_DEBUG, "TRACE": LOG_TRACE, } - + # Configured log level var _log_level: int @@ -110,18 +110,18 @@ class ESCLoggerFile extends ESCLoggerBase: log_file_path, File.WRITE ) - + func trace(owner: Object, msg: String): if _log_level >= LOG_TRACE: _log_to_file(owner, msg, "T") .trace(owner, msg) - + # Debug log func debug(owner: Object, msg: String): if _log_level >= LOG_DEBUG: _log_to_file(owner, msg, "D") .debug(owner, msg) - + func info(owner: Object, msg: String): if _log_level >= LOG_INFO: _log_to_file(owner, msg, "I") @@ -138,7 +138,7 @@ class ESCLoggerFile extends ESCLoggerBase: print_stack() close_logs() .warn(owner, msg) - + # Error log func error(owner: Object, msg: String): if _log_level >= LOG_ERROR: @@ -165,11 +165,11 @@ class ESCLoggerFile extends ESCLoggerBase: if owner != null: context = owner.get_script().resource_path.get_file() log_file.store_string(formatted_message(context, msg, letter) + "\n") - + func _log_line_to_file(msg: String): if log_file.is_open(): log_file.store_string(msg + "\n") - + func _log_stack_trace_to_file(owner: Object): var frame_number = 0 for stack in get_stack().slice(2, get_stack().size()): @@ -188,7 +188,7 @@ class ESCLoggerFile extends ESCLoggerBase: class ESCLoggerVerbose extends ESCLoggerBase: func _init(): pass - + func debug(owner: Object, msg: String): var context = owner.get_script().resource_path.get_file() print(context, ": ", msg) diff --git a/addons/escoria-core/game/escoria.gd b/addons/escoria-core/game/escoria.gd index 124a5717..a1ad3244 100644 --- a/addons/escoria-core/game/escoria.gd +++ b/addons/escoria-core/game/escoria.gd @@ -56,7 +56,7 @@ func _ready(): ).empty(): escoria.logger.error( self, - "Project setting '%s' is not set!" + "Project setting '%s' is not set!" % ESCProjectSettingsManager.GAME_START_SCRIPT ) escoria.start_script = escoria.esc_compiler.load_esc_file( @@ -64,13 +64,13 @@ func _ready(): ESCProjectSettingsManager.GAME_START_SCRIPT ) ) - + escoria.main = main - + _perform_plugins_checks() -# Verifies that the game is configured with required plugin(s). +# Verifies that the game is configured with required plugin(s). # If a required plugin is missing (or disabled) we stop immediately. func _perform_plugins_checks(): if ESCProjectSettingsManager.get_setting( diff --git a/addons/escoria-core/game/main.gd b/addons/escoria-core/game/main.gd index 77862eca..990e90ca 100644 --- a/addons/escoria-core/game/main.gd +++ b/addons/escoria-core/game/main.gd @@ -43,7 +43,7 @@ func _exit_tree(): func set_scene(p_scene: Node) -> void: if !p_scene: escoria.logger.error( - self, + self, "Can't change to an empty scene. Please specify the scene name." ) diff --git a/addons/escoria-core/game/main_scene.gd b/addons/escoria-core/game/main_scene.gd index 8bd567e9..f556f535 100644 --- a/addons/escoria-core/game/main_scene.gd +++ b/addons/escoria-core/game/main_scene.gd @@ -9,9 +9,9 @@ var escoria_node: Escoria # Start the main menu func _ready(): escoria.logger.info(self, "Escoria starts...") - + escoria_node = preload("res://addons/escoria-core/game/escoria.tscn").instance() add_child(escoria_node) - + if not escoria.is_direct_room_run: escoria_node.init() diff --git a/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd b/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd index 27120a8b..8d3dc344 100644 --- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd +++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd @@ -135,7 +135,7 @@ func say(character: String, type: String, text: String) -> void: escoria.logger.warn( self, "Unable to find voice file with key '%s'." % matches.get_string("key") - ) + ) else: ( escoria.object_manager.get_object(escoria.object_manager.SPEECH).node\ diff --git a/addons/escoria-core/game/scenes/inventory/inventory_ui.gd b/addons/escoria-core/game/scenes/inventory/inventory_ui.gd index 16e7d4ce..afd264da 100644 --- a/addons/escoria-core/game/scenes/inventory/inventory_ui.gd +++ b/addons/escoria-core/game/scenes/inventory/inventory_ui.gd @@ -62,7 +62,7 @@ func add_new_item_by_id(item_id: String) -> void: self, ( "Item global id '%s' is not registered because the item's scene file was not found.\n" - + "Attempted scene file path: %s.\n" + + "Attempted scene file path: %s.\n" + "Please ensure that the '%s' project setting points at **your inventory items folder** (current is: \"%s\")." ) % [ diff --git a/addons/escoria-core/plugin.gd b/addons/escoria-core/plugin.gd index e8012af7..ee317a12 100644 --- a/addons/escoria-core/plugin.gd +++ b/addons/escoria-core/plugin.gd @@ -18,7 +18,7 @@ func enable_plugin(): set_escoria_ui_settings() set_escoria_sound_settings() set_escoria_platform_settings() - + # Add input actions in InputMap # if not InputMap.has_action(ESCInputsManager.SWITCH_ACTION_VERB): # InputMap.add_action(ESCInputsManager.SWITCH_ACTION_VERB) @@ -38,14 +38,14 @@ func enable_plugin(): popup_info = AcceptDialog.new() popup_info.dialog_text = """You enabled escoria-core plugin. - + Please ignore error messages in Output console and reload your project using Godot editor's "Project / Reload Current Project" menu. """ popup_info.connect("confirmed", self, "_on_warning_popup_confirmed", [], CONNECT_ONESHOT) add_child(popup_info) popup_info.popup_centered() - + func _on_warning_popup_confirmed(): popup_info.queue_free() @@ -63,7 +63,7 @@ func disable_plugin(): # Setup Escoria func _enter_tree(): pass - + func _ready(): ProjectSettings.save_custom("escoria.godot") @@ -295,7 +295,7 @@ func set_escoria_debug_settings(): "hint": PROPERTY_HINT_DIR } ) - + # Prepare the settings in the Escoria sound settings func set_escoria_sound_settings(): diff --git a/addons/escoria-dialog-simple/plugin.gd b/addons/escoria-dialog-simple/plugin.gd index ff685dff..b185babd 100644 --- a/addons/escoria-dialog-simple/plugin.gd +++ b/addons/escoria-dialog-simple/plugin.gd @@ -41,7 +41,7 @@ func disable_plugin(): null, {} ) - + EscoriaPlugin.deregister_dialog_manager(MANAGER_CLASS) @@ -56,7 +56,7 @@ func enable_plugin(): "type": TYPE_STRING } ) - + ESCProjectSettingsManager.register_setting( ESCProjectSettingsManager.AVATARS_PATH, "", diff --git a/addons/escoria-ui-9verbs/game.gd b/addons/escoria-ui-9verbs/game.gd index 8cce4e8c..aab2721d 100644 --- a/addons/escoria-ui-9verbs/game.gd +++ b/addons/escoria-ui-9verbs/game.gd @@ -47,7 +47,7 @@ onready var tooltip = $ui/Control/panel_down/VBoxContainer/MarginContainer\ /tooltip onready var inventory_ui = $ui/Control/panel_down/VBoxContainer/HBoxContainer\ /InventoryMargin/inventory_ui -var room_select +var room_select func _enter_tree(): var room_selector_parent = $ui/Control/panel_down/VBoxContainer\ @@ -363,7 +363,7 @@ func apply_custom_settings(custom_settings: Dictionary): if custom_settings.has("a_custom_setting"): escoria.logger.info( self, - "custom setting value loaded: %s." + "custom setting value loaded: %s." % str(custom_settings["a_custom_setting"]) ) diff --git a/addons/escoria-ui-simplemouse/game.gd b/addons/escoria-ui-simplemouse/game.gd index 3cbdb280..1f1fc77b 100644 --- a/addons/escoria-ui-simplemouse/game.gd +++ b/addons/escoria-ui-simplemouse/game.gd @@ -329,7 +329,7 @@ func apply_custom_settings(custom_settings: Dictionary): if custom_settings.has("a_custom_setting"): escoria.logger.info( self, - "custom setting value loaded: %s." + "custom setting value loaded: %s." % str(custom_settings["a_custom_setting"]) ) diff --git a/addons/escoria-ui-simplemouse/plugin.gd b/addons/escoria-ui-simplemouse/plugin.gd index 20504b69..6939397b 100644 --- a/addons/escoria-ui-simplemouse/plugin.gd +++ b/addons/escoria-ui-simplemouse/plugin.gd @@ -22,4 +22,4 @@ func enable_plugin(): get_plugin_name(), false ) - +