DiD S6: fixed previously stored orc leader ending up in the wrong place (fixes #3304)
[ci skip]
This commit is contained in:
parent
1c708c4801
commit
8659c32afc
1 changed files with 12 additions and 16 deletions
|
@ -198,25 +198,21 @@
|
|||
|
||||
# Replace the fallback orcish leader with the stored one from the
|
||||
# previous scenario
|
||||
[if]
|
||||
[variable]
|
||||
name=orc_leader_store.side
|
||||
not_equals=$empty
|
||||
[/variable]
|
||||
[lua]
|
||||
code = <<
|
||||
local saved_orc_leader = wml.variables.orc_leader_store
|
||||
|
||||
[then]
|
||||
{VARIABLE orc_leader_store.x 29}
|
||||
{VARIABLE orc_leader_store.y 2}
|
||||
{VARIABLE orc_leader_store.side 2}
|
||||
if saved_orc_leader ~= nil then
|
||||
saved_orc_leader.side = 2
|
||||
saved_orc_leader.facing = se
|
||||
|
||||
[unstore_unit]
|
||||
variable=orc_leader_store
|
||||
find_vacant=no
|
||||
[/unstore_unit]
|
||||
local loc = wesnoth.get_starting_location(2)
|
||||
wesnoth.put_unit(saved_orc_leader, loc[1], loc[2])
|
||||
|
||||
{CLEAR_VARIABLE orc_leader_store}
|
||||
[/then]
|
||||
[/if]
|
||||
wml.variables.orc_leader_store = nil
|
||||
end
|
||||
>>
|
||||
[/lua]
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
|
|
Loading…
Add table
Reference in a new issue