On second thought, this fix is kind of broken. I haven't tested it but it will 
most likely fail if a building has the same worker type as an "input" worker 
and as a "worker" worker. In that case, the input workers will probably be 
deleted as well.
Unfortunately the PlayerImmovable given as a function parameter does not offer 
a way to differentiate between the two kinds of workers. To fix this, one would 
probably create a copy of this function specifically for production sites.

If this should be done, feel free to say so. Otherwise we could just merge this 
code (since it fixes an appeared bug) and wait whether it fails again (and 
maybe add a TODO comment in the code).
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1795871-lua-set_workers/+merge/357716
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1795871-lua-set_workers into lp:widelands.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to