Kerbal Inventory System (KIS)

Kerbal Inventory System (KIS)

1M Downloads

[Feature] Whitelist/Blacklist for an inventory or individual slots (and related goodies)

Deadpan110 opened this issue ยท 0 comments

commented

Fictional Scenario

The proton smoothie pack mod (not a real mod) enables a Kerbal to create great tasting and long lasting smoothies for deep space exploration missions.
A KIS container made to look like a tiny space age refrigerator is attached somewhere on to their craft.
The smoothie maker has only 4 slots:

  1. Accepts either strawberry or chocolate esscence
  2. Requires a nuclear fuel bottle
  3. Needs an empty drinking flask
  4. Output slot accepts no items but dispenses a full flask
MODULE
{
    name = ModuleKISInventory
    slotsX = 1
    slotsY = 4
    slot {
        X = 1
        Y = 1
        Whitelist = Strawberry_item, Chocolate_item
    }
    slot {
        X = 1
        Y = 2
        Whitelist = UraniumTank
    }
    slot {
        X = 1
        Y = 3
        Whitelist = SmoothieContainer
    }
    slot {
        X = 1
        Y = 4
        Blacklist = ALL
        GhostImage = proton-smoothie-pack/assets/blenderblades.png
    }
}

KIS could perhaps provide ghosted images for the items required in the Whitelist slots or have a means for the modder to provide their own image.

The proton-smoothie-pack.dll would hook into KIS and KSP's right click context menus providing a means to start the smoothie making process, checking the requirements are met, then taking a small amount of uranium, a little electric charge, a bit of time and then stock the output slot with a filled smoothie container of the required flavour.

The Proton Smoothie Pack also provides a chilled KIS storage container part so Kerbals can stock up their supply of Chocolate and Strawberry Proton Smoothies:

MODULE
{
    name = ModuleKISInventory
    slotsX = 6
    slotsY = 4
    InventoryWhitelist = Strawberry_Smoothie, Chocolate_Smoothie
}

Feature Summary

The above is not quite the mod I am planning but would use those particular features, in short:

  • Ability to Whitelist/Blacklist Item slots to prevent invalid items from being stored
  • Ability to Whitelist/Blacklist entire inventories to prevent invalid items from being stored
  • Optionally have KIS (or the modder) create background images for slots

Thanks and Keep up the good work!