Merge lp:~stdh/widelands/rewrite_wincondition into lp:widelands
Status: | Work in progress | ||||
---|---|---|---|---|---|
Proposed branch: | lp:~stdh/widelands/rewrite_wincondition | ||||
Merge into: | lp:widelands | ||||
Diff against target: |
537 lines (+265/-200) 6 files modified
doc/sphinx/source/conf.py (+2/-2) scripting/infrastructure.lua (+1/-1) scripting/table.lua (+23/-0) scripting/win_condition_functions.lua (+31/-0) scripting/win_conditions/03_territorial_lord.lua (+207/-196) src/scripting/lua_bases.cc (+1/-1) |
||||
To merge this branch: | bzr merge lp:~stdh/widelands/rewrite_wincondition | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
SirVer | Needs Fixing | ||
Review via email: mp+178461@code.launchpad.net |
Description of the change
A rewrite of the Territorial Lord win condition, imho clearer with better abstractions. It should also be a bit more straightforward to adapt to a land-ownership-
I hope the structure of the code is clear as is, otherwise I'd like to add some comments.
Remaining questions, on top of those posed in code comments:
*What does wc_version mean & should I provide compatibility code for old savegames?
*The code to check for defeated players was broken in that it only checks once. I didn't touch it, some other win conditions use the same faulty code and it should be adressed more globally, I feel. Bonus question: should other players be noticed when one of their friends/enemies is defeated?
*I noticed that "not rawequal(
*After I found this out, I used wl.game.Player.name as a key. I hope that's a unique property...
*Code style and formatting OK? A quick search didn't turn up information about any preference in the project.
*I must have forgotten what should come here, maybe later...
And a known bug: it doesn't survive save-load. More specifically, the main loop seems to be restarted so that it loses connection to the last thread it started. In specific conditions it is possible to win twice! I have a script more or less ready to demonstrate that, but it seemed a bit silly to put that in this branch...
Unmerged revisions
- 6698. By Steven De Herdt
-
Merge trunk. With game end screen!
- 6697. By Steven De Herdt
-
Adress some review comments, add pictures to Sphinx docs (second try).
- 6696. By Steven De Herdt
-
First version of rewrite Territorial Lord.
Oh yes, that detail I forgot: copyright. I pasted the GPL2+ boilerplate at the top, but I haven't completed the year range(s).
Also, do I have to officialy claim that the code I contribute is licensed to Widelands, and hence the world, under GPL2+? Or is this the implicit understanding?