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

 
 
Show feedback again

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

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

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 05 Aug 2010 05:16:09 AM UTC, 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 04 Aug 2010 07:37:24 PM UTC, 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 04 Aug 2010 07:18:03 PM UTC, 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 Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

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.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup