Added "label" command.

Continued room9 puzzle (not finished)
This commit is contained in:
Julian Murgia
2021-02-23 23:10:24 +01:00
parent 38f554b496
commit f743d1089c
16 changed files with 347 additions and 116 deletions

View File

@@ -51,6 +51,7 @@ var commands = {
"inventory_remove": { "min_args": 1 },
"inventory_display": { "min_args": 1, "types": [TYPE_BOOL] },
"jump": { "min_args": 1 },
"label": { "min_args": 1 },
"play_snd": { "min_args": 2, "types": [TYPE_STRING, TYPE_STRING, TYPE_BOOL] },
"queue_animation": { "min_args": 2, "types": [TYPE_STRING, TYPE_STRING, TYPE_BOOL] },
"queue_resource": { "min_args": 1, "types": [TYPE_STRING, TYPE_BOOL] },
@@ -75,9 +76,9 @@ var commands = {
"turn_to": { "min_args": 2 },
"wait": true,
"walk": { "min_args": 2 },
"walk_block": { "min_args": 2 },
"walk_to_pos": { "min_args": 3},
"walk_to_pos_block": { "min_args": 3},
"walk_block": { "min_args": 2 },
"%": { "alias": "label", "min_args": 1},
"?": { "alias": "dialog"},

View File

@@ -389,13 +389,15 @@ func inventory_display(command_params : Array):
"""
jump label_name
Jump to label_name block. Labels are blocks defined the same way as action_verbs:
:label
Jump to label_name block. This is used to build more complex dialog trees.
Labels must be defined at the same level as the 'jump' command, using either
'label label_name' command or '% label_name'.
"""
func jump(command_params : Array):
escoria.esc_runner.jump(command_params[0])
return esctypes.EVENT_LEVEL_STATE.JUMP
"""
"""
func play_snd(command_params : Array):

View File

@@ -80,7 +80,7 @@ func set_target2(target2 : String) -> void:
func update_tooltip_text():
"""
Overriden method. Should not be called.
Overriden method. Should not be called directly.
"""
pass

View File

@@ -14,7 +14,7 @@ func _input(event):
escoria.main.get_node("layers/debug_layer/esc_prompt_popup").popup()
if ProjectSettings.get_setting("escoria/ui/tooltip_follows_mouse"):
if !hotspot_focused.empty():
if escoria.main.current_scene and escoria.main.current_scene.game:
if event is InputEventMouseMotion:
escoria.main.current_scene.game.update_tooltip_following_mouse_position(event.position)