bugBattle for Wesnoth - Bugs: bug #16358, Sanitizing how hiding and unhiding...

Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #16358: Sanitizing how hiding and unhiding of units works

Submitted by:  Lari Nieminen <zookeeper>
Submitted on:  Wed Aug 4 19:18:03 2010  
Category: Feature RequestSeverity: 1 - Wish
Priority: 5 - NormalItem Group: WML
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open
Release: trunkOperating System: all

Thu Aug 5 05:16:09 2010, comment #2:

Points 2 and 3 are fixed. Points 1 and 4 are the same issue: persistence of the hidden attribute, and it is orthogonal to points 2 and 3.

Note that the hidden attribute was designed to be short-lived only (e.g. wml animations, fake unit moves, and so on); making it persistent and hence long-lived may lead to some unexpected behaviors in user interface.

Guillaume Melquiond <silene>
Wed Aug 4 19:37:24 2010, SVN revision 45193:

Moved [hide_unit] and [unhide_unit] implementations to Lua. Added support for standard unit filters along the way. (Partial fix for bug #16358.)

(Browse SVN revision 45193)

Guillaume Melquiond <silene>
Wed Aug 4 19:18:03 2010, original submission:

There's currently several issues making hiding/unhiding of units a bit of a mess:

1. [hide_unit] doesn't persist across save/load; if you use [hide_unit] and then the player saves the game and loads it again, the unit isn't hidden anymore.

2. [hide_unit] only takes the location of the unit to hide (x,y), not a full SUF. It should be changed to take a full SUF (and hide all units matching the filter).

3. [unhide_unit] should similarly take a SUF and unhide only the units matching the filter.

4. Whether a unit is hidden or not should be governed by an actual unit attribute. unit.status.hidden=yes|no (boolean) would do, as it looks like that key is no longer used by ambushers. [hide_unit] and [unhide_unit] should simply set and clear that variable. This would fix point 1, as well as allow WML authors to poke that variable directly if necessary instead of having to use [hide_unit] and [unhide_unit].

Lari Nieminen <zookeeper>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by silene (Posted a comment)
  • -unavailable- added by zookeeper (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup