From 584b81a496a95fadb5062dc31ce8db09cc0c3269 Mon Sep 17 00:00:00 2001 From: Balloonpopper Date: Wed, 20 Apr 2022 13:34:48 +1000 Subject: [PATCH] fix: Corrected wether to whether --- .../game/core-scripts/behaviors/esc_movable.gd | 4 ++-- .../game/core-scripts/esc/esc_event_manager.gd | 2 +- .../game/core-scripts/esc/esc_globals_manager.gd | 2 +- .../game/core-scripts/esc/esc_inventory_manager.gd | 2 +- .../esc/types/esc_command_argument_descriptor.gd | 2 +- .../game/core-scripts/esc/types/esc_condition.gd | 4 ++-- .../game/core-scripts/esc/types/esc_object.gd | 4 ++-- .../game/core-scripts/esc_animation_player.gd | 8 ++++---- addons/escoria-core/game/core-scripts/esc_item.gd | 2 +- addons/escoria-core/game/core-scripts/esc_player.gd | 2 +- .../game/scenes/dialogs/esc_dialog_manager.gd | 4 ++-- .../escoria-core/game/scenes/dialogs/esc_dialog_player.gd | 4 +++- .../ui_library/inventory/esc_inventory_container.gd | 2 +- addons/escoria-dialog-simple/esc_dialog_simple.gd | 4 ++-- addons/escoria-dialog-simple/types/avatar.gd | 2 +- addons/escoria-dialog-simple/types/floating.gd | 2 +- addons/escoria-ui-simplemouse/inventory/inventory_ui.gd | 2 +- 17 files changed, 27 insertions(+), 25 deletions(-) diff --git a/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd b/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd index d0ea82b4..77190873 100644 --- a/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd +++ b/addons/escoria-core/game/core-scripts/behaviors/esc_movable.gd @@ -27,7 +27,7 @@ var walk_destination: Vector2 # The walk context currently carried out by this movable node var walk_context: ESCWalkContext = null -# Wether the character was moved at all +# Whether the character was moved at all var moved: bool # Player Direction used to reflect the movement to the new position @@ -36,7 +36,7 @@ var last_dir: int # The last scaling applied to the parent var last_scale: Vector2 -# Wether the current direction animation is flipped +# Whether the current direction animation is flipped var is_mirrored: bool 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 03e35c02..c6620a05 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 @@ -235,7 +235,7 @@ func clear_event_queue(): # # #### Parameters # - name: Name of the channel to test -# **Returns** Wether the channel can currently accept a new event +# **Returns** Whether the channel can currently accept a new event func is_channel_free(name: String) -> bool: return _channels_state[name] if name in _channels_state else true diff --git a/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd index 5831d8d0..b1c2fe8f 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_globals_manager.gd @@ -22,7 +22,7 @@ var _reserved_globals: Dictionary = {} # #### Parameters # # - key: The global key to check -# **Returns** Wether the global was registered +# **Returns** Whether the global was registered func has(key: String) -> bool: return _globals.has(key) diff --git a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd index 69625fa7..134c4e81 100644 --- a/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd +++ b/addons/escoria-core/game/core-scripts/esc/esc_inventory_manager.gd @@ -8,7 +8,7 @@ class_name ESCInventoryManager # #### Parameters # # - item: Inventory item id -# **Returns** Wether the player has the inventory +# **Returns** Whether the player has the inventory func inventory_has(item: String) -> bool: return escoria.globals_manager.has("i/%s" % item) 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 d50b4236..73d7014f 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 @@ -27,7 +27,7 @@ var types: Array = [] # The default values for the arguments var defaults: Array = [] -# Wether to strip quotes on specific arguments +# Whether to strip quotes on specific arguments var strip_quotes: Array = [] diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd index 75a3fc86..d6d904a7 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_condition.gd @@ -31,10 +31,10 @@ const COMPARISON_DESCRIPTION = [ # Name of the flag compared var flag: String -# Wether this condition is negated +# Whether this condition is negated var negated: bool = false -# Wether this condition is regarding an inventory item ("i/...") +# Whether this condition is regarding an inventory item ("i/...") var inventory: bool = false # An optional comparison type. Use the COMPARISON-Enum diff --git a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd index faf3d94c..d9e040bc 100644 --- a/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd +++ b/addons/escoria-core/game/core-scripts/esc/types/esc_object.gd @@ -6,10 +6,10 @@ class_name ESCObject # The global id of the object var global_id: String -# Wether the object is active (visible to the player) +# Whether the object is active (visible to the player) var active: bool = true setget _set_active -# Wether the object is interactive (clickable by the player) +# Whether the object is interactive (clickable by the player) var interactive: bool = true setget _set_interactive, _get_interactive # The state of the object. If the object has a respective animation, diff --git a/addons/escoria-core/game/core-scripts/esc_animation_player.gd b/addons/escoria-core/game/core-scripts/esc_animation_player.gd index 9a6621b1..37a1456d 100644 --- a/addons/escoria-core/game/core-scripts/esc_animation_player.gd +++ b/addons/escoria-core/game/core-scripts/esc_animation_player.gd @@ -17,7 +17,7 @@ var _animation_player: AnimationPlayer # A AnimationPlayer typed reference to the player node (for intellisense) var _animated_sprite: AnimatedSprite -# Wether the player node is of type AnimationPlayer (just for convenience) +# Whether the player node is of type AnimationPlayer (just for convenience) var _is_animation_player: bool = false # Currently running animation @@ -73,8 +73,8 @@ func get_animations() -> PoolStringArray: return _animated_sprite.frames.get_animation_names() -# Wether the animation is playing -# **Returns: Wether the animation is playing** +# Whether the animation is playing +# **Returns: Whether the animation is playing** func is_playing() -> bool: return _player_node.is_playing() @@ -118,7 +118,7 @@ func play_backwards(name: String): # #### Parameters # # - name: Name of the animation to check -# **Returns** Wether the animation player has the animation +# **Returns** Whether the animation player has the animation func has_animation(name: String) -> bool: if _is_animation_player: return _animation_player.has_animation(name) diff --git a/addons/escoria-core/game/core-scripts/esc_item.gd b/addons/escoria-core/game/core-scripts/esc_item.gd index 7335471d..abf9cb9e 100644 --- a/addons/escoria-core/game/core-scripts/esc_item.gd +++ b/addons/escoria-core/game/core-scripts/esc_item.gd @@ -86,7 +86,7 @@ export(String) var trigger_out_verb = "trigger_out" # If true, the player can interact with this item export(bool) var is_interactive = true -# Wether this item is movable +# Whether this item is movable export(bool) var is_movable = false # If true, player orients towards 'interaction_direction' as diff --git a/addons/escoria-core/game/core-scripts/esc_player.gd b/addons/escoria-core/game/core-scripts/esc_player.gd index 2f6f3940..80d0a407 100644 --- a/addons/escoria-core/game/core-scripts/esc_player.gd +++ b/addons/escoria-core/game/core-scripts/esc_player.gd @@ -6,7 +6,7 @@ class_name ESCPlayer, "res://addons/escoria-core/design/esc_player.svg" -# Wether the player can be selected like an item +# Whether the player can be selected like an item export(bool) var selectable = false 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 46b9e069..faeac1f1 100644 --- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd +++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd @@ -15,7 +15,7 @@ signal option_chosen(option) # # #### Parameters # - type: required type -# *Returns* Wether the type is supported or not +# *Returns* Whether the type is supported or not func has_type(type: String) -> bool: return false @@ -25,7 +25,7 @@ func has_type(type: String) -> bool: # # #### Parameters # - type: required chooser type -# *Returns* Wether the type is supported or not +# *Returns* Whether the type is supported or not func has_chooser_type(type: String) -> bool: return false diff --git a/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd b/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd index d66f820b..3340c81d 100644 --- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd +++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd @@ -18,7 +18,7 @@ signal option_chosen(option) signal say_finished -# Wether the player is currently speaking +# Whether the player is currently speaking var is_speaking: bool = false @@ -105,6 +105,8 @@ func say(character: String, type: String, text: String) -> void: var _manager: ESCDialogManager = load(_manager_class).new() if _manager.has_type(type): _dialog_manager = _manager + else: + _dialog_manager = null if _dialog_manager == null: escoria.logger.report_errors( 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 dfc6a311..8969b0bf 100644 --- a/addons/escoria-core/ui_library/inventory/esc_inventory_container.gd +++ b/addons/escoria-core/ui_library/inventory/esc_inventory_container.gd @@ -4,7 +4,7 @@ class_name ESCInventoryContainer # Get whether the inventory container currently is empty -# **Returns** Wether the container is empty or not +# **Returns** Whether 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 6e063a30..0d75eb81 100644 --- a/addons/escoria-dialog-simple/esc_dialog_simple.gd +++ b/addons/escoria-dialog-simple/esc_dialog_simple.gd @@ -15,7 +15,7 @@ var _dialog_player: Node = null # # #### Parameters # - type: required type -# *Returns* Wether the type is supported or not +# *Returns* Whether the type is supported or not func has_type(type: String) -> bool: return true if type in ["floating", "avatar"] else false @@ -25,7 +25,7 @@ func has_type(type: String) -> bool: # # #### Parameters # - type: required chooser type -# *Returns* Wether the type is supported or not +# *Returns* Whether the type is supported or not func has_chooser_type(type: String) -> bool: return true if type == "simple" else false diff --git a/addons/escoria-dialog-simple/types/avatar.gd b/addons/escoria-dialog-simple/types/avatar.gd index a8824dec..3d12668a 100644 --- a/addons/escoria-dialog-simple/types/avatar.gd +++ b/addons/escoria-dialog-simple/types/avatar.gd @@ -15,7 +15,7 @@ var _fast_text_speed_per_character # The time to wait before the dialog is finished var _max_time_to_text_disappear -# Wether the current dialog is speeding up +# Whether the current dialog is speeding up var _is_speeding_up: bool = false diff --git a/addons/escoria-dialog-simple/types/floating.gd b/addons/escoria-dialog-simple/types/floating.gd index 6c9cd6a3..600f3ba3 100644 --- a/addons/escoria-dialog-simple/types/floating.gd +++ b/addons/escoria-dialog-simple/types/floating.gd @@ -19,7 +19,7 @@ var _max_time_to_text_disappear # Current character speaking, to keep track of reference for animation purposes var _current_character -# Wether the current dialog is speeding up +# Whether the current dialog is speeding up var _is_speeding_up: bool = false diff --git a/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd b/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd index df40d821..2bc06be0 100644 --- a/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd +++ b/addons/escoria-ui-simplemouse/inventory/inventory_ui.gd @@ -1,7 +1,7 @@ extends ESCInventory -# Wether the inventory is visible currently +# Whether the inventory is visible currently var inventory_visible: bool = false