mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-19 19:43:47 +00:00
Updated dialogic
This commit is contained in:
parent
1d11462073
commit
cbb82512ee
483 changed files with 5743 additions and 2177 deletions
|
|
@ -2,11 +2,42 @@ extends DialogicSubsystem
|
|||
|
||||
## Subsystem that holds methods for jumping to specific labels, or return to the previous jump.
|
||||
|
||||
signal switched_timeline(info:Dictionary)
|
||||
signal jumped_to_label(info:Dictionary)
|
||||
signal returned_from_jump(info:Dictionary)
|
||||
signal passed_label(info:Dictionary)
|
||||
|
||||
@warning_ignore("unused_signal") # this is emitted from the jump event
|
||||
## Emitted when a jump event switches from one timeline to another. Gives a dictionary witht the keys:
|
||||
## [br]
|
||||
## Key | Value Type | Value [br]
|
||||
## -------------------- | ----------------------- | ----- [br]
|
||||
## `previous_timeline` | [type DialogicTimeline] | The timeline that we were in previously. [br]
|
||||
## `timeline` | [type DialogicTimeline] | The timeline we are in now. [br]
|
||||
## `label` | [type String] | The label we went to (empty if beginning). [br]
|
||||
signal switched_timeline(info:Dictionary)
|
||||
|
||||
## Emitted when a jump event jumps to a label. Gives a dictionary witht the keys:
|
||||
## [br]
|
||||
## Key | Value Type | Value [br]
|
||||
## ----------- | ----------------------- | ----- [br]
|
||||
## `timeline` | [type DialogicTimeline] | The timeline we are in now. [br]
|
||||
## `label` | [type String] | The label we went to (empty if beginning). [br]
|
||||
signal jumped_to_label(info:Dictionary)
|
||||
|
||||
## Emitted when a return event is hit and there was a timeline to return to. Gives a dictionary witht the keys:
|
||||
## [br]
|
||||
## Key | Value Type | Value [br]
|
||||
## --------------- | ----------------------- | ----- [br]
|
||||
## `sub_timeline` | [type DialogicTimeline] | The timeline we were in before. [br]
|
||||
## `label` | [type String] | The label we went back to (empty if beginning). [br]
|
||||
signal returned_from_jump(info:Dictionary)
|
||||
|
||||
## Emitted when a label event is executed (usually does nothing else). Gives a dictionary witht the keys:
|
||||
## [br]
|
||||
## Key | Value Type | Value [br]
|
||||
## ------------------- | ----------------------- | ----- [br]
|
||||
## `identifier` | [type String] | The identifier of the label event. [br]
|
||||
## `display_name` | [type String] | The display name, possibly translated. [br]
|
||||
## `display_name_orig` | [type String] | The untranslated display name. [br]
|
||||
## `timeline` | [type String] | The identifier of the timeline we are in. [br]
|
||||
signal passed_label(info:Dictionary)
|
||||
|
||||
#region STATE
|
||||
####################################################################################################
|
||||
|
|
@ -29,8 +60,10 @@ func load_game_state(_load_flag:=LoadFlags.FULL_LOAD) -> void:
|
|||
func jump_to_label(label:String) -> void:
|
||||
if label.is_empty():
|
||||
dialogic.current_event_idx = 0
|
||||
jumped_to_label.emit({'timeline':dialogic.current_timeline, 'label':"TOP"})
|
||||
jumped_to_label.emit({'timeline':dialogic.current_timeline, 'label':""})
|
||||
return
|
||||
## Allows label to be a variable, making the jump event dynamic
|
||||
label = str(dialogic.VAR.parse_variables(label))
|
||||
|
||||
var idx: int = -1
|
||||
while true:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue