Restock Compatability
EngTurtle opened this issue ยท 3 comments
Right now restock overrides the Mk1-3 pod and blacklists stock assets so that SDHI is borked.
For compatibility a .restockwhitelist file needs to be added.
And the MM patch needs to have BEFORE[ReStock]
and RestockIgnore = True
added.
I've attached my changes in example files.
SDHI.restockwhitelist.txt
SDHI_SMS_MMPatch_Mk1-3_Pod_Umbilical_Interface.cfg.txt
Did some more testing, the RestockIgnore MM patch needs to be placed in its own node, as shown below. I think because the FOR
and BEFORE
keywords interfere with each other.
// Add a toggleable Umbilical Interface mesh to the stock Mark 1-3 Pod
@PART[mk1-3pod]:HAS[~RestockIgnore[*]]:BEFORE[000_ReStock]
{
RestockIgnore = True
}
@PART[mk1-3pod]:FOR[zSDHISMS]
{
MODEL
{
model = SDHI/Service Module System/Parts/SDHI_Service_Module/SDHI_Mk1-3_Pod_Umbilical_Interface
}
MODULE
{
name = ModuleAnimateGeneric
animationName = SDHI_Mk1-3_Pod_Umbilical_Interface_ShowHide_Toggle
startEventGUIName = #autoLOC_SDHI_Mk1-3_Patch_umbilicalInstallGUIName
endEventGUIName = #autoLOC_SDHI_Mk1-3_Patch_umbilicalRemoveGUIName
actionAvailable = false // Prevents umbilical port retrofit from being toggled via Action Groups
eventAvailableEditor = true
eventAvailableFlight = false
eventAvailableEVA = false
}
}
Okay, this is now working in my dev environment, with and without ReStock installed - I'll roll this into this weekend's update.
Many thanks for the help, @EngTurtle!
I'm not terribly familiar with ReStock, aside from a cursory browse through Nertea's release thread on the KSP forums.
The CFG edit with :BEFORE[ReStock]
seems straightforward enough. As for SDHI.restockwhitelist.txt
, I assume it doesn't matter too much where I put that file? (as long as ReStock can scan for it in GameData)
I'll look into folding these changes into the next update - thanks!