URL:
<http://gna.org/bugs/?25472>
Summary: remove [on_redo]
Project: Battle for Wesnoth
Submitted by: gfgtdf
Submitted on: Sa 28 Jan 2017 15:19:45 UTC
Category: Feature Request
Severity: 2 - Minor
Priority: 5 - Normal
Item Group: WML
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 1.13
Operating System:
_______________________________________________________
Details:
Currently the different actions handle redoing differently. There are 2 types
of actions:
1) some actions just call the original 'action execute' code similar to what
happens when watching a replay of a move. In this case [on_redo] is not needed
because the game would just execute the original wml code again.
2) Other actions have a specialised codepath specifically for redoing, since
this specialed codepath doesnt fire any wml events, [on_redo] is needed to
adapt it to possible changestate changes made by wml events.
We could remove the type (2) and always execute just the original codepaths,
so one might wonder why the type (2) exists in the first place. I perosnally
think it is some type of optimisation since the original codepath might be
rather slow with all its event fireing etc.
If we don't want to remove the redo method (2), i suggest to change the engine
code so that if a [on_undo] happens (the game angine already tracks that)
during a event, the game engine automatically switches to method (1) when
redoing that particual action. This would allow us to remove the need for
[on_redo] complteley and make work easier for wml developers.
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?25472>
_______________________________________________
Nachricht gesendet von/durch Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs