{"action":"closed","issue":{"url":"https://api.github.com/repos/jrossignol/ContractConfigurator/issues/335","labels_url":"https://api.github.com/repos/jrossignol/ContractConfigurator/issues/335/labels{/name}","comments_url":"https://api.github.com/repos/jrossignol/ContractConfigurator/issues/335/comments","events_url":"https://api.github.com/repos/jrossignol/ContractConfigurator/issues/335/events","html_url":"https://github.com/jrossignol/ContractConfigurator/issues/335","id":114746671,"number":335,"title":"min and maxTerrainAltitude seem to still operate based on altitude ASL","user":{"login":"space-is-hard","id":10237092,"avatar_url":"https://avatars.githubusercontent.com/u/10237092?v=3","gravatar_id":"","url":"https://api.github.com/users/space-is-hard","html_url":"https://github.com/space-is-hard","followers_url":"https://api.github.com/users/space-is-hard/followers","following_url":"https://api.github.com/users/space-is-hard/following{/other_user}","gists_url":"https://api.github.com/users/space-is-hard/gists{/gist_id}","starred_url":"https://api.github.com/users/space-is-hard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/space-is-hard/subscriptions","organizations_url":"https://api.github.com/users/space-is-hard/orgs","repos_url":"https://api.github.com/users/space-is-hard/repos","events_url":"https://api.github.com/users/space-is-hard/events{/privacy}","received_events_url":"https://api.github.com/users/space-is-hard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jrossignol/ContractConfigurator/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jrossignol/ContractConfigurator/milestones/55","html_url":"https://github.com/jrossignol/ContractConfigurator/milestones/1.7.8","labels_url":"https://api.github.com/repos/jrossignol/ContractConfigurator/milestones/55/labels","id":1381662,"number":55,"title":"1.7.8","description":"","creator":{"login":"jrossignol","id":8717685,"avatar_url":"https://avatars.githubusercontent.com/u/8717685?v=3","gravatar_id":"","url":"https://api.github.com/users/jrossignol","html_url":"https://github.com/jrossignol","followers_url":"https://api.github.com/users/jrossignol/followers","following_url":"https://api.github.com/users/jrossignol/following{/other_user}","gists_url":"https://api.github.com/users/jrossignol/gists{/gist_id}","starred_url":"https://api.github.com/users/jrossignol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrossignol/subscriptions","organizations_url":"https://api.github.com/users/jrossignol/orgs","repos_url":"https://api.github.com/users/jrossignol/repos","events_url":"https://api.github.com/users/jrossignol/events{/privacy}","received_events_url":"https://api.github.com/users/jrossignol/received_events","type":"User","site_admin":false},"open_issues":4,"closed_issues":1,"state":"open","created_at":"2015-10-28T15:27:08Z","updated_at":"2015-11-03T21:58:07Z","due_on":null,"closed_at":null},"comments":9,"created_at":"2015-11-03T05:45:43Z","updated_at":"2015-11-03T21:58:07Z","closed_at":"2015-11-03T21:58:07Z","body":"Trying to implement a kOS contract pack, the prototype contract is a simple hover that should encourage developing a PID controller. However, we'd like it based off of altitude AGL so that the player can't simply park a rover on a hillside at 500m ASL to complete the contract. Unfortunately, specifying `max/minTerrainAltitude` parameters still behaves as though you're only using `max/minAltitude` parameters.\r\n\r\nThe contract, for reference:\r\n\r\n```\r\nCONTRACT_TYPE\r\n{\r\n    name = kOS_hover_easy\r\n    \r\n    //Contract text\r\n    title = Autonomous hover at a specific altitude\r\n    description = Design a vehicle that will autonomously hover at a specific altitude for a specific period of time\r\n    synopsis = We'd like you to design a vehicle that can hover at a specific altitude above ground level for a specific period of time under the autonomous control of a kOS script.\r\n    completedMessage = Congratulations! You've successfully hovered at the desired altitude for the required amount of time!\r\n    \r\n    //Agency -- Do we make our own or let CC assign a random one?\r\n    //agent = \r\n    \r\n    //Expiry\r\n    minExpiry = 500.0\r\n    maxExpiry = 1000.0\r\n    \r\n    //Deadline\r\n    deadline = 500.0\r\n    \r\n    //Declinability/Cancellability\r\n    cancellable = true\r\n    declinable = true\r\n    \r\n    //Prestige -- Defaults to any\r\n    prestige = Trivial\r\n    \r\n    //Target celestial body -- defaults to null/none\r\n    //targetBody = Kerbin\r\n    \r\n    //Maximum times contract can be completed -- default is 0/unlimited\r\n    maxCompletions = 0\r\n    \r\n    //Maximum simultaneous instances of this contract -- default is 0/unlimited\r\n    maxSimultaneous = 1\r\n    \r\n    //Rewards\r\n    rewardScience = 20.0\r\n    rewardReputation = 10.0\r\n    rewardFunds = 25000.0\r\n    failureReputation = 10.0\r\n    failureFunds = 10000.0\r\n    advanceFunds = 10000.0\r\n    \r\n    //Completion parameters\r\n    PARAMETER\r\n    {\r\n        name = altitude_parameter\r\n        type = ReachState\r\n        targetBody = Kerbin\r\n        //Craft must hover at 500 meters AGL (+/- 10 meters)\r\n        minTerrainAltitude = 490.0\r\n        maxTerrainAltitude = 510.0\r\n        //Craft must be flying at no more than 10 m/s surface velocity\r\n        maxSpeed = 10.0\r\n        situation = FLYING\r\n        title = Altitude\r\n        \r\n        PARAMETER\r\n        {\r\n            name = time_parameter\r\n            type = Duration\r\n            //Craft must hover in the altitude range for 30s\r\n            duration = 30s\r\n            preWaitText = Waiting for altitude range\r\n            waitingText = Hover timer running\r\n            completionText = Time requirement reached\r\n        }\r\n    }\r\n    \r\n    //This fails for some reason\r\n    // PARAMETER\r\n    // {\r\n        // name = no_crew_parameter\r\n        // type = HasCrewCapacity\r\n        //Craft must not be able to hold crew\r\n        // maxCapacity = 0\r\n    // }\r\n    \r\n    //Contract availibility requirements\r\n    REQUIREMENT\r\n    {\r\n        name = core_part_requirement\r\n        type = PartModuleUnlocked\r\n        //A part with the kOSProcessor module must be unlocked\r\n        partModule = kOSProcessor\r\n    }\r\n    \r\n    REQUIREMENT\r\n    {\r\n        name = liquid_engine_requirement\r\n        type = Any\r\n        //An LV-T45 or LV-T30 liquid engine must be unlocked\r\n        \r\n        REQUIREMENT\r\n        {\r\n            name = LVT45_requirement\r\n            type = PartUnlocked\r\n            part = liquidEngine2  //**VERIFY THAT THIS IS CORRECT**\r\n        }\r\n        \r\n        REQUIREMENT\r\n        {\r\n            name = LVT30_requirement\r\n            type = PartUnlocked\r\n            part = liquidEngine  //**VERIFY THAT THIS IS CORRECT**\r\n        }\r\n    }\r\n    \r\n    REQUIREMENT\r\n    {\r\n        name = probe_core_requirement\r\n        type = PartUnlocked\r\n        //A probe core must be unlocked\r\n        part = probeCoreSphere\r\n    }\r\n    \r\n    REQUIREMENT\r\n    {\r\n        name = altitude_requirement\r\n        type = AltitudeRecord\r\n        //The player must have breached 30km\r\n        minAltitude = 30000\r\n    }\r\n}\r\n```"}}