I have removed the playercommand now. Here's what I remember of the vision code:
Vision state of a field is an integer. Everything in sight of a building with vision is always visible. Every time a worker walks past an area, the vision on the field is incremented. It then slowly gets decremented until the player loses vision. Then the fields are darkened and not updated any longer, but never blacked out. What we needed in the hide/reveal code were 2 versions of hiding fields from the player: 1. Just the darkened state 2. A permanent black state that can be undone by scripting, field by field Buildings and workers will interfere with the hiding state, so implementing this became a bit tricky and also needed some extra data in the savegame. -- https://code.launchpad.net/~widelands-dev/widelands/bug-1687100-reveal_fields/+merge/323721 Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/bug-1687100-reveal_fields. _______________________________________________ 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