-
Notifications
You must be signed in to change notification settings - Fork 38
Quick Slot Type
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)
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)
}
To edit an item's quick slot type, you need to call the CraftDataHandler.SetQuickSlotType()
method sitting in the SMLHelper.V2.Handlers
namespace
There is only one overload for this method:
CraftDataHandler.SetQuickSlotType([TechType] techType, [QuickSlotType] quickSlotType);
-
[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
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!
If there is something missing or ambiguous, please create an issue or contact us on the Subnautica Modding Discord using our tags:
- PrimeSonic:
@PrimeSonic#0667
- Metious:
@Metious#3682
Please note that some pages are under construction and the links to them will be enabled as they are completed
[Adding]
- Items/GameObjects using Asset Classes
- Asynchronous loading for ModPrefab
- [Custom Scanner Unlocks]
- Items/GameObjects to the Spawning System
- [Recipes to uncraftable items]
- [Custom Mouse Click Actions]
[Editing]
- Background Type
- Crafting Time
- Equipment Type
- Quick Slot Type
- Size in Inventory
- [Recipes for craftable items]
- Harvest Settings
- BioReactor Fuel Values
- [Scanning Count/Time]
- [Spawning (Where/How often/How many)]
[General Utilities]
- In-Game Options Menu
- Adding crafting recipes for other mods items
- Using items from other mods
- Texture/Sprite Utilities
- [Adding/Playing Audio]
- Config Files using Abstract Json Config class
- Custom Console Commands
- [Registering OnSave/OnQuit Actions]
[Language]