1146 Commits

Author SHA1 Message Date
J. Tyne
b45a6fa04f Push [and],[or],[not] tags from event weapon filters to all weapon filters. 2012-09-23 20:48:55 +00:00
J. Tyne
cad139f572 Make the new parameter to unit::set_movement() optional,
...with the default to not have side-effects (not the behavior before
the parameter).
2012-09-19 13:43:05 +00:00
J. Tyne
651c127dab Do not always clear end_turn_ and hold_position_ in unit::set_movement().
This allows the function to be called without side-effects, so it can
be used as a simple setter (as the name suggests). Since the previous
behavior was to have side-effects (which is bad style for a default),
this commit introduces a non-optional parameter, ensuring that I've
looked at each place where this function is called.
2012-09-19 13:39:48 +00:00
J. Tyne
e6d48072eb Clean up some variable declarations. Includes a fix for bug #20160. 2012-09-14 16:13:32 +00:00
Anja Keicher
29f815482d Fixed bug #20158
Separated persistent and transient fields in end_level_data.
2012-09-10 14:33:34 +00:00
J. Tyne
352c9a5bc9 Adjustments to shroud/fog clearing and refogging.
This should make vision filters and sighted events behave correctly and
consistently (plays and replays) in all "normal" cases. Wild WML or the
delayed shroud updates setting can still cause problems (for now).
2012-09-05 23:39:34 +00:00
J. Tyne
16a6ae04ce Define a null entity_location for use as a default parameter. 2012-09-02 15:04:31 +00:00
J. Tyne
a3a8d7c448 Have teams pay for their recruits between the pre- and recruit events.
And similarly for recalls.

Fetaure request / bug #16711
2012-09-01 18:22:21 +00:00
J. Tyne
01db63d26f Adding some const qualifiers. 2012-08-30 11:05:00 +00:00
J. Tyne
c22b5176f3 Adding some const qualifiers. 2012-08-29 17:56:46 +00:00
J. Tyne
5cf5e73cd2 Simpler interface for unit_display::unit_healing(). 2012-08-26 02:27:17 +00:00
J. Tyne
724618c287 Split actions.cpp into six pieces (into a new "actions" subdirectory).
Most of the project files have also been updated, but I ran into some
difficulties trying to update VC9 and Xcode.
2012-08-25 14:06:46 +00:00
Anja Keicher
9d0ca55d9b Moved difficulty, current and next scenario info...
...to new carryover_info and game_data
2012-08-20 17:22:47 +00:00
J. Tyne
b08206f291 Eliminate a parameter that was always *resources::teams.
This made the two implementations of village_owner() identical modulo an
error check, so I merged them.
2012-08-19 19:43:38 +00:00
J. Tyne
9df7550cf2 Reduce the number of calls to whiteboard->on_gamestate_change().
Gabba, could you check this? I think this is what was desired.
(Revert if I misread the intent.)
2012-08-15 20:09:32 +00:00
J. Tyne
1028d7fab8 Add the ability to detect if any WML/Lua has been executed...
...(independent of [allow_undo]), and hook this ability into
move_unit().
2012-08-15 19:36:18 +00:00
J. Tyne
0fd1a4169d Eliminate the need for a temporary object,
...and make a variable called side_num hold the side number rather
than the team index.
2012-08-12 23:05:37 +00:00
J. Tyne
9050fd9b49 Eliminate a parameter that is always *resources::teams. 2012-08-11 23:11:06 +00:00
J. Tyne
18d13c3d1e Extend entity_location to support filtering units as if they were somewhere else.
(To be used for sighted and enter_/exit_ hex events.)
2012-08-05 23:37:49 +00:00
J. Tyne
9baa876323 Refactoring filter_event() and entity_location...
...in preparation for extending functionality.

(No functional changes yet.)
2012-08-05 23:23:02 +00:00
J. Tyne
054f2b9152 Rearrange the logic in filer_event() for easier reading...
...and possibly better efficiency.

(No change to the overall functioning, just the order in which things
are checked.)
2012-08-05 22:58:45 +00:00
J. Tyne
e93a2593fd Split the filtering part of process_event() into its own function. 2012-08-05 22:52:04 +00:00
Anonymissimus
892c256f97 introduce [unstore_unit]animate=yes|no (def. yes) parameter
FR in the forums

