mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-14 00:23:29 +01:00
Variable typo fix, add proper Unati/Tajaran hardsuit conversion from Baystation
This commit is contained in:
@@ -50,6 +50,7 @@
|
||||
*/
|
||||
var/list/sprite_sheets = null
|
||||
var/icon_override = null //Used to override hardcoded clothing dmis in human clothing proc.
|
||||
var/sprite_sheets_obj = null //Used to override hardcoded clothing inventory object dmis in human clothing proc.
|
||||
var/list/species_fit = null //This object has a different appearance when worn by these species
|
||||
|
||||
/obj/item/Destroy()
|
||||
|
||||
@@ -7,14 +7,19 @@
|
||||
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 = "Human"
|
||||
|
||||
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)
|
||||
/obj/item/device/modkit/afterattack(obj/O, mob/user as mob, proximity)
|
||||
if(!proximity)
|
||||
return
|
||||
|
||||
if (!target_species)
|
||||
return //it shouldn't be null, okay?
|
||||
|
||||
if(!parts)
|
||||
user << "<span class='warning'>This kit has no parts for this modification left.</span>"
|
||||
@@ -22,11 +27,21 @@
|
||||
del(src)
|
||||
return
|
||||
|
||||
/* TODO: list comparison
|
||||
if(istype(O,to_type))
|
||||
user << "<span class='notice'>[O] is already modified.</span>"
|
||||
var/allowed = 0
|
||||
for (var/permitted_type in permitted_types)
|
||||
if(istype(O, permitted_type))
|
||||
allowed = 1
|
||||
|
||||
var/obj/item/clothing/I = O
|
||||
if (!istype(I) || !allowed)
|
||||
user << "<span class='notice'>[src] is unable to modify that.</span>"
|
||||
return
|
||||
|
||||
var/excluding = ("exclude" in I.species_restricted)
|
||||
var/in_list = (target_species in I.species_restricted)
|
||||
if (excluding ^ in_list)
|
||||
user << "<span class='notice'>[I] is already modified.</span>"
|
||||
return
|
||||
*/
|
||||
|
||||
if(!isturf(O.loc))
|
||||
user << "<span class='warning'>[O] must be safely placed on the ground for modification.</span>"
|
||||
@@ -36,22 +51,27 @@
|
||||
|
||||
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()
|
||||
I.refit_for_species(target_species)
|
||||
|
||||
if (istype(I, /obj/item/clothing/head/helmet))
|
||||
parts &= ~MODKIT_HELMET
|
||||
if (istype(I, /obj/item/clothing/suit))
|
||||
parts &= ~MODKIT_SUIT
|
||||
|
||||
parts--
|
||||
if(!parts)
|
||||
user.drop_from_inventory(src)
|
||||
del(src)
|
||||
|
||||
/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]"
|
||||
usr << "It looks as though it modifies hardsuits to fit [target_species] 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 Tajaran."
|
||||
target_species = "Tajaran"
|
||||
|
||||
/obj/item/device/modkit/unathi
|
||||
name = "Unathi 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 Unathi."
|
||||
target_species = "Unathi"
|
||||
Reference in New Issue
Block a user