Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SotA: Fix and improve freeze/thaw unit implementation
Bug was that when a unit was thawed, mouse over in unit sidebar would show incorrect movement costs (all 1's). New implementation properly uses {UNREACHABLE} and makes use of the now available [remove_object] tag.
- Loading branch information
1 parent
ca03818
commit 64d3aa1
Showing
1 changed file
with
21 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you test that this work? Iirc id in ojject has a specaial meaning that an on ect with a fixed i id can only be given once per scenario.
64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.
that's what:
take_only_once=no
is for, so it can be given more than once
64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Huh? Where did
object_id
come from?64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what you're asking here.
64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
object_id
in[remove_object]
.64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's the same as the [object] id in the FREEZE_UNIT macro above.
https://wiki.wesnoth.org/DirectActionsWML#.5Bobject.5D & [remove_object] below it.
object_id in [remove_object] is equal to the id used in [object]. I would imagine it is object_id and not id in [remove_object] to avoid clashing with SUF's
64d3aa1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh... I guess I was confused because the underlying Lua function for
[remove_object]
actually takes the equivalent of a[filter_wml]
tag to apply to each object and determine a match, but I guess the WML tag doesn't expose that.