Overall statistics (only for files with a smaller recompressed size):
Original size: 65 KiB on 1 files
Optimized size: 63 KiB
Total saving: 2 KiB = 4% decrease
...rather than an index into the set of possible recruits.
Negative consequences:
* Changing a type id can break replays (but how often does this happen?).
Positive consequences:
* Different parts of the code no longer need to be kept in sync to use
the same set of recruits when calculating/using an index
(c.f. 2013-02-08T21:42:56Z!jt_coding@verizon.net and 2013-02-08T22:06:22Z!jt_coding@verizon.net).
* The code is simpler (other than the legacy support added to
replay.cpp allowing older replays to still be replayed).
...the same way menu_events.cpp calculates it.
(Yes, there were three different and incompatible definitions of the
recruit index, if multiple leaders had personal recruit lists.)
1) Use check_recall/recruit_location() instead of the AI-specific
checks in do_check_before().
2) Get rid of the redundant checks in do_execute().
An advantage of #1 is that the AI better supports sides with multiple
leaders, along with leader-specific recruit lists and recall filters
(not full support, but better support).
...that detects if a container contains a given value.
This will use std::find in most cases, but uses the member find()
function when detecting if an associative container contains a
key_value. So it should be efficient, while allowing more readable
code.
This function is in the util:: namespace to avoid any future naming
conflicts.
...for the case where a recruit does not match any recruit lists.
This should never happen, but if it does, it could be helpful to have
the error message distinguish this case from not having an eligible
leader on a keep.
...shows the same page as the Add-ons Manager's own Help button
Thanks to lipkab for help with the buttons layout trick.
The rest is kind of a hack because:
1) GUI2 doesn't use display objects, so I needed to acquire one from
the constructor (optionally, to avoid problems with the test suite)
2) If the button id is "help", it is handled by a hardcoded hack that
handles the titlescreen dialog in gui2::twindow::get_retval_by_id()
and closes the dialog prematurely right after our local callback is
executed; so the id is "show_help" instead
Notice that there is precedent for (1) in gui2::teditor_settings.
Clear the destination hex before the teleport animation (so it can be
seen), and clear the remaining hexes after the animation (when it
looks like the unit can see them).
...for the "Restore defaults button"
Previously that label would have been "Reset Defaults" (hotkey
preferences), but since that's just been changed it will be "Defaults"
instead.
Please use title case for button labels.
This is possible as a side-effect of 2013-02-03T19:05:22Z!jt_coding@verizon.net. I think it looks
kind of cool, but if it turns out to be a bad idea, it can be easily
reverted (just a matter of changing a single "false" to "true").
...while fog/shroud clearing occurs.
This should help with bug #20324, maybe fix it.
The chance is optional because there are times when we do not want the
delays, such as when starting a scenario.
there was a chance of them not firing ever since WML division was
changed to floating point.
Also changelog entries for this and 2013-02-01T04:48:38Z!jt_coding@verizon.net.