From 0a45140fadc2064e3dc70d0a768fe696c8cfd5a3 Mon Sep 17 00:00:00 2001 From: balloonpopper <5151242+balloonpopper@users.noreply.github.com> Date: Fri, 11 Mar 2022 09:05:27 +1100 Subject: [PATCH] documentation: Fixes to command descriptions (#506) Co-authored-by: Duncan Brown Co-authored-by: Balloonpopper --- .../core-scripts/esc/commands/accept_input.gd | 17 +++++++++-------- .../game/core-scripts/esc/commands/anim.gd | 8 ++++---- .../core-scripts/esc/commands/anim_block.gd | 9 +++++---- .../core-scripts/esc/commands/camera_push.gd | 8 +++++--- .../esc/commands/camera_set_limits.gd | 10 +++++++--- .../core-scripts/esc/commands/camera_set_pos.gd | 2 +- .../esc/commands/camera_set_target.gd | 9 ++++++--- .../esc/commands/camera_set_zoom.gd | 8 +++++--- .../esc/commands/camera_set_zoom_height.gd | 4 ++-- .../core-scripts/esc/commands/camera_shift.gd | 3 ++- .../core-scripts/esc/commands/change_scene.gd | 6 ++++-- .../game/core-scripts/esc/commands/custom.gd | 8 +++++--- .../core-scripts/esc/commands/dec_global.gd | 2 +- .../core-scripts/esc/commands/enable_terrain.gd | 7 +++++-- .../game/core-scripts/esc/commands/hide_menu.gd | 15 +++++++++++---- .../core-scripts/esc/commands/inc_global.gd | 2 +- .../core-scripts/esc/commands/inventory_add.gd | 4 +++- .../esc/commands/inventory_remove.gd | 4 +++- .../game/core-scripts/esc/commands/play_snd.gd | 4 ++-- .../core-scripts/esc/commands/queue_event.gd | 4 ++-- .../core-scripts/esc/commands/queue_resource.gd | 2 +- .../core-scripts/esc/commands/rand_global.gd | 2 +- .../game/core-scripts/esc/commands/say.gd | 7 ++++--- .../core-scripts/esc/commands/sched_event.gd | 6 +++--- .../core-scripts/esc/commands/set_active.gd | 6 +++--- .../game/core-scripts/esc/commands/set_angle.gd | 7 +++++-- .../core-scripts/esc/commands/set_animations.gd | 2 +- .../core-scripts/esc/commands/set_global.gd | 3 ++- .../esc/commands/set_gui_visible.gd | 4 ++-- .../esc/commands/set_interactive.gd | 4 ++-- .../game/core-scripts/esc/commands/set_speed.gd | 4 ++-- .../game/core-scripts/esc/commands/set_state.gd | 2 +- .../game/core-scripts/esc/commands/show_menu.gd | 10 +++++++--- .../game/core-scripts/esc/commands/slide.gd | 13 ++++++++----- .../core-scripts/esc/commands/slide_block.gd | 3 ++- .../game/core-scripts/esc/commands/spawn.gd | 4 ++-- .../game/core-scripts/esc/commands/stop_snd.gd | 2 +- .../game/core-scripts/esc/commands/teleport.gd | 7 ++++--- .../core-scripts/esc/commands/teleport_pos.gd | 4 ++-- .../core-scripts/esc/commands/transition.gd | 2 +- .../game/core-scripts/esc/commands/turn_to.gd | 10 ++++++++-- .../game/core-scripts/esc/commands/walk.gd | 9 +++++---- .../core-scripts/esc/commands/walk_block.gd | 5 +++-- .../core-scripts/esc/commands/walk_to_pos.gd | 6 +++--- .../esc/commands/walk_to_pos_block.gd | 6 +++--- .../game/core-scripts/esc/esc_event_manager.gd | 2 +- .../game/core-scripts/esc/esc_object_manager.gd | 2 +- .../core-scripts/esc/types/esc_base_command.gd | 2 +- .../types/esc_command_argument_descriptor.gd | 4 ++-- .../core-scripts/esc/types/esc_statement.gd | 2 +- .../escoria-core/game/core-scripts/esc_item.gd | 2 +- .../game/core-scripts/esc_location.gd | 5 ++++- .../resources/esc_animationresource.gd | 4 ++-- .../game/scenes/dialogs/esc_dialog_manager.gd | 4 ++-- .../inventory/esc_inventory_container.gd | 2 +- .../escoria-dialog-simple/esc_dialog_simple.gd | 4 ++-- 56 files changed, 177 insertions(+), 120 deletions(-) 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 a82ca62d..7ad12d19 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 @@ -1,20 +1,21 @@ # `accept_input [type]` # -# Sets how much input the game is to accept, allowing for cut scenes -# in which dialog can be skipped (if [type] is set to SKIP). -# Also allows for cut scenes that can be completely locked down. +# Sets how much input the game is to accept. This allows for cut scenes +# in which dialogue can be skipped (if [type] is set to SKIP), and ones where +# it can't (if [type] is set to NONE). # # **Parameters** # # - *type*: Type of inputs to accept (ALL) -# `ALL`: Accept all types of input -# `SKIP`: Accept skipping dialogs but nothing else +# `ALL`: Accept all types of user input +# `SKIP`: Accept skipping dialogues but nothing else # `NONE`: Deny all inputs (including opening menus) # # **Warning**: `SKIP` and `NONE` also disable autosaves. # -# **Warning**: The type of input accepted will persist even after the current -# event has ended. +# **Warning**: The type of user input accepted will persist even after the +# current event has ended. Remember to reset the input type at the end of +# cut-scenes! # # @ESC extends ESCBaseCommand @@ -30,7 +31,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not arguments[0] in ["ALL", "NONE", "SKIP"]: escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/anim.gd b/addons/escoria-core/game/core-scripts/esc/commands/anim.gd index 5dcb1dab..e125fd4b 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/anim.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/anim.gd @@ -1,8 +1,8 @@ # `anim object name [reverse]` # -# Executes the animation specified in "name" on "object", -# without blocking. The next command in the event will be executed immediately -# after. +# Executes the animation specified in "name" on "object" without blocking. +# The next command in the event will be executed immediately after the +# animation is started. # # **Parameters** # @@ -24,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 eda9c5a2..7d7e9c49 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 @@ -1,8 +1,9 @@ # `anim_block object name [reverse]` # -# Executes the animation specified in "name" on "object", -# while blocking. The next command in the event will be executed when the animation -# is finished playing. +# Executes the animation specified in "name" on "object" while blocking other +# events from starting. +# The next command in the event will be executed when the animation is +# finished playing. # # **Parameters** # @@ -24,7 +25,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 c91860d8..9fdd7c22 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 @@ -1,6 +1,8 @@ # `camera_push target [time] [type]` # -# Pushes the camera to point at a specific `target`. +# Pushes (moves) the camera so it points at a specific `target`. If the camera +# was following a target (like the player) previously, it will no longer follow +# this target. # # **Parameters** # @@ -13,7 +15,7 @@ # Supported transitions include the names of the values used # in the "TransitionType" enum of the "Tween" type (without the "TRANS_" prefix): # -# https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#enumerations +# See https://docs.godotengine.org/en/stable/classes/class_tween.html?highlight=tween#enumerations # # For more details see: https://docs.escoria-framework.org/camera # @@ -35,7 +37,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 258e07db..8cdf2105 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 @@ -1,10 +1,14 @@ # `camera_set_limits camlimits_id` # -# Activates the current camera's limits +# Limits the current camera's movement to a limit defined in the `ESCRoom`'s +# definition. A limit is defined as an upper-left (x, y) coordinate, a width +# and a height that the camera must stay within. Multiple limits can be +# defined for a room, allowing for new areas to be seen once they have +# been 'unlocked'. # # **Parameters** # -# - *camlimits_id*: Index of the camera limit in the `camera limits` +# - *camlimits_id*: Index of the camera limit defined in the `camera limits` # list of the current `ESCRoom` # # For more details see: https://docs.escoria-framework.org/camera @@ -23,7 +27,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if escoria.main.current_scene.camera_limits.size() < arguments[0]: escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_pos.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_pos.gd index dcf274a1..90a9e2df 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_pos.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_pos.gd @@ -1,6 +1,6 @@ # `camera_set_pos time x y` # -# Moves the camera to the given position. +# Moves the camera to the given absolute position over a time period. # # **Parameters** # 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 f8209b56..5a335d01 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 @@ -1,10 +1,13 @@ # `camera_set_target time object` # -# Configures the camera to follow the specified target `object` +# Configures the camera to follow the specified target `object` as it moves +# around the current room. The transition to focus on the `object` will happen +# over a time period. # # **Parameters** # -# - *time*: Number of seconds the transition should take +# - *time*: Number of seconds the transition should take to move the camera +# to follow `object` # - *object*: Global ID of the target object # # For more details see: https://docs.escoria-framework.org/camera @@ -23,7 +26,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[1]): escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom.gd index 647a997f..82fa8785 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_set_zoom.gd @@ -1,8 +1,10 @@ # `camera_set_zoom magnitude [time]` # -# Zooms the camera in/out to the desired `magnitude`. Values larger than 1 zoom -# the camera out while smaller values zoom in, relative to the default value -# of 1. +# Zooms the camera in/out to the desired `magnitude`. Values larger than '1' zoom +# the camera out while smaller values zoom in. These values are relative to the +# default zoom value of '1', not the current value. As such, while using a value +# of '0.5' would double the size of the graphics, running the same command again +# would result in no change. The zoom will happen over the given time period. # # **Parameters** # 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 42490760..1cadea17 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 @@ -1,6 +1,6 @@ # `camera_set_zoom_height pixels [time]` # -# Zooms the camera in/out so it occupies the given height in pixels +# Zooms the camera in/out so it occupies the given height in pixels. # # **Parameters** # @@ -24,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if arguments[0] < 0: escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/camera_shift.gd b/addons/escoria-core/game/core-scripts/esc/commands/camera_shift.gd index aff990d4..1509d6cf 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/camera_shift.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/camera_shift.gd @@ -1,6 +1,7 @@ # `camera_shift x y [time] [type]` # -# Shifts the camera by the given horizontal and vertical amounts. +# Shifts the camera by the given horizontal and vertical amounts relative to the +# current location. # # **Parameters** # 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 792db127..87218955 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 @@ -1,6 +1,8 @@ # `change_scene path [enable_automatic_transition] [run_events]` # -# Switches the current scene to another scene +# Switches the game from the current scene to another scene. Use this to move +# the player to a new room when they walk through an unlocked door, for +# example. # # **Parameters** # @@ -23,7 +25,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array) -> bool: if not ResourceLoader.exists(arguments[0]): escoria.logger.report_errors( 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 00340e8c..a1aa00e9 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/custom.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/custom.gd @@ -1,13 +1,15 @@ # `custom object node func_name [params]` # -# Calls the given Godot function on a (child) node of a registered `ESCitem`. +# +# Executes the specified Godot function. This function must be in a script +# attached to a child node of a registered `ESCitem`. # # **Parameters** # # - *object*: Global ID of the target `ESCItem` # - *node*: Name of the child node of the target `ESCItem` # - *func_name*: Name of the function to be called -# - *params*: Any primitive, non-array arguments for the function. Multiple +# - params: Any arguments to be passed to the function (array and object parameters are not supported). Multiple # parameters can be passed by using comma-separated values inside a string # # @ESC @@ -24,7 +26,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 b664a934..05ea6398 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 @@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.globals_manager.get_global(arguments[0]) is int: escoria.logger.report_errors( 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 7492cb60..47f0bf60 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 @@ -1,7 +1,10 @@ # `enable_terrain node_name` # -# Enables the `ESCTerrain`'s `NavigationPolygonInstance` defined by the given node name. -# Disables previously-activated `NavigationPolygonInstance`. +# Enables the `ESCTerrain`'s `NavigationPolygonInstance` specified by the given +# node name. It will also disable the previously-activated +# `NavigationPolygonInstance`. +# Use this to change where the player can walk, allowing them to walk into the +# next room once a door has been opened, for example. # # **Parameters** # diff --git a/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd b/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd index 4a1b85c7..7a1662cf 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/hide_menu.gd @@ -1,10 +1,17 @@ # `hide_menu menu_type [enable_automatic_transition]` # -# Hides either the main menu or the pause menu. -# +# Hides either the main menu or the pause menu. The enable_automatic_transition +# parameter can be used to specify if Escoria manages the graphical transition +# for you or not. +# Setting `enable_automatic_transition` to false allows you to manage the +# transition effect for your room as it transitions in and out. Place a +# `transition` command in the room's `setup` event to manage the look of the +# transition in, and in the room's `exit_scene` event to manage the look of the +# transition out. +# # **Parameters** # -# - *menu_type*: Type of menu to hide. Can be either `main` or `pause` (default: `main`) +# - *menu_type*: Which menu to hide. Can be either `main` or `pause` (default: `main`) # - *enable_automatic_transition*: Whether to automatically transition from the menu (default: `false`) # # @ESC @@ -21,7 +28,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not arguments[0] in ["main", "pause"]: escoria.logger.report_errors( 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 236ce71f..214c8693 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 @@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.globals_manager.has(arguments[0]): escoria.logger.report_errors( 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 5dd3abc6..a385eb50 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 @@ -1,6 +1,8 @@ # `inventory_add item` # -# Adds an item to the inventory. +# Adds an item to the inventory. If the player is picking up an object, you may +# want to use this command in conjunction with the `set_active` command so that +# the object 'disappears' from the scene as it's added to the inventory. # # **Parameters** # diff --git a/addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd b/addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd index e71e0003..23f9f282 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/inventory_remove.gd @@ -1,6 +1,8 @@ # `inventory_remove item` # -# Removes an item from the inventory +# Removes an item from the inventory. You may wish to use this command in +# conjuction with the `set_active` command to show an item in the scene, +# simulating placing the item somewhere, for example. # # **Parameters** # 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 0b801de0..540cf625 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 @@ -1,6 +1,6 @@ # `play_snd file [player]` # -# Plays the specified sound without blocking the event. +# Plays the specified sound without blocking the currently running event. # # **Parameters** # @@ -23,7 +23,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.has(arguments[1]): escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/queue_event.gd b/addons/escoria-core/game/core-scripts/esc/commands/queue_event.gd index eb6a28ca..04195591 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/queue_event.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/queue_event.gd @@ -1,6 +1,6 @@ # `queue_event object event [channel] [block]` # -# Queue another event to run +# Queue an event to run. # # **Parameters** # @@ -25,7 +25,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 27d8295d..e2f4b350 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 @@ -22,7 +22,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array) -> bool: if not ResourceLoader.exists(arguments[0]): escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/rand_global.gd b/addons/escoria-core/game/core-scripts/esc/commands/rand_global.gd index fcc08fc1..2b81dfa7 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/rand_global.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/rand_global.gd @@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.globals_manager.has(arguments[0]): escoria.logger.report_errors( 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 3dc6d26e..ecabd253 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/say.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/say.gd @@ -1,7 +1,8 @@ # `say player text [type]` # -# Displays the specified string as dialog spoken by the player. Blocks execution -# until the dialog has finished playing. +# Displays the specified string as dialog spoken by the player. This command +# blocks further event execution until the dialog has finished being 'said' +# (either as displayed text or as audible speech from a file). # # **Parameters** # @@ -38,7 +39,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 df06caca..d3eee617 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 @@ -1,9 +1,9 @@ # `sched_event time object event` # -# Schedules the execution to run at a later time. +# Schedules an event to run at a later time. # # If another event is already running when the scheduled -# event is to start, execution of the scheduled event +# event is supposed to start, execution of the scheduled event # begins when the already-running event ends. # # **Parameters** @@ -26,7 +26,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.has(arguments[1]): escoria.logger.report_errors( 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 1c3c1061..b69fd3f9 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 @@ -1,12 +1,12 @@ # `set_active object active` # -# Changes the "active" state of the object. `active` can be `true` or `false`. +# Changes the "active" state of the object. # Inactive objects are invisible in the room. # # **Parameters** # # - *object* Global ID of the object -# - *active* Whether `object` should be active. +# - *active* Whether `object` should be active. `active` can be `true` or `false`. # # @ESC extends ESCBaseCommand @@ -22,7 +22,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 84572e8d..cada69f3 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 @@ -1,6 +1,9 @@ # `set_angle object degrees [wait]` # -# Turns a movable `ESCItem` or `ESCPlayer`. +# Turns a movable `ESCItem` or `ESCPlayer` to face a given angle. + +# Angles 0 and 360 are the same and correspond to UP/NORTH, +# 90 is RIGHT/EAST, 180 is DOWN/SOUTH, 270 is LEFT/WEST etc. # # **Parameters** # @@ -24,7 +27,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 7f22011d..53aed0e3 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 @@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_global.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_global.gd index 1065b000..74598d9d 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_global.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_global.gd @@ -5,7 +5,8 @@ # **Parameters** # # - *name*: Name of the global -# - *value*: Value to set (can be of type string, boolean, integer or float) +# - *value*: Value to set the global to (can be of type string, boolean, integer +# or float) # # @ESC extends ESCBaseCommand diff --git a/addons/escoria-core/game/core-scripts/esc/commands/set_gui_visible.gd b/addons/escoria-core/game/core-scripts/esc/commands/set_gui_visible.gd index e4a2817c..8914983b 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/set_gui_visible.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/set_gui_visible.gd @@ -1,10 +1,10 @@ # `set_gui_visible visible` # -# Shows or hide the GUI. +# Show or hide the GUI. # # **Parameters** # -# - *visible*: Whether the GUI should be visible +# - *visible*: Whether the GUI should be visible (`true` or `false`) # # @ESC extends ESCBaseCommand 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 7fd6c42c..48a8812c 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 @@ -1,6 +1,6 @@ # `set_interactive object interactive` # -# Sets whether an object should be interactive. +# Sets whether an object is interactive. # # **Parameters** # @@ -21,7 +21,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 26888b46..3437dfa0 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 @@ -5,7 +5,7 @@ # **Parameters** # # - *object*: Global ID of the `ESCPlayer` or movable `ESCItem` -# - *speed*: Speed value for `object` +# - *speed*: Speed value for `object` in pixels per second. # # @ESC extends ESCBaseCommand @@ -20,7 +20,7 @@ func configure() -> ESCCommandArgumentDescriptor: [null, null] ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 390cb021..e960e727 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 @@ -28,7 +28,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd b/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd index a8a1cd9d..7bc40486 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/show_menu.gd @@ -1,10 +1,14 @@ # `show_menu menu_type [enable_automatic_transition]` # -# Shows either the main menu or the pause menu. +# Shows either the main menu or the pause menu. The enable_automatic_transition +# parameter can be used to specify if Escoria manages the graphical transition to +# the menu or not. If set to false, you can manage the transition yourself +# instead (if you want to change the transition type from the default for +# example) using the `transition` command. # # **Parameters** # -# - *menu_type*: Type of menu to hide. Can be either `main` or `pause` (default: `main`) +# - *menu_type*: Which menu to show. Can be either `main` or `pause` (default: `main`) # - *enable_automatic_transition*: Whether to automatically transition to the menu (default: `false`) # # @ESC @@ -21,7 +25,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not arguments[0] in ["main", "pause"]: escoria.logger.report_errors( 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 04629fdc..54e9f1e9 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/slide.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/slide.gd @@ -5,7 +5,8 @@ # # - *object*: Global ID of the object to move # - *target*: Global ID of the target object -# - *speed*: Movement speed (default: the default speed of `object`) +# - *speed*: The speed at which to slide in pixels per second (will default to +# the speed configured on the `object`) # # **Warning** This command does not respect the room's navigation polygons, so # `object` can be moved even when outside walkable areas. @@ -28,7 +29,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( @@ -53,9 +54,11 @@ func validate(arguments: Array): # # #### Parameters # -# - source: The item to slide -# - destination: The destination item to slide to -# - speed: The speed at which to slide (will default to the +# - *source*: The item to slide +# - *destination*: The destination item to slide to +# - *speed*: The speed at which to slide in pixels per second (will default to +# the speed configured on the `object`) +# # # **Returns** The generated (and started) tween func _slide_object( diff --git a/addons/escoria-core/game/core-scripts/esc/commands/slide_block.gd b/addons/escoria-core/game/core-scripts/esc/commands/slide_block.gd index 7aa32fb3..5cefcdd6 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/slide_block.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/slide_block.gd @@ -5,7 +5,8 @@ # # - *object*: Global ID of the object to move # - *target*: Global ID of the target object -# - *speed*: Movement speed (default: the default speed of `object`) +# - *speed*: The speed at which to slide in pixels per second (will default to +# the speed configured on the `object`) # # **Warning** This command does not respect the room's navigation polygons, so # `object` can be moved even when outside walkable areas. 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 24dd78db..bad3bacd 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/spawn.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/spawn.gd @@ -8,7 +8,7 @@ # - *path*: Path to the scene file of the object # - *is_active*: Whether the new object should be set to active (default: `true`) # - *position_target*: Global ID of another object that will be used to -# position the new object (when omitted, the new objet's position is not specified) +# position the new object (when omitted, the new object's position is not specified) # # @ESC extends ESCBaseCommand @@ -24,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if arguments[0].empty() \ or arguments[0] in escoria.object_manager.RESERVED_OBJECTS: 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 96ec96ef..4187877b 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 @@ -22,7 +22,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.has(arguments[0]): escoria.logger.report_errors( 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 bae3a708..bbb06f45 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/teleport.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/teleport.gd @@ -1,11 +1,12 @@ # `teleport object target` # -# Instantly moves an object to a new position +# Instantly moves an object to a new position. # # **Parameters** # # - *object*: Global ID of the object to move -# - *target*: Global ID of the target object to use as the destination +# - *target*: Global ID of the object to use as the destination coordinates +# for `object` # # @ESC extends ESCBaseCommand @@ -21,7 +22,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 41ec4285..89c97488 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 @@ -1,6 +1,6 @@ # `teleport_pos object x y` # -# Instantly moves an object to the specified position +# Instantly moves an object to the specified (absolute) coordinates. # # **Parameters** # @@ -22,7 +22,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 3599f2b4..780ee945 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/transition.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/transition.gd @@ -23,7 +23,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.main.scene_transition.has_transition(arguments[0]): escoria.logger.report_errors( 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 bcbcfc3f..49095aaa 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 @@ -2,13 +2,19 @@ # # Turns `object` to face another object. # +# Unlike movement commands, `turn_to` will not automatically reference an +# `ESCLocation` that is a child of an `ESCItem.` +# To turn towards an `ESCLocation` that is a child of an `ESCItem`, give the +# `ESCLocation` a `Global ID` and use this value as the `object_to_face` +# parameter. +# # **Parameters** # # - *object*: Global ID of the object to be turned # - *object_to_face*: Global ID of the object to turn towards # - *wait*: Length of time to wait in seconds for each intermediate angle. # If set to 0, the turnaround is immediate (default: `0`) -## +# # @ESC extends ESCBaseCommand class_name TurnToCommand @@ -23,7 +29,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 952cb89f..bc4bc062 100644 --- a/addons/escoria-core/game/core-scripts/esc/commands/walk.gd +++ b/addons/escoria-core/game/core-scripts/esc/commands/walk.gd @@ -1,13 +1,14 @@ # `walk object target [speed]` # -# Moves the specified `ESCPlayer` or movable `ESCItem` to `target` w -# hile playing `object`'s walking animation. This command is non-blocking. +# Moves the specified `ESCPlayer` or movable `ESCItem` to `target` +# while playing the `object`'s walking animation. This command is non-blocking. # # **Parameters** # # - *object*: Global ID of the object to move # - *target*: Global ID of the target object -# - *speed*: Walking speed to use (default: `object`'s default speed) +# - *speed*: The speed the `object` will walk in pixels per second (will +# default to the speed configured on the `object`) # # @ESC extends ESCBaseCommand @@ -23,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 68cc05fd..db2eb829 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 @@ -7,7 +7,8 @@ # # - *object*: Global ID of the object to move # - *target*: Global ID of the target object -# - *speed*: Walking speed to use (default: `object`'s default speed) +# - *speed*: The speed the `object` will walk in pixels per second (will +# default to the speed configured on the `object`) # # @ESC extends ESCBaseCommand @@ -23,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 6bd3b800..e6da54da 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 @@ -1,7 +1,7 @@ # `walk_to_pos object x y` # -# Moves the specified `ESCPlayer` or movable `ESCItem` to the target -# position while playing `object`'s walking animation. +# Moves the specified `ESCPlayer` or movable `ESCItem` to the absolute +# coordinates provided while playing the `object`'s walking animation. # This command is non-blocking. # # **Parameters** @@ -24,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( 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 f1a899ca..5fabdc10 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 @@ -1,7 +1,7 @@ # `walk_to_pos_block object x y` # -# Moves the specified `ESCPlayer` or movable `ESCItem` to the target -# position while playing `object`'s walking animation. +# Moves the specified `ESCPlayer` or movable `ESCItem` to the absolute +# coordinates provided while playing the `object`'s walking animation. # This command is blocking. # # **Parameters** @@ -24,7 +24,7 @@ func configure() -> ESCCommandArgumentDescriptor: ) -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array): if not escoria.object_manager.objects.has(arguments[0]): escoria.logger.report_errors( diff --git a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd index 791bea71..38809fc8 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_event_manager.gd @@ -215,7 +215,7 @@ func clear_event_queue(): events_queue[channel_name].clear() -# Check wether a channel is free to run more events +# Check whether a channel is free to run more events # # #### Parameters # - name: Name of the channel to test 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 9fc8d56f..2fd4abe7 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 @@ -80,7 +80,7 @@ func register_object(object: ESCObject, force: bool = false) -> void: objects[object.global_id] = object -# Check wether an object was registered +# Check whether an object was registered # # #### Parameters # diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_base_command.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_base_command.gd index 395dda7b..3e5c5c91 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_base_command.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_base_command.gd @@ -26,7 +26,7 @@ func configure() -> ESCCommandArgumentDescriptor: return ESCCommandArgumentDescriptor.new() -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(arguments: Array) -> bool: return self.configure().validate(get_class(), arguments) 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 c48512b9..a79b1be5 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 @@ -62,7 +62,7 @@ func prepare_arguments(arguments: Array) -> Array: return complete_arguments -# Validate wether the given arguments match the command descriptor +# Validate whether the given arguments match the command descriptor func validate(command: String, arguments: Array) -> bool: if arguments.size() < self.min_args: escoria.logger.report_errors( @@ -106,7 +106,7 @@ func validate(command: String, arguments: Array) -> bool: return true -# Check wether the given argument is of the given type +# Check whether the given argument is of the given type # # #### Parameters # diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd index 534a34f7..189f7893 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_statement.gd @@ -19,7 +19,7 @@ var _is_interrupted: bool = false var is_finished: bool = false -# Check wether the statement should be run based on its conditions +# Check whether the statement should be run based on its conditions func is_valid() -> bool: for condition in self.conditions: if not (condition as ESCCondition).run(): diff --git a/addons/escoria-core/game/core-scripts/esc_item.gd b/addons/escoria-core/game/core-scripts/esc_item.gd index 9ff20ec6..adf55302 100644 --- a/addons/escoria-core/game/core-scripts/esc_item.gd +++ b/addons/escoria-core/game/core-scripts/esc_item.gd @@ -424,7 +424,7 @@ func set_speed(speed_value: int) -> void: speed = speed_value -# Check wether this item moved +# Check whether this item moved func has_moved() -> bool: return _movable.moved if is_movable else false diff --git a/addons/escoria-core/game/core-scripts/esc_location.gd b/addons/escoria-core/game/core-scripts/esc_location.gd index 1c19da4b..77442e32 100644 --- a/addons/escoria-core/game/core-scripts/esc_location.gd +++ b/addons/escoria-core/game/core-scripts/esc_location.gd @@ -1,5 +1,8 @@ # A simple node extending Position2D with a global ID so that it can be -# referenced in ESC Scripts. +# referenced in ESC Scripts. Movement-based commands like `walk_to_pos` will +# automatically use an `ESCLocation` that is a child of the destination node. +# Commands like `turn_to`--which are not movement-based--will ignore child +# `ESCLocation`s and refer to the parent node. extends Position2D class_name ESCLocation, "res://addons/escoria-core/design/esc_location.svg" diff --git a/addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd b/addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd index db3b4d37..d11b57b3 100644 --- a/addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd +++ b/addons/escoria-core/game/core-scripts/resources/esc_animationresource.gd @@ -8,8 +8,8 @@ class_name ESCAnimationResource # Array containing the different angles available for animations. # Each angle is defined by an array [start_angle, angle_size]. # start_angle must be between 0 and 360. -# Angle 0 and 360 are the same and correspond to UP/NORTH -# 90 is RIGHT/EAST, 180 is DOWN/SOUTH, etc +# Angles 0 and 360 are the same and correspond to UP/NORTH, +# 90 is RIGHT/EAST, 180 is DOWN/SOUTH, 270 is LEFT/WEST etc. export(Array, Resource) var dir_angles: Array = [] # Array of animations for each direction, from UP to RIGHT_UP clockwise diff --git a/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd b/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd index 67147b66..46b9e069 100644 --- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd +++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd @@ -10,7 +10,7 @@ signal say_finished signal option_chosen(option) -# Check wether a specific type is supported by the +# Check whether a specific type is supported by the # dialog plugin # # #### Parameters @@ -20,7 +20,7 @@ func has_type(type: String) -> bool: return false -# Check wether a specific chooser type is supported by the +# Check whether a specific chooser type is supported by the # dialog plugin # # #### Parameters diff --git a/addons/escoria-core/ui_library/inventory/esc_inventory_container.gd b/addons/escoria-core/ui_library/inventory/esc_inventory_container.gd index 13970380..dfc6a311 100644 --- a/addons/escoria-core/ui_library/inventory/esc_inventory_container.gd +++ b/addons/escoria-core/ui_library/inventory/esc_inventory_container.gd @@ -3,7 +3,7 @@ extends Control class_name ESCInventoryContainer -# Get wether the inventory container currently is empty +# Get whether the inventory container currently is empty # **Returns** Wether the container is empty or not func is_empty() -> bool: return get_child_count() > 0 diff --git a/addons/escoria-dialog-simple/esc_dialog_simple.gd b/addons/escoria-dialog-simple/esc_dialog_simple.gd index dbfaa1a3..6e063a30 100644 --- a/addons/escoria-dialog-simple/esc_dialog_simple.gd +++ b/addons/escoria-dialog-simple/esc_dialog_simple.gd @@ -10,7 +10,7 @@ var _type_player: Node = null var _dialog_player: Node = null -# Check wether a specific type is supported by the +# Check whether a specific type is supported by the # dialog plugin # # #### Parameters @@ -20,7 +20,7 @@ func has_type(type: String) -> bool: return true if type in ["floating", "avatar"] else false -# Check wether a specific chooser type is supported by the +# Check whether a specific chooser type is supported by the # dialog plugin # # #### Parameters