Lots of work on hardsuits, commented out some broken WIP code, did some renaming, deleted now-redundant species-specific hardsuits.

This commit is contained in:
Zuhayr
2014-05-27 01:18:07 +09:30
parent 13046655e8
commit 4538fbabca
7 changed files with 181 additions and 275 deletions
+32 -22
View File
@@ -7,41 +7,51 @@
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
var/list/target_species = list("Human","Skrell")
var/list/permitted_types = list(
/obj/item/clothing/head/helmet/space/rig,
/obj/item/clothing/suit/space/rig
)
/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))
if(!parts)
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
user.drop_from_inventory(src)
del(src)
return
/* TODO: list comparison
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
user.visible_message("\red [user] opens \the [src] and modifies \the [O].","\red You open \the [src] and modify \the [O].")
var/obj/item/clothing/I = O
if(istype(I))
I.species_restricted = target_species.Copy()
parts--
if(!parts)
user.drop_from_inventory(src)
del(src)
/obj/item/device/modkit/tajaran
name = "tajara hardsuit modification kit"
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 Tajara."
to_helmet = /obj/item/clothing/head/helmet/space/rig/tajara
to_suit = /obj/item/clothing/suit/space/rig/tajara
target_species = list("Tajaran")
/obj/item/device/modkit/examine()
..()
usr << "It looks as though it modifies hardsuits to fit the following users:"
for(var/species in target_species)
usr << "- [species]"