mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Generalized all ninja power and gear code to work with new rig system. Added shurikens, weapon mount, more work on deployable items. Readded energy nets and energy blades. Grenade launcher/charge stuff, interface stuff. Renamed previously existing rigs to voidsuits, restructured rig and voidsuit files. Refactored the energy net and teleportation proc. Totally rewrote AI core/intellicard transfer procs. Added rig sprites by Mordeth221, added step by steap suit sealing/inability to interfere with suit sealing process. Updated map paths to use voidsuits. Added chemical dispenser functionality, added power sink, added atom/drain_power() proc for later use. Added rigsuit verbs, added voice changer. Renamed MASKINTERNALS to AIRTIGHT, added internals checks for airtight helmets. Added drain_power() procs to vulnerable machinery. Reimplemented data theft. Added suit maluses for losing your cell while wearing one. Transitioned the rig suits to a back-mounted item that also controls a chestpiece. Converted rig module to a storage item, convert ERT voidsuits to hardsuits.
72 lines
2.1 KiB
Plaintext
72 lines
2.1 KiB
Plaintext
#define MODKIT_HELMET 1
|
|
#define MODKIT_SUIT 2
|
|
#define MODKIT_FULL 3
|
|
|
|
/obj/item/device/modkit
|
|
name = "hardsuit modification kit"
|
|
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
|
|
icon_state = "modkit"
|
|
var/parts = MODKIT_FULL
|
|
var/target_species = "Human"
|
|
|
|
var/list/permitted_types = list(
|
|
/obj/item/clothing/head/helmet/space/void,
|
|
/obj/item/clothing/suit/space/void
|
|
)
|
|
|
|
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
|
if(!proximity)
|
|
return
|
|
|
|
if (!target_species)
|
|
return //it shouldn't be null, okay?
|
|
|
|
if(!parts)
|
|
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
|
user.drop_from_inventory(src)
|
|
del(src)
|
|
return
|
|
|
|
var/allowed = 0
|
|
for (var/permitted_type in permitted_types)
|
|
if(istype(O, permitted_type))
|
|
allowed = 1
|
|
|
|
var/obj/item/clothing/I = O
|
|
if (!istype(I) || !allowed)
|
|
user << "<span class='notice'>[src] is unable to modify that.</span>"
|
|
return
|
|
|
|
var/excluding = ("exclude" in I.species_restricted)
|
|
var/in_list = (target_species in I.species_restricted)
|
|
if (excluding ^ in_list)
|
|
user << "<span class='notice'>[I] is already modified.</span>"
|
|
return
|
|
|
|
if(!isturf(O.loc))
|
|
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
|
|
return
|
|
|
|
playsound(user.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
|
|
|
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
|
|
|
|
I.refit_for_species(target_species)
|
|
|
|
if (istype(I, /obj/item/clothing/head/helmet))
|
|
parts &= ~MODKIT_HELMET
|
|
if (istype(I, /obj/item/clothing/suit))
|
|
parts &= ~MODKIT_SUIT
|
|
|
|
if(!parts)
|
|
user.drop_from_inventory(src)
|
|
del(src)
|
|
|
|
/obj/item/device/modkit/examine(mob/user)
|
|
..(user)
|
|
user << "It looks as though it modifies hardsuits to fit [target_species] users."
|
|
|
|
/obj/item/device/modkit/tajaran
|
|
name = "tajaran hardsuit modification kit"
|
|
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user. This one looks like it's meant for Tajaran."
|
|
target_species = "Tajara" |