478 Commits

Author SHA1 Message Date
Chris Beck
ec379ce355 create "fight_on_without_leader" field of [side]
this field is intended to allow battles to continue after the death of a leader
if a side has this flag enabled and any units alive, they will be considered
to have a leader regardless of canrecruit.
2014-04-08 20:13:56 -04:00
Chris Beck
60777429c3 Purge "human_ai" controller type
This is a fixup of bugfix #18829 (which was commit
736ceaa6c7e81882c9c5b2e932307b1f1ecb3bfd)
2014-03-19 17:20:36 -04:00
Chris Beck
186e66cec6 fix bug #21758
in the refactor of mp_connect, one behavior from 1.10 that was
lost was that the host may not start a game until all sides have
chosen faction. we restore this, adding fields to the side engine
to fix in a robust manner, some debugging capabilities left over.
2014-03-17 07:42:58 -04:00
Chris Beck
df39be5d12 idle controlled teams serialize as "human" controlled 2014-03-06 16:38:47 -05:00
Chris Beck
04a4ec308e define idle controller 2014-02-21 16:11:16 -05:00
Ignacio R. Morelle
a4f47a63c7 New Year copyright update 2014-01-01 02:08:52 -03:00
fendrin
05aab56e44 Lifted CONTROLLER enumeration into the team namespace and made public.
It will be used by the editor's side setup dialog.
2013-12-20 02:27:43 +01:00
Andrius Silinskas
f61cdf720e Added missing side attributes to team::attributes array. 2013-10-11 20:35:27 +01:00
Andrius Silinskas
fe3224e9b4 Remove a side from carryover on all of its leaders loss.
These changes allow to pass a correct information about sides to
mp::connect.

Can be turned off by adding "remove_from_carryover_on_leaders_loss=no".
2013-09-05 18:33:40 +01:00
JaMiT
c0435769bd Split game_events.cpp.
VC and XCode projects still need to be updated.
2013-08-11 19:31:20 -05:00
fendrin
fa86e2e350 Fix some wrong spelling, mostly in comments. 2013-06-23 17:18:49 +02:00
JaMiT
dbd4fdc9d9 Simplify some code.
Calling insert() on a range instead of explicitly looping. It just
makes the code a little simpler for a human to read.
2013-06-22 18:47:43 -05:00
Eric S. Raymond
043c4f9fd3 Remove $Id$ cookies. 2013-03-26 21:41:37 -04:00
Mark de Wever
43b71f2ff0 New year copyright update. 2013-01-01 09:22:03 +00:00
J. Tyne
699a6ae1f3 Save each team's DSU setting.
This is for consistency when loading a (mid-turn) game, as the undo stack
may have been built with shroud updates delayed.
2012-12-22 00:51:12 +00:00
J. Tyne
66bff9192a Add [side]suppress_end_turn_confirmation=
This is to restore some functionality that was lost in 2012-11-28T20:26:33Z!jt_coding@verizon.net.
Doesn't have mainline use, but anonymissimus has a use case, so this
replaces the old hacky approach.
2012-12-05 22:36:08 +00:00
J. Tyne
6e905256b7 In the interest of future maintenance,
...move the list of side attributes from gamestatus.cpp to team.cpp.
2012-12-04 20:42:09 +00:00
J. Tyne
7d39c6a167 Make team_info and default_team_gold private to the team class.
It just seems to be a better fit to data encapsulation principles
(and they are not currently used outside the team class).
2012-12-04 13:39:04 +00:00
J. Tyne
4aab1d0064 Store last_recruit_ in team,
...rather than in menu_handler (better for hotseat games).
2012-11-25 22:50:44 +00:00
J. Tyne
139875b87b Remove unused and undocumented [side] attribute "music=". 2012-11-24 02:42:30 +00:00
J. Tyne
38d8d51fe4 Remove unused and undocumented side attribute "team_rgb". 2012-11-24 01:49:27 +00:00
Boldizsár Lipka
f5981ec9fc Apply patch #3360. Fixes bug #19862 and bug #16220 2012-10-01 11:19:26 +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
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
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
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
fff30d6839 Consistent shroud_map values for out-of-range locations.
(Specifically they are always true/shrouded, instead of false if too
high or too far to the left, and true otherwise.)
2012-04-29 16:06:13 +00:00
Anonymissimus
82bf07fa41 fix $owner_side incorrectly set if capture event fired by unit movement
We are deleting the captured village from the set of owned villages of
the previous owner before querying which previous side owned it (and
giving it to the new side + firing the event), thus the result was
always "unowned".

