Skip to content

Commit

Permalink
Rework tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
jrossignol committed Aug 16, 2020
1 parent 64af016 commit ee202f6
Show file tree
Hide file tree
Showing 28 changed files with 1,535 additions and 2,981 deletions.
23 changes: 11 additions & 12 deletions test/AwardExperience.cfg → test/Behaviour/AwardExperience.cfg
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
// Contract for behaviour test
CONTRACT_TYPE
{
name = AwardExperience

title = AwardExperience test
description = A more detailed description of the contract. This is where you come in.
synopsis = We want you to do a thing.
completedMessage = You have done the thing.
// Unique name of the contract (required)
name = TestBehaviour_AwardExperience

group = BehaviourTest
maxSimultaneous = 1

targetBody = Kerbin

// Contract rewards
rewardScience = 100.0
rewardFunds = 100000.0
// Contract text
title = AwardExperience Behaviour
description = description
synopsis = synopsis
completedMessage = completedMessage

PARAMETER
{
name = VesselParameterGroup
name = ParameterToComplete
type = VesselParameterGroup

PARAMETER
Expand All @@ -34,7 +33,7 @@ CONTRACT_TYPE
{
type = AwardExperience

parameter = VesselParameterGroup
parameter = ParameterToComplete

experience = 4

Expand Down
File renamed without changes.
73 changes: 73 additions & 0 deletions test/Behaviour/Orbit.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Contract for behaviour test
CONTRACT_TYPE
{
// Unique name of the contract (required)
name = TestBehaviour_OrbitGenerator

group = BehaviourTest
maxSimultaneous = 1
targetBody = Kerbin

// Contract text
title = OrbitGenerator Behaviour
description = description
synopsis = synopsis
completedMessage = completedMessage

PARAMETER
{
type = VesselParameterGroup

duration = 10d 2h

PARAMETER
{
type = ReachSpecificOrbit
index = 0
}
}

PARAMETER
{
type = ReachSpecificOrbit
index = 1
}

BEHAVIOUR
{
type = OrbitGenerator

// Use this to generate an orbit with specific parameters
FIXED_ORBIT
{
// Actual orbit details. Note that REF represents the reference
// body - but will be overriden by the targetBody.
ORBIT
{
SMA = 1449999.99996286
ECC = 1.07570816555399E-05
INC = 0
LPE = 270.690311604893
LAN = 1.93635924563296
MNA = 1.55872660382504
EPH = 31.3999999999994
REF = 1
}
}

RANDOM_ORBIT
{
type = KOLNIYA
}

RANDOM_ORBIT
{
type = POLAR
}

RANDOM_ORBIT
{
type = TUNDRA
}
}
}
28 changes: 28 additions & 0 deletions test/Behaviour/SpawnPassengers.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
// Contract for behaviour test
CONTRACT_TYPE
{
// Unique name of the contract (required)
name = TestBehaviour_SpawnPassengers

group = BehaviourTest
maxSimultaneous = 1
targetBody = Kerbin

// Contract text
title = SpawnPassengers Behaviour
description = description
synopsis = synopsis
completedMessage = completedMessage

PARAMETER
{
type = HasPassengers
}

BEHAVIOUR
{
type = SpawnPassengers

count = 10
}
}
File renamed without changes.
102 changes: 102 additions & 0 deletions test/Behaviour/WaypointGenerator.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// Contract for behaviour test
CONTRACT_TYPE
{
// Unique name of the contract (required)
name = TestBehaviour_WaypointGenerator

group = BehaviourTest
maxSimultaneous = 1
targetBody = Kerbin

// Contract text
title = WaypointGenerator Behaviour
description = description
synopsis = synopsis
completedMessage = completedMessage

PARAMETER
{
type = VisitWaypoint

index = 0
disableOnStateChange = false
}

PARAMETER
{
type = VisitWaypoint

index = 1
}

PARAMETER
{
type = VisitWaypoint

index = 2
}

BEHAVIOUR
{
type = WaypointGenerator

// Use this to generate a waypoint with fixed coordinates
WAYPOINT
{
name = Kerbal Space Center

icon = thermometer
altitude = 0.0
latitude = -0.102668048654
longitude = -74.5753856554
}

// Use this to generate a waypoint relative to a PQS City
PQS_CITY
{
name = LaunchPad

icon = thermometer
altitude = 0.0
pqsCity = KSC
pqsOffset = 447.307865750742, 5.14341771520321E-05, 24.9700656982985
parameter = VisitWaypoint1
}

// Use this to generate a waypoint with random coordinates
RANDOM_WAYPOINT
{
name = A waypoint on Kerbin

count = 1
icon = thermometer
altitude = 0.0
waterAllowed = false
forceEquatorial = false
}

// Use this to generate a waypoint with random coordinates, but near
// another waypoint.
RANDOM_WAYPOINT_NEAR
{
name = A random waypoint near

count = Random(2,5)
icon = thermometer
altitude = 0.0
waterAllowed = false
nearIndex = 2
minDistance = 500.0
maxDistance = 25000.0
}

RANDOM_WAYPOINT
{
name = An underwater waypoint

count = 1
icon = thermometer
underwater = true
}
}
}
Loading

0 comments on commit ee202f6

Please sign in to comment.