Skip to content

Quick Slot Type

MrPurple6411 edited this page Jul 27, 2020 · 1 revision

Disclaimer

The examples depicted below will NOT work alone! You will need to use this in conjunction with Editing an item's equipment type and other stuff to make it work. For info on how this can be used, look at (Link missing to ID: AddUpgrades)

What are quick slot types?

QuickSlotType is an enum that describes how an upgrade behaves in the quick slot bar. This only works with upgrades or items that have an EquipmentType equal to CyclopsModule, VehicleModule, SeamothModule, ExosuitModule and ExosuitArm. The possible values for this enum are listed below.

public enum QuickSlotType
{
    None, // ?
    Passive, // The item doesn't have any user interaction on the quick slot bar
    Instant, // ?
    Selectable, // The item can be selected using the corresponding quick slot key, then activated by the use item key (usually one the mouse buttons)
    SelectableChargeable, // ?
    Chargeable, // ?
    Toggleable // The item is there to activate and deactivate an effect (Currently isn't used by any item still in the game)
}

How can edit an item's quick slot type?

To edit an item's quick slot type, you need to call the CraftDataHandler.SetQuickSlotType() method sitting in the SMLHelper.V2.Handlers namespace

Overloads

There is only one overload for this method:

CraftDataHandler.SetQuickSlotType([TechType] techType, [QuickSlotType] quickSlotType);

Parameters

  • [TechType] techType is the item that you want to modify the quick slot type for. This can be both an existing and a custom item.

Example: TechType.Titanium

  • [QuickSlotType] quickSlotType is the quick slot type to set for the item.

Example: QuickSlotType.Passive

Usage

CraftDataHandler.SetQuickSlotType(TechType.Titanium, QuickSlotType.Passive);

Warning: It is dangerous to edit quick slot types for items that already have one (upgrades), because they might break!

Example: Don't edit the equipment type for the Depth Module Mk2, because then it won't have any passive effects and it will not work!


Please note that some pages are under construction and the links to them will be enabled as they are completed

Home
Quick Start Guide

[Adding]

[Editing]

[General Utilities]

[Language]

Clone this wiki locally