Advertisement
Guest User

SurfaceSample

a guest
Sep 4th, 2015
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.34 KB | None | 0 0
  1. CONTRACT_TYPE
  2. {
  3. // Unique name of the contract type (required)
  4. name = SurfaceSample
  5. // Contract text details
  6. title = Perform a science experiment on @/targetVessel1
  7. description = Our research department wants to know what the effects of space will be on something besides a Kerbal.
  8. synopsis = Analyze a Surface Sample from @/biome1 on board @/targetVessel1
  9. completedMessage = We now have a better understanding of something we know nothing about!
  10. minExpiry = 1
  11. maxExpiry = 30
  12. deadline = Random(500, 1000)
  13. cancellable = true
  14. declinable = true
  15. weight = 0.8
  16. group = KerbinTier3
  17. maxSimultaneous = 1
  18. rewardScience = 0
  19. rewardReputation = Random(1.0, 100.0)
  20. rewardFunds = Random(40000.0, 60000.0)
  21. failureReputation = Random(1.0, 100.0)
  22. failureFunds = 10000.0
  23. advanceFunds = 10000.0
  24. targetBody = @/targetBody1
  25.  
  26. DATA
  27. {
  28. type = Vessel
  29. requiredValue = true
  30. targetVessel1 = [MunStationNEW, MinmusStationNEW ].Where(v => v.CrewCount()>0).Random()
  31. }
  32. DATA
  33. {
  34. type = CelestialBody
  35. requiredValue = true
  36. uniqueValue = true
  37. targetBody1 = @targetVessel1.CelestialBody()
  38. }
  39. DATA
  40. {
  41. type = CelestialBody
  42. requiredValue = true
  43. uniqueValue = true
  44. }
  45.  
  46. //logic to try and make it not selected a drained biome.
  47. DATA
  48. {
  49. type = Biome
  50. requiredValue = true
  51. uniqueValue = true
  52. biome1 = @targetBody1.Biomes().Where(b => b.RemainingScience() >20).Random()
  53. }
  54. //attempt to find
  55. DATA
  56. {
  57. type = ScienceSubject
  58. requiredValue = true
  59. uniqueValue = true
  60. experiment1 = AllScienceSubjectsByBiome([@biome1]).Where(s => s.Experiment() == surfaceSample && s.CollectedScience() <1).First()
  61. }
  62.  
  63. PARAMETER
  64. {
  65. name = Sequence
  66. type = Sequence
  67. PARAMETER
  68. {
  69. name = CollectScience
  70. type = CollectScience
  71. targetBody = @/targetBody1
  72. biome = @/biome1
  73. experiment = @/experiment1
  74. }
  75. PARAMETER
  76. {
  77. name = Docking
  78. type = Docking
  79. vessel = @/targetVessel1
  80. title = Dock with @/targetVessel1
  81. }
  82. }
  83. REQUIREMENT
  84. {
  85. name = CompleteContract
  86. type = CompleteContract
  87. contractType = SurfaceSample
  88. minCount = 0
  89. cooldownDuration = 10d
  90. }
  91. REQUIREMENT
  92. {
  93. name = HomeWorldCheck
  94. type = Expression
  95.  
  96. expression = (!@/targetBody1.IsHomeWorld())
  97. }
  98. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement