mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Fix for #3666.
This commit is contained in:
47
code/game/objects/items/devices/modkit.dm
Normal file
47
code/game/objects/items/devices/modkit.dm
Normal file
@@ -0,0 +1,47 @@
|
||||
#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/from_helmet = /obj/item/clothing/head/helmet/space/rig
|
||||
var/from_suit = /obj/item/clothing/suit/space/rig
|
||||
var/to_helmet = /obj/item/clothing/head/cardborg
|
||||
var/to_suit = /obj/item/clothing/suit/cardborg
|
||||
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob)
|
||||
var/flag
|
||||
var/to_type
|
||||
if(istype(O,from_helmet))
|
||||
flag = MODKIT_HELMET
|
||||
to_type = to_helmet
|
||||
else if(istype(O,from_suit))
|
||||
flag = MODKIT_SUIT
|
||||
to_type = to_suit
|
||||
else
|
||||
return
|
||||
if(!(parts & flag))
|
||||
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
||||
return
|
||||
if(istype(O,to_type))
|
||||
user << "<span class='notice'>[O] 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)
|
||||
var/N = new to_type(O.loc)
|
||||
user.visible_message("\red [user] opens \the [src] and modifies \the [O] into \the [N].","\red You open \the [src] and modify \the [O] into \the [N].")
|
||||
del(O)
|
||||
parts &= ~flag
|
||||
if(!parts)
|
||||
del(src)
|
||||
|
||||
/obj/item/device/modkit/tajaran
|
||||
name = "tajara 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 Tajara."
|
||||
to_helmet = /obj/item/clothing/head/helmet/space/rig/tajara
|
||||
to_suit = /obj/item/clothing/suit/space/rig/tajara
|
||||
@@ -1,33 +1,3 @@
|
||||
//Species modification item.
|
||||
|
||||
/obj/item/weapon/modkit/tajaran
|
||||
name = "hardsuit modification kit"
|
||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another species. This one looks like it's meant for Tajara."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "royce_kit"
|
||||
|
||||
/obj/item/clothing/head/helmet/space/rig/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/modkit/tajaran))
|
||||
user.drop_item()
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\red You painstakingly modify [src] to make it more suitable for a Tajaran user."
|
||||
new /obj/item/clothing/head/helmet/space/rig/tajara(user.loc)
|
||||
del(I)
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/clothing/suit/space/rig/attackby(obj/item/I as obj, mob/user as mob)
|
||||
if(istype(I,/obj/item/weapon/modkit/tajaran))
|
||||
user.drop_item()
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 100, 1)
|
||||
user << "\red You painstakingly modify [src] to make it more suitable for a Tajaran user."
|
||||
new /obj/item/clothing/suit/space/rig/tajara(user.loc)
|
||||
del(I)
|
||||
del(src)
|
||||
return
|
||||
..()
|
||||
|
||||
//Regular rig suits
|
||||
/obj/item/clothing/head/helmet/space/rig
|
||||
name = "engineering hardsuit helmet"
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 20 KiB |
@@ -6195,7 +6195,7 @@
|
||||
"cpg" = (/obj/structure/cable,/obj/machinery/power/tracker,/turf/simulated/floor/plating/airless,/area/solar/starboard)
|
||||
"cph" = (/turf/space,/area/vox_station/southwest_solars)
|
||||
"cpi" = (/obj/machinery/the_singularitygen{anchored = 0},/turf/simulated/floor/plating,/area/engine/engineering)
|
||||
"cpj" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/machinery/cell_charger,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/weapon/modkit/tajaran,/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva)
|
||||
"cpj" = (/obj/structure/cable{d1 = 4; d2 = 8; icon_state = "4-8"; pixel_x = 0},/obj/structure/table/reinforced,/obj/machinery/cell_charger,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/weapon/cable_coil{pixel_x = 3; pixel_y = -7},/obj/item/device/modkit/tajaran,/turf/simulated/floor{dir = 8; icon_state = "warning"},/area/ai_monitored/storage/eva)
|
||||
"cpk" = (/obj/machinery/portable_atmospherics/canister/toxins,/turf/simulated/floor/plating,/area/engine/engineering)
|
||||
"cpl" = (/obj/machinery/power/emitter,/turf/simulated/floor/plating,/area/engine/engineering)
|
||||
"cpm" = (/obj/machinery/atmospherics/portables_connector,/obj/machinery/portable_atmospherics/canister/air,/turf/simulated/floor{dir = 2; icon_state = "warning"},/area/engine/engineering)
|
||||
@@ -10171,7 +10171,7 @@
|
||||
"dNE" = (/obj/structure/window/basic{dir = 1},/obj/structure/table,/obj/item/broken_device,/turf/simulated/shuttle/floor4,/area/shuttle/vox/station)
|
||||
"dNF" = (/obj/machinery/embedded_controller/radio/airlock_controller{airpump_tag = "vox_east_vent"; exterior_door_tag = "vox_northeast_lock"; frequency = 1331; id_tag = "vox_east_control"; interior_door_tag = "vox_southeast_lock"; pixel_x = -24; req_access_txt = "150"; sensor_tag = "vox_east_sensor"},/turf/simulated/shuttle/plating,/area/shuttle/vox/station)
|
||||
"dNG" = (/obj/item/clothing/head/collectable/petehat{desc = "It smells faintly of reptile."; name = "fancy leader hat"},/turf/simulated/shuttle/floor{icon_state = "floor4"; oxygen = 0},/area/shuttle/vox/station)
|
||||
"dNH" = (/obj/structure/closet/crate,/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/rods{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/obj/item/weapon/airlock_electronics,/obj/item/weapon/airlock_electronics,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/obj/item/weapon/modkit/tajaran,/turf/simulated/floor/plating,/area/engine/engineering)
|
||||
"dNH" = (/obj/structure/closet/crate,/obj/item/stack/sheet/metal{amount = 50},/obj/item/stack/rods{amount = 50},/obj/item/stack/sheet/glass{amount = 50},/obj/item/weapon/airlock_electronics,/obj/item/weapon/airlock_electronics,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/turf/simulated/floor/plating,/area/engine/engineering)
|
||||
"dNI" = (/obj/structure/disposalpipe/segment,/turf/simulated/wall/r_wall,/area/research_outpost/anomaly)
|
||||
|
||||
(1,1,1) = {"
|
||||
|
||||
Reference in New Issue
Block a user