{"action":"created","issue":{"url":"https://api.github.com/repos/colobot/colobot/issues/759","repository_url":"https://api.github.com/repos/colobot/colobot","labels_url":"https://api.github.com/repos/colobot/colobot/issues/759/labels{/name}","comments_url":"https://api.github.com/repos/colobot/colobot/issues/759/comments","events_url":"https://api.github.com/repos/colobot/colobot/issues/759/events","html_url":"https://github.com/colobot/colobot/issues/759","id":145538015,"number":759,"title":"Change default value for dist= in EndMissionTake and AudioChange","user":{"login":"krzys-h","id":1517255,"avatar_url":"https://avatars.githubusercontent.com/u/1517255?v=3","gravatar_id":"","url":"https://api.github.com/users/krzys-h","html_url":"https://github.com/krzys-h","followers_url":"https://api.github.com/users/krzys-h/followers","following_url":"https://api.github.com/users/krzys-h/following{/other_user}","gists_url":"https://api.github.com/users/krzys-h/gists{/gist_id}","starred_url":"https://api.github.com/users/krzys-h/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krzys-h/subscriptions","organizations_url":"https://api.github.com/users/krzys-h/orgs","repos_url":"https://api.github.com/users/krzys-h/repos","events_url":"https://api.github.com/users/krzys-h/events{/privacy}","received_events_url":"https://api.github.com/users/krzys-h/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/colobot/colobot/labels/level%20files","name":"level files","color":"aa50e1"},{"url":"https://api.github.com/repos/colobot/colobot/labels/proposal","name":"proposal","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-04-03T20:35:33Z","updated_at":"2016-04-04T21:43:30Z","closed_at":null,"body":"***WARNING! This is a backwards incompatible change that WILL break user levels that don't specify the value explicitly***\r\n\r\nThe default value for dist= has always confused me. By default it's set to value appropariate to cover the whole SpaceShip. If I omit pos= and dist=, I would expect the command to detect anywhere on the level. This is not how it works.\r\n\r\nConsider this:\r\n```\r\nEndMissionTake type=WheeledGrabber min=1\r\n```\r\nThis looks like \"the mission ends when one WheeledGrabber is produced anywhere on the map\", while actually this is \"the mission ends when one WheeledGrabber is placed at max 8 meters from the center of the map\"\r\nTo get the desired behaviour, you have to type:\r\n```\r\nEndMissionTake dist=25000.00 type=WheeledGrabber min=1\r\n```\r\nWhich is longer and confusing.\r\n\r\n---\r\n\r\nAnother common misconception might be assuming that pos= defaults to SpaceShip position. This is not how it works either. pos= defaults to the center of the map. To check for objects on SpaceShip, you still have to do this:\r\n```\r\nEndMissionTake pos=x;y type=TitaniumOre min=4 // dist= omitted to keep the default value\r\n```\r\nI believe it would be better to make this more explicit:\r\n```\r\nEndMissionType pos=x;y dist=8 type=TitaniumOre min=4 // dist= is required to detect around the position\r\n```\r\n\r\n---\r\n\r\nAdditionaly, using only pos or only dist should not be allowed to avoid mistakes and the level parser should throw an error.\r\n\r\nI would like to know what other people think about changing this, especially (user)level designers."},"comment":{"url":"https://api.github.com/repos/colobot/colobot/issues/comments/205510490","html_url":"https://github.com/colobot/colobot/issues/759#issuecomment-205510490","issue_url":"https://api.github.com/repos/colobot/colobot/issues/759","id":205510490,"user":{"login":"RaptorParkowsky","id":4019345,"avatar_url":"https://avatars.githubusercontent.com/u/4019345?v=3","gravatar_id":"","url":"https://api.github.com/users/RaptorParkowsky","html_url":"https://github.com/RaptorParkowsky","followers_url":"https://api.github.com/users/RaptorParkowsky/followers","following_url":"https://api.github.com/users/RaptorParkowsky/following{/other_user}","gists_url":"https://api.github.com/users/RaptorParkowsky/gists{/gist_id}","starred_url":"https://api.github.com/users/RaptorParkowsky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RaptorParkowsky/subscriptions","organizations_url":"https://api.github.com/users/RaptorParkowsky/orgs","repos_url":"https://api.github.com/users/RaptorParkowsky/repos","events_url":"https://api.github.com/users/RaptorParkowsky/events{/privacy}","received_events_url":"https://api.github.com/users/RaptorParkowsky/received_events","type":"User","site_admin":false},"created_at":"2016-04-04T21:43:30Z","updated_at":"2016-04-04T21:43:30Z","body":"Of course, it's a remake but in the plot/design/gameplay aspects, not engine aspects."}}