I still don't understand where you're going with all this.

> Should they be completely static - created only in editor?

I think port_spaces_ should ALWAYS hold coordinates of all the port spaces 
defined in the map and we shouldn't ever need to call set_port_space during 
normal gameplay (except maybe via scripting). It also works like that right now 
and I don't see a problem with that.


> Only reason was that somewhere under the hood the field was not listed in 
> port_spaces.

That's an entirely valid reason. It's not a port space because it wasn't 
defined by the map author as such.


> 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.

That's exactly how the game behaves right now...


> I understand this is called whenever you click the save map/game. But I dont 
> know how to find out if it is the game or editor, so I am not able to test it 
> right now....

That only applies to saving maps in the editor. The idea is to remove port 
spaces that the map maker invalidates e.g. by changing the height of the port 
space field.
-- 
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.

_______________________________________________
Mailing list: https://launchpad.net/~widelands-dev
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp

Reply via email to