mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Allows modkits to be created for any item. (#4450)
* Adds modular modkits * Adds explorer suit functionality to voidsuit modkits.
This commit is contained in:
committed by
Atermonera
parent
8255744c2b
commit
a190ec5725
@@ -9,11 +9,13 @@
|
||||
// On-mob icons must be in CUSTOM_ITEM_MOB with state name [item_icon].
|
||||
// Inhands must be in CUSTOM_ITEM_MOB as [icon_state]_l and [icon_state]_r.
|
||||
|
||||
// Kits must have mech icons in CUSTOM_ITEM_OBJ under [kit_icon].
|
||||
// Mech kits must have mech icons in CUSTOM_ITEM_OBJ under [kit_icon].
|
||||
// Broken must be [kit_icon]-broken and open must be [kit_icon]-open.
|
||||
|
||||
// Kits must also have hardsuit icons in CUSTOM_ITEM_MOB as [kit_icon]_suit
|
||||
// and [kit_icon]_helmet, and in CUSTOM_ITEM_OBJ as [kit_icon].
|
||||
// Voidsuits and hooded kits must also have hardsuit icons in CUSTOM_ITEM_MOB as [kit_icon]_suit
|
||||
// and [kit_icon]_helmet, and in CUSTOM_ITEM_OBJ as [kit_icon]_suit.
|
||||
// If hooded, have [kit_icon]_suit_t in both files for the hood-up version.
|
||||
// If not using the default overlay, have [kit_icon]_light in both files for custom light overlays.
|
||||
|
||||
/var/list/custom_items = list()
|
||||
|
||||
@@ -30,7 +32,7 @@
|
||||
var/kit_name
|
||||
var/kit_desc
|
||||
var/kit_icon
|
||||
var/additional_data
|
||||
var/additional_data //for modular modkits, item path; for mech modkits, allowed mechs; for voidsuit modkits, light overlays
|
||||
|
||||
/datum/custom_item/proc/spawn_item(var/newloc)
|
||||
var/obj/item/citem = new item_path(newloc)
|
||||
@@ -69,18 +71,7 @@
|
||||
// Kits are dumb so this is going to have to be hardcoded/snowflake.
|
||||
if(istype(item, /obj/item/device/kit))
|
||||
var/obj/item/device/kit/K = item
|
||||
K.new_name = kit_name
|
||||
K.new_desc = kit_desc
|
||||
K.new_icon = kit_icon
|
||||
K.new_icon_file = CUSTOM_ITEM_OBJ
|
||||
if(istype(item, /obj/item/device/kit/paint))
|
||||
var/obj/item/device/kit/paint/kit = item
|
||||
kit.allowed_types = splittext(additional_data, ", ")
|
||||
else if(istype(item, /obj/item/device/kit/suit))
|
||||
var/obj/item/device/kit/suit/kit = item
|
||||
kit.new_light_overlay = additional_data
|
||||
kit.new_mob_icon_file = CUSTOM_ITEM_MOB
|
||||
|
||||
K.set_info(kit_name, kit_desc, kit_icon, additional_data = additional_data)
|
||||
return item
|
||||
|
||||
/datum/custom_item/proc/apply_inherit_inhands(var/obj/item/item)
|
||||
|
||||
Reference in New Issue
Block a user