Skip to content

Commit

Permalink
Some typos and improvments found during testing #31
Browse files Browse the repository at this point in the history
  • Loading branch information
N3h3miah committed Jan 1, 2015
1 parent 226534a commit 6651098
Show file tree
Hide file tree
Showing 9 changed files with 35 additions and 9 deletions.
2 changes: 1 addition & 1 deletion GameData/NehemiahInc/Parts/KEES/Experiment/ODC.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PART

title = KEES Orbital Debris Collector
manufacturer = Nehemiah Engineering
description = The objective of the Orbital Debris Collector (ODC) experiment is to capture hypervelocity orbital debris and natural micrometeoroid particles in such a fashion so that they can be returned to Kerbin and can be analyzed to determine their compositions.
description = The objective of the Orbital Debris Collector (ODC) experiment is to capture hypervelocity orbital debris and natural micrometeoroid particles in such a fashion so that they can be returned to Kerbin and can be analyzed to determine their compositions. This experiment must be stored on a KEES Passive Experiment Carrier (PEC) to run.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision, allowDock, allowRotate
attachRules = 1,0,0,0,0
Expand Down
2 changes: 1 addition & 1 deletion GameData/NehemiahInc/Parts/KEES/Experiment/POSA1.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PART

title = KEES Passive Optical Sample Assemblies I
manufacturer = Nehemiah Engineering
description = The objective of the Passive Optical Sample Assembly I (POSA I) experiment is to assess the magnitude of molecular contamination on critical surfaces of Space Stations and to quantify the performance and degradation rate of potential exterior surface materials for future space stations.
description = The objective of the Passive Optical Sample Assembly I (POSA I) experiment is to assess the magnitude of molecular contamination on critical surfaces of Space Stations and to quantify the performance and degradation rate of potential exterior surface materials for future space stations. This experiment must be stored on a KEES Passive Experiment Carrier (PEC) to run.
// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision, allowDock, allowRotate
attachRules = 1,0,0,0,0
mass = 0.1
Expand Down
2 changes: 1 addition & 1 deletion GameData/NehemiahInc/Parts/KEES/Experiment/POSA2.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PART

title = KEES Passive Optical Sample Assemblies II
manufacturer = Nehemiah Engineering
description = The objective of the Passive Optical Sample Assembly I (POSA I) experiment is to assess the magnitude of molecular contamination on critical surfaces of Space Stations and to quantify the performance and degradation rate of potential exterior surface materials for future space stations.
description = The objective of the Passive Optical Sample Assembly I (POSA I) experiment is to assess the magnitude of molecular contamination on critical surfaces of Space Stations and to quantify the performance and degradation rate of potential exterior surface materials for future space stations. This experiment must be stored on a KEES Passive Experiment Carrier (PEC) to run.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision, allowDock, allowRotate
attachRules = 1,0,0,0,0
Expand Down
2 changes: 1 addition & 1 deletion GameData/NehemiahInc/Parts/KEES/Experiment/PPMD.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PART

title = KEES Polished Plate Micrometeoroid and Debris
manufacturer = Nehemiah Engineering
description = The objective of the Polished Plate Micrometeoroid and Debris (PPMD) experiment is to assess and to characterize the natural micrometeoroid and the man-made debris environments in orbit.
description = The objective of the Polished Plate Micrometeoroid and Debris (PPMD) experiment is to assess and to characterize the natural micrometeoroid and the man-made debris environments in orbit. This experiment must be stored on a KEES Passive Experiment Carrier (PEC) to run.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision, allowDock, allowRotate
attachRules = 1,1,0,0,0
Expand Down
4 changes: 2 additions & 2 deletions GameData/NehemiahInc/Parts/KEES/PEC/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ PART
category = Science
subcategory = 0

title = KEES Passive Experiment Carrier (KEES PEC)
title = KEES Passive Experiment Carrier
manufacturer = Nehemiah Engineering
description = Experiment carrer that can be attached on the outside of a space craft in space and does hold the experiment.
description = An Experiment carrer that can be attached on the outside of a space craft in space and does hold the experiment.

// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision, allowDock, allowRotate
attachRules = 1,1,1,0,0
Expand Down
2 changes: 1 addition & 1 deletion GameData/NehemiahInc/Parts/KEES/PayloadCarrier/part.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ PART

title = KEES Payload Carrier
manufacturer = Nehemiah Engineering
description = Transport container for the KEES PEC and the KEES Experiments
description = Transport container for the KEES PEC and the KEES Experiments.

attachRules = 1,0,1,1,0
mass = 0.1
Expand Down
2 changes: 1 addition & 1 deletion GameData/NehemiahInc/Resources/Experiments.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ EXPERIMENT_DEFINITION

RESULTS
{
default = There are many track from high velocity impacts in the gel but there are also several shallow pit. Those pits confuse Wernher Von Kerman and his team.
default = There are many tracks from high velocity impacts in the gel but there are also several shallow pits. Those pits confuse Wernher Von Kerman and his team.
}
}

Expand Down
Binary file added GameData/OrbitalMaterialScience_0.5.zip
Binary file not shown.
28 changes: 27 additions & 1 deletion Plugin/NE Science/KEESExperimentContract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,39 @@ private int activeContracts(String experimentPartName = null, CelestialBody body
return ret;
}

private int activeAndDoneContracts(String experimentPartName = null, CelestialBody body = null)
{
int ret = 0;
if (ContractSystem.Instance == null)
{
return 0;
}
if (ContractSystem.Instance.Contracts == null)
{
return 0;
}
foreach (Contract con in ContractSystem.Instance.Contracts)
{
KEESExperimentContract keesCon = con as KEESExperimentContract;
if (keesCon != null && (keesCon.ContractState == Contract.State.Active ||
keesCon.ContractState == Contract.State.Offered ||
keesCon.ContractState == Contract.State.Completed) &&
(experimentPartName == null || keesCon.experiment != null) &&
(body == null || keesCon.targetBody != null) &&
((experimentPartName == null || experimentPartName == keesCon.experiment.getPartName()) &&
(body == null || body.theName == keesCon.targetBody.theName)))
ret += 1;
}
return ret;
}

private Experiment getTargetExperiment()
{
List<Experiment> unlockedExperiments = getUnlookedKEESExperiments();
List<Experiment> unlookedNoContract = new List<Experiment>();
foreach (Experiment exp in unlockedExperiments)
{
if (activeContracts(exp.getPartName(), targetBody) == 0)
if (activeAndDoneContracts(exp.getPartName(), targetBody) == 0)
{
unlookedNoContract.Add(exp);
}
Expand Down

0 comments on commit 6651098

Please sign in to comment.