mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Adds a system for refitting species clothing
This commit is contained in:
@@ -1064,19 +1064,9 @@
|
|||||||
if(!target_species || !target_department)
|
if(!target_species || !target_department)
|
||||||
return
|
return
|
||||||
|
|
||||||
switch(target_species)
|
if(target_species)
|
||||||
if("Skrell")
|
if(helmet) helmet.refit_for_species(target_species)
|
||||||
if(helmet) helmet.species_restricted = list("Skrell")
|
if(suit) suit.refit_for_species(target_species)
|
||||||
if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
|
||||||
if("Human")
|
|
||||||
if(helmet) helmet.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox","Skrell")
|
|
||||||
if(suit) suit.species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
|
||||||
if("Unathi")
|
|
||||||
if(helmet) helmet.species_restricted = list("Unathi")
|
|
||||||
if(suit) suit.species_restricted = list("Unathi")
|
|
||||||
if("Tajaran")
|
|
||||||
if(helmet) helmet.species_restricted = list("Tajaran")
|
|
||||||
if(suit) suit.species_restricted = list("Tajaran")
|
|
||||||
|
|
||||||
switch(target_department)
|
switch(target_department)
|
||||||
if("Engineering")
|
if("Engineering")
|
||||||
|
|||||||
@@ -49,6 +49,18 @@
|
|||||||
var/list/sprite_sheets = null
|
var/list/sprite_sheets = null
|
||||||
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
|
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
|
/obj/item/device
|
||||||
icon = 'icons/obj/device.dmi'
|
icon = 'icons/obj/device.dmi'
|
||||||
|
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
|
desc = "A kit containing all the needed tools and parts to modify a hardsuit for another user."
|
||||||
icon_state = "modkit"
|
icon_state = "modkit"
|
||||||
var/parts = MODKIT_FULL
|
var/parts = MODKIT_FULL
|
||||||
var/list/target_species = list("Human","Skrell")
|
var/target_species = null
|
||||||
|
|
||||||
var/list/permitted_types = list(
|
var/list/permitted_types = list(
|
||||||
/obj/item/clothing/head/helmet/space/rig,
|
/obj/item/clothing/head/helmet/space/rig,
|
||||||
@@ -38,20 +38,21 @@
|
|||||||
|
|
||||||
var/obj/item/clothing/I = O
|
var/obj/item/clothing/I = O
|
||||||
if(istype(I))
|
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--
|
parts--
|
||||||
if(!parts)
|
if(!parts)
|
||||||
user.drop_from_inventory(src)
|
user.drop_from_inventory(src)
|
||||||
del(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
|
/obj/item/device/modkit/tajaran
|
||||||
name = "tajaran 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."
|
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")
|
target_species = "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]"
|
|
||||||
@@ -32,6 +32,27 @@
|
|||||||
|
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/item/clothing/proc/refit_for_species(var/target_species)
|
||||||
|
switch(target_species)
|
||||||
|
if("Human", "Skrell") //humanoid bodytypes
|
||||||
|
species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
||||||
|
else
|
||||||
|
species_restricted = list(target_species)
|
||||||
|
|
||||||
|
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
|
||||||
|
icon = sprite_sheets_obj[target_species]
|
||||||
|
|
||||||
|
/obj/item/clothing/head/helmet/refit_for_species(var/target_species)
|
||||||
|
switch(target_species)
|
||||||
|
if("Human")
|
||||||
|
species_restricted = list("exclude","Unathi","Tajaran","Diona","Vox")
|
||||||
|
else
|
||||||
|
species_restricted = list(target_species)
|
||||||
|
|
||||||
|
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
|
||||||
|
icon = sprite_sheets_obj[target_species]
|
||||||
|
|
||||||
|
|
||||||
//Ears: headsets, earmuffs and tiny objects
|
//Ears: headsets, earmuffs and tiny objects
|
||||||
/obj/item/clothing/ears
|
/obj/item/clothing/ears
|
||||||
name = "ears"
|
name = "ears"
|
||||||
|
|||||||
Reference in New Issue
Block a user