mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-18 11:45:41 +00:00
First cut at random-feature-placement macro.
This commit is contained in:
parent
c40271e5ee
commit
96177d84bf
@ -72,6 +72,34 @@
|
|||||||
[event]
|
[event]
|
||||||
name="prestart"
|
name="prestart"
|
||||||
|
|
||||||
|
#define RANDOM_FEATURE_PLACEMENT X_SPAN Y_SPAN TERRAIN_PATTERN IMAGE MOD_WML
|
||||||
|
[store_locations]
|
||||||
|
x={X_SPAN}
|
||||||
|
y={Y_SPAN}
|
||||||
|
terrain={TERRAIN_PATTERN}
|
||||||
|
variable=random_placement_locations
|
||||||
|
[/store_locations]
|
||||||
|
|
||||||
|
{VARIABLE_OP random_string format "0..$random_placement_locations.length"}
|
||||||
|
|
||||||
|
{RANDOM $random_string}
|
||||||
|
|
||||||
|
{VARIABLE_OP random_placement_x format "$random_placement_locations[$random].x"}
|
||||||
|
{VARIABLE_OP random_placement_y format "$random_placement_locations[$random].y"}
|
||||||
|
|
||||||
|
{CLEAR_VARIABLE random_placement_locations}
|
||||||
|
|
||||||
|
{UNIT_WML}
|
||||||
|
|
||||||
|
[item]
|
||||||
|
image={IMAGE}
|
||||||
|
x,y=$random_placement_x,$random_placement_y
|
||||||
|
{MOD_WML}
|
||||||
|
[/item]
|
||||||
|
#enddef
|
||||||
|
|
||||||
|
{RANDOM_FEATURE_PLACEMENT 1-44 1-30 Gg scenery/pine1.png ()}
|
||||||
|
|
||||||
[unit]
|
[unit]
|
||||||
type=Gryphon Rider
|
type=Gryphon Rider
|
||||||
description=Pelmathidrol
|
description=Pelmathidrol
|
||||||
@ -117,8 +145,6 @@
|
|||||||
[event]
|
[event]
|
||||||
name="start"
|
name="start"
|
||||||
|
|
||||||
{PLACE_IMAGE "scenery/oak-leaning.png" 33 21}
|
|
||||||
|
|
||||||
[message]
|
[message]
|
||||||
description="Aiglondur"
|
description="Aiglondur"
|
||||||
message=_"Up axes! We will be the Northern Alliance's arm today,
|
message=_"Up axes! We will be the Northern Alliance's arm today,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user