fix for a bug reported in the forums:

http://forums.wesnoth.org/viewtopic.php?f=21&t=36569&p=525789#p525789
2012-04-07 16:43:03 +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
16bd3c0d02 patch 3200 by jamit: save fog removers in savefiles 2012-03-31 14:07:21 +00:00
Anonymissimus
a719e38814 remove unused varible team::seen_ and related functions (+calls)
This was holding data about which side has already seen which
other side. Probably a left over thing from someone
who wanted to implement something at some spot. It also wasn't saved
in the savegames (surely needed).
2012-03-30 17:10:24 +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
Anonymissimus
e2b38a0c1a remove redundant function team::map_color_to() 2012-02-07 23:26:26 +00:00
Ignacio R. Morelle
6ca69b2df5 New year copyright update 2012-01-07 02:35:17 +00:00
Anonymissimus
bbaa97e898 Revert 2011-12-16T04:06:47Z!Majora700@gmail.com, 2011-12-16T04:08:22Z!Majora700@gmail.com and 2011-12-16T04:14:58Z!Majora700@gmail.com.
1. The internal type is a std::string, the lua getters/setters should
reflect that like all the existing ones already do instead of making
implicit conversions.

2. It doesn't make sense to convert the already translated string
into a t_string again upon getting it.

3. The setter in team.cpp you added is redundant.

4. The attribute is apparently not really meant to be modified
by lua or wml so a tag is no good idea.
2011-12-16 20:13:27 +00:00
Steven Panek
8eaa9c2ec6 Made it so that [modify_side] is able to change...
...the current_player attribute; made the Lua stuff return the
attribute in the form of t_strings.
2011-12-16 04:06:47 +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
Anonymissimus
5ffabe7d14 made strin2rgb unthrowing (fix for bug #19052)
Updated all callers.

Some callers were calling it without catching the bad_lexical_cast it
could throw.
2011-11-25 22:54:24 +00:00
Anonymissimus
0a519cfebd remove some ocurrances of "colour" being written into configs
I leave out places with which I don't feel familiar enough. Removes
"colour" from gamestate inspector.
2011-11-06 00:20:28 +00:00
Anonymissimus
c277c69d72 fix variable owner_side not cleared if it didn't exist 2011-11-05 18:27:37 +00:00
Anonymissimus
95b0522d61 introduce support to wesnoth.set_village_owner for not firing capture event 2011-11-05 18:27:05 +00:00
Anonymissimus
e9b3d27d88 let capture events store previous owner in variable owner_side (FR bug #13567) 2011-11-05 18:26:47 +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
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
7e99017fa4 Updated image.cpp to
1. Use t_token in place of std:string to save on string construction

2. Use boost::unordered_map in place of std::map as per todo by silene
2011-09-08 19:17:41 +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
Mark de Wever
cdaaa43bdb Use empty() instead of comparing size() with 0.
Issue found by cppcheck.
2011-05-19 18:16:16 +00:00
Mark de Wever
c882845e37 Add team::get_side_color.
Main part of patch #2628, the other minor changes will be committed
separately.
2011-04-09 20:25:18 +00:00
Mark de Wever
b1486c4920 Remove the const qualifier on a returned object.
The const does not do much.
2011-04-09 20:25:15 +00:00