Skip to content

Equipment Type

MrPurple6411 edited this page Jul 27, 2020 · 1 revision

What are equipment types?

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
}

How can edit an item's equipment type?

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

Overloads

There is only one overload for this method:

CraftDataHandler.SetEquipmentType([TechType] techType, [EquipmentType] equipmentType);

Parameters

  • [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

Usage

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

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