Added a macro for preventing view from scrolling to an (AI) side's leader...
...at the beginning of its turn. Also nuked the table of contents as it's out of date and not maintained.
This commit is contained in:
parent
77b1bbac11
commit
0655d2a5b2
1 changed files with 56 additions and 43 deletions
|
@ -6,49 +6,6 @@
|
|||
|
||||
# ! in comments is used in generating HTML documentation, ignore it otherwise.
|
||||
|
||||
#### TABLE OF CONTENTS ####
|
||||
|
||||
# variable operations
|
||||
|
||||
# RANDOM
|
||||
# VARIABLE
|
||||
# VARIABLE_OP
|
||||
# CLEAR_VARIABLE
|
||||
# FOREACH
|
||||
# NEXT
|
||||
# IF_TERRAIN
|
||||
# DEBUG_MSG
|
||||
|
||||
# scenario/campaign setup
|
||||
|
||||
# STARTING_VILLAGES
|
||||
# MENU_IMG_TXT
|
||||
# MENU_IMG_TXT2
|
||||
|
||||
# side setup
|
||||
|
||||
# TURNS
|
||||
# GOLD
|
||||
# INCOME
|
||||
# ATTACK_DEPTH
|
||||
# NO_SCOUTS
|
||||
|
||||
# in-scenario actions
|
||||
|
||||
# UNIT
|
||||
# UNDEAD_UNIT
|
||||
# CREATE_UNIT
|
||||
# MOVE_UNIT
|
||||
# MODIFY_UNIT
|
||||
# STORE_UNIT_VAR
|
||||
# PUT_TO_RECALL_LIST
|
||||
|
||||
# utilities not intended for general use
|
||||
|
||||
# QUANTITY
|
||||
|
||||
#### END OF TABLE OF CONTENTS ####
|
||||
|
||||
#define QUANTITY ATTRIBUTE ON_EASY ON_NORMAL ON_HARD
|
||||
# Macro to define a 'quantity' differently based on difficulty levels.
|
||||
#ifdef EASY
|
||||
|
@ -359,6 +316,62 @@
|
|||
{CLEAR_VARIABLE MOVE_UNIT_path_coords_y}
|
||||
#enddef
|
||||
|
||||
#define NO_SCROLL_TO_AI_LEADER SIDE
|
||||
# Prevents the view from scrolling to the leader of a specific AI side at the
|
||||
# beginning of its turn. Useful if that side doesn't really do anything and the
|
||||
# scrolling distance would be long enough to be annoying every turn (for example
|
||||
# on a big map). Does not work on human-controlled sides.
|
||||
[event]
|
||||
name=side turn
|
||||
first_time_only=no
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=side_number
|
||||
numerical_equals={SIDE}
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[store_unit]
|
||||
[filter]
|
||||
side={SIDE}
|
||||
canrecruit=1
|
||||
[/filter]
|
||||
|
||||
kill=no
|
||||
variable=stored_side_{SIDE}_leader
|
||||
[/store_unit]
|
||||
|
||||
{MODIFY_UNIT (
|
||||
side={SIDE}
|
||||
canrecruit=1
|
||||
) canrecruit 0}
|
||||
[/then]
|
||||
[/if]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=ai turn
|
||||
first_time_only=no
|
||||
|
||||
[if]
|
||||
[variable]
|
||||
name=side_number
|
||||
numerical_equals={SIDE}
|
||||
[/variable]
|
||||
|
||||
[then]
|
||||
[unstore_unit]
|
||||
variable=stored_side_{SIDE}_leader
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
|
||||
{CLEAR_VARIABLE stored_side_{SIDE}_leader}
|
||||
[/then]
|
||||
[/if]
|
||||
[/event]
|
||||
#enddef
|
||||
|
||||
#define PUT_TO_RECALL_LIST FILTER
|
||||
# This places a given unit back to the recall list of the side it is on.
|
||||
# Note however, that the unit is not healed to full health, so when
|
||||
|
|
Loading…
Add table
Reference in a new issue