54720 Commits

Author SHA1 Message Date
Ignacio R. Morelle
db95b23db5 preferences: Implement a "combo" advanced preferences entry type
Usage example:

    [advanced_preference]
        field=test_combo
        name= _ "Combo test"
        type=combo
        default=option1
        [option]
            id=option1
            name= _ "Option #1"
        [/option]
        [option]
            id=option2
            name= _ "Option #2"
        [/option]
        [option]
            id=option3
            name= _ "Option #3"
        [/option]
    [/advanced_preference]

NOTE:

Now that there are more than two types of advanced preferences entries,
a problem with the saving and restoring of the previous screen surface
contents with the three GUI1 widgets involved (the checkbox, the combo,
and the slider) has appeared, resulting in the advanced preferences
slider glitching into view under certain conditions. This is apparently
related to the widget hiding/unhiding order; for example,
hiding/unhiding the advanced preferences combobox after the slider and
its label results in the combobox glitching into view when switching the
advanced preferences list selection instead.
2013-12-20 06:25:42 -03:00
mattsc
70954b7ba2 Update changelogs and release notes with SotBE changes 2013-12-19 20:58:17 -08:00
fendrin
91b5a57449 Renamed "current_tod" attribute of [time_area] to match the global one.
"current_tod" and "current_time" served the same purpose, one at
scenario toplevel, the other inside of [time_area].

For the sake of consistency and for enabling the usage of the same
schedule macros in both cases, they are now both called "current_time".
2013-12-20 04:45:18 +01:00
fendrin
de239ae2e5 Save [time_area]s id only if it is not empty. 2013-12-20 04:29:31 +01:00
fendrin
8604edd226 Save the id of [time_area]s into the savefile.
This should fix removing [time_area]s in a loaded game.
2013-12-20 04:20:43 +01:00
Ignacio R. Morelle
7e965dbdd2 Fix vague/misleading error messages for non-existent color palettes
Fixes bug #20439.
2013-12-19 23:15:11 -03:00
Ignacio R. Morelle
c7cacb1d5a gui1: Display unit overlays and crowns in the Recall dialog preview pane
This incidentally would allow displaying overlays for other preview
panes in the future (e.g. the main sidebar) since most of the required
functionality was implemented on the unit_preview_pane base class.
2013-12-19 22:38:24 -03:00
Ignacio R. Morelle
7883f366df gui1: Display unit overlays and crowns in the Recall dialog's list 2013-12-19 22:38:24 -03:00
Ignacio R. Morelle
2d41e10b00 Move leader crown path to a constant and static public method 2013-12-19 22:38:23 -03:00
fendrin
f979609ccf area= SLF attribute support for filtering by [time_area]s. 2013-12-20 02:27:44 +01:00
fendrin
0b7aeb2272 Put the new side setup dialog from Shadowmaster in full use. 2013-12-20 02:27:44 +01:00
fendrin
b4ceb5f272 get_area_by_id() method. Will be used in the SLF. 2013-12-20 02:27:44 +01:00
fendrin
2abb7cb8f1 Improved the time of day schedule menu.
Change the save state of the scenario when times are adjusted.
Load the default schedule into new maps.
2013-12-20 02:27:44 +01:00
fendrin
904383ea4f Support for defining the controller of a side in the editor. 2013-12-20 02:27:43 +01: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
fendrin
6c0d068e57 Added setter for the current_time_ member.
It will be used to change the starting time of day from within the
scenario editor.
2013-12-20 02:27:43 +01:00
fendrin
715ae3d6b9 Cleaned up the comments. 2013-12-20 02:27:43 +01:00
Ignacio R. Morelle
b4d771e306 Change logic for handling invalid Pango markup in ttext::set_markup()
The previous logic assumed that the markup itself could possibly be
broken ONLY when it included unescaped ampersands (thus changing the
length of the ampersand fix test string). This is obviously not always
the case. As a result, markup was not disabled for strings like "this is
obviously <a>invalid</b> markup".

This logic is implemented in a single conditional statement. The new
condition is that if no ampersands had to be escaped, then _obviously_
markup was found to be broken first for some other reason, so we
immediately disable markup in that case. Alternatively, we test the
"fixed" test string immediately if we escaped ampersands.

Fixes bug #20996, although the specific manifestation of the bug
(confirmed) didn't make any sense in the first place.

NOTE: The overall logic continues to be bogus. Finding a & in the
original string isn't sufficient to find an unescaped ampersand; e.g.
"Foo & &lt; bar" will be "fixed" as "Foo &amp; &amp;lt; bar". Then
again, there's only so much that can be done to work with text written
by people who don't know Pango markup or HTML.
2013-12-19 21:20:09 -03:00
Andrius Silinskas
597f5ad6a9 Added new CampaignWML attribute "allow_era_choice".
If attribute is set to "no" and campaign with it is selected, eras menu will be
hidden and text to indicate this will be displayed.

Attribute defaults to "yes" and has been added to LoW.

