← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/bug-1795871-lua-set_workers into lp:widelands

 

Notabilis has proposed merging lp:~widelands-dev/widelands/bug-1795871-lua-set_workers into lp:widelands.

Commit message:
Ignore workers in WorkerQueues when setting the amount of "worker" workers by script.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1795871 in widelands: "Game data error: inputqueue: workersqueue: not found"
  https://bugs.launchpad.net/widelands/+bug/1795871

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1795871-lua-set_workers/+merge/357716

The set_workers() Lua function removes all workers that aren't explicitly given as parameter. In case of the barracks this leads to the carriers in the input queue being deleted when the trainer is added per script. For once, this isn't intended (I think), but more importantly this leads to a crash later on since the WOrkersQueue still contains the references to the deleted "input" workers.

For testing, see the attached bug report.
-- 
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1795871-lua-set_workers into lp:widelands.


References