693 Commits

Author SHA1 Message Date
J. Tyne
597fcf49d7 Stop sending invalid actions between the redo and undo stacks.
If an action could not be undone, it makes no sense to "redo" it, and
vice-versa.

(In particular, certain movement undos produce a message stating
"Possible abuse of [allow_undo]" without crashing, but then redoing
that move caused an assertion failure before this change.)
2012-05-20 21:56:37 +00:00
J. Tyne
2a7296fc09 Revising how the screen is updated in undo/redo.
Since changes to fog are not allowed to be undone, no need to clear_shroud().

Redos were not updating the minimap.

And otherwise making the invalidations/draws consistent across the
various events.
2012-05-11 21:14:57 +00:00
J. Tyne
b4f0d659ce Streamlining invalidations associated with fog/shroud clearing.
The foundation for this was introduced with the enter/ext hex events.
This update allows more of the game to take advantage of this (as
well as consolidating some code to make it more robust in the face
of edits).
2012-05-11 20:43:52 +00:00
Jon Daniel
f02470d739 fix another appearence of bug #19322 2012-05-02 15:24:54 +00:00
Jon Daniel
3277f00658 Fix empty sides not getting listed at the status table bug #19322 2012-05-02 06:04:11 +00: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
Ignacio R. Morelle
3dfad07694 Various changes to the Dismiss Unit prompt
* Gave the dialog a title

 * Hardcoded trailing blanks previous found in translatable strings

 * Removed 'excited' exclamation marks from UI strings

 * Removed the silly "My lord" at the start; merits no further
   explanation
2012-04-26 05:28:34 +00:00
J. Tyne
57e97b274c Add wrapper functions find_if_matches_id() and erase_if_matches_id(),
making some parts of the code easier to read.
2012-04-09 12:30:04 +00:00
Anonymissimus
fba24f7ca0 Fix wesnoth.find_reach failing for private lua proxy units.
Modified pathfind::paths to take a unit as argument instead of its
location; updated all callers.

As observed by mattsc, the function did in its callstack
re-query the unit at the location of a passed private proxy unit,
calculating the reach for the unit in the unit_map at that
location instead of the private one.

The other pathfind bindings already work for private proxy
units. Private lua proxy units were introduced after the pathfinder
functions were already exposed in the lua API.
2012-03-18 00:19:09 +00:00
Fabian Müller
a8aa81f338 Now realy introduced the new map format. 2012-02-23 02:39:58 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Alexander van Gessel
509655682e Merge and update 2011-05-02T18:52:36Z!terraninfo@terraninfo.net from 1.8 branch
rework MP chat log as a GUI2 dialog with colored display of messages
2011-12-12 02:26:27 +01:00
Ali El Gariani
71f833a06c Fix hex-cut images in :layers
This remove the need of ~LOC (which was broken some time ago) by using
~CROP~MASK instead.
2011-12-11 15:47:06 +00:00
Gabriel Morin
53c416b65f Reimplement and enable auto-execution of planned actions at end of turn 2011-12-10 21:10:12 +00:00
Gabriel Morin
2c87771745 Revert 2011-11-23T13:40:40Z!gabrielmorin@gmail.com
"Auto-execute remaining whiteboard planned actions at end of turn" for now.

Attacks were executing on remote clients but not locally, because of
the seed callback mechanism no having a chance to trigger.
2011-12-09 08:31:05 +00:00
Gabriel Morin
625452d4bf Track whiteboard gold with less future map building. 2011-11-25 17:52:02 +00:00
Gabriel Morin
a1fea70ff5 Properly remove planned recalls from the recall list. Fixes bug #18774. 2011-11-25 17:51:56 +00:00
Gabriel Morin
b36573976e Replaced future_map by future_map_if_active...
...for finding recruit/recall locations.

This changes the fix for bug#18992
2011-11-24 11:36:16 +00:00
Gabriel Morin
96f67f96dd Rename scoped real/future unit map structs,
...and add a new one which only applies future map when planning mode
is active.
2011-11-24 11:36:10 +00:00
Gabriel Morin
e08a4be552 Auto-execute remaining whiteboard planned actions at end of turn.
Only finish turn if they all execute successfully, i.e. no ambush, etc.
2011-11-23 13:40:40 +00:00
Gabriel Morin
89b4d6e33a Don't tell the player "you haven't started your turn yet"...
...when he has some planned actions, and correction of other similar
warnings.
2011-11-23 13:40:11 +00:00
Steven Panek
838dfae978 Converted some hyphen-minuses to em dashes. 2011-11-16 02:08:48 +00:00
Ignacio R. Morelle
e706a98197 Revert 2011-11-05T22:09:19Z!shadowm@wesnoth.org,
fixing disappearing UI buttons after Display settings changes in-game
2011-11-10 20:27:30 +00:00
Iurii Chernyi
bd1bc355e1 Fixed Bug #18918: the create unit dialog...
...was sometimes capturing village incorrectly
2011-11-07 20:03:55 +00:00
Fabian Müller
c33446f715 fix bug #18931 and bug #18929
Makes the replay engine aware of the multiple leader recall/recruit stuff.
2011-11-07 18:23:48 +00:00
Alexander van Gessel
671bfedf1c Make status report and tool bar use (half)_signed_value 2011-11-07 00:18:26 +01:00
Ignacio R. Morelle
019947332c Remove an unneded call to redraw the whole display...
...after showing the Preferences dialog in-game
2011-11-05 22:09:19 +00:00
Steven Panek
57dcdff73d 'nick' -> 'nickname'. 2011-11-03 17:24:38 +00:00
Fabian Müller
f10768bf75 Implemented the $second_unit being bound to the acting leader...
...in recruit/recall events.

