Some macros from NR move to mainline.

This commit is contained in:
Eric S. Raymond 2007-05-01 07:58:08 +00:00
parent 07b2e0e778
commit ef04dbc46d
3 changed files with 43 additions and 23 deletions

View File

@ -1,26 +1,3 @@
# Apply an image mod to filter-selected units at prestart time
#define PRESTART_FILTER_EFFECT FILTER EFFECT
[event]
name=prestart
first_time_only=yes
[object]
silent=yes
[filter]
{FILTER}
[/filter]
[effect]
apply_to=image_mod
add={EFFECT}
[/effect]
[/object]
[/event]
#enddef
# Override the team color of filtered units
#define TEAM_COLOR_OVERRIDE FILTER TEAMCOLOR
{PRESTART_FILTER_EFFECT {FILTER} "RC(magenta>{TEAMCOLOR})"}
#enddef
[scenario]
#textdomain wesnoth-Northern_Rebirth
id=chain_break

View File

@ -54,6 +54,30 @@ delay=500
[/item]
#enddef
#define PRESTART_FILTER_EFFECT FILTER EFFECT
# Apply an image mod to filter-selected units at prestart time
[event]
name=prestart
first_time_only=yes
[object]
silent=yes
[filter]
{FILTER}
[/filter]
[effect]
apply_to=image_mod
add={EFFECT}
[/effect]
[/object]
[/event]
#enddef
#define TEAM_COLOR_OVERRIDE FILTER TEAMCOLOR
# Override the team color of filtered units.
# This is an example of how to use PRESTART_FILTER_EFFECT.
{PRESTART_FILTER_EFFECT {FILTER} "RC(magenta>{TEAMCOLOR})"}
#enddef

View File

@ -417,6 +417,25 @@ name=prestart
[/unit]
#enddef
#define SET_PORTRAIT DESC IMAGE
# Set the profile field of any unit matching specified description.
# Meant to be called in a scenario start or prestart event.
# This change will be persistent and carried by the unit in later scenarios.
[object]
silent=yes
duration=forever
[filter]
description={DESC}
[/filter]
[effect]
apply_to=profile
portrait={IMAGE}
[/effect]
[/object]
#enddef
# FIXME: Documentation for these is needed.
#define MENU_IMG_TXT IMG TXT