Makes the kit very very simple

As simple as it can get, I think.
This commit is contained in:
Jarcolr
2014-06-08 11:12:29 +03:00
parent 553d1f5f00
commit 32a015d83c
2 changed files with 16 additions and 45 deletions

View File

@@ -487,53 +487,24 @@
/obj/item/device/kit/fluff/salvage
name = "salvage hardsuit modification kit"
desc = "A kit containing all the needed tools and parts to modify a hardsuit into a salvage hardsuit."
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/helmet/space/rig/medical/fluff/salvage
var/to_suit = /obj/item/clothing/suit/space/rig/medical/fluff/salvage
/obj/item/device/kit/fluff/salvage/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/clothing/head/helmet/space/rig/medical/fluff/salvage
name = "Salvage Hardsuit helmet"
desc = "An orange hardsuit helmet used by salvage flotillas. Has reinforced plating."
icon = 'icons/obj/custom_items.dmi'
icon_state = "salvage_helmet"
item_state = "salvage_helmet"
icon_state = "salvage_kit"
/obj/item/clothing/suit/space/rig/medical/fluff/salvage
name = "Salvage Hardsuit"
desc = "An orange hardsuit used by salvage flotillas. Has reinforced plating."
icon = 'icons/obj/custom_items.dmi'
icon_state = "salvage_suit"
item_state = "salvage_suit"
/obj/item/clothing/head/helmet/space/rig/medical/attackby(var/obj/item/O as obj, mob/user as mob)
if(istype(O,/obj/item/device/kit/fluff/salvage))
name = "Salvage Hardsuit helmet"
desc = "An orange hardsuit helmet used by salvage flotillas. Has reinforced plating."
icon = 'icons/obj/custom_items.dmi'
icon_state = "salvage_helmet"
item_state = "salvage_helmet"
/obj/item/clothing/suit/space/rig/medical/attackby(var/obj/item/O as obj, mob/user as mob)
if(istype(O,/obj/item/device/kit/fluff/salvage))
name = "Salvage Hardsuit"
desc = "An orange hardsuit used by salvage flotillas. Has reinforced plating."
icon = 'icons/obj/custom_items.dmi'
icon_state = "salvage_suit"
item_state = "salvage_suit"
//////////////////////////////////
//////////// Clothing ////////////