Add missing tutorial utils.cfg file
This commit is contained in:
parent
e83e48a6d6
commit
aab59a640c
1 changed files with 75 additions and 0 deletions
75
data/tutorial/scenarios/utils.cfg
Normal file
75
data/tutorial/scenarios/utils.cfg
Normal file
|
@ -0,0 +1,75 @@
|
|||
#textdomain wesnoth-tutorial
|
||||
#define LABEL STRING POS
|
||||
[set_variable]
|
||||
name=label_string
|
||||
format={STRING}
|
||||
[/set_variable]
|
||||
[label]
|
||||
x,y={POS}
|
||||
text=$label_string
|
||||
[/label]
|
||||
{CLEAR_VARIABLE label_string}
|
||||
#enddef
|
||||
#define UNLABEL POS
|
||||
[label]
|
||||
x,y={POS}
|
||||
text=""
|
||||
[/label]
|
||||
#enddef
|
||||
|
||||
#define PRINT STRING
|
||||
[set_variable]
|
||||
name=print_string
|
||||
format={STRING}
|
||||
[/set_variable]
|
||||
[print]
|
||||
text=$print_string
|
||||
size=18
|
||||
duration=10000
|
||||
red,green,blue=255,255,255
|
||||
[/print]
|
||||
{CLEAR_VARIABLE print_string}
|
||||
#enddef
|
||||
|
||||
#define CLEAR_PRINT
|
||||
[print]
|
||||
text=""
|
||||
[/print]
|
||||
#enddef
|
||||
|
||||
#define MOVE DESCRIPTION STARTX STARTY ENDX ENDY
|
||||
[scroll_to]
|
||||
x,y={STARTX},{STARTY}
|
||||
[/scroll_to]
|
||||
[store_unit]
|
||||
[filter]
|
||||
description={DESCRIPTION}
|
||||
[/filter]
|
||||
variable=MOVE_tmp
|
||||
kill=yes
|
||||
[/store_unit]
|
||||
[redraw][/redraw]
|
||||
[move_unit_fake]
|
||||
type=$MOVE_tmp.type
|
||||
side=$MOVE_tmp.side
|
||||
x={STARTX},{ENDX}
|
||||
y={STARTY},{ENDY}
|
||||
[/move_unit_fake]
|
||||
# Drain moves
|
||||
{VARIABLE MOVE_tmp.moves 0}
|
||||
{VARIABLE MOVE_tmp.x {ENDX}}
|
||||
{VARIABLE MOVE_tmp.y {ENDY}}
|
||||
[unstore_unit]
|
||||
variable=MOVE_tmp
|
||||
[/unstore_unit]
|
||||
[redraw][/redraw]
|
||||
{CLEAR_VARIABLE MOVE_tmp}
|
||||
#enddef
|
||||
|
||||
#define NUMEQ VAR VAL
|
||||
[variable]
|
||||
name={VAR}
|
||||
numerical_equals={VAL}
|
||||
[/variable]
|
||||
#enddef
|
||||
|
Loading…
Add table
Reference in a new issue