N.B. since current MP code is tighly coupled with eras, the default era will
still be used by the engine to properly initialize stuff. Later on, code should be
improved by making it more modular and independant of eras.
2013-12-19 21:37:41 +00:00
mattsc
473fc1d3f0 SotBE S8: increase enemy gold and reduce turn limit
The scenario was way too easy previously.
2013-12-19 13:05:52 -08:00
mattsc
296f39acbd SotBE S8: take lots of villages off the map
... to prevent huge gold carry-over.  To make up for that (for the
AIs), the enemies will be given larger income.
2013-12-19 13:05:52 -08:00
ln-zookeeper
b5591bbab9 Tweaked the timing of the undead recruitment dialogue. 2013-12-19 21:29:58 +02:00
ln-zookeeper
6f7c4363cc Prevent troll sighting event from triggering when a non-player side sees them. 2013-12-19 20:50:52 +02:00
Ignacio R. Morelle
89a881778a Lua API: Add read-write support to wesnoth.sides[n].hidden 2013-12-18 23:52:05 -03:00
Ignacio R. Morelle
b73c9092ca Lua API: Add read-write support to village_support field in wesnoth.sides[n] 2013-12-18 23:49:21 -03:00
Ignacio R. Morelle
f10bf2b538 Lua API: Add village_support field to wesnoth.sides table elements
The [store_side] implementation in Lua actually already assumed that
this field was implemented.
2013-12-18 23:45:50 -03:00
Ignacio R. Morelle
80d093b2b9 Add support for flag and flag_icon to [store_side] 2013-12-18 23:30:39 -03:00
Ignacio R. Morelle
3411c4c81b Lua API: Add flag and flag_icon fields to wesnoth.sides table elements 2013-12-18 23:28:33 -03:00
Ignacio R. Morelle
0fffe87d79 Implement flag and flag_icon attributes for [modify_side]
Implements the feature request from bug #18454.
2013-12-18 23:06:07 -03:00
Ignacio R. Morelle
54b8768abd Add set_flag() and set_flag_icon() methods to team class 2013-12-18 23:05:23 -03:00
Ignacio R. Morelle
d1378f26ab display: Additional assertion checks in init_flags_for_side_internal() 2013-12-18 23:05:23 -03:00
Ignacio R. Morelle
27367b844f display: Additional sanity checks in reinit_flags_for_side() 2013-12-18 23:05:23 -03:00
Ignacio R. Morelle
3db69a7132 display: Implement public reinit_flags_for_side() method
This overwrites an existing flag animation for a side with a rebuilt
one, intended for use after changing a side's flag animation.

It does pretty much the same thing init_flags() does sans vector
allocation and TC configuration, which are supposed to have been done
already.
2013-12-18 23:05:23 -03:00
Ignacio R. Morelle
a0eea71691 display: Refactor flag animation build code into a separate private method
In order to implement functionality to change a side's flag imageset
after display initialization has taken place, we need to rerun this code
under different conditions.

The refactored code default-initializes the set of flag animations prior
to building them for individual sides; before this change, only the
memory allocation for the set was reserved in advance. Since the first
time init_flags() runs is during display initialization,
default-initializing the set shouldn't really make a noticeable
difference.

Now, we assign the flag animations later over the default-constructed
animations. Hopefully this shouldn't introduce any new interesting bugs.
It's not like there's any code accessing the animations at this point.
2013-12-18 23:05:22 -03:00
mattsc
8919fd6c2d Update players_changelog with replay and MP changes 2013-12-18 16:10:56 -08:00
mattsc
0f45b86a2e Update changelog with AI changes 2013-12-18 16:10:14 -08:00
mattsc
c93420d4a4 Fix indenting 2013-12-18 13:29:08 -08:00
mattsc
2305e48f05 SotBE S18: no linger mode needed at end of last scenario 2013-12-18 13:14:55 -08:00
mattsc
4338528e43 SotBE S17: add warning about enemy reinforcements 2013-12-18 13:14:44 -08:00
mattsc
2075284309 SotBE S18: grammar fix 2013-12-18 13:05:32 -08:00
mattsc
06c3fd90b5 SotBE S8: avoid duplicating a message 2013-12-18 09:57:39 -08:00
mattsc
7210f4ef0a SotBE S11: remove unnecessary message 2013-12-18 09:57:38 -08:00
mattsc
d375c090bd SotBE: minor prose changes 2013-12-18 09:57:38 -08:00
mattsc
6a693f405b SotBE: minor corrections to grammar, punctuation, capitalization 2013-12-18 09:57:38 -08:00
Andrius Silinskas
16a49feefa Support for new add-on type "SP/MP Campaign".
Add-on filter options have been reordered to take new changes into account.
2013-12-18 15:42:07 +00:00
Ignacio R. Morelle
fbf47c0f00 gui2/teditor_edit_side: Rearrange options, add player number slider, no_leader toggle, human/AI controller option
Other options needed to be rearranged in order to balance the overall
layout and make room for the new options.
2013-12-18 07:52:14 -03:00
Ignacio R. Morelle
5a815f180d gui2/teditor_edit_side: Allow sliders to extend further horizontally 2013-12-18 07:52:14 -03:00
Ignacio R. Morelle
1cf594b52d gui2/teditor_edit_side: Make the dialog look nice
* Stacked most widgets vertically since GUI2 textboxes and sliders
   demand a lot of horizontal space (especially sliders, for some
   reason).
 * Rearranged various options grouping them according to the
   functionality they target.
 * Reworded some option labels to make them look nice or have their
   purpose made more evident.
 * Added a side number label near the top of the dialog as a reminder
   for the user.

For these ends:

 * The whole grid layout has been extensively rearranged.
 * Some unused or redundant code has been removed.
 * A radio button macro was renamed, and made sure it is undefined at
   the end of the file.
 * Another macro along with its inclusion sites were removed
2013-12-18 07:52:14 -03:00
mattsc
7db11b30c4 SotBE S7: balancing adjustments to gold, turns, AI parameters 2013-12-17 19:09:02 -08:00
mattsc
bfb2edeb90 SotBE S7: change locations and number of scorpions
They are slightly farther away at the beginning now.  Also, there's a
new event that adds new scorpions for the first 10 turns.
2013-12-17 19:08:16 -08:00