chore: storing version and changelog
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
]
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
)
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 ""
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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()
|
||||
)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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],
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
@@ -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
|
||||
)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 = []
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -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."
|
||||
)
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -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\
|
||||
|
||||
@@ -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\")."
|
||||
)
|
||||
% [
|
||||
|
||||
@@ -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():
|
||||
|
||||
@@ -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,
|
||||
"",
|
||||
|
||||
@@ -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"])
|
||||
)
|
||||
|
||||
|
||||
@@ -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"])
|
||||
)
|
||||
|
||||
|
||||
@@ -22,4 +22,4 @@ func enable_plugin():
|
||||
get_plugin_name(),
|
||||
false
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user