← Back to team overview

widelands-dev team mailing list archive

Re: [Merge] lp:~widelands-dev/widelands/bug-1559729-lost_portspace into lp:widelands

 

Few months (weeks?) ago I fixed a bug in find_portdock, when it did not test existence of another portdock on a field nor ownership of a field. Now you are partially reverting the change.

I had some printfs in the code that showed how are is_port_space(f) and !find_portdock(f).empty() evaluated and it really showed that is_port_space(f) returned "false" without good reason. Only reason was that somewhere under the hood the field was not listed in port_spaces.

So I think the problem is in port_spaces concept. Should they be completely static - created only in editor? Or is there a problem with pushing a field that re-gained port capabilities back to port_spaces?

I believe the game should behave this way: If a port cannot be built there, because there is no room for portdock - PORT placeholder should NOT be be shown. As soon as some nearby water is conquered, PORT placeholder should be shown.

So in summary, the problem is not where you are fixing it. IMHO

Gun should also say her opinion, it is her code.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1559729-lost_portspace/+merge/289626
Your team Widelands Developers is requested to review the proposed merge of lp:~widelands-dev/widelands/bug-1559729-lost_portspace into lp:widelands.


References