Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CONTRACT_TYPE
- {
- // Unique name of the contract type (required)
- name = SurfaceSample
- // Contract text details
- title = Perform a science experiment on @/targetVessel1
- description = Our research department wants to know what the effects of space will be on something besides a Kerbal.
- synopsis = Analyze a Surface Sample from @/biome1 on board @/targetVessel1
- completedMessage = We now have a better understanding of something we know nothing about!
- minExpiry = 1
- maxExpiry = 30
- deadline = Random(500, 1000)
- cancellable = true
- declinable = true
- weight = 0.8
- group = KerbinTier3
- maxSimultaneous = 1
- rewardScience = 0
- rewardReputation = Random(1.0, 100.0)
- rewardFunds = Random(40000.0, 60000.0)
- failureReputation = Random(1.0, 100.0)
- failureFunds = 10000.0
- advanceFunds = 10000.0
- targetBody = @/targetBody1
- DATA
- {
- type = Vessel
- requiredValue = true
- targetVessel1 = [MunStationNEW, MinmusStationNEW ].Where(v => v.CrewCount()>0).Random()
- }
- DATA
- {
- type = CelestialBody
- requiredValue = true
- uniqueValue = true
- targetBody1 = @targetVessel1.CelestialBody()
- }
- DATA
- {
- type = CelestialBody
- requiredValue = true
- uniqueValue = true
- }
- //logic to try and make it not selected a drained biome.
- DATA
- {
- type = Biome
- requiredValue = true
- uniqueValue = true
- biome1 = @targetBody1.Biomes().Where(b => b.RemainingScience() >20).Random()
- }
- //attempt to find
- DATA
- {
- type = ScienceSubject
- requiredValue = true
- uniqueValue = true
- experiment1 = AllScienceSubjectsByBiome([@biome1]).Where(s => s.Experiment() == surfaceSample && s.CollectedScience() <1).First()
- }
- PARAMETER
- {
- name = Sequence
- type = Sequence
- PARAMETER
- {
- name = CollectScience
- type = CollectScience
- targetBody = @/targetBody1
- biome = @/biome1
- experiment = @/experiment1
- }
- PARAMETER
- {
- name = Docking
- type = Docking
- vessel = @/targetVessel1
- title = Dock with @/targetVessel1
- }
- }
- REQUIREMENT
- {
- name = CompleteContract
- type = CompleteContract
- contractType = SurfaceSample
- minCount = 0
- cooldownDuration = 10d
- }
- REQUIREMENT
- {
- name = HomeWorldCheck
- type = Expression
- expression = (!@/targetBody1.IsHomeWorld())
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement