post-kerbin-mining-corporation / StationPartsExpansionRedux

Adds an extensive set of space station parts to Kerbal Space Program
52 stars 43 forks source link

Feature Request: B9 Plurals #240

Open hemeac opened 4 years ago

hemeac commented 4 years ago

I have found switcherDescriptionPlural is useful for making the PAW a bit more informative and have created a simple patch to help label the switchable parts. Just in case you want to incorporate in the future. I've set it to run after the pass in which you convert the Hitchhiker and Mobile Processing Lab

//B9 Plurals
@PART[sspx-*]:NEEDS[StationPartsExpansionRedux]:HAS[@MODULE[ModuleB9PartSwitch]]:AFTER[zzzzStationParts]
{
    @MODULE[ModuleB9PartSwitch]:HAS[#moduleID[endcapSwitch]]
    {
        %switcherDescriptionPlural = Upper End Caps
    }

    @MODULE[ModuleB9PartSwitch]:HAS[#moduleID[endcapSwitchLower]]
    {
        %switcherDescriptionPlural = Lower End Caps
    }
    @MODULE[ModuleB9PartSwitch]:HAS[#moduleID[endcapSwitch2]]
    {
        %switcherDescriptionPlural = Lower End Caps
    }
    @MODULE[ModuleB9PartSwitch]:NEEDS[StationPartsExpansionMetal]:HAS[#moduleID[surfaceSwitch]]
    {
        %switcherDescriptionPlural = Surface Types
    }
}
ChrisAdderley commented 4 years ago

This is a cool update and I'd accept it as a PR (assuming you changed the text to localization keys).

On Fri, Sep 11, 2020 at 3:09 PM Trevor Kollmann notifications@github.com wrote:

I have found switcherDescriptionPlural is useful for making the PAW a bit more informative and have created a simple patch to help label the switchable parts. Just in case you want to incorporate in the future. I've set it to run after the pass in which you convert the Hitchhiker and Mobile Processing Lab

//B9 Plurals @PART[sspx-*]:NEEDS[StationPartsExpansionRedux]:HAS[@MODULE[ModuleB9PartSwitch]]:AFTER[zzzzStationParts] { @MODULE[ModuleB9PartSwitch]:HAS[#moduleID[endcapSwitch]] { %switcherDescriptionPlural = Upper End Caps }

@MODULE[ModuleB9PartSwitch]:HAS[#moduleID[endcapSwitchLower]] { %switcherDescriptionPlural = Lower End Caps } @MODULE[ModuleB9PartSwitch]:HAS[#moduleID[endcapSwitch2]] { %switcherDescriptionPlural = Lower End Caps } @MODULE[ModuleB9PartSwitch]:NEEDS[StationPartsExpansionMetal]:HAS[#moduleID[surfaceSwitch]] { %switcherDescriptionPlural = Surface Types } }

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ChrisAdderley/StationPartsExpansionRedux/issues/240, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLBOUGCPXUREFYBXXF3HFTSFKN2NANCNFSM4RIN5LRQ .