56 Commits

Author SHA1 Message Date
Mark de Wever
92f5f92ce5 New year copyright update. 2010-01-01 13:16:49 +00:00
Mark de Wever
b6b94514b4 Remove unneeded includes. 2009-12-05 21:25:18 +00:00
Guillaume Melquiond
0d92ce900b Removed code/data duplication of end_level...
...handling between actions.cpp and play_controller.cpp. (Fix for bug
#14160.)
2009-09-20 12:54:05 +00:00
Ali El Gariani
a879b7adad Add basic support to define waypoints via a hotkey "Add waypoint"
Seems to work fine, but no visual indication yet (besides the bended path)
Don't affect the normal pathfinding interface, so this WIP is safe.
2009-08-28 23:49:27 +00:00
Guillaume Melquiond
e8afe762ca Made all the AI actions test for level end. (Fix for bug #14068.) 2009-08-05 06:39:23 +00:00
Guillaume Melquiond
39a8620156 Moved end_level to the same mechanism as end_turn. 2009-08-03 12:39:32 +00:00
Alexander van Gessel
3c5e5e432a Make [end_turn] work in new turn, side turn and turn refresh [event]s again. 2009-07-27 03:28:47 +01:00
Alexander van Gessel
0f3ef4dd75 Rewrite [end_turn] to end the turn after the event has finished. 2009-07-26 15:07:44 +01:00
Eugen Jiresch
9148d8bbb6 fixed carryover gold and recalls on loading linger mode saves.
moved some code of playsingle_controller::play_scenario to separate
functions
2009-07-10 11:33:42 +00:00
Ali El Gariani
dfcea60951 Make the context-menu 'change unit side' allow to change village flag.
(cycle between teams and free. Supposed to fire the event but not tested)
Also rename 'Change unit side' to 'Change side' to better reflect this.
But not sure if not confusing.
2009-04-21 02:06:41 +00:00
Guillaume Melquiond
a6632e8211 Removed config::get_children from playcampaign.cpp. 2009-03-20 07:08:58 +00:00
Mark de Wever
973a0a7d5c Remove trailing whitespace. 2009-01-01 10:28:26 +00:00
Mark de Wever
a5d1d2e969 New year copyright update. 2009-01-01 10:27:41 +00:00
Alexander van Gessel
e493804a88 Rewrite some of my earlier changes to be less intrusive,
fixing some side-effect bugs.
2008-12-25 01:32:44 +01:00
Christian Bielert
8fed71047b bug #12227: Added the carryover_report, save and linger_mode attributes to the endlevel tag, added a deprecated message for result=continue and result=continue_no_saves 2008-12-23 02:44:00 +00:00
Ignacio R. Morelle
c0d39e3de9 Hopefully reduced cohesion a bit by moving the...
...end_*_exception classes/structs out from menu_events.hpp.
2008-11-23 17:23:42 +00:00
Gunter Labes
3e8aa0a94c start the timer before showing the turn dialog 2008-10-10 14:24:58 +00:00
Pauli Nieminen
af509f431c Fixed multiplayer replay switching to next side after victory/defeat,
...removed bogus end turn caused by linger mode (bug #9157)
2008-09-02 20:28:24 +00:00
Ignacio R. Morelle
7e827b89f6 Engine automatically plays special music on defeat or victory;
default lists from which an option is randomly chosen at runtime are
provided as the default_victory_music and default_defeat_music
attributes in [game_config] node; this may be overriden per-scenario
using the victory_music and/or defeat_music attributes on its code -
it can also be overriden in a [endlevel] block by providing a music=
attribute with the desired list (feature request/bug #11203).
2008-07-27 17:59:46 +00:00
Greg Copeland
b0abbdae36 Fixed key-collision in ai_manager...
...which would cause an AI to be incorrectly reused by another
team. Added a method to allow the ai_manager to detect if an AI
requests management by the ai_manager. Lastly, added a hook to allow
the ai_manager to clean up AI resources prior to playsingle_controller
destruction.  Formula_ai now has method to inform ai_manager it wishes
to be managed.
2008-07-08 22:15:38 +00:00
Ali El Gariani
8a027095cf New hotkey for debugging: "Custom command" which execute a saved command.
With a new command: "custom <command>" to assign a command to this hotkey.

examples: "custom refresh" or "custom create Troll" etc...

This custom command is saved in preferences.
2008-04-30 03:52:10 +00:00
Gunter Labes
469fc378fb redo parts of 2008-02-03T21:36:06Z!patrick_x99@hotmail.com, 2008-02-16T08:47:16Z!koraq@xs4all.nl and 2008-03-01T15:45:18Z!martinxyz@gmx.ch...
...that have been reverted by the formula ai merge
2008-04-25 01:55:51 +00:00
Jörg Hinrichs
95bf75315f Lazy loading for unit_types Step 2:
Rename game_data to unit_type_data and make it a singleton to prevent
passing the same instance throughout the whole code and make
subsequent optimization less painful.
2008-03-30 13:49:03 +00:00
David White
5c0df60c23 initial branch changes 2008-01-28 03:04:25 +00:00
Pauli Nieminen
4803f989b1 Fixed turn timer and end_turn commands order (bug #10849) 2008-01-22 12:57:44 +00:00
Mark de Wever
a1d37a3b14 Unclutter includes. 2007-12-22 17:48:45 +00:00
Eric S. Raymond
2727c032ba Simplify an argument signature. 2007-11-20 08:36:10 +00:00
Eric S. Raymond
93af169f98 Yet more refactoring of the end-of-scenario report; eliminate one argument. 2007-11-20 08:26:13 +00:00
Eric S. Raymond
a7f9420029 Correct minor bug introduced by last refactoring step. 2007-11-20 08:11:18 +00:00
Eric S. Raymond
d4a7c34d22 More refactoring of victory reporting. 2007-11-20 05:34:38 +00:00
Mark de Wever
080eb69f60 Updated the headers to state GPL 2+ and a few changelog cleanups. 2007-08-15 13:41:56 +00:00
Hans Joachim Gurt
7f0c9b0a66 Update for hotkey-patch #770 2007-08-11 15:43:06 +00:00
Mark de Wever
21a6dd7b43 added a hotkey for clearing the chat messages (patch #770) 2007-08-07 17:28:04 +00:00
Eric S. Raymond
58694a1df1 All the EOS-linger machinery is now in place except the actual linger() calls.
Tested with SP and MP (2p Blitz).
2007-08-01 16:19:39 +00:00
Eric S. Raymond
4f4ebe012c Sneak up on EOS-linger by a different refactoring.
Instead of trying to use new/delete, pull the entire text of
playsingle_scenario and playmp_scenario into playcampaign.cpp in
preparation for inlinining them at the point where we'll need the
controller objects to be visible.

Tested, both SP and MP.
2007-08-01 14:28:37 +00:00
Eric S. Raymond
9710708b28 Backing out my EOS-linger changes.
They're either wrong in themselves or (more likely) interacting badly
with some recent MP-lobby changes.  I don't want to leave the game in
a broken state just as I go on vacation.
2007-08-01 04:56:07 +00:00
Eric S. Raymond
31ccad0752 First cut at new end-of-turn logic.
Currently works only for single-player.  Issues: Needs some kind of
visible indication on the display.  Also, saves made during the
post-victory-or-defeat linger could be reloaded and abused for
experience farming.
2007-07-31 22:56:06 +00:00
Eric S. Raymond
a91a35231d Refactoring step.
Expose the play_controller object in play_campaign.cpp; we're going to
need it to implement linger mode.
2007-07-31 20:16:37 +00:00
Mark de Wever
bb01934b85 A rather large update which updates the copyright info
* Wesnoth is distributed under the terms of the GPL version 2, made
  that more explicit

* updated the copyright range to 2007

* updated Dave's email adress
2007-07-21 07:28:04 +00:00
Mark de Wever
7c5c3d3ae4 set svn:keywords to 'Author Date Id Revision'
added /* $Id$ */ to files which didn't have that
2007-06-04 20:48:38 +00:00
Patrick Parker
e98ca04d31 fix the "can't end turn" bug 2007-03-26 21:37:30 +00:00
Pauli Nieminen
b58a67c38b Support for team only labels 2007-01-01 10:32:00 +00:00
Jörg Hinrichs
63bb19d081 removes unnecessary method declaration 2006-09-07 16:25:20 +00:00
Isaac Clerencia Perez
48e0e47791 Merged 13001 13007 13014 13055 13108 13109 into trunk 2006-08-17 06:53:11 +00:00
Gunter Labes
23ca57f01e ran codeclean over all files and set them all to svn:eol-style 'native' 2006-06-05 20:02:25 +00:00
Jörg Hinrichs
37fcd8fdbe fixes a compiler warning (hopefully since i don't use that compiler) 2006-06-01 19:06:21 +00:00
Jörg Hinrichs
644101318a fixes bug #4233 (saving during enemies turn skips actual attack)
adds missing copyright
2006-05-16 17:50:09 +00:00
Jörg Hinrichs
2f840285d0 implements observer pattern for ai.cpp with these events:
- user_interact
- unit_recruited
- unit_moved
- enemy_attacked

removes dependency of ai.cpp on playturn.hpp

removes playturn.cpp out of editor build

fixes bug #5845 (menu doesn't open on ai turn)
2006-05-08 20:57:06 +00:00
Jörg Hinrichs
c7ce250476 fixes bugs #5794 and #4942 (rng not initialized) 2006-04-17 21:49:55 +00:00
Jörg Hinrichs
704962568d fixes broken textbox support in single player (bug #5763) 2006-04-12 21:43:01 +00:00