summaryrefslogtreecommitdiff
path: root/addons/escoria-core/game/scenes/dialogs
diff options
context:
space:
mode:
Diffstat (limited to 'addons/escoria-core/game/scenes/dialogs')
-rw-r--r--addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd10
-rw-r--r--addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd2
-rw-r--r--addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd17
3 files changed, 15 insertions, 14 deletions
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 0a00456..375c967 100644
--- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd
+++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_manager.gd
@@ -1,7 +1,7 @@
## A base class for dialog plugins to work with Escoria
## @MANAGER
-extends Control
class_name ESCDialogManager
+extends Control
## Emitted when the say function has completed showing the text[br]
## [br]
@@ -40,7 +40,7 @@ signal option_chosen(option)
## #### Returns[br]
## [br]
## Returns whether the type is supported or not. (`bool`)
-func has_type(type: String) -> bool:
+func has_type(_type: String) -> bool:
return false
## Checks whether a specific chooser type is supported by the dialog plugin.[br]
@@ -54,7 +54,7 @@ func has_type(type: String) -> bool:
## #### Returns[br]
## [br]
## Returns whether the type is supported or not. (`bool`)
-func has_chooser_type(type: String) -> bool:
+func has_chooser_type(_type: String) -> bool:
return false
## Outputs a text said by the item specified by the global id and emits `say_finished` after finishing displaying the text.[br]
@@ -72,7 +72,7 @@ func has_chooser_type(type: String) -> bool:
## #### Returns[br]
## [br]
## Returns nothing.
-func say(dialog_player: Node, global_id: String, text: String, type: String, key: String):
+func say(_dialog_player: Node, _global_id: String, _text: String, _type: String, _key: String):
pass
## Instructs the dialog manager to preserve the next dialog box used by a `say` command until a call to `disable_preserve_dialog_box` is made. This method should be idempotent, i.e. if called after the first time and prior to `disable_preserve_dialog_box` being called, the result should be the same.[br]
@@ -112,7 +112,7 @@ func disable_preserve_dialog_box() -> void:
## #### Returns[br]
## [br]
## Returns nothing.
-func choose(dialog_player: Node, dialog: ESCDialog, type: String):
+func choose(_dialog_player: Node, _dialog: ESCDialog, _type: String):
pass
## Triggers running the dialogue faster.[br]
diff --git a/addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd b/addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd
index 44e2a3f..69f7127 100644
--- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd
+++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_options_chooser.gd
@@ -1,6 +1,6 @@
## Base class for all dialog options implementations
-extends Control
class_name ESCDialogOptionsChooser
+extends Control
## Emitted when an option is chosen.[br]
## [br]
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 70e61e2..3862696 100644
--- a/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd
+++ b/addons/escoria-core/game/scenes/dialogs/esc_dialog_player.gd
@@ -1,6 +1,6 @@
## Escoria dialog player
-extends Control
class_name ESCDialogPlayer
+extends Control
## Emitted when an answer is chosen.[br]
## [br]
@@ -158,9 +158,9 @@ func _determine_say_dialog_manager(type: String) -> void:
ESCProjectSettingsManager.DIALOG_MANAGERS
):
if ResourceLoader.exists(_manager_class):
- var _manager: ESCDialogManager = load(_manager_class).new()
- if _manager.has_type(type):
- dialog_manager = _manager
+ var manager: ESCDialogManager = load(_manager_class).new()
+ if manager.has_type(type):
+ dialog_manager = manager
else:
dialog_manager = null
@@ -191,9 +191,9 @@ func _determine_choose_dialog_manager(type: String) -> void:
ESCProjectSettingsManager.DIALOG_MANAGERS
):
if ResourceLoader.exists(_manager_class):
- var _manager: ESCDialogManager = load(_manager_class).new()
- if _manager.has_chooser_type(type):
- dialog_manager = _manager
+ var manager: ESCDialogManager = load(_manager_class).new()
+ if manager.has_chooser_type(type):
+ dialog_manager = manager
else:
dialog_manager = null
@@ -248,7 +248,8 @@ func _determine_dialog_manager(dialog_type: String, dialog_manager_type: String)
if dialog_type == DIALOG_TYPE_SAY:
_determine_say_dialog_manager(dialog_manager_type)
return _say_dialog_manager
- elif dialog_type == DIALOG_TYPE_CHOOSE:
+
+ if dialog_type == DIALOG_TYPE_CHOOSE:
_determine_choose_dialog_manager(dialog_manager_type)
return _choose_dialog_manager