{"action":"created","issue":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/775","repository_url":"https://api.github.com/repos/wesnoth/wesnoth","labels_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/775/labels{/name}","comments_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/775/comments","events_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/775/events","html_url":"https://github.com/wesnoth/wesnoth/pull/775","id":176500418,"number":775,"title":"Honor special locations in terrain mask","user":{"login":"GregoryLundberg","id":11877870,"avatar_url":"https://avatars.githubusercontent.com/u/11877870?v=3","gravatar_id":"","url":"https://api.github.com/users/GregoryLundberg","html_url":"https://github.com/GregoryLundberg","followers_url":"https://api.github.com/users/GregoryLundberg/followers","following_url":"https://api.github.com/users/GregoryLundberg/following{/other_user}","gists_url":"https://api.github.com/users/GregoryLundberg/gists{/gist_id}","starred_url":"https://api.github.com/users/GregoryLundberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GregoryLundberg/subscriptions","organizations_url":"https://api.github.com/users/GregoryLundberg/orgs","repos_url":"https://api.github.com/users/GregoryLundberg/repos","events_url":"https://api.github.com/users/GregoryLundberg/events{/privacy}","received_events_url":"https://api.github.com/users/GregoryLundberg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-09-12T22:22:41Z","updated_at":"2016-09-13T11:49:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/wesnoth/wesnoth/pulls/775","html_url":"https://github.com/wesnoth/wesnoth/pull/775","diff_url":"https://github.com/wesnoth/wesnoth/pull/775.diff","patch_url":"https://github.com/wesnoth/wesnoth/pull/775.patch"},"body":"Added overlay_special_locations=yes|no, default no, to [terrain_mask]. When yes, side starting locations and special locations marked in the mask replace those in the effected area of the underlying map by removing any from the underlying map, and applying only those given in the mask."},"comment":{"url":"https://api.github.com/repos/wesnoth/wesnoth/issues/comments/246656593","html_url":"https://github.com/wesnoth/wesnoth/pull/775#issuecomment-246656593","issue_url":"https://api.github.com/repos/wesnoth/wesnoth/issues/775","id":246656593,"user":{"login":"gfgtdf","id":4893136,"avatar_url":"https://avatars.githubusercontent.com/u/4893136?v=3","gravatar_id":"","url":"https://api.github.com/users/gfgtdf","html_url":"https://github.com/gfgtdf","followers_url":"https://api.github.com/users/gfgtdf/followers","following_url":"https://api.github.com/users/gfgtdf/following{/other_user}","gists_url":"https://api.github.com/users/gfgtdf/gists{/gist_id}","starred_url":"https://api.github.com/users/gfgtdf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gfgtdf/subscriptions","organizations_url":"https://api.github.com/users/gfgtdf/orgs","repos_url":"https://api.github.com/users/gfgtdf/repos","events_url":"https://api.github.com/users/gfgtdf/events{/privacy}","received_events_url":"https://api.github.com/users/gfgtdf/received_events","type":"User","site_admin":false},"created_at":"2016-09-13T11:49:56Z","updated_at":"2016-09-13T11:49:56Z","body":"I feel like most of these options are not really needed, becasue\r\n1) When you dotn want to mess with stating locatiosn in your overlays then you usually simply woudln pput them in the map\r\n2) from how i understood it, clear_existing_positions = no would have no effect other than gibing an additional warning.\r\n\r\nSo what i suggest, is to have just one paramter, that only specifies what happens in the case that one starting positions is defined on both the orignal map and the overlays, not guarneteed this example code works:\r\n```\r\n\tfor location loop{\r\n\t\t...\r\n\t}\r\n\t....\r\n\tbool overwrite = rules_cfg[\"overwrite_starting_positions\"].to_bool(true);\r\n\tfor (auto& pair : m.starting_positions_) {\r\n\t\tauto new_pos = pair.right + offset;\r\n\t\tif (overwrite) {\r\n\t\t\tstarting_positions_.left[pair.left] = new_pos;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tstarting_positions_.insert(tstarting_positions::value_type(pair.left, new_pos));\r\n\t\t}\r\n\t}\r\n\r\n```"}}
{"actor":{"display_login":"gfgtdf"}}