-
Notifications
You must be signed in to change notification settings - Fork 37
Equipment Type
EquipmentType
is an enum that handles special items. The possible values for this enum are listed below.
public enum EquipmentType
{
None, // Normal item
Hand, // The item can be equipped in the Hand slot
Head, // The item can be equipped in the Head slot
Body, // The item can be equipped in the Body slot
Gloves, // The item can be equipped in the Gloves slot
Foots, // The item can be equipped in the Feet slot
Tank, // The item can be equipped in the Oxygen Tank slot
Chip, // The item can be equipped in the Chip slots
CyclopsModule, // The item can be equipped in the Cyclops as an upgrade module
VehicleModule, // The item can be equipped both in the Seamoth and in the Prawn Suit as an upgrade module
NuclearReactor, // The item can be used in a Nuclear Reactor
BatteryCharger, // When batteries are thrown in it, they get charged (for buildables)
PowerCellCharger, // When power cells are thrown in it, they get charged (for buildables)
SeamothModule, // The item can be equipped in the Seamoth as an upgrade module
ExosuitModule, // The item can be equipped in the Prawn Suit as an upgrade module
ExosuitArm, // The item can be equipped in the Prawn Suit as an arm
DecoySlot // (Need actual name) Possibly for the decoy tube thing in the cyclops
}
To edit an item's equipment type, you need to call the CraftDataHandler.SetEquipmentType()
method sitting in the SMLHelper.V2.Handlers
namespace
There is only one overload for this method:
CraftDataHandler.SetEquipmentType([TechType] techType, [EquipmentType] equipmentType);
-
[TechType] techType
is the item that you want to modify the equipment type for. This can be both an existing and a custom item.
Example: TechType.Titanium
-
[EquipmentType] equipmentType
is the equipment type to set for the item.
Example: EquipmentType.Head
Using this knowledge, if we wanted to wear titanium on our head, we could do this:
CraftDataHandler.SetEquipmentType(TechType.Titanium, EquipmentType.Head);
Warning: It is dangerous to edit equipment types for items that already have one, because they might break!
Example: Don't edit the equipment type for the Radiation Helmet, because then you won't be able to wear it!
Congratulations! You have successfully made a titanium helmet! :P
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]