diff --git a/DeepFreeze.zip b/DeepFreeze.zip index cb2f67e..3495a74 100644 Binary files a/DeepFreeze.zip and b/DeepFreeze.zip differ diff --git a/GameData/REPOSoftTech/Agencies/REPOSoftTech.png b/GameData/REPOSoftTech/Agencies/REPOSoftTech.png index 27c9b63..d9d5c77 100644 Binary files a/GameData/REPOSoftTech/Agencies/REPOSoftTech.png and b/GameData/REPOSoftTech/Agencies/REPOSoftTech.png differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY-0300Freezer.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/CRY-0300Freezer.mu similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY-0300Freezer.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/CRY-0300Freezer.mu diff --git a/GameData/REPOSoftTech/DeepFreeze/Assets/CRY-0300RFreezer.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/CRY-0300RFreezer.mu new file mode 100644 index 0000000..72a2973 Binary files /dev/null and b/GameData/REPOSoftTech/DeepFreeze/Assets/CRY-0300RFreezer.mu differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300_bump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/CRY0300_bump_NRM.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300_bump_NRM.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/CRY0300_bump_NRM.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300_color.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/CRY0300_color.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300_color.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/CRY0300_color.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/CRY2300IVA_color.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/CRY2300IVA_color.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/CRY2300IVA_color.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/CRY2300IVA_color.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/Cry-0300Internals.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-0300Internals.mu similarity index 65% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/Cry-0300Internals.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/Cry-0300Internals.mu index 4083540..f081df1 100644 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/Cry-0300Internals.mu and b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-0300Internals.mu differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-0300RInternals.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-0300RInternals.mu new file mode 100644 index 0000000..0f5ecb8 Binary files /dev/null and b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-0300RInternals.mu differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/Cry-1300Freezer.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-1300Freezer.mu similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/Cry-1300Freezer.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/Cry-1300Freezer.mu diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/Cry-1300Internals.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-1300Internals.mu similarity index 69% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/Cry-1300Internals.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/Cry-1300Internals.mu index 11209c8..bb91074 100644 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/Cry-1300Internals.mu and b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-1300Internals.mu differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/Cry-2300Internals.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-2300Internals.mu similarity index 58% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/Cry-2300Internals.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/Cry-2300Internals.mu index 8fcb3ae..8e4ed18 100644 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/Cry-2300Internals.mu and b/GameData/REPOSoftTech/DeepFreeze/Assets/Cry-2300Internals.mu differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CryopodCushionColor.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/CryopodCushionColor.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CryopodCushionColor.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/CryopodCushionColor.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CryopodTexture.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/CryopodTexture.dds similarity index 86% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CryopodTexture.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/CryopodTexture.dds index 532a32e..f42c171 100644 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CryopodTexture.dds and b/GameData/REPOSoftTech/DeepFreeze/Assets/CryopodTexture.dds differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolRadialTank.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/GlykerolRadialTank.mu similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolRadialTank.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/GlykerolRadialTank.mu diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolTank_diff.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/GlykerolTank_diff.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolTank_diff.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/GlykerolTank_diff.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Assets/RadialCryopodTexture.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/RadialCryopodTexture.dds new file mode 100644 index 0000000..36c48bc Binary files /dev/null and b/GameData/REPOSoftTech/DeepFreeze/Assets/RadialCryopodTexture.dds differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/cornerBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/cornerBump_NRM.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/cornerBump_NRM.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/cornerBump_NRM.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/cornerColor.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/cornerColor.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/cornerColor.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/cornerColor.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/hitchhikerIVAcolor.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/hitchhikerIVAcolor.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/hitchhikerIVAcolor.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/hitchhikerIVAcolor.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model.mu b/GameData/REPOSoftTech/DeepFreeze/Assets/model.mu similarity index 99% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model.mu rename to GameData/REPOSoftTech/DeepFreeze/Assets/model.mu index aa9c6bd..23ea3cd 100644 Binary files a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model.mu and b/GameData/REPOSoftTech/DeepFreeze/Assets/model.mu differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/model000.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/model000.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/model000.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/model000.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/model001_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/model001_NRM.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/model001_NRM.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/model001_NRM.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/tubesBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/tubesBump_NRM.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/tubesBump_NRM.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/tubesBump_NRM.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/tubesColor.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/tubesColor.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/tubesColor.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/tubesColor.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/wallTextureBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/wallTextureBump_NRM.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/wallTextureBump_NRM.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/wallTextureBump_NRM.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/wallTextureColor.dds b/GameData/REPOSoftTech/DeepFreeze/Assets/wallTextureColor.dds similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/wallTextureColor.dds rename to GameData/REPOSoftTech/DeepFreeze/Assets/wallTextureColor.dds diff --git a/GameData/REPOSoftTech/DeepFreeze/DeepFreezeContinued.version b/GameData/REPOSoftTech/DeepFreeze/DeepFreezeContinued.version index 188afe8..5cf1802 100644 --- a/GameData/REPOSoftTech/DeepFreeze/DeepFreezeContinued.version +++ b/GameData/REPOSoftTech/DeepFreeze/DeepFreezeContinued.version @@ -2,8 +2,8 @@ "NAME":"DeepFreeze Continued...", "URL":"http://ksp-avc.cybutek.net/version.php?id=183", "DOWNLOAD":"https://kerbalstuff.com/mod/895/DeepFreeze%20Continued...", -"VERSION":{"MAJOR":0,"MINOR":19,"PATCH":3,"BUILD":0}, +"VERSION":{"MAJOR":0,"MINOR":20,"PATCH":0,"BUILD":0}, "KSP_VERSION":{"MAJOR":1,"MINOR":0,"PATCH":5}, -"KSP_VERSION_MIN":{"MAJOR":1,"MINOR":0,"PATCH":0}, +"KSP_VERSION_MIN":{"MAJOR":1,"MINOR":0,"PATCH":3}, "KSP_VERSION_MAX":{"MAJOR":1,"MINOR":0,"PATCH":5} } \ No newline at end of file diff --git a/GameData/REPOSoftTech/DeepFreeze/MMDeepFreezeCLS.cfg b/GameData/REPOSoftTech/DeepFreeze/MMDeepFreezeCLS.cfg index 2bc2958..9e59a84 100644 --- a/GameData/REPOSoftTech/DeepFreeze/MMDeepFreezeCLS.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/MMDeepFreezeCLS.cfg @@ -1,4 +1,4 @@ -@PART[cryofreezer]:HAS[!MODULE[ModuleConnectedLivingSpace]] +@PART[cryofreezer]:HAS[!MODULE[ModuleConnectedLivingSpace]]:NEEDS[ConnectedLivingSpace] { MODULE { @@ -7,7 +7,7 @@ } } -@PART[CRY-2300Freezer]:HAS[!MODULE[ModuleConnectedLivingSpace]] +@PART[CRY-2300Freezer]:HAS[!MODULE[ModuleConnectedLivingSpace]]:NEEDS[ConnectedLivingSpace] { MODULE { @@ -16,7 +16,7 @@ } } -@PART[CRY-1300Freezer]:HAS[!MODULE[ModuleConnectedLivingSpace]] +@PART[CRY-1300Freezer]:HAS[!MODULE[ModuleConnectedLivingSpace]]:NEEDS[ConnectedLivingSpace] { MODULE { @@ -25,7 +25,15 @@ } } -@PART[CRY-0300Freezer]:HAS[!MODULE[ModuleConnectedLivingSpace]] +@PART[CRY-0300Freezer]:HAS[!MODULE[ModuleConnectedLivingSpace]]:NEEDS[ConnectedLivingSpace] +{ + MODULE + { + name = ModuleConnectedLivingSpace + passable = false + } +} +@PART[CRY-0300RFreezer]:HAS[!MODULE[ModuleConnectedLivingSpace]]:NEEDS[ConnectedLivingSpace] { MODULE { diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300Freezer.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300Freezer.cfg similarity index 81% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300Freezer.cfg rename to GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300Freezer.cfg index ab9a3b4..5de0f5b 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300Freezer.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300Freezer.cfg @@ -2,13 +2,15 @@ PART { name = CRY-0300Freezer module = Part - author = NovaSilisko,JPLRepo - //mesh = CRY-0300Freezer.mu + author = JPLRepo scale = 1 rescaleFactor = 1 MODEL { - model = REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY-0300Freezer + model = REPOSoftTech/DeepFreeze/Assets/CRY-0300Freezer + texture = CRY0300_color, REPOSoftTech/DeepFreeze/Assets/CRY0300_color + texture = CRY0300_bump_NRM, REPOSoftTech/DeepFreeze/Assets/CRY0300_bump_NRM + texture = CryopodCushionColor, REPOSoftTech/DeepFreeze/Assets/CryopodCushionColor } node_stack_bottom = 0.0, -0.9133, 0.0, 0.0, -1.0, 0.0, 1 diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RFreezer.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RFreezer.cfg new file mode 100644 index 0000000..3245806 --- /dev/null +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RFreezer.cfg @@ -0,0 +1,63 @@ +PART +{ + name = CRY-0300RFreezer + module = Part + author = JPLRepo + //mesh = CRY-0300Freezer.mu + scale = 1 + rescaleFactor = 1 + MODEL + { + model = REPOSoftTech/DeepFreeze/Assets/CRY-0300RFreezer + texture = CryopodTexture, REPOSoftTech/DeepFreeze/Assets/CryopodTexture + texture = RadialCryopodTexture, REPOSoftTech/DeepFreeze/Assets/RadialCryopodTexture + } + + //node_attach = 0.0, 0.0, 0.312, 0.0, 0.0, -1.0 + node_attach = 0.0, 0.0, 0.352, 0.0, 0.0, -1.0 + node_stack_top = 0.0, 0.667, 0.0, 0.0, 1.0, 0.0, 0 + TechRequired = spaceExploration + entryCost = 8000 + cost = 4000 + category = Utility + subcategory = 0 + title = CRY-0300R Cryonic Freezing Chamber + manufacturer = REPOSoftTech + description = Designed for long term storage of 1 kerbal. The CRY-0300R uses Glykerol and ElectricCharge to freeze or thaw one Kerbal. +Please ensure you have enough ElectricCharge capacity on your ship. The CRY-0300R comes stocked with 10 units of Glykerol. +CAUTION: The CRY-0300R also requires ElectricCharge per minute per Kerbal to keep it's Monitoring Systems Functioning. If it cannot get this ElectricCharge +there is a risk of frozen Kerbals dying. + attachRules = 1,1,0,1,1 + mass = 0.75 + dragModelType = default + maximum_drag = 0.20 + minimum_drag = 0.15 + angularDrag = 2 + crashTolerance = 8 + maxTemp = 2000 // = 3400 + vesselType = Ship + CrewCapacity = 1 + bulkheadProfiles = size1 + INTERNAL + { + name = Cry-0300RInternals + } + RESOURCE + { + name = Glykerol + amount = 10 + maxAmount = 10 + } + MODULE + { + name = DeepFreezer + FreezerSize = 1 + ChargeRequired = 3000 + GlykerolRequired = 5 + ChargeRate = 30 + FrznChargeRequired = 10 + isPartAnimated = False + isPodExternal = True + cryopodstateclosedstring = True + } +} diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300RPMInternalsMM.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RPMInternalsMM.cfg similarity index 100% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo0300Freezer/CRY0300RPMInternalsMM.cfg rename to GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RPMInternalsMM.cfg diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RRPMInternalsMM.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RRPMInternalsMM.cfg new file mode 100644 index 0000000..37cf022 --- /dev/null +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY0300RRPMInternalsMM.cfg @@ -0,0 +1,8 @@ +@PART[CRY-0300RFreezer]:FOR[DeepFreeze]:NEEDS[RasterPropMonitor] +{ +@MODULE[DeepFreezer] + MODULE + { + name = JSITransparentPod + } +} \ No newline at end of file diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/CRY1300Freezer.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY1300Freezer.cfg similarity index 88% rename from GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/CRY1300Freezer.cfg rename to GameData/REPOSoftTech/DeepFreeze/Parts/CRY1300Freezer.cfg index 109ac39..d4d02b5 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/CRY1300Freezer.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY1300Freezer.cfg @@ -3,11 +3,12 @@ PART name = CRY-1300Freezer module = Part author = JPLRepo - //mesh = Cry-1300Freezer.mu rescaleFactor = 1 MODEL { - model = REPOSoftTech/DeepFreeze/Parts/Cryo1300Freezer/Cry-1300Freezer + model = REPOSoftTech/DeepFreeze/Assets/Cry-1300Freezer + texture = model000, REPOSoftTech/DeepFreeze/Assets/model000 + texture = model001_NRM, REPOSoftTech/DeepFreeze/Assets/model001_NRM } node_stack_top = 0.0, 0.986899, 0.0, 0.0, 1.0, 0.0, 2 node_stack_bottom = 0.0, -0.986899, 0.0, 0.0, -1.0, 0.0, 2 diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/CRY2300Freezer.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY2300Freezer.cfg new file mode 100644 index 0000000..c7399ad --- /dev/null +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY2300Freezer.cfg @@ -0,0 +1,64 @@ +PART +{ + name = CRY-2300Freezer + module = Part + author = ScottPaladin, JPLRepo + rescaleFactor = 1 + MODEL + { + model = REPOSoftTech/DeepFreeze/Assets/model + texture = model000, REPOSoftTech/DeepFreeze/Assets/model000 + texture = model001, REPOSoftTech/DeepFreeze/Assets/model001_NRM + } + node_stack_top = 0.0, 1.830905, 0.0, 0.0, 1.0, 0.0, 2 + node_stack_bottom = 0.0, -1.830905, 0.0, 0.0, -1.0, 0.0, 2 + + CrewCapacity = 10 + TechRequired = advMetalworks + entryCost = 16000 + cost = 8000 + category = Utility + subcategory = 0 + title = CRY-2300 Cryonic Freezing Chamber + manufacturer = REPOSoftTech + description = Designed for long term storage of up to 10 Kerbals. The CRY-2300 uses Glykerol and ElectricCharge to freeze or thaw one Kerbal. +Please ensure you have enough ElectricCharge capacity on your ship. The CRY-2300 comes stocked with 50 units of Glykerol. +CAUTION: The CRY-2300 also requires ElectricCharge per minute per Kerbal to keep it's Monitoring Systems Functioning. If it cannot get this ElectricCharge +there is a risk of frozen Kerbals dying. + + attachRules = 1,0,1,1,0 + + mass = 5.25 + dragModelType = default + maximum_drag = 0.2 + minimum_drag = 0.3 + angularDrag = 2 + crashTolerance = 6 + breakingForce = 200 + breakingTorque = 200 + maxTemp = 2900 + + vesselType = Ship + bulkheadProfiles = size2 + INTERNAL + { + name = Cry-2300Internals + } + RESOURCE + { + name = Glykerol + amount = 50 + maxAmount = 50 + } + MODULE + { + name = DeepFreezer + FreezerSize = 10 + ChargeRequired = 3000 + GlykerolRequired = 5 + ChargeRate = 30 + FrznChargeRequired = 10 + isPartAnimated = True + cryopodstateclosedstring = True, True, True, True, True, True, True, True, True, True + } +} diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/CRY2300partDepricated.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY2300partDepricated.cfg new file mode 100644 index 0000000..b3e0ebb --- /dev/null +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/CRY2300partDepricated.cfg @@ -0,0 +1,8 @@ +PART[CRY-2300Freezer] +{ + @name = cryofreezer + @TechRequired = hidden + @category = -1 + @title ^= :$: [DEPRECATED]: + @description = REPOSoftTech has Deprecated this Duplicate Part Definition. CONVERT CRAFT to use NEW CRY-2300 part AND DELETE this one. REPOSoftTech_DEPRECATED +} \ No newline at end of file diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/CRY2300Freezer.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/CRY2300Freezer.cfg deleted file mode 100644 index a867b3c..0000000 --- a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/CRY2300Freezer.cfg +++ /dev/null @@ -1,63 +0,0 @@ -PART -{ -name = CRY-2300Freezer -module = Part -author = ScottPaladin, JPLRepo - -//mesh = model -rescaleFactor = 1 -MODEL - { - model = REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model - } -node_stack_top = 0.0, 1.830905, 0.0, 0.0, 1.0, 0.0, 2 -node_stack_bottom = 0.0, -1.830905, 0.0, 0.0, -1.0, 0.0, 2 - -CrewCapacity = 10 -TechRequired = advMetalworks -entryCost = 16000 -cost = 8000 -category = Utility -subcategory = 0 -title = CRY-2300 Cryonic Freezing Chamber -manufacturer = REPOSoftTech -description = Designed for long term storage of up to 10 Kerbals. The CRY-2300 uses Glykerol and ElectricCharge to freeze or thaw one Kerbal. -Please ensure you have enough ElectricCharge capacity on your ship. The CRY-2300 comes stocked with 50 units of Glykerol. -CAUTION: The CRY-2300 also requires ElectricCharge per minute per Kerbal to keep it's Monitoring Systems Functioning. If it cannot get this ElectricCharge -there is a risk of frozen Kerbals dying. - -attachRules = 1,0,1,1,0 - -mass = 5.25 -dragModelType = default -maximum_drag = 0.2 -minimum_drag = 0.3 -angularDrag = 2 -crashTolerance = 6 -breakingForce = 200 -breakingTorque = 200 -maxTemp = 2900 - -vesselType = Ship -INTERNAL - { - name = Cry-2300Internals - } -RESOURCE - { - name = Glykerol - amount = 50 - maxAmount = 50 - } -MODULE - { - name = DeepFreezer - FreezerSize = 10 - ChargeRequired = 3000 - GlykerolRequired = 5 - ChargeRate = 30 - FrznChargeRequired = 10 - isPartAnimated = True - cryopodstateclosedstring = True, True, True, True, True, True, True, True, True, True - } -} diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model000.dds b/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model000.dds deleted file mode 100644 index 7777fb9..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model000.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model001.dds b/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model001.dds deleted file mode 100644 index c030437..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model001.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/partDepricated.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/partDepricated.cfg deleted file mode 100644 index 02f955c..0000000 --- a/GameData/REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/partDepricated.cfg +++ /dev/null @@ -1,60 +0,0 @@ -PART -{ -name = cryofreezer -module = Part -author = ScottPaladin, JPLRepo - -//mesh = model -rescaleFactor = 1 -MODEL - { - model = REPOSoftTech/DeepFreeze/Parts/Cryo2300Freezer/model - } -node_stack_top = 0.0, 1.830905, 0.0, 0.0, 1.0, 0.0, 2 -node_stack_bottom = 0.0, -1.830905, 0.0, 0.0, -1.0, 0.0, 2 - -CrewCapacity = 10 -TechRequired = hidden -entryCost = 16000 -cost = 8000 -category = -1 -subcategory = 0 -title = CRY-2300 Cryonic Freezing Chamber [DEPRECATED] -manufacturer = REPOSoftTech -description = REPOSoftTech has Deprecated this Duplicate Part Definition. CONVERT CRAFT to use NEW CRY-2300 part AND DELETE this one. REPOSoftTech_DEPRECATED - -attachRules = 1,0,1,1,0 - -mass = 5.25 -dragModelType = default -maximum_drag = 0.2 -minimum_drag = 0.3 -angularDrag = 2 -crashTolerance = 6 -breakingForce = 200 -breakingTorque = 200 -maxTemp = 2900 - -vesselType = Ship -INTERNAL -{ - name = Cry-2300Internals -} -RESOURCE -{ - name = Glykerol - amount = 50 - maxAmount = 50 -} -MODULE -{ - name = DeepFreezer - FreezerSize = 10 - ChargeRequired = 3000 - GlykerolRequired = 5 - ChargeRate = 30 - FrznChargeRequired = 10 - isPartAnimated = True -} - -} diff --git a/GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolRadialTank.cfg b/GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolRadialTank.cfg similarity index 84% rename from GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolRadialTank.cfg rename to GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolRadialTank.cfg index 223c980..1701371 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolRadialTank.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Parts/GlykerolRadialTank.cfg @@ -3,11 +3,11 @@ PART name = GlykerolTankRadial module = Part author = JPLRepo - //mesh = GlykerolRadialTank.mu rescaleFactor = 1 MODEL { - model = REPOSoftTech/DeepFreeze/Parts/GlykerolTankRadial/GlykerolRadialTank + model = REPOSoftTech/DeepFreeze/Assets/GlykerolRadialTank + texture = GlykerolTank_diff, REPOSoftTech/DeepFreeze/Assets/GlykerolTank_diff } node_attach = 0.0, 0.0, -0.12, 0.0, 0.0, -1.0 TechRequired = specializedConstruction diff --git a/GameData/REPOSoftTech/DeepFreeze/Plugins/Config.cfg b/GameData/REPOSoftTech/DeepFreeze/Plugins/Config.cfg index 5f6dae0..637c668 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Plugins/Config.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Plugins/Config.cfg @@ -19,7 +19,7 @@ DFSettings heatamtMonitoringFrznKerbals = 100 heatamtThawFreezeKerbal = 1000 TempinKelvin = True - defaultTimeoutforCrewXfer = 30 + defaultTimeoutforCrewXfer = 10 cryopodResettimeDelay = 3 DFWindowWidth = 450 CFWindowWidth = 340 diff --git a/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll b/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll index 7366fdf..df1fa5e 100644 Binary files a/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll and b/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll.mdb b/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll.mdb new file mode 100644 index 0000000..9c9bf87 Binary files /dev/null and b/GameData/REPOSoftTech/DeepFreeze/Plugins/DeepFreeze.dll.mdb differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Props/DoorHandle.cfg b/GameData/REPOSoftTech/DeepFreeze/Props/DoorHandle.cfg index 2a6b3b1..5362fce 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Props/DoorHandle.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Props/DoorHandle.cfg @@ -10,7 +10,7 @@ PROP texture = propLabels_DIF, REPOSoftTech/DeepFreeze/Props/propLabels_DIF texture = propLabels_EMI, REPOSoftTech/DeepFreeze/Props/propLabels_EMI } - MODULE + MODULE:NEEDS[JSI] { name = JSIActionGroupSwitch actionName = plugin @@ -29,7 +29,7 @@ PROP stateMethod = ButtonExtDoorState } } - MODULE + MODULE:NEEDS[JSI] { name = JSIActionGroupSwitch actionName = plugin @@ -45,7 +45,7 @@ PROP stateMethod = ButtonExtDoorState } } - MODULE + MODULE:NEEDS[JSI] { name = JSIActionGroupSwitch actionName = plugin diff --git a/GameData/REPOSoftTech/DeepFreeze/Props/ElectricGaugeBar.cfg b/GameData/REPOSoftTech/DeepFreeze/Props/ElectricGaugeBar.cfg index 65b18a9..e31889f 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Props/ElectricGaugeBar.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Props/ElectricGaugeBar.cfg @@ -10,7 +10,7 @@ PROP texture = propLabels_DIF, REPOSoftTech/DeepFreeze/Props/propLabels_DIF texture = propLabels_EMI, REPOSoftTech/DeepFreeze/Props/propLabels_EMI } - MODULE + MODULE:NEEDS[JSI] { name = JSIVariableAnimator refreshRate = 2 @@ -32,7 +32,7 @@ PROP } } - MODULE + MODULE:NEEDS[JSI] { name = JSISwitchableVariableLabel labelTransform = gaugeDisplay @@ -51,7 +51,7 @@ PROP } } - MODULE + MODULE:NEEDS[JSI] { name = JSIPropTextureShift transformToShift = flatBarLabel diff --git a/GameData/REPOSoftTech/DeepFreeze/Props/GykerolGaugeBar.cfg b/GameData/REPOSoftTech/DeepFreeze/Props/GykerolGaugeBar.cfg index 0dc30e0..96a5980 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Props/GykerolGaugeBar.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Props/GykerolGaugeBar.cfg @@ -10,7 +10,7 @@ PROP texture = propLabels_DIF, REPOSoftTech/DeepFreeze/Props/propLabels_DIF texture = propLabels_EMI, REPOSoftTech/DeepFreeze/Props/propLabels_EMI } - MODULE + MODULE:NEEDS[JSI] { name = JSIVariableAnimator refreshRate = 2 @@ -32,7 +32,7 @@ PROP } } - MODULE + MODULE:NEEDS[JSI] { name = JSISwitchableVariableLabel labelTransform = gaugeDisplay @@ -51,7 +51,7 @@ PROP } } - MODULE + MODULE:NEEDS[JSI] { name = JSIPropTextureShift transformToShift = flatBarLabel diff --git a/GameData/REPOSoftTech/DeepFreeze/Props/LightSwitch.cfg b/GameData/REPOSoftTech/DeepFreeze/Props/LightSwitch.cfg index 4a36147..d3913a3 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Props/LightSwitch.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Props/LightSwitch.cfg @@ -8,7 +8,7 @@ PROP texture = propBase_DIF, REPOSoftTech/DeepFreeze/Props/propBase_DIF texture = propBase_EMI, REPOSoftTech/DeepFreeze/Props/propBase_EMI } - MODULE + MODULE:NEEDS[JSI] { name = JSIActionGroupSwitch actionName = intlight @@ -22,7 +22,7 @@ PROP switchSound = Squad/Sounds/sound_click_flick switchTransform = COL_flipSwitch } - MODULE + MODULE:NEEDS[JSI] { name = JSIActionGroupSwitch actionName = intlight diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CRY0300_bump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CRY0300_bump_NRM.dds deleted file mode 100644 index 9e070db..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CRY0300_bump_NRM.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CRY0300_color.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CRY0300_color.dds deleted file mode 100644 index b70db05..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CRY0300_color.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CryopodCushionColor.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CryopodCushionColor.dds deleted file mode 100644 index 568fac2..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/CryopodCushionColor.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Rinternal.cfg b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Rinternal.cfg new file mode 100644 index 0000000..c42d0c2 --- /dev/null +++ b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Rinternal.cfg @@ -0,0 +1,38 @@ +INTERNAL +{ + name = Cry-0300RInternals + MODEL + { + model = REPOSoftTech/DeepFreeze/Assets/Cry-0300RInternals + texture = CryopodTexture, REPOSoftTech/DeepFreeze/Assets/CryopodTexture + texture = RadialCryopodTexture, REPOSoftTech/DeepFreeze/Assets/RadialCryopodTexture + } + MODULE + { + name = InternalSeat + seatTransformName = Seat1 + portraitCameraName = Cam1 + allowCrewHelmet = true + } + PROP + { + name = LightSwitch + position = -0.2714,0.1222,-0.045 + rotation = 0.6927769,0.7209744,0.01291895,-0.00944356 + scale = 1,0.9999998,1 + } + PROP + { + name = DFElectricGaugeBar + position = -0.2877,0.04359996,-0.0579 + rotation = -0.507728,-0.4664451,-0.5165215,-0.5077864 + scale = 0.9999998,0.9999998,1 + } + PROP + { + name = DFGlykerolGaugeBar + position = -0.2899,0.04209995,-0.0103 + rotation = 0.4810322,0.4739458,0.5363787,0.5062423 + scale = 0.9999998,0.9999998,1 + } +} diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/internal.cfg b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300internal.cfg similarity index 57% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/internal.cfg rename to GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300internal.cfg index 3ffc5e6..d90c8c7 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/internal.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-0300internal.cfg @@ -3,7 +3,14 @@ INTERNAL name = Cry-0300Internals MODEL { - model = REPOSoftTech/DeepFreeze/Spaces/Cry-0300Internals/Cry-0300Internals + model = REPOSoftTech/DeepFreeze/Assets/Cry-0300Internals + texture = CryopodCushionColor, REPOSoftTech/DeepFreeze/Assets/CryopodCushionColor + texture = CryopodTexture, REPOSoftTech/DeepFreeze/Assets/CryopodTexture + texture = hitchhikerIVAcolor, REPOSoftTech/DeepFreeze/Assets/hitchhikerIVAcolor + texture = tubesColor, REPOSoftTech/DeepFreeze/Assets/tubesColor + texture = TubesBump_NRM, REPOSoftTech/DeepFreeze/Assets/TubesBump_NRM + texture = CRY0300_color, REPOSoftTech/DeepFreeze/Assets/CRY0300_color + texture = CRY0300_bump_NRM, REPOSoftTech/DeepFreeze/Assets/CRY0300_bump_NRM } MODULE { diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/CryopodTexture.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/CryopodTexture.dds deleted file mode 100644 index 532a32e..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/CryopodTexture.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/hitchhikerIVAcolor.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/hitchhikerIVAcolor.dds deleted file mode 100644 index 7d88fc7..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/hitchhikerIVAcolor.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/tubesBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/tubesBump_NRM.dds deleted file mode 100644 index 81ca2bd..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/tubesBump_NRM.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/tubesColor.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/tubesColor.dds deleted file mode 100644 index 5d24354..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/tubesColor.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/internal.cfg b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300internal.cfg similarity index 60% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/internal.cfg rename to GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300internal.cfg index 86601dd..79cf118 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/internal.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-1300internal.cfg @@ -3,7 +3,16 @@ INTERNAL name = Cry-1300Internals MODEL { - model = REPOSoftTech/DeepFreeze/Spaces/Cry-1300Internals/Cry-1300Internals + model = REPOSoftTech/DeepFreeze/Assets/Cry-1300Internals + texture = CryopodTexture, REPOSoftTech/DeepFreeze/Assets/CryopodTexture + texture = hitchhikerIVAcolor, REPOSoftTech/DeepFreeze/Assets/hitchhikerIVAcolor + texture = tubesColor, REPOSoftTech/DeepFreeze/Assets/tubesColor + texture = TubesBump_NRM, REPOSoftTech/DeepFreeze/Assets/TubesBump_NRM + texture = CRY2300IVA_color, REPOSoftTech/DeepFreeze/Assets/CRY2300IVA_color + texture = wallTextureColor, REPOSoftTech/DeepFreeze/Assets/wallTextureColor + texture = wallTextureBump_NRM, REPOSoftTech/DeepFreeze/Assets/wallTextureBump_NRM + texture = cornerColor, REPOSoftTech/DeepFreeze/Assets/cornerColor + texture = cornerBump_NRM, REPOSoftTech/DeepFreeze/Assets/cornerBump_NRM } MODULE { @@ -26,6 +35,7 @@ INTERNAL portraitCameraName = Cam3 allowCrewHelmet = false } + PROP { name = LightSwitch @@ -60,5 +70,5 @@ INTERNAL position = -0.8247,0.0177,0.7968 rotation = 0.7170615,0.05715754,0.09327104,-0.6883723 scale = 0.9999999,0.9999996,0.9999999 - } + } } diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/CRY2300IVA_color.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/CRY2300IVA_color.dds deleted file mode 100644 index 33c9779..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/CRY2300IVA_color.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/CryopodTexture.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/CryopodTexture.dds deleted file mode 100644 index 532a32e..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/CryopodTexture.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/cornerBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/cornerBump_NRM.dds deleted file mode 100644 index e17207b..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/cornerBump_NRM.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/cornerColor.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/cornerColor.dds deleted file mode 100644 index c1c70ac..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/cornerColor.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/tubesBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/tubesBump_NRM.dds deleted file mode 100644 index 81ca2bd..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/tubesBump_NRM.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/tubesColor.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/tubesColor.dds deleted file mode 100644 index 5d24354..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/tubesColor.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/wallTextureBump_NRM.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/wallTextureBump_NRM.dds deleted file mode 100644 index 1fa509d..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/wallTextureBump_NRM.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/wallTextureColor.dds b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/wallTextureColor.dds deleted file mode 100644 index a62f178..0000000 Binary files a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/wallTextureColor.dds and /dev/null differ diff --git a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/internal.cfg b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300internal.cfg similarity index 79% rename from GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/internal.cfg rename to GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300internal.cfg index a59a982..a774d26 100644 --- a/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/internal.cfg +++ b/GameData/REPOSoftTech/DeepFreeze/Spaces/Cry-2300internal.cfg @@ -3,7 +3,15 @@ INTERNAL name = Cry-2300Internals MODEL { - model = REPOSoftTech/DeepFreeze/Spaces/Cry-2300Internals/Cry-2300Internals + model = REPOSoftTech/DeepFreeze/Assets/Cry-2300Internals + texture = CryopodTexture, REPOSoftTech/DeepFreeze/Assets/CryopodTexture + texture = tubesColor, REPOSoftTech/DeepFreeze/Assets/tubesColor + texture = TubesBump_NRM, REPOSoftTech/DeepFreeze/Assets/TubesBump_NRM + texture = CRY2300IVA_color, REPOSoftTech/DeepFreeze/Assets/CRY2300IVA_color + texture = wallTextureColor, REPOSoftTech/DeepFreeze/Assets/wallTextureColor + texture = wallTextureBump_NRM, REPOSoftTech/DeepFreeze/Assets/wallTextureBump_NRM + texture = cornerColor, REPOSoftTech/DeepFreeze/Assets/cornerColor + texture = cornerBump_NRM, REPOSoftTech/DeepFreeze/Assets/cornerBump_NRM } MODULE { diff --git a/Source/Changelog.txt b/Source/Changelog.txt index 304386a..1a865e9 100644 --- a/Source/Changelog.txt +++ b/Source/Changelog.txt @@ -1,4 +1,19 @@ -[B]V0.19.3.0 "KSP 1.0.5"[/B] +[B]V0.20.0.0 "External Radial Pods"[/B] +Added new Radial External Cryopod - The CRY-0300R. A single kerbal Cryopod part that can be radially attached. The CRY-0300R also has an attach point at the top of the pod. +Great for adding radial pods to your vessel or inside a SpacePlane CargoBay! Fits inside the Mk-2 & Mk-3 Cargo bays, the part does clip through the base of cargo bays as it is +primarily designed to attach to the outside of a curved part. However, if you get creative you can fit it into a Cargo bay using girders or octaganol struts. +The CRY-0300R supports RasterPropMonitor transparent pods (yes it's transparent if you have RPM installed). +The CRY-0300R also has an external EVA hatch. The CRY-0300R only weighs 0.87t (the full CRY-0300 weights 2.62t) and appears in the TechTree at spaceExploration (same as the CRY-0300). +This now completes the set of all the originally planned DeepFreeze parts. +MerlinsMaster has re-textured more details into all the Cryopods. +Fixed Pod transparency for the CRY-0300 (and the CRY-0300R) based on RPM transparency setting in flight and also now works in the Editor (VAB/SPH). However, due to the +complications of DeepFreeze parts transparency can either be ON or OFF (RPM AUTO setting is treated as Transparency OFF). +Fixed bug where the External Door Open/Close sound effect was not working for the CRY-0300. +Rationalis(z)ed all the part models and textures into one folder, as a lot of them are shared. This will save some memory. Thanks goes to khr15714n for kicking me into doing this as I have been meaning to for a while. +Due to this however, if you are upgrading from a previous version of DeepFreeze you MUST delete the /GameData/REPOSoftTech/DeepFreeze entirely BEFORE installing this version. If you want to save your DeepFreeze +settings make a backup/copy of /GameData/REPOSoftTech/DeepFreeze/Plugins/Config.cfg file BEFORE deleting your DeepFreeze folder then copy you backup/copy of this file +back into the /GameData/REPOSoftTech/DeepFreeze/Plugins folder once you have upgraded. +[B]V0.19.3.0 "KSP 1.0.5"[/B] re-compile for KSP 1.0.5. [B]V0.19.2.0 "Bug fixes & Enhancements"[/B] Fix distribution to include missing Editor group icon from V0.19.0.0 that somehow got left out of V0.19.1.0. diff --git a/Source/DFIntMemory.cs b/Source/DFIntMemory.cs index 8d234c7..740cb5c 100644 --- a/Source/DFIntMemory.cs +++ b/Source/DFIntMemory.cs @@ -712,7 +712,7 @@ private void CheckVslUpdate() { UpdatePredictedVesselEC(vesselInfo, vessel, currentTime); } - if (vesselInfo.hasextDoor) + if (vesselInfo.hasextDoor || vesselInfo.hasextPod) { // If vessel is Not ActiveVessel and has a Transparent Pod reset the Cryopods. if (FlightGlobals.ActiveVessel != vessel) @@ -721,9 +721,9 @@ private void CheckVslUpdate() DpFrzrLoadedVsl = vessel.FindPartModulesImplementing(); foreach (DeepFreezer frzr in DpFrzrLoadedVsl) { - if (frzr.hasExternalDoor) + if (frzr.hasExternalDoor || frzr.isPodExternal) { - this.Log_Debug("chkvslupdate loaded freezer with door, reset the cryopods"); + this.Log_Debug("chkvslupdate loaded freezer with door or external pod, reset the cryopods"); frzr.resetCryopods(false); } } @@ -800,6 +800,7 @@ private void UpdateVesselInfo(VesselInfo vesselInfo, Vessel vessel, double curre this.Log("New Freezer Part: " + frzr.name + "(" + frzr.part.flightID + ")" + " (" + vessel.id + ")"); partInfo = new PartInfo(vessel.id, frzr.name, currentTime); partInfo.hasextDoor = frzr.hasExternalDoor; + partInfo.hasextPod = frzr.isPodExternal; partInfo.numSeats = frzr.FreezerSize; partInfo.timeLastElectricity = frzr.timeSinceLastECtaken; partInfo.frznChargeRequired = frzr.FrznChargeRequired; @@ -820,6 +821,7 @@ private void UpdateVesselInfo(VesselInfo vesselInfo, Vessel vessel, double curre else // Update existing entry { partInfo.hasextDoor = frzr.hasExternalDoor; + partInfo.hasextPod = frzr.isPodExternal; partInfo.numSeats = frzr.FreezerSize; partInfo.timeLastElectricity = frzr.timeSinceLastECtaken; partInfo.frznChargeRequired = frzr.FrznChargeRequired; @@ -839,10 +841,9 @@ private void UpdateVesselInfo(VesselInfo vesselInfo, Vessel vessel, double curre } //now update the knownfreezerpart and any related vesselinfo field if (frzr.hasExternalDoor) - { vesselInfo.hasextDoor = true; - break; - } + if (frzr.isPodExternal) + vesselInfo.hasextPod = true; } } diff --git a/Source/DeepFreeze.cs b/Source/DeepFreeze.cs index c001010..099b247 100644 --- a/Source/DeepFreeze.cs +++ b/Source/DeepFreeze.cs @@ -271,7 +271,7 @@ internal void ThawFrozenCrew(String FrozenCrew, Guid vesselID) if (kerbal != null) { Vessel vessel = FlightGlobals.Vessels.Find(v => v.id == vesselID); - this.Log_Debug("vessel mainbody" + vessel.mainBody.name + " is homeworld? " + vessel.mainBody.isHomeWorld); + //this.Log_Debug("vessel mainbody" + vessel.mainBody.name + " is homeworld? " + vessel.mainBody.isHomeWorld); if (vessel == null || (vessel.mainBody.isHomeWorld diff --git a/Source/DeepFreeze.csproj b/Source/DeepFreeze.csproj index abf2a79..712d828 100644 --- a/Source/DeepFreeze.csproj +++ b/Source/DeepFreeze.csproj @@ -36,7 +36,8 @@ False ..\..\Assembly-CSharp.dll - + + False ..\DFInterface\bin\Debug\DFInterface.dll diff --git a/Source/DeepFreezeGUI.cs b/Source/DeepFreezeGUI.cs index 9ee9f25..2dcc26e 100644 --- a/Source/DeepFreezeGUI.cs +++ b/Source/DeepFreezeGUI.cs @@ -444,7 +444,12 @@ private void windowDF(int id) GUILayout.BeginHorizontal(); VesselInfo vsl = DeepFreeze.Instance.DFgameSettings.knownVessels[frzr.Value.vesselID]; GUILayout.Label(vsl.vesselName, statusStyle, GUILayout.Width(DFvslWdthName)); - GUILayout.Label(frzr.Value.PartName.Substring(0, 8), statusStyle, GUILayout.Width(DFvslPrtName)); + string partname = string.Empty; + if (frzr.Value.PartName.Substring(8, 1) == "R") + partname = frzr.Value.PartName.Substring(0, 9); + else + partname = frzr.Value.PartName.Substring(0, 8); + GUILayout.Label(partname, statusStyle, GUILayout.Width(DFvslPrtName)); string TempVar; if (DeepFreeze.Instance.DFsettings.TempinKelvin) { diff --git a/Source/DeepFreezerPart.cs b/Source/DeepFreezerPart.cs index 55f5c3b..888778d 100644 --- a/Source/DeepFreezerPart.cs +++ b/Source/DeepFreezerPart.cs @@ -85,6 +85,9 @@ public class DeepFreezer : PartModule, IDeepFreezer, IResourceConsumer [KSPField(isPersistant = false, guiActive = false, guiName = "Animated")] //Set to true if Internal contains Animated Cryopods, read from part.cfg. public bool isPartAnimated; + [KSPField(isPersistant = false, guiActive = false, guiName = "PodExternal")] //Set to true if Cryopod is External part (eg. CRY-0300R), read from part.cfg. + public bool isPodExternal = false; + [KSPField(isPersistant = true, guiActive = true, guiName = "Freezer Capacity")] //Total Size of Freezer, get's read from part.cfg. public int FreezerSize; @@ -158,7 +161,7 @@ internal FrzrTmpStatus DFFrzrTmp [KSPField(isPersistant = true, guiName = "Cabin Temperature", guiUnits = "K", guiFormat = "F1", guiActive = true)] public float CabinTemp = 0f; - [KSPEvent(active = true, guiActive = true, name = "showMenu", guiName = "Toggle Menu")] + [KSPEvent(active = true, guiActive = true, name = "showMenu", guiName = "DeepFreeze Menu")] public void showMenu() { DeepFreezeGUI obj = DeepFreeze.Instance.GetComponent("DeepFreezeGUI") as DeepFreezeGUI; @@ -388,15 +391,14 @@ public void DeActivateAction(KSPActionParam param) private bool[] seatTakenbyFrznKerbal; //This bool array is set to true for each seat that is currently being taken by a frozen kerbal. //Audio Sounds - protected AudioSource mon_beep; - - protected AudioSource flatline; - protected AudioSource hatch_lock; - protected AudioSource ice_freeze; - protected AudioSource machine_hum; - protected AudioSource ding_ding; - protected AudioSource ext_door; - protected AudioSource charge_up; + private AudioSource mon_beep; + private AudioSource flatline; + private AudioSource hatch_lock; + private AudioSource ice_freeze; + private AudioSource machine_hum; + private AudioSource ding_ding; + private AudioSource ext_door; + private AudioSource charge_up; public List GetConsumedResources() { @@ -408,24 +410,63 @@ public List GetConsumedResources() return resources; } - public override void OnUpdate() + public void Update() { - if (Time.timeSinceLevelLoad < 2.0f || !HighLogic.LoadedSceneIsFlight) // Check not loading level or not in flight - { + if (Time.timeSinceLevelLoad < 2.0f) // Check not loading level return; - } - // This should only happen once, we need to load the StoredCrewList of frozen kerbals for this part from the DeepFreeze master list + // This should only happen once in flight only, we need to load the StoredCrewList of frozen kerbals for this part from the DeepFreeze master list //This should be done in onload, but it doesn't seem to be working, probably should be checking and doing when vessel loads/unloads/switches/etc. - if (!setGameSettings) + if (!setGameSettings && HighLogic.LoadedSceneIsFlight) { onceoffSetup(); } + // If we have an external door (CRY-0300) or external pod (CRY-0300R) check RPM transparency setting and change the door settings as appropriate + if ((hasExternalDoor || isPodExternal) && (DFInstalledMods.IsRPMInstalled) && !IsFreezeActive && !IsThawActive) + { + try + { + checkRPMPodTransparencySetting(); + } + catch (Exception ex) + { + this.Log("Exception attempting to check RPM transparency settings. Report this error on the Forum Thread."); + this.Log("Err: " + ex); + } + } + + if (!HighLogic.LoadedSceneIsFlight) // If scene is not flight we are done with onUpdate + return; + + //This is necessary to override stock crew xfer behaviour. When the user cancels the xfer the Stock highlighting system + // makes the transparent pod opaque. There is no way (that I can find) to know when this occurs. + // So we look through the parts pod states for any part that is not animated (IE: CRY-0300R) any that are OPEN we + // set their window to transparent..... Maybe we should check it first. + if (FlightGlobals.ready && this.vessel.loaded && isPodExternal && !IsFreezeActive && !IsThawActive && DFInstalledMods.IsRPMInstalled) + { + if (_prevRPMTransparentpodSetting == "ON") + { + for (int i = 0; i < cryopodstateclosed.Length; i++) + { + if (!cryopodstateclosed[i]) + { + string windowname = "Cryopod-" + (i + 1).ToString() + "-Window"; + Renderer extwindowrenderer = this.part.FindModelComponent(windowname); + if (extwindowrenderer != null) + { + if (extwindowrenderer.material.shader != TransparentSpecularShader) + setCryopodWindowTransparent(i); + } + } + } + } + } + //For some reason when we go on EVA or switch vessels the InternalModel is destroyed. //Which causes a problem when we re-board the part as the re-boarding kerbal ends up in a frozen kerbals seat. //So we check for the internmodel existing while the vessel this part is attached to is loaded and if it isn't we re-instansiate it. - if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ready && this.vessel.loaded && partHasInternals && this.part.internalModel == null) + if (FlightGlobals.ready && this.vessel.loaded && partHasInternals && this.part.internalModel == null) { this.Log("Part " + this.part.name + "(" + this.part.flightID + ") is loaded and internalModel has disappeared, so re-instansiate it"); this.part.SpawnCrew(); @@ -441,7 +482,7 @@ public override void OnUpdate() if ((Time.time - lastUpdate) > updatetnterval && (Time.time - lastRemove) > updatetnterval) // We only update every updattnterval time interval. { lastUpdate = Time.time; - if (HighLogic.LoadedSceneIsFlight && FlightGlobals.ready && FlightGlobals.ActiveVessel != null) + if (FlightGlobals.ready && FlightGlobals.ActiveVessel != null) { CrntVslID = this.vessel.id; CrntVslName = this.vessel.vesselName; @@ -480,20 +521,6 @@ public override void OnUpdate() } } - // If we have an external door (CRY-0300) check RPM transparency setting and change the door settings as appropriate - if (hasExternalDoor && (DFInstalledMods.IsRPMInstalled)) - { - try - { - checkRPMPodTransparencySetting(); - } - catch (Exception ex) - { - this.Log("Exception attempting to check RPM transparency settings. Report this error on the Forum Thread."); - this.Log("Err: " + ex); - } - } - // If we have an external door (CRY-0300) check if the door state has changed and then set the helmet state if (hasExternalDoor) { @@ -620,59 +647,110 @@ private void checkRPMPodTransparencySetting() switch (transparentPodSetting) { case "ON": - // If the doors are closed or closing set open doors event active - if (_externaldoorstate != DoorState.CLOSED && _externaldoorstate != DoorState.CLOSING) + if (hasExternalDoor) //CRY-0300 { - Events["eventOpenDoors"].active = false; - Events["eventCloseDoors"].active = true; + // If the doors are closed or closing set open doors event active + if (_externaldoorstate != DoorState.CLOSED && _externaldoorstate != DoorState.CLOSING) + { + Events["eventOpenDoors"].active = false; + Events["eventCloseDoors"].active = true; + } + else + { + //If the doors are open or opening set close doors event active + if (_externaldoorstate != DoorState.OPEN && _externaldoorstate != DoorState.OPENING) + { + Events["eventOpenDoors"].active = true; + Events["eventCloseDoors"].active = false; + } + } } - else + else //CRY-0300R { - //If the doors are open or opening set close doors event active - if (_externaldoorstate != DoorState.OPEN && _externaldoorstate != DoorState.OPENING) + for (int i = 0; i < FreezerSize; i++) { - Events["eventOpenDoors"].active = true; - Events["eventCloseDoors"].active = false; + string windowname = "Cryopod-" + (i + 1).ToString() + "-Window"; + Renderer extwindowrenderer = this.part.FindModelComponent(windowname); + if (extwindowrenderer != null) + { + if (HighLogic.LoadedSceneIsFlight) //If in flight, we check the pod state + { + if (!cryopodstateclosed[i]) //Pod is open + { + if (extwindowrenderer.material.shader != TransparentSpecularShader) + setCryopodWindowTransparent(i); + } + else //Pod is closed + { + if (extwindowrenderer.material.shader != KSPSpecularShader) + setCryopodWindowSpecular(i); + } + } + else //If in editor, always transparent + { + if (extwindowrenderer.material.shader != TransparentSpecularShader) + setCryopodWindowTransparent(i); + } + } } } + break; default: this.Log_Debug("RPM set to OFF or AUTO for transparent pod"); - //hasExternalDoor = false; - // We must close the doors if they are not or we see an empty internal. - DoorState actualDoorState = getdoorState(); - if (actualDoorState != DoorState.CLOSED) + if (hasExternalDoor) //CRY-0300 { - try + //hasExternalDoor = false; + // We must close the doors if they are not or we see an empty internal. + + DoorState actualDoorState = getdoorState(); + if (actualDoorState != DoorState.CLOSED) { - Animation anim; - Animation[] animators = this.part.internalModel.FindModelAnimators("DOORHandle"); - if (animators.Length > 0) + try { - anim = animators[0]; - anim["DOORHandle"].speed = float.MinValue; - anim["DOORHandle"].normalizedTime = 1; - anim.Play("DOORHandle"); + Animation anim; + Animation[] animators = this.part.internalModel.FindModelAnimators("DOORHandle"); + if (animators.Length > 0) + { + anim = animators[0]; + anim["DOORHandle"].speed = float.MinValue; + anim["DOORHandle"].normalizedTime = 1; + anim.Play("DOORHandle"); + } + ext_door.Play(); } - ext_door.Play(); - } - catch (Exception ex) - { - Debug.Log("Exception trying to run the Doorhandle animation"); - Debug.Log("Err: " + ex); + catch (Exception ex) + { + Debug.Log("Exception trying to run the Doorhandle animation"); + Debug.Log("Err: " + ex); + } + if (animationName != null) + { + externalDoorAnim[animationName].normalizedTime = 1; + externalDoorAnim[animationName].speed = float.MinValue; + externalDoorAnim.Play("Open"); + } + _prevexterndoorstate = _externaldoorstate; + _externaldoorstate = DoorState.CLOSED; } - if (animationName != null) + Events["eventOpenDoors"].active = false; + Events["eventCloseDoors"].active = false; + } + else //CRY-0300R + { + for (int i = 0; i < FreezerSize; i++) { - externalDoorAnim[animationName].normalizedTime = 1; - externalDoorAnim[animationName].speed = float.MinValue; - externalDoorAnim.Play("Open"); + string windowname = "Cryopod-" + (i + 1).ToString() + "-Window"; + Renderer extwindowrenderer = this.part.FindModelComponent(windowname); + + if (extwindowrenderer != null) + { + if (extwindowrenderer.material.shader != KSPSpecularShader) + setCryopodWindowSpecular(i); + } } - _prevexterndoorstate = _externaldoorstate; - _externaldoorstate = DoorState.CLOSED; } - Events["eventOpenDoors"].active = false; - Events["eventCloseDoors"].active = false; break; } _prevRPMTransparentpodSetting = transparentPodSetting; @@ -729,6 +807,7 @@ private void onceoffSetup() } resetFrozenKerbals(); + this.Log_Debug("Onceoffsetup resetcryopod doors"); if (partHasInternals) { @@ -757,29 +836,37 @@ private void onceoffSetup() //If we have lightstrips (CRY-5000) set them up if (partHasInternals) { - Animation[] animators = this.part.internalModel.FindModelAnimators("LightStrip"); - if (animators.Length > 0) + try { - this.Log_Debug("Found " + animators.Length + " LightStrip animations starting"); - partHasStripLights = true; - if (DeepFreeze.Instance.DFsettings.StripLightsActive) + Animation[] animators = this.part.internalModel.FindModelAnimators("LightStrip"); + if (animators.Length > 0) { - foreach (Animation anim in animators) + this.Log_Debug("Found " + animators.Length + " LightStrip animations starting"); + partHasStripLights = true; + if (DeepFreeze.Instance.DFsettings.StripLightsActive) { - anim["LightStrip"].speed = 1; - anim["LightStrip"].normalizedTime = 0; - anim.wrapMode = WrapMode.Loop; - anim.Play("LightStrip"); + foreach (Animation anim in animators) + { + anim["LightStrip"].speed = 1; + anim["LightStrip"].normalizedTime = 0; + anim.wrapMode = WrapMode.Loop; + anim.Play("LightStrip"); + } } - } - else - { - foreach (Animation anim in animators) + else { - anim.Stop(); + foreach (Animation anim in animators) + { + anim.Stop(); + } } } } + catch (Exception ex) + { + Utilities.Log("DeepFreezer", " Error finding Internal LightStrip Animators"); + Utilities.Log("DeepFreezer ", ex.Message); + } } setGameSettings = true; //set the flag so this method doesn't execute a second time } @@ -1178,8 +1265,10 @@ public override void OnStart(PartModule.StartState state) ding_ding.panLevel = 0; ding_ding.rolloffMode = AudioRolloffMode.Linear; ding_ding.Stop(); + List databaseAudioFiles = new List(); + databaseAudioFiles = GameDatabase.Instance.databaseAudioFiles; ext_door = gameObject.AddComponent(); - ext_door.clip = GameDatabase.Instance.GetAudioClip("REPOSoftTech/DeepFreeze/Sounds/extdoorswitch"); + ext_door.clip = GameDatabase.Instance.GetAudioClip("REPOSoftTech/DeepFreeze/Sounds/externaldoorswitch"); ext_door.volume = .7F; ext_door.panLevel = 0; ext_door.rolloffMode = AudioRolloffMode.Linear; @@ -1484,14 +1573,12 @@ private void ProcessFreezeKerbal() case 2: //close the Pod door Hal this.Log_Debug("Freeze Step 2"); - if (partHasInternals && !isPartAnimated) - // Part has no animated cryopods but has internals. Set window to on and skip to step 4. - { - hatch_lock.Play(); // Play the sound effects. - machine_hum.Play(); - machine_hum.loop = true; - setCryoWindowOn(ToFrzeKerbalSeat); - FreezeStepInProgress = 4; + if (partHasInternals && isPodExternal) + // Part has no animated cryopods but has internals. skip to step 3. + { + cryopodstateclosed[ToFrzeKerbalSeat] = true; + savecryopodstatepersistent(); + FreezeStepInProgress = 3; } else { @@ -1505,7 +1592,8 @@ private void ProcessFreezeKerbal() machine_hum.loop = true; ClosePodAnimPlaying = true; closeCryopod(ToFrzeKerbalSeat, 1f); - cryopodstateclosed[ToFrzeKerbalSeat] = true; + //cryopodstateclosed[ToFrzeKerbalSeat] = true; + //savecryopodstatepersistent(); } else // Animation is already playing, check if it has finished. { @@ -1536,6 +1624,8 @@ private void ProcessFreezeKerbal() { //Part is not animated, skip to step 4. ClosePodAnimPlaying = false; + cryopodstateclosed[ToFrzeKerbalSeat] = true; + savecryopodstatepersistent(); FreezeStepInProgress = 4; } } @@ -1544,7 +1634,7 @@ private void ProcessFreezeKerbal() case 3: //Freeze the window this.Log_Debug("Freeze Step 3"); - if (partHasInternals && isPartAnimated) + if (partHasInternals) { if (!FreezeWindowAnimPlaying) // If animation not already playing start it playing. { @@ -1590,7 +1680,7 @@ private void ProcessFreezeKerbal() case 4: //Finalise this.Log_Debug("Freeze Step 4"); - if (partHasInternals && isPartAnimated) + if (partHasInternals) { setCryopodWindowSpecular(ToFrzeKerbalSeat); } @@ -1715,22 +1805,20 @@ private void FreezeKerbalAbort(ProtoCrewMember CrewMember) Utilities.setFrznKerbalLayer(CrewMember, true, false); if (partHasInternals) { - if (isPartAnimated) + if (vesselisinIVA || vesselisinInternal) { - if (vesselisinIVA || vesselisinInternal) - { - setIVAFrzrCam(ToFrzeKerbalSeat); - } + setIVAFrzrCam(ToFrzeKerbalSeat); + } + if (isPartAnimated) openCryopod(ToFrzeKerbalSeat, float.MaxValue); + if (isPartAnimated || (isPodExternal && DFInstalledMods.IsRPMInstalled && _prevRPMTransparentpodSetting == "ON")) thawCryopodWindow(ToFrzeKerbalSeat, float.MaxValue); - cryopodstateclosed[ToFrzeKerbalSeat] = false; - if (partHasStripLights && DeepFreeze.Instance.DFsettings.StripLightsActive) - { - stopStripLightFlash(ToFrzeKerbalSeat); - } + cryopodstateclosed[ToFrzeKerbalSeat] = false; + savecryopodstatepersistent(); + if (partHasStripLights && DeepFreeze.Instance.DFsettings.StripLightsActive) + { + stopStripLightFlash(ToFrzeKerbalSeat); } - else - setCryoWindowOff(ToFrzeKerbalSeat); } if (!AddKerbal(CrewMember, ToFrzeKerbalSeat)) @@ -1896,60 +1984,52 @@ private void ProcessThawKerbal() case 2: //thaw the cryopod window //this.Log_Debug("Thaw Step 2"); - if (partHasInternals && !isPartAnimated) - // Part has no animated cryopods but has internals. Set window to off and skip to step 4. - { - ice_freeze.Play(); - setCryoWindowOff(ToThawKerbalSeat); - ThawStepInProgress = 4; - } - else + if (partHasInternals) { - if (partHasInternals && isPartAnimated) + if (!ThawWindowAnimPlaying) // If animation not already playing start it playing. { - if (!ThawWindowAnimPlaying) // If animation not already playing start it playing. - { - this.Log_Debug("Thawing the cryopod window"); - ice_freeze.Play(); - ThawWindowAnimPlaying = true; + this.Log_Debug("Thawing the cryopod window"); + ice_freeze.Play(); + ThawWindowAnimPlaying = true; + if (isPartAnimated || (isPodExternal && DFInstalledMods.IsRPMInstalled && _prevRPMTransparentpodSetting == "ON")) thawCryopodWindow(ToThawKerbalSeat, 1f); - if (partHasStripLights && DeepFreeze.Instance.DFsettings.StripLightsActive) - { - startStripLightFlash(ToThawKerbalSeat); - } + if (partHasStripLights && DeepFreeze.Instance.DFsettings.StripLightsActive) + { + startStripLightFlash(ToThawKerbalSeat); } - else // Animation is already playing, check if it has finished. + } + else // Animation is already playing, check if it has finished. + { + if (_windowAnimation != null) { - if (_windowAnimation != null) + if (_windowAnimation.IsPlaying("CryopodWindowOpen")) { - if (_windowAnimation.IsPlaying("CryopodWindowOpen")) - { - //this.Log_Debug("waiting for the pod animation to complete the thaw"); - ThawWindowAnimPlaying = true; - } - else - { - this.Log_Debug("Animation has completed. go to step 3."); - ThawWindowAnimPlaying = false; - ThawStepInProgress = 3; - } + //this.Log_Debug("waiting for the pod animation to complete the thaw"); + ThawWindowAnimPlaying = true; } else { - this.Log_Debug("Animation disappeared. go to step 3."); - //There is no animation found? Skip to step 3. + this.Log_Debug("Animation has completed. go to step 3."); ThawWindowAnimPlaying = false; ThawStepInProgress = 3; } } + else + { + this.Log_Debug("Animation disappeared. go to step 3."); + //There is no animation found? Skip to step 3. + ThawWindowAnimPlaying = false; + ThawStepInProgress = 3; + } } - else - { - //Part is not animated, skip to step 4. - ThawWindowAnimPlaying = false; - ThawStepInProgress = 4; - } } + else + { + //Part is not animated, skip to step 4. + ThawWindowAnimPlaying = false; + ThawStepInProgress = 4; + } + //} break; case 3: @@ -1965,7 +2045,8 @@ private void ProcessThawKerbal() machine_hum.loop = true; OpenPodAnimPlaying = true; openCryopod(ToThawKerbalSeat, 1f); - cryopodstateclosed[ToThawKerbalSeat] = false; + //cryopodstateclosed[ToThawKerbalSeat] = false; + //savecryopodstatepersistent(); } else // Animation is already playing, check if it has finished. { @@ -1996,6 +2077,8 @@ private void ProcessThawKerbal() { //Part is not animated, skip to step 4. OpenPodAnimPlaying = false; + cryopodstateclosed[ToThawKerbalSeat] = false; + savecryopodstatepersistent(); ThawStepInProgress = 4; } break; @@ -2118,8 +2201,6 @@ private void ThawKerbalStep0(string frozenkerbal) KerbalGUIManager.PrintActiveCrew(); //Utilities.setFrznKerbalLayer(kerbal, false, true); this.Log_Debug("Expected condition met, kerbal already in their seat."); - // If not animated pods change the window state. - if (!isPartAnimated) setCryoWindowOff(tmpcrew.SeatIdx); // If in IVA mode set the camera to watch the process. if (vesselisinIVA || vesselisinInternal) setIVAFrzrCam(tmpcrew.SeatIdx); @@ -2196,7 +2277,6 @@ private void ThawKerbalStep0(string frozenkerbal) KerbalGUIManager.AddActiveCrew(kerbal.KerbalRef); //Add them to the portrait cams. this.Log_Debug("Just thawing crew and added to GUIManager"); KerbalGUIManager.PrintActiveCrew(); - if (!isPartAnimated && partHasInternals) setCryoWindowOff(tmpcrew.SeatIdx); if (vesselisinIVA || vesselisinInternal) setIVAFrzrCam(tmpcrew.SeatIdx); if (hasExternalDoor) @@ -2305,13 +2385,15 @@ private void ThawKerbalAbort(String ThawKerbal) { setIVAFrzrCam(ToThawKerbalSeat); } - if (isPartAnimated && partHasInternals) + if (partHasInternals) { - closeCryopod(ToThawKerbalSeat, float.MaxValue); + if (isPartAnimated) + closeCryopod(ToThawKerbalSeat, float.MaxValue); this.Log_Debug("Time freezewindow started " + Planetarium.GetUniversalTime()); freezeCryopodWindow(ToThawKerbalSeat, float.MaxValue); this.Log_Debug("Time freezewindow finished make them invisible " + Planetarium.GetUniversalTime()); cryopodstateclosed[ToThawKerbalSeat] = true; + savecryopodstatepersistent(); if (partHasStripLights && DeepFreeze.Instance.DFsettings.StripLightsActive) { stopStripLightFlash(ToThawKerbalSeat); @@ -2431,7 +2513,7 @@ private bool RemoveKerbal(ProtoCrewMember kerbal, int SeatIndx) kerbalInfo.type = ProtoCrewMember.KerbalType.Unowned; kerbalInfo.status = ProtoCrewMember.RosterStatus.Dead; if (partHasInternals) - { + { kerbalInfo.seatName = this.part.internalModel.seats[SeatIndx].seatTransformName; kerbalInfo.seatIdx = SeatIndx; } @@ -3173,95 +3255,103 @@ private void onVesselDestroy(Vessel vessel) internal void resetFrozenKerbals() { - // Create a list of kerbals that are in InvSeats (SeatIndx == -1 where kerbal is in this part in this vessel & they are not comatose/tourist - List> kerbalsInvSeats = DeepFreeze.Instance.DFgameSettings.KnownFrozenKerbals.Where(e => e.Value.partID == CrntPartID && e.Value.vesselID == CrntVslID && e.Value.type != ProtoCrewMember.KerbalType.Tourist && e.Value.seatIdx == -1).ToList(); - // create a list of kerbal that are in this part in this vessel & they are not comatose/tourist - List> FrznKerbalsinPart = DeepFreeze.Instance.DFgameSettings.KnownFrozenKerbals.Where(e => e.Value.partID == CrntPartID && e.Value.vesselID == CrntVslID && e.Value.type != ProtoCrewMember.KerbalType.Tourist).ToList(); - - if (kerbalsInvSeats.Count() > 0) //If we found any Invalid Seat assignments we need to find them empty seats + try { - bool[] seatIndxs = new bool[FreezerSize]; //Create a bool array to store whether seats are taken or not - //go through all the frozen kerbals in the part that don't have invalid seats and set bool array seat index to true (taken) for each - foreach (KeyValuePair frznkerbal in FrznKerbalsinPart) - { - if (frznkerbal.Value.seatIdx > -1 && frznkerbal.Value.seatIdx < FreezerSize - 1) - seatIndxs[frznkerbal.Value.seatIdx] = true; - } - //go through all the thawed kerbals in the part and set bool array seat index to true (taken) for each - foreach (ProtoCrewMember crew in this.part.protoModuleCrew) - { - seatIndxs[crew.seatIdx] = true; - } - //Go through all our kerbals with invalid seats and find them an empty seat. - foreach (KeyValuePair frznkerbal in kerbalsInvSeats) + // Create a list of kerbals that are in InvSeats (SeatIndx == -1 where kerbal is in this part in this vessel & they are not comatose/tourist + List> kerbalsInvSeats = DeepFreeze.Instance.DFgameSettings.KnownFrozenKerbals.Where(e => e.Value.partID == CrntPartID && e.Value.vesselID == CrntVslID && e.Value.type != ProtoCrewMember.KerbalType.Tourist && e.Value.seatIdx == -1).ToList(); + // create a list of kerbal that are in this part in this vessel & they are not comatose/tourist + List> FrznKerbalsinPart = DeepFreeze.Instance.DFgameSettings.KnownFrozenKerbals.Where(e => e.Value.partID == CrntPartID && e.Value.vesselID == CrntVslID && e.Value.type != ProtoCrewMember.KerbalType.Tourist).ToList(); + + if (kerbalsInvSeats.Count() > 0) //If we found any Invalid Seat assignments we need to find them empty seats { - //Iterate for the number of seats in the part - for (int i = 0; i < FreezerSize; i++) + bool[] seatIndxs = new bool[FreezerSize]; //Create a bool array to store whether seats are taken or not + //go through all the frozen kerbals in the part that don't have invalid seats and set bool array seat index to true (taken) for each + foreach (KeyValuePair frznkerbal in FrznKerbalsinPart) + { + if (frznkerbal.Value.seatIdx > -1 && frznkerbal.Value.seatIdx < FreezerSize - 1) + seatIndxs[frznkerbal.Value.seatIdx] = true; + } + //go through all the thawed kerbals in the part and set bool array seat index to true (taken) for each + foreach (ProtoCrewMember crew in this.part.protoModuleCrew) + { + seatIndxs[crew.seatIdx] = true; + } + //Go through all our kerbals with invalid seats and find them an empty seat. + foreach (KeyValuePair frznkerbal in kerbalsInvSeats) { - if (seatIndxs[i] == false) //If seat not already taken we take it + //Iterate for the number of seats in the part + for (int i = 0; i < FreezerSize; i++) { - seatIndxs[i] = true; - frznkerbal.Value.seatIdx = i; - frznkerbal.Value.seatName = this.part.internalModel.seats[i].seatTransformName; - break; + if (seatIndxs[i] == false) //If seat not already taken we take it + { + seatIndxs[i] = true; + frznkerbal.Value.seatIdx = i; + frznkerbal.Value.seatName = this.part.internalModel.seats[i].seatTransformName; + break; + } } } } - } - // Iterate through the dictionary of all known frozen kerbals where kerbal is in this part in this vessel & they are not comatose/tourist - foreach (KeyValuePair kerbal in FrznKerbalsinPart) - { - //Check if they are in the _StoredCrewList and if they aren't Add them in. - FrznCrewMbr fzncrew = new FrznCrewMbr(kerbal.Key, kerbal.Value.seatIdx, CrntVslID, CrntVslName); - FrznCrewMbr tmpcrew = _StoredCrewList.Find(a => a.CrewName == kerbal.Key); - if (tmpcrew == null) - { - //add them to our storedcrewlist for this part. - Utilities.Log_Debug("DeepFreezer", "Adding frozen kerbal to this part storedcrewlist " + kerbal.Key); - _StoredCrewList.Add(fzncrew); - } - - //check if they are in part spawned, if not do so. - ProtoCrewMember crewmember = HighLogic.CurrentGame.CrewRoster.Unowned.FirstOrDefault(a => a.name == kerbal.Key); - if (partHasInternals) + // Iterate through the dictionary of all known frozen kerbals where kerbal is in this part in this vessel & they are not comatose/tourist + foreach (KeyValuePair kerbal in FrznKerbalsinPart) { - crewmember.seatIdx = kerbal.Value.seatIdx; - if (crewmember.seatIdx != -1 && crewmember.seatIdx < FreezerSize) - crewmember.seat = this.part.internalModel.seats[crewmember.seatIdx]; - if (crewmember.KerbalRef == null) + //Check if they are in the _StoredCrewList and if they aren't Add them in. + FrznCrewMbr fzncrew = new FrznCrewMbr(kerbal.Key, kerbal.Value.seatIdx, CrntVslID, CrntVslName); + FrznCrewMbr tmpcrew = _StoredCrewList.Find(a => a.CrewName == kerbal.Key); + if (tmpcrew == null) { - crewmember.Spawn(); + //add them to our storedcrewlist for this part. + Utilities.Log_Debug("DeepFreezer", "Adding frozen kerbal to this part storedcrewlist " + kerbal.Key); + _StoredCrewList.Add(fzncrew); } - crewmember.KerbalRef.transform.parent = this.part.internalModel.seats[crewmember.seatIdx].seatTransform; - crewmember.KerbalRef.transform.localPosition = Vector3.zero; - crewmember.KerbalRef.transform.localRotation = Quaternion.identity; - crewmember.KerbalRef.InPart = null; - if (hasExternalDoor) + + //check if they are in part spawned, if not do so. + ProtoCrewMember crewmember = HighLogic.CurrentGame.CrewRoster.Unowned.FirstOrDefault(a => a.name == kerbal.Key); + if (partHasInternals) { - //set the seat to allow helmet, this will cause the helmet to appear - crewmember.KerbalRef.showHelmet = true; + crewmember.seatIdx = kerbal.Value.seatIdx; + if (crewmember.seatIdx != -1 && crewmember.seatIdx < FreezerSize) + crewmember.seat = this.part.internalModel.seats[crewmember.seatIdx]; + if (crewmember.KerbalRef == null) + { + crewmember.Spawn(); + } + crewmember.KerbalRef.transform.parent = this.part.internalModel.seats[crewmember.seatIdx].seatTransform; + crewmember.KerbalRef.transform.localPosition = Vector3.zero; + crewmember.KerbalRef.transform.localRotation = Quaternion.identity; + crewmember.KerbalRef.InPart = null; + if (hasExternalDoor) + { + //set the seat to allow helmet, this will cause the helmet to appear + crewmember.KerbalRef.showHelmet = true; + } + else + { + crewmember.KerbalRef.showHelmet = false; + crewmember.KerbalRef.ShowHelmet(false); + } + seatTakenbyFrznKerbal[crewmember.seatIdx] = true; + //setup seat and part settings for frozen kerbal. + Utilities.setFrznKerbalLayer(crewmember, false, false); + this.part.internalModel.seats[crewmember.seatIdx].taken = true; + this.part.internalModel.seats[crewmember.seatIdx].kerbalRef = crewmember.KerbalRef; + this.part.internalModel.seats[crewmember.seatIdx].crew = crewmember; + setseatstaticoverlay(this.part.internalModel.seats[crewmember.seatIdx]); } - else + //Unregister their traits/abilities and remove them from the Portrait Cameras if they are there. + crewmember.UnregisterExperienceTraits(this.part); + this.part.protoModuleCrew.Remove(crewmember); + if (KerbalGUIManager.ActiveCrew.Contains(crewmember.KerbalRef)) { - crewmember.KerbalRef.showHelmet = false; - crewmember.KerbalRef.ShowHelmet(false); + KerbalGUIManager.RemoveActiveCrew(crewmember.KerbalRef); } - seatTakenbyFrznKerbal[crewmember.seatIdx] = true; - //setup seat and part settings for frozen kerbal. - Utilities.setFrznKerbalLayer(crewmember, false, false); - this.part.internalModel.seats[crewmember.seatIdx].taken = true; - this.part.internalModel.seats[crewmember.seatIdx].kerbalRef = crewmember.KerbalRef; - this.part.internalModel.seats[crewmember.seatIdx].crew = crewmember; - setseatstaticoverlay(this.part.internalModel.seats[crewmember.seatIdx]); - } - //Unregister their traits/abilities and remove them from the Portrait Cameras if they are there. - crewmember.UnregisterExperienceTraits(this.part); - this.part.protoModuleCrew.Remove(crewmember); - if (KerbalGUIManager.ActiveCrew.Contains(crewmember.KerbalRef)) - { - KerbalGUIManager.RemoveActiveCrew(crewmember.KerbalRef); } } + catch (Exception ex) + { + Utilities.Log("DeepFreezer", " Error attempting to resetFrozenKerbals, Critical ERROR, Report on the forum"); + Utilities.Log("DeepFreezer ", ex.Message); + } } private void OnCrewBoardVessel(GameEvents.FromToAction fromToAction) @@ -3292,40 +3382,14 @@ private void UpdateCounts() // Reset the seat status for frozen crew to taken - true, because it seems to reset by something?? So better safe than sorry. if (partHasInternals) { - if (!isPartAnimated) //Only applicable for non-animated internals - { - // set cryotube window off for all crew onboard the part - Utilities.Log_Debug("DeepFreezer", "Checking all actual crewseats status"); - foreach (ProtoCrewMember onbrdcrew in this.part.protoModuleCrew) - { - setCryoWindowOff(onbrdcrew.seatIdx); - Utilities.Log_Debug("Setting CryoWindowOff for onboard crew " + onbrdcrew.name + ",Seatindx=" + onbrdcrew.seatIdx); - } - // set cryotube window off for all empty seats in the part - int i = 0; - foreach (InternalSeat chkpartseats in this.part.internalModel.seats) - { - string kerblrefstring; - if (chkpartseats.kerbalRef == null) - { - kerblrefstring = ("kerbalref not found in seatindex=" + i + ",turning the window off"); - setCryoWindowOff(i); - } - else kerblrefstring = chkpartseats.kerbalRef.crewMemberName; - Utilities.Log_Debug("DeepFreezer", "seatXformName=" + chkpartseats.seatTransformName + ",SeatIndex=" + i + ",KerbalRef=" + kerblrefstring); - i++; - } - } - // reset seats to TAKEN for all frozen kerbals in the part, check KerbalRef is still in place or re-instantiate it and check frozen kerbals // are not appearing in the Portrait Cameras, if they are remove them. //Utilities.Log_Debug("DeepFreezer", "StoredCrewList"); foreach (FrznCrewMbr lst in _StoredCrewList) { this.part.internalModel.seats[lst.SeatIdx].taken = true; - seatTakenbyFrznKerbal[lst.SeatIdx] = true; - if (!isPartAnimated && partHasInternals) setCryoWindowOn(lst.SeatIdx); - if (isPartAnimated && partHasInternals) + seatTakenbyFrznKerbal[lst.SeatIdx] = true; + if (partHasInternals) { setCryopodWindowSpecular(lst.SeatIdx); } @@ -3484,11 +3548,7 @@ public void resetCryopods(bool resetall) } //Create a temporary array and set entries to true where that seat index contains a frozen kerbal. - bool[] closedpods = new bool[FreezerSize]; - //for (int i = 0; i < FreezerSize; i++) - //{ - // this.Log_Debug("cryopodstate closed=" + cryopodstateclosed[i].ToString() + " checking pod " + i); - //} + bool[] closedpods = new bool[FreezerSize]; foreach (FrznCrewMbr frzncrew in _StoredCrewList) { closedpods[frzncrew.SeatIdx] = true; @@ -3502,51 +3562,43 @@ public void resetCryopods(bool resetall) this.Log_Debug("resetCryopod " + i + " contains frozen kerbal? " + closedpods[i]); if (closedpods[i]) //Pod contains a frozen kerbal { - if (isPartAnimated) + if (!cryopodstateclosed[i]) //If we think the pod is not closed, we close it. { - if (!cryopodstateclosed[i]) //If we think the pod is not closed, we close it. - { - this.Log_Debug("pod is open so close it"); + this.Log_Debug("pod is open so close it"); + if (isPartAnimated) closeCryopod(i, float.MaxValue); - cryopodstateclosed[i] = true; - //this.Log_Debug("Time freezewindow started " + Planetarium.GetUniversalTime()); - freezeCryopodWindow(i, float.MaxValue); - //this.Log_Debug("Time freezewindow finished make them invisible " + Planetarium.GetUniversalTime()); - } - else - { - this.Log_Debug("pod is already closed"); - freezeCryopodWindow(i, float.MaxValue); - } + cryopodstateclosed[i] = true; + //this.Log_Debug("Time freezewindow started " + Planetarium.GetUniversalTime()); + freezeCryopodWindow(i, float.MaxValue); + //this.Log_Debug("Time freezewindow finished make them invisible " + Planetarium.GetUniversalTime()); } else { - setCryoWindowOn(i); + this.Log_Debug("pod is already closed"); + freezeCryopodWindow(i, float.MaxValue); } } else //Pod does not contain a frozen kerbal { - if (isPartAnimated) + if (cryopodstateclosed[i]) //If we think the pod is closed, we open it. { - if (cryopodstateclosed[i]) //If we think the pod is closed, we open it. - { - this.Log_Debug("pod is closed so open it"); - thawCryopodWindow(i, float.MaxValue); + this.Log_Debug("pod is closed so open it"); + if (isPartAnimated) + { openCryopod(i, float.MaxValue); - cryopodstateclosed[i] = false; - } - else - { - this.Log_Debug("pod is already open"); - thawCryopodWindow(i, float.MaxValue); } + thawCryopodWindow(i, float.MaxValue); + cryopodstateclosed[i] = false; } else { - setCryoWindowOff(i); + this.Log_Debug("pod is already open"); + thawCryopodWindow(i, float.MaxValue); } } + setseatstaticoverlay(this.part.internalModel.seats[i]); } + savecryopodstatepersistent(); } catch (Exception ex) { @@ -3555,50 +3607,6 @@ public void resetCryopods(bool resetall) } } - private void setCryoWindowOff(int SeatIndx) //only called for non-animated internal parts - { - Renderer renderer; - string windowname = "Cryopod-" + (SeatIndx + 1).ToString() + "-Window"; - try - { - //Debug.Log("setCryoWindowOff for " + windowname + " on partid=" + this.part.flightID); - renderer = this.part.internalModel.FindModelComponent(windowname); - //renderer.enabled = false; - GameObject objfnd = renderer.gameObject; - objfnd.layer = 21; - //Debug.Log("setcryoff set renderergo to layer 21 ok"); - Component parobj = objfnd.GetComponentUpwards("Component"); - parobj.gameObject.layer = 21; - //Debug.Log("setcryoff set rendererparentgo to layer 21 ok"); - } - catch (Exception) - { - Debug.Log("Unable to find Renderer in internal model for this part called " + windowname); - } - } - - private void setCryoWindowOn(int SeatIndx) //only called for non-animated internal parts - { - Renderer renderer; - string windowname = "Cryopod-" + (SeatIndx + 1).ToString() + "-Window"; - try - { - //Debug.Log("setCryoWindowOn for " + windowname + " on partid=" + this.part.flightID); - renderer = this.part.internalModel.FindModelComponent(windowname); - //renderer.enabled = true; - GameObject objfnd = renderer.gameObject; - objfnd.layer = 16; - //Debug.Log("setcryon set renderergo to layer 16 ok"); - Component parobj = objfnd.GetComponentUpwards("Component"); - parobj.gameObject.layer = 16; - //Debug.Log("setcryon set rendererparentgo to layer 16 ok"); - } - catch (Exception) - { - Debug.Log("Unable to find Renderer in internal model for this part called " + windowname); - } - } - private void openCryopod(int seatIndx, float speed) //only called for animated internal parts { string podname = "Animated-Cryopod-" + (seatIndx + 1).ToString(); @@ -3613,6 +3621,7 @@ public void resetCryopods(bool resetall) _animation["Open"].speed = speed; _animation.Play("Open"); cryopodstateclosed[seatIndx] = false; + savecryopodstatepersistent(); } } else @@ -3628,8 +3637,19 @@ public void resetCryopods(bool resetall) private void thawCryopodWindow(int seatIndx, float speed) { setCryopodWindowOpaque(seatIndx); - string windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + string windowname = ""; + if (isPartAnimated) + windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + else + windowname = "Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + _windowAnimation = this.part.internalModel.FindModelComponent(windowname); + Animation _extwindowAnimation = null; + if (isPodExternal) + { + _extwindowAnimation = this.part.FindModelComponent(windowname); + } + if (_windowAnimation == null) { this.Log_Debug("Why can't I find the window animation?"); @@ -3638,28 +3658,80 @@ private void thawCryopodWindow(int seatIndx, float speed) { _windowAnimation["CryopodWindowOpen"].speed = speed; _windowAnimation.Play("CryopodWindowOpen"); + if (isPodExternal && _extwindowAnimation != null) + { + _extwindowAnimation["CryopodWindowOpen"].speed = speed; + _extwindowAnimation.Play("CryopodWindowOpen"); + } } } private void setCryopodWindowOpaque(int seatIndx) { - //Set their Window glass to fully opaque. - Just in case. - string windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; - Renderer windowrenderer = this.part.internalModel.FindModelComponent(windowname); - windowrenderer.material.shader = TransparentSpecularShader; - Color savedwindowcolor = windowrenderer.material.color; - savedwindowcolor.a = 1f; - windowrenderer.material.color = savedwindowcolor; + try + { + //Set their Window glass to fully opaque. - Just in case. + string windowname = ""; + if (isPartAnimated) + windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + else + windowname = "Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + Renderer windowrenderer = this.part.internalModel.FindModelComponent(windowname); + if (windowrenderer != null) + { + windowrenderer.material.shader = TransparentSpecularShader; + Color savedwindowcolor = windowrenderer.material.color; + savedwindowcolor.a = 1f; + windowrenderer.material.color = savedwindowcolor; + } + if (isPodExternal) + { + Renderer extwindowrenderer = this.part.FindModelComponent(windowname); + if (extwindowrenderer != null) + { + extwindowrenderer.material.shader = TransparentSpecularShader; + Color extsavedwindowcolor = extwindowrenderer.material.color; + extsavedwindowcolor.a = 1f; + extwindowrenderer.material.color = extsavedwindowcolor; + } + } + } + catch (Exception ex) + { + Debug.Log("Unable to setCryopodWindowOpaque seat " + seatIndx); + Debug.Log("Err: " + ex); + } } private void setCryopodWindowSpecular(int seatIndx) { - //Set the window glass to specular shader - string windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; - Renderer windowrenderer = this.part.internalModel.FindModelComponent(windowname); - if (windowrenderer != null) + try { - windowrenderer.material.shader = KSPSpecularShader; + //Set the window glass to specular shader + string windowname = ""; + if (isPartAnimated) + windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + else + windowname = "Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + + Renderer windowrenderer = this.part.internalModel.FindModelComponent(windowname); + Renderer extwindowrenderer = null; + if (isPodExternal) + extwindowrenderer = this.part.FindModelComponent(windowname); + + if (windowrenderer != null && windowrenderer.material.shader != KSPSpecularShader) + windowrenderer.material.shader = KSPSpecularShader; + + if (isPodExternal && extwindowrenderer != null) + { + if (extwindowrenderer.material.shader != KSPSpecularShader) + extwindowrenderer.material.shader = KSPSpecularShader; + } + } + catch (Exception ex) + { + Debug.Log("Unable to setCryopodWindowSpecular seat " + seatIndx); + Debug.Log("Err: " + ex); } } @@ -3705,6 +3777,7 @@ private void startStripLightFlash(int seatIndx) _animation["Close"].speed = speed; _animation.Play("Close"); cryopodstateclosed[seatIndx] = true; + savecryopodstatepersistent(); } } else @@ -3719,9 +3792,23 @@ private void startStripLightFlash(int seatIndx) private void freezeCryopodWindow(int seatIndx, float speed) { - setCryopodWindowTransparent(seatIndx); - string windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + if (isPartAnimated || (isPodExternal && DFInstalledMods.IsRPMInstalled && _prevRPMTransparentpodSetting == "ON")) + setCryopodWindowTransparent(seatIndx); + else + speed = float.MaxValue; + string windowname = ""; + if (isPartAnimated) + windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + else + windowname = "Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + _windowAnimation = this.part.internalModel.FindModelComponent(windowname); + Animation _extwindowAnimation = null; + if (isPodExternal) + { + _extwindowAnimation = this.part.FindModelComponent(windowname); + } + if (_windowAnimation == null) { this.Log_Debug("Why can't I find the window animation?"); @@ -3730,18 +3817,47 @@ private void freezeCryopodWindow(int seatIndx, float speed) { _windowAnimation["CryopodWindowClose"].speed = speed; _windowAnimation.Play("CryopodWindowClose"); + if (isPodExternal && _extwindowAnimation != null) + { + _extwindowAnimation["CryopodWindowClose"].speed = speed; + _extwindowAnimation.Play("CryopodWindowClose"); + } } } private void setCryopodWindowTransparent(int seatIndx) { - //Set their Window glass to see-through. - Just in case. - string windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; - Renderer windowrenderer = this.part.internalModel.FindModelComponent(windowname); - windowrenderer.material.shader = TransparentSpecularShader; - Color savedwindowcolor = windowrenderer.material.color; - savedwindowcolor.a = 0.3f; - windowrenderer.material.color = savedwindowcolor; + try + { + //Set their Window glass to see-through. - Just in case. + string windowname = ""; + if (isPartAnimated) + windowname = "Animated-Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + else + windowname = "Cryopod-" + (seatIndx + 1).ToString() + "-Window"; + Renderer windowrenderer = this.part.internalModel.FindModelComponent(windowname); + windowrenderer.material.shader = TransparentSpecularShader; + Color savedwindowcolor = windowrenderer.material.color; + savedwindowcolor.a = 0.3f; + windowrenderer.material.color = savedwindowcolor; + + if (isPodExternal) + { + Renderer extwindowrenderer = this.part.FindModelComponent(windowname); + if (extwindowrenderer != null) + { + extwindowrenderer.material.shader = TransparentSpecularShader; + Color extsavedwindowcolor = extwindowrenderer.material.color; + extsavedwindowcolor.a = 0.3f; + extwindowrenderer.material.color = extsavedwindowcolor; + } + } + } + catch (Exception ex) + { + Debug.Log("Unable to setCryopodWindowTransparent seat " + seatIndx); + Debug.Log("Err: " + ex); + } } private void stopStripLightFlash(int seatIndx) @@ -3777,7 +3893,7 @@ private void setIVAFrzrCam(int seatIndx) string camname = "FrzCam" + (seatIndx + 1).ToString(); //this.Log_Debug("Setting FrzrCam " + camname); Camera cam = this.part.internalModel.FindModelComponent(camname); - if (cam != null) + if (cam != null) //Found Freezer Camera so switch to it. { Transform camxform = cam.transform; if (camxform != null) @@ -3786,6 +3902,10 @@ private void setIVAFrzrCam(int seatIndx) DFIntMemory.Instance.lastFrzrCam = seatIndx; } } + else //Didn't find Freezer Camera so kick out to flight camera. + { + CameraManager.Instance.SetCameraMode(CameraManager.CameraMode.Flight); + } } private void setseatstaticoverlay(InternalSeat seat) diff --git a/Source/PartInfo.cs b/Source/PartInfo.cs index 86cc6e4..48b0d18 100644 --- a/Source/PartInfo.cs +++ b/Source/PartInfo.cs @@ -32,6 +32,7 @@ internal class PartInfo //numFrznCrew - # of frozen crew in the part //hibernating - true if the part/vessel is unloaded //hasextDoor - true if the part has an External door and therefore needs TransparentPod treatment, etc. + //hasextPod - True if the part has an external pod and therefore need TransparentPod treatment, etc. //timeLastElectricity - the time last EC was taken to run the part's Frozen kerbal monitoring //frznChargeRequired - the amount of EC required per frozen kerbal to run the part's Frozen kerbal monitoring //timeLastTempCheck - the time last Temperature check was taken on the part @@ -53,6 +54,7 @@ internal class PartInfo internal int numFrznCrew; internal bool hibernating; internal bool hasextDoor; + internal bool hasextPod; internal double timeLastElectricity = 0f; internal double frznChargeRequired = 0f; internal double timeLastTempCheck = 0f; @@ -71,6 +73,7 @@ internal PartInfo(Guid vesselid, string PartName, double currentTime) this.PartName = PartName; hibernating = false; hasextDoor = false; + hasextPod = false; outofEC = false; ECWarning = false; TempWarning = false; @@ -118,6 +121,7 @@ internal static PartInfo Load(ConfigNode node) info.numFrznCrew = Utilities.GetNodeValue(node, "numFrznCrew", 0); info.hibernating = Utilities.GetNodeValue(node, "hibernating", false); info.hasextDoor = Utilities.GetNodeValue(node, "hasextDoor", false); + info.hasextPod = Utilities.GetNodeValue(node, "hasextPod", false); info.timeLastElectricity = Utilities.GetNodeValue(node, "timeLastElectricity", lastUpdate); info.frznChargeRequired = Utilities.GetNodeValue(node, "frznChargeRequired", 0d); info.timeLastTempCheck = Utilities.GetNodeValue(node, "timeLastTempCheck", lastUpdate); @@ -146,6 +150,7 @@ internal ConfigNode Save(ConfigNode config) node.AddValue("numFrznCrew", numFrznCrew); node.AddValue("hibernating", hibernating); node.AddValue("hasextDoor", hasextDoor); + node.AddValue("hasextPod", hasextPod); node.AddValue("timeLastElectricity", timeLastElectricity); node.AddValue("frznChargeRequired", frznChargeRequired); node.AddValue("timeLastTempCheck", timeLastTempCheck); diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs index 62e2cb4..1c9f6ee 100644 --- a/Source/Properties/AssemblyInfo.cs +++ b/Source/Properties/AssemblyInfo.cs @@ -31,7 +31,7 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.19.3.0")] -[assembly: AssemblyFileVersion("0.19.3.0")] -[assembly: KSPAssembly("DeepFreeze", 0, 19)] +[assembly: AssemblyVersion("0.20.0.0")] +[assembly: AssemblyFileVersion("0.20.0.0")] +[assembly: KSPAssembly("DeepFreeze", 0, 20)] [assembly: KSPAssemblyDependency("DFInterface", 0, 4)] \ No newline at end of file diff --git a/Source/VesselInfo.cs b/Source/VesselInfo.cs index 219296c..a4e8826 100644 --- a/Source/VesselInfo.cs +++ b/Source/VesselInfo.cs @@ -27,6 +27,7 @@ internal class VesselInfo //numFrznCrew - Number of frozen crew on-board //hibernating - True if vessel is unloaded //hasextDoor - True if somewhere on the vessel is a DeepFreezer part with an external door + //hasextPod - True if somewhere on the vessel is a DeepFreezer part with an external pod //lastUpdate - Time this class entry was last updated //storedEC - How much ElectricCharge the vessel has //predictedECOut - Predicted time in seconds ElectricCharge will run out (by just running the freezers) @@ -40,6 +41,7 @@ internal class VesselInfo internal int numFrznCrew; internal bool hibernating; internal bool hasextDoor; + internal bool hasextPod; internal double lastUpdate = 0f; internal double storedEC = 0f; internal double predictedECOut = 0f; @@ -49,6 +51,7 @@ internal VesselInfo(string vesselName, double currentTime) this.vesselName = vesselName; hibernating = false; hasextDoor = false; + hasextDoor = false; lastUpdate = currentTime; } @@ -65,6 +68,7 @@ internal static VesselInfo Load(ConfigNode node) info.numFrznCrew = Utilities.GetNodeValue(node, "numFrznCrew", 0); info.hibernating = Utilities.GetNodeValue(node, "hibernating", false); info.hasextDoor = Utilities.GetNodeValue(node, "hasextDoor", false); + info.hasextPod = Utilities.GetNodeValue(node, "hasextPod", false); info.storedEC = Utilities.GetNodeValue(node, "storedEC", 0d); info.predictedECOut = Utilities.GetNodeValue(node, "predictedECOut", 0d); @@ -82,6 +86,7 @@ internal ConfigNode Save(ConfigNode config) node.AddValue("numFrznCrew", numFrznCrew); node.AddValue("hibernating", hibernating); node.AddValue("hasextDoor", hasextDoor); + node.AddValue("hasextPod", hasextPod); node.AddValue("lastUpdate", lastUpdate); node.AddValue("storedEC", storedEC); node.AddValue("predictedECOut", predictedECOut); diff --git a/Source/ksp_dir.txt b/Source/ksp_dir.txt index c9fa190..84ac29e 100644 --- a/Source/ksp_dir.txt +++ b/Source/ksp_dir.txt @@ -1 +1 @@ -C:\KSP_win 1.0.5 \ No newline at end of file +C:\KSP_win 1.0.5 Test \ No newline at end of file