Open yalov opened 4 years ago
This will require rewriting the contract, because with various mods there are now multiple labs with 6 crew possible
these changes could work (I didn't test it)
DATA
{
type = Vessel
uniquenessCheck = CONTRACT_ACTIVE
requiredValue = true
targetVessel1 = AllVessels().Where(v => v.Parts().Any(p => p.Modules().Contains(ModuleScienceLab)) == false && v.VesselType() == Station && v.CrewCount() > 0).Random()
title = Must have a station without a ScienceLab Module
}
PARAMETER
{
name = PartValidation
type = PartValidation
title = Launch a new ScienceLab Module to @/targetVessel1 .
VALIDATE
{
partModule = ModuleScienceLab
}
}
Problem: a contract "Add a Mobile Processing Lab MPL-LG-2 to the Station" is created for a station with the MPL-LG-6 (from the ScienceLabInfo mod)
https://github.com/linuxgurugamer/KerbinSpaceStation/blob/d7ed30d93f0ea201a66cf2edebff9527f7d64a82/GameData/ContractPacks/KerbinSpaceStation/StationMissions/ModuleScienceLab.cfg#L29-L36
https://github.com/linuxgurugamer/KerbinSpaceStation/blob/d7ed30d93f0ea201a66cf2edebff9527f7d64a82/GameData/ContractPacks/KerbinSpaceStation/StationMissions/ModuleScienceLab.cfg#L47-L56
Instead of checking for Large_Crewed_Lab I belive it's better to check for a ModuleScienceLab
UPD. another possibility is adding Large_Crewed_Lab_6, if a checking for the module is too scary performance wise