From 0a1f16f61fc28f34b5ba9762c60f13eee071c590 Mon Sep 17 00:00:00 2001 From: StraToN Date: Tue, 19 Apr 2022 05:55:31 +0000 Subject: [PATCH] chore: storing version and changelog --- CHANGELOG.md | 15 +++++++++++++++ .../game/core-scripts/esc/commands/wait.gd | 2 +- .../esc/types/esc_command_argument_descriptor.gd | 6 +++--- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d9d9e41a..81d7d760 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,18 @@ +## [4.0.0-alpha.159](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.159) (2022-04-19) + + +### Features + +* adds in max args checking; also removes duplicate command validation and now properly validates min_args; re-orders validation to allow argument descriptor validation to always be done first; misc. cleanup of error strings ([7050a8a](https://github.com/godot-escoria/escoria-demo-game/commit/7050a8a2fb9b61a4ec5831741e3b57f8dd24094e)) + + +### Bug Fixes + +* allows for bare decimals (no leading 0) to be properly interpreted; also adds in additional validation for 'wait' command ([768f65d](https://github.com/godot-escoria/escoria-demo-game/commit/768f65d929ee60ce14a9d94c2cbf585f8137a95c)) +* properly validate min_args and remove superfluous validation call to argument descriptor ([157c2f5](https://github.com/godot-escoria/escoria-demo-game/commit/157c2f564c13696c6ae627e5e53e285ac652be69)) + + + ## [4.0.0-alpha.158](https://github.com/godot-escoria/escoria-demo-game/compare/v0.0.0...v4.0.0-alpha.158) (2022-04-09) 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 6a5fb996..f9a8e1ad 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/wait.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/wait.gd @@ -35,7 +35,7 @@ func validate(arguments: Array): ] ) return false - + return true # Run the command 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 1d179886..c814ee28 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 @@ -57,7 +57,7 @@ func prepare_arguments(arguments: Array) -> Array: if index >= complete_arguments.size(): complete_arguments.append(arguments[index]) continue - + complete_arguments[index] = escoria.utils.get_typed_value( arguments[index], types[index] @@ -151,14 +151,14 @@ func _is_type(argument, type: int) -> bool: # #### Parameters # # - array_to_check: Array to check for leading non-null values -# - max_index: Maximum (inclusive) index to check in array_to_check +# - max_index: Maximum (inclusive) index to check in array_to_check # # *Returns* the total number of entries at the start of # array_to_check that are not null func _count_leading_non_null_values(array_to_check: Array, max_index: int) -> int: if array_to_check == null or max_index < 0: return 0 - + var leading_non_nulls_count: int = 0 for i in range(max_index):