LUA and WML connections to the feature are still missing.
2011-11-01 16:20:13 +00:00
Fabian Müller
cc3d33430f Corrected "recruit" to "recall". 2011-10-29 17:06:58 +00:00
Fabian Müller
7527fa143e Distinguish between two kinds of "empty recall lists":
1. The player does not have any units left over from previous scenarios.

2. The player can't recall at the highlighted location.
2011-10-29 17:04:39 +00:00
Anonymissimus
371b567f90 changed code order (fix for bug #18778)
Was a small mistake in 2011-08-11T20:49:51Z!terraninfo@terraninfo.net.
2011-10-24 23:35:09 +00:00
Alexander van Gessel
ebe4e5e357 Make the create unit dialog use valid genders for the unit type (bug #18704) 2011-10-13 16:04:27 +01:00
Steven Panek
9ec3fe6e7b Added missing references to liminal,
...thus we can now change a unit's alignment to liminal with :unit.
2011-10-12 16:26:28 +00:00
Alexander van Gessel
81e0a2007f Revert token t_token commits from 2011-09-08T19:15:40Z!thonsew@yahoo.com on. 2011-10-10 03:43:29 +01:00
Thonsew
41944c4d25 Fix for bug #18705: Unit WML is shown out of alphabetical order.
Menu and text based iteration ranges of cfg objects are now sorted in
alphabetical order, before being displayed.
2011-09-22 22:03:13 +00:00
Thonsew
88b5546118 Attempt to fix static de-initialization problems.
Some compilers are calling destructors for static objects before other
static objects use them in their destructors.  This patch initializes
static t_interned objects with new and intentionally doesn't call
delete in order to guarrantee their existence throughout the static
de-initialization phase.  It creates a new function
generate_safe_static_const_t_interned for this purpose.  It might
address bug #18666, although I can not duplicate the crash with gcc on
fedora 15.
2011-09-20 21:21:31 +00:00
Thonsew
cdb129508d Fix implicit static cast...
...of config::attribute_value & to tstring & or t_token reference
causes crashes.  Some compilers were generating a temporary object and
binding a reference to the temporary when creating an implicit cast to
an attribute value.  I removed the implicit cast and replaced all (I
think) instances of the implicit cast with explicit 2 step operation.
This fixes bugs like bug #18663, bug #18684
2011-09-20 21:20:54 +00:00
Thonsew
1a5810656b [[t_token optimizations]]
1. Updated terrain_builder to use t_token in place of std::string to
facilitate fast copying, hashing and comparison

2. Added utils::parenthetical_split_token, a cached parenthetical
version of the string version

3. Made the lru_cache faster for the cache miss case.
2011-09-08 19:17:55 +00:00
Thonsew
9ce82aec1a Upgraded game_events.cpp...
...and files that interacted with game_events to use t_token in place
of std::string for config objects
2011-09-08 19:16:49 +00:00
Gabriel Morin
192e7a017e Completely removed the waypoint functionality on 'w' key,
...since the whiteboard is now an adequate replacement.

Fixes bug #17060
2011-09-08 00:52:38 +00:00
Mark de Wever
1947e50f15 Limit variable scope.
Issue found by cppcheck.
2011-09-04 16:52:07 +00:00
Tommy Schmitz
f63224dc22 Added whiteboard options dialog. 2011-08-18 23:39:21 +00:00
Iurii Chernyi
c1e5d4bb55 improve 2011-08-11T19:51:43Z!thonsew@yahoo.com by adding a workaround...
...to deal with :unit advances=2 , as well. Also, add a :unit fail=now
command as a testcase for iterator stability guarantee, violation of
which is the real cause behind bug #18488
2011-08-11 20:49:51 +00:00
Thonsew
a9cca78aa1 Fix for bug #18488...
...unit_map iterator not updated when changed in menu_events.cpp
2011-08-11 19:51:43 +00:00
Thonsew
f92dd22281 Changed unit_map to not store invalidated iterators.
Added incremental recovery of invalidated but reference counted
unit_map::iterators.
2011-08-10 12:45:43 +00:00
Tommy Schmitz
b219b3fe02 Changed do_recruit and do_recall return type. (for whiteboard)
Instead of void, they now return bool indicating success or failure.
2011-08-05 22:34:07 +00:00
Tommy Schmitz
b2fd0736d3 Eliminated the non-pathfinding whiteboard mapbuilding mode.
Accordingly, changed scoped_planned_pathfind_map to scoped_planned_unit_map.
2011-07-21 19:10:12 +00:00
Tommy Schmitz
f2e7ec0ef5 Fixed loophole in disabling undo for whiteboard.
Activating the whiteboard while an undo (or redo) is in progress will
no longer crash Wesnoth.
2011-07-12 07:45:32 +00:00
Ignacio R. Morelle
eb6f6906e0 Sort the Recruit menu by localized unit type names...
...with a simple GUI1 hack (FR bug #18294)
2011-07-04 10:09:43 +00:00