Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Space Telescopes Program #2442

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
195 changes: 195 additions & 0 deletions GameData/RP-1/Contracts/Great Observatories/GOCrewedServicing.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
CONTRACT_TYPE
{
name = GOCrewedServicing
title = @/targetVessel1 Crewed Servicing Mission
genericTitle = Space Telescope Crewed Servicing Mission

group = Great Observatories
agent = Federation Aeronautique Internationale

description = <b>Program: Great Observatories<br>Type: <color=green>Required</color></b><br><br> One of our space telescopes is in need of component repairs and upgrades to continue operating optimally. Either launch a new crewed spacecraft or dock the telescope to a space station to allow crew to service it.

synopsis = Send a crew to dock with and service instrumentation on the designated craft

completedMessage = Mission success! The upgraded instrumentation is already producing scientific data.

// sortKey = 1503

cancellable = true
declinable = true
autoAccept = false
minExpiry = 0
maxExpiry = 0
maxCompletions = 1
maxSimultaneous = 1
deadline = 0

targetBody = HomeWorld()

prestige = Trivial // 1.0x
advanceFunds = 0
rewardScience = 0
rewardReputation = 250
rewardFunds = 0
failureReputation = 0 // was @rewardReputation
failureFunds = 0

// ************ REQUIREMENTS ************

REQUIREMENT
{
name = ProgramActive
type = ProgramActive
program = GreatObservatories
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = GOLargeSpaceTelescope
}

REQUIREMENT
{
name = AtLeast
type = AtLeast
count = 2

REQUIREMENT
{
name = CompleteContract1
type = CompleteContract
contractType = GOHeavySpaceTelescope
}

REQUIREMENT
{
name = CompleteContract2
type = CompleteContract
contractType = GOEllipticalSpaceTelescope
}

REQUIREMENT
{
name = CompleteContract3
type = CompleteContract
contractType = GOInfraredSpaceObservatory
}

REQUIREMENT
{
name = CompleteContract4
type = CompleteContract
contractType = GOFirstInfraredSpaceTelescope
}
}

// ************ DATA ************

DATA
{
type = Vessel
requiredValue = true
targetVessel1 = LSTcraft // this is the craft that completed the Large Space Telescope contract
hidden = true
}

BEHAVIOUR
{
name = ServicingReset
type = Expression

CONTRACT_COMPLETED_SUCCESS
{
TelescopeLastServiced = @/targetVessel1
FirstServicingTime = UniversalTime()
}
}

// ************ PARAMETERS ************

PARAMETER
{
name = LSTServicingMission
type = VesselParameterGroup
title = Dock a spacecraft with a servicing crew to the @/targetvessel1
genericTitle = Dock a spacecraft with a servicing crew to the space telescope

PARAMETER
{
name = Crewmembers
type = HasCrew
minCrew = 3
crewOnly = true
title = Bring a minimum crew of @minCrew
hideChildren = true
}

PARAMETER
{
name = HasResource
type = HasResource
resource = ResearchPayload
minQuantity = 600 // WFPC2 + COSTAR was 571 kg
title = Bring @minQuantity units of ResearchPayload as replacement instruments
}

PARAMETER
{
name = DockingSequence
type = Sequence
title = Dock with the @/targetVessel1 for 4 days to allow your engineers to service its instrumentation
genericTitle = Dock with the space telescope for 4 days to allow your engineers to service its instrumentation

PARAMETER
{
name = Crewmembers
type = HasCrew
trait = Engineer
minCrew = 2
crewOnly = true
title = Have at least 2 engineers on board to conduct servicing
hideChildren = true
}
PARAMETER
{
name = DockWithTelescope
type = Docking
vessel = @/targetVessel1
title = Dock with @/targetVessel1
genericTitle = Dock with the space telescope
}

PARAMETER
{
name = Duration
type = Duration
duration = 4d
preWaitText = Service the space telescope
waitingText = Servicing instrumentation...
completionText = Servicing: Complete
disableOnStateChange = true
}

}

PARAMETER
{
name = ReturnHome
type = RP1ReturnHome
title = Undock and return the crew home safely
hideChildren = true
completeInSequence = true
}

PARAMETER
{
name = RecoverKerbal
type = RecoverKerbal
}


}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
CONTRACT_TYPE
{
name = GOCrewedServicingRepeat
title = @/targetVessel1 Crewed Servicing Mission
genericTitle = Space Telescope Crewed Servicing Mission

group = Great Observatories
agent = Federation Aeronautique Internationale

description = <b>Program: Great Observatories<br>Type: <color=green>Required</color></b><br><br>Another one of our space telescopes is in need of component repairs and upgrades to continue operating optimally. Either launch a new crewed spacecraft or dock the telescope to a space station to allow crew to service it.

synopsis = Send a crew to dock with and service instrumentation on the designated space telescope

completedMessage = Mission success! The upgraded instrumentation is already producing scientific data.

// sortKey = 1503

cancellable = true
declinable = true
autoAccept = false
minExpiry = 0
maxExpiry = 0
maxCompletions = 3
maxSimultaneous = 1
deadline = 0

targetBody = HomeWorld()

prestige = Trivial // 1.0x
advanceFunds = 0
rewardScience = 0
rewardReputation = 200
rewardFunds = 0
failureReputation = 0 // was @rewardReputation
failureFunds = 0

// ************ REQUIREMENTS ************
REQUIREMENT
{
name = ProgramActive
type = ProgramActive
program = GreatObservatories
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = GOLargeSpaceTelescope
}

REQUIREMENT
{
name = CompleteContract
type = CompleteContract
contractType = GOCrewedServicing
}

REQUIREMENT
{
name = Expression
type = Expression
title = Must have been 90 days since completing the first crewed servicing mission
expression = $FirstServicingTime - $GOCurrentTime > 7776000
}

// ************ DATA ************

DATA
{
type = Vessel
requiredValue = true
targetVessel1 = $EarthST.Where(v => v.FreeDockingPorts()>0 && v.Vessel() != @index).Random()
title = Target must be a previously launched space telescope
hidden = true
}

DATA
{
type = Vessel
index = $TelescopeLastServiced
}

BEHAVIOUR
{
name = ServicingReset
type = Expression

CONTRACT_COMPLETED_SUCCESS
{
TelescopeLastServiced = @/targetVessel1
}
}

BEHAVIOUR
{
name = ServicingDelayCheck
type = Expression

CONTRACT_OFFERED
{
type = double
GOCurrentTime = UniversalTime()
}
}

// ************ PARAMETERS ************

PARAMETER
{
name = LSTServicingMission
type = VesselParameterGroup
title = Dock a spacecraft with a servicing crew to the @/targetvessel1
genericTitle = Dock a spacecraft with a servicing crew to the space telescope

PARAMETER
{
name = Crewmembers
type = HasCrew
minCrew = 3
crewOnly = true
title = Bring a minimum crew of @minCrew
hideChildren = true
}

PARAMETER
{
name = HasDockingPort
type = PartValidation
partModule = ModuleDockingNode
title = Vessel must have a docking port
hideChildren = true
}

PARAMETER
{
name = HasResource
type = HasResource
resource = ResearchPayload
inQuantity = 600 // WFPC2 + COSTAR was 571 kg
title = Bring @minQuantity units of ResearchPayload as replacement instruments
}

PARAMETER
{
name = DockingSequence
type = Sequence
title = Dock with @/targetVessel1 for 4 days to allow your engineers to service its instrumentation
genericTitle = Dock with the space telescope for 4 days to allow your engineers to service its instrumentation

PARAMETER
{
name = Crewmembers
type = HasCrew
trait = Engineer
minCrew = 2
crewOnly = true
title = Have at least 2 engineers on board
hideChildren = true
}

PARAMETER
{
name = DockWithTelescope
type = Docking
vessel = @/targetVessel1
title = Dock with @/targetVessel1
genericTitle = Dock with the space telescope
}

PARAMETER
{
name = Duration
type = Duration
duration = 4d
preWaitText = Service the space telescope
waitingText = Servicing instrumentation...
completionText = Servicing: Complete
disableOnStateChange = true
}

}

PARAMETER
{
name = ReturnHome
type = RP1ReturnHome
title = Return the crew home safely
hideChildren = true
completeInSequence = true
}

PARAMETER
{
name = RecoverKerbal
type = RecoverKerbal
}


}

}
Loading