http://forums.wesnoth.org/viewtopic.php?f=12&t=36999&p=534561#p534561
2012-08-04 18:22:13 +00:00
Anja Keicher
c63e52ca14 Changed the way carryover info is stored in gamestate
Made wml_menu_items private
2012-08-01 21:20:05 +00:00
Anja Keicher
c17d84b12f Moved in-game data to make sure it can't be accessed out of game 2012-07-26 15:18:08 +00:00
Elvish_Hunter
9476d796c1 Moved [store_villages] from C++ to Lua 2012-07-21 10:03:31 +00:00
J. Tyne
f3631cd713 Get rid of parameters that are always...
...*resources::game_map, *resources::units.
2012-07-20 22:17:33 +00:00
Fabian Müller
719b1a05c3 Code cleanup.
Hopefully fixed a problem with variable substitution.
2012-07-08 16:29:29 +00:00
Fabian Müller
cdca4f1b85 Support for the new map format in [replace_map]. 2012-07-08 15:36:06 +00:00
Sergey Popov
6b6eafb213 Use BOOST_FOREACH directly instead of #define foreach BOOST_FOREACH
The define is extremely unreliable, will break compile with boost >=
1.50 and upstream can't fix issues with it, see
https://svn.boost.org/trac/boost/ticket/6131
2012-07-07 00:49:45 +00:00
Ignacio R. Morelle
b12bb3524a display: Allow disabling viewport scrolling
This will later allow WML/Lua to lock the viewport so the user cannot
scroll away from the current viewport location. WML and Lua actions such
as [scroll], [scroll_to] and [scroll_to_unit] will always be able to
scroll the screen regardless of this setting.
2012-06-11 09:37:33 +00:00
J. Tyne
95f83b148a Forgot to redraw the minimap (after WML kills a unit). 2012-05-11 22:31:47 +00:00
J. Tyne
31625f9216 Make units disappear when WML-killed without animations.
Discovered this while checking my revisions to screen invalidations,
but it appears to be a separate issue.
2012-05-11 22:07:45 +00:00
Alexander van Gessel
c9a5c32bb4 Rename [object]duration=level to [object]duration=scenario 2012-05-01 22:13:52 +01:00
Silas Brill
f806b61e80 Applied patch #1381: Configurable village support
This differs from the original patch in that the minimum village
support for multiplayer is 0, not 1.
2012-04-30 21:52:38 +00:00
J. Tyne
75616aa86e Add multiturn= attribute for [lift_fog]. 2012-04-10 20:55:27 +00:00
Jérémy Rosen
794713802a apply patch 3197 by jamit, add flags to handle refogging properly 2012-03-31 16:33:14 +00:00
Jérémy Rosen
f2d4b90a36 remove MAX_MAP_AREA patch 3195 by jamit 2012-03-31 08:29:26 +00:00
Jérémy Rosen
f177ce7c83 partial revert of previous commit, accidentally commited a file I didn't want to 2012-03-28 20:32:43 +00:00
Jérémy Rosen
0c28e59f83 fix bug 19563 (patch 3196 by jamit) 2012-03-28 20:31:30 +00:00
Mark de Wever
d4fcad4944 Avoid double promotion.
A floating point literal without a type specifier is a double and
causes the float to be promoted to double as well. It has no
advantages in these cases so avoid it. (Found with gcc
-Wdouble-promotion.)
2012-03-18 14:15:04 +00:00
Jérémy Rosen
fcc5e09153 apply patch 3176 by jamit:
fog does not recover discovered hex until end of turn
2012-03-14 21:35:03 +00:00
Ignacio R. Morelle
f281c17fc1 Convert remaining uses of utils::string_bool()...
...on config attributes to use config::attribute_value::to_bool()
2012-02-29 09:11:28 +00:00
Anonymissimus
8457d8b8ef change "Trying to recall unit failed!" error to emit useful information 2012-02-25 18:01:06 +00:00
Anonymissimus
e6d88f55d9 let a warning have more information 2012-02-25 18:00:29 +00:00
Fabian Müller
a8aa81f338 Now realy introduced the new map format. 2012-02-23 02:39:58 +00:00
Anonymissimus
6594a06918 remove deprecation for empty side= in modify_side,place*,remove_shroud
final syntax for these: all sides if neither side= nor [filter_side] are
present, all sides matching the ssf in [filter_side] if the tag is
present regardless of inline side=, and the sides matching inline side=
otherwise.

modify_side can't have inline SSF due to key conflicts. The other two
(and capture_village) already have inline SLF so it's a bad idea to
add an inline SSF. After removing filter_side in [gold] and
[modify_ai] this leaves 4 tags with possibly redundant side info
and confusing syntax (especially capture_village),
at the benefit of more backwards compatibility.
2012-02-14 21:24:31 +00:00
Anonymissimus
e605fce758 remove a done todo 2012-02-14 21:24:06 +00:00
Anonymissimus
60e18fe9c2 Introduce inline SSF support...
...in modify_ai and deprecate [modify_ai][filter_side].
2012-02-14 21:23:41 +00:00
Anonymissimus
4c22c47303 remove confusing unused parameters from game_events::get_sides_vector() 2012-02-14 21:23:23 +00:00