item_representation

Light weight representation of an obj/item This allow us to manipulate and store a lot of item-like objects, without it costing a ton of memory or having to instantiate all items This also allow to save loadouts with jatum, because it doesn't accept obj/item
Vars | |
bypass_vendor_check | If it's allowed to bypass the vendor check |
---|---|
colors | If the item has greyscale colors, they are saved here |
contents | The contents in the storage (If there is storage) |
item_type | The type of the object represented, to allow us to create the object when needed |
variant | If the item has an icon_state variant, save it. |
Procs | |
get_tgui_data | This is in charge of generating a visualisation of the item, that will then be gave to TGUI |
instantiate_current_storage_datum | Like instantiate_object(), but returns a /datum instead of a /item, master is REQUIRED and it must be at least an atom |
instantiate_object | This will attempt to instantiate an object. First, it tries to find that object in a vendor with enough supplies. If it finds one vendor with that item in reserve, it sells it and instantiate that item. If it fails to find a vendor, it will add that item to a list on seller to warns him that it failed Seller: The datum in charge of checking for points and buying_flags Master: used for modules, when the item need to be installed on master. Can be null User: The human trying to equip this item Return the instantatiated item if it was successfully sold, and return null otherwise |
Var Details
bypass_vendor_check

If it's allowed to bypass the vendor check
colors

If the item has greyscale colors, they are saved here
contents

The contents in the storage (If there is storage)
item_type

The type of the object represented, to allow us to create the object when needed
variant

If the item has an icon_state variant, save it.
Proc Details
get_tgui_data
This is in charge of generating a visualisation of the item, that will then be gave to TGUI
instantiate_current_storage_datum
Like instantiate_object(), but returns a /datum instead of a /item, master is REQUIRED and it must be at least an atom
instantiate_object
This will attempt to instantiate an object. First, it tries to find that object in a vendor with enough supplies. If it finds one vendor with that item in reserve, it sells it and instantiate that item. If it fails to find a vendor, it will add that item to a list on seller to warns him that it failed Seller: The datum in charge of checking for points and buying_flags Master: used for modules, when the item need to be installed on master. Can be null User: The human trying to equip this item Return the instantatiated item if it was successfully sold, and return null otherwise