Adds a system for refitting species clothing

This commit is contained in:
mwerezak
2014-07-19 22:08:31 -04:00
parent 73d3883da3
commit e8c4ad07bb
4 changed files with 46 additions and 22 deletions
+12
View File
@@ -49,6 +49,18 @@
var/list/sprite_sheets = null
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
/* Species-specific sprite sheets for object and inhand sprites
Works similarly to worn sprite_sheets, except the alternate sprites are used when the clothing/refit_for_species() proc is called.
*/
var/list/sprite_sheets_obj = null
//Inhand is not as big a deal as the object sprites, so I'm not sure if these are worth the extra vars.
//Maybe in the future:
//var/list/sprite_sheets_inhand_l = null
//var/list/sprite_sheets_inhand_r = null
//var/icon_l_hand = 'icons/mob/items_lefthand.dmi'
//var/icon_r_hand = 'icons/mob/items_righthand.dmi'
/obj/item/device
icon = 'icons/obj/device.dmi'
+10 -9
View File
@@ -7,7 +7,7 @@
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/list/target_species = list("Human","Skrell")
var/target_species = null
var/list/permitted_types = list(
/obj/item/clothing/head/helmet/space/rig,
@@ -38,20 +38,21 @@
var/obj/item/clothing/I = O
if(istype(I))
I.species_restricted = target_species.Copy()
if (target_species)
I.refit_for_species(target_species)
else
I.refit_for_species("Human")
parts--
if(!parts)
user.drop_from_inventory(src)
del(src)
/obj/item/device/modkit/examine()
..()
usr << "It looks as though it modifies hardsuits to fit the following [target_species? target_species : "Human"] 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 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]"
target_species = "Tajaran"