Compare commits

...

2 Commits

8 changed files with 18 additions and 0 deletions

View File

@ -24,6 +24,8 @@
@MODULE[ModuleDeployableSolarPanel]
{
@secondaryTransformName = panel6
@animationName = 1x6SolarPanels
@breakName = sunParent
}
}
@ -43,6 +45,8 @@
@MODULE[ModuleDeployableSolarPanel]
{
@secondaryTransformName = panel6
@animationName = 1x6ShroudSolarPanels
@breakName = sunParent
}
MODULE
{
@ -67,6 +71,8 @@
@MODULE[ModuleDeployableSolarPanel]
{
@secondaryTransformName = solar6
@animationName = 3x2SolarPanels
@breakName = sunParent
}
}
@ -86,6 +92,9 @@
@MODULE[ModuleDeployableSolarPanel]
{
@secondaryTransformName = solar6
@animationName = 3x2ShroudSolarPanels
@breakName = sunParent
}
MODULE
{

View File

@ -19,6 +19,7 @@ v1.3.0
- Added White variant to Mk1, Mk2 Illuminators
- Updated claw lamps with lens reflectivity and light cookies.
- Added RCS nozzle glows to improve RCS effects
- Updated small solar panel parts to allow them to be repaired
- Updated Russian localization (Fedor-St)
- Updated Japanese localization (Chemical-Factory)
- Updated twin boar replacement to target "new" Squad model

View File

@ -44,12 +44,14 @@ namespace Restock
// the part variant system is implemented extremely stupidly
// so we have to make this whole module more complicated as a result
GameEvents.onVariantApplied.Add(OnVariantApplied);
GameEvents.onPartRepaired.Add(OnPartRepaired);
}
private void OnDestroy()
{
GameEvents.onVariantApplied.Remove(OnVariantApplied);
GameEvents.onPartRepaired.Remove(OnPartRepaired);
}
@ -95,6 +97,12 @@ namespace Restock
if (appliedPart == this.part) UpdateAllMaterials();
}
public void OnPartRepaired(Part repairedPart)
{
// Part repair resets part of the mesh from the prefab, so it needs to be reapplied
if (repairedPart == this.part) UpdateAllMaterials();
}
private void UpdateAllMaterials()
{