mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 21:19:00 +01:00
Merge pull request #3724 from KasparoVy/redoes-redoing-suit-adjustment
Suit Adjustment Bugfixes, Fixes #3703, Fixes #3707 and Fixes #3752, Adds Blueshield Coat in_hands and Hulk Jacket Destruction
This commit is contained in:
@@ -289,7 +289,7 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/mask/proc/adjustmask(var/mob/user)
|
||||
var/mob/living/carbon/human/H = usr //Used to check if the mask is on the head, to check if the hands are full, and to turn off internals if they were on when the mask was pushed out of the way.
|
||||
if(!ignore_maskadjust)
|
||||
if(!user.canmove || user.stat || user.restrained())
|
||||
if(user.incapacitated()) //This check allows you to adjust your masks while you're buckled into chairs or beds.
|
||||
return
|
||||
if(mask_adjusted)
|
||||
icon_state = copytext(icon_state, 1, findtext(icon_state, "_up")) /*Trims the '_up' off the end of the icon state, thus reverting to the most recent previous state.
|
||||
@@ -331,16 +331,10 @@ BLIND // can't see anything
|
||||
if(initial(flags_inv) == HIDEFACE) //Means that you won't have to take off and put back on simple things like breath masks which, realistically, can just be pulled down off your face.
|
||||
if(H.l_hand && H.r_hand) //If both hands are occupied, drop the object on the ground.
|
||||
user.unEquip(src)
|
||||
else
|
||||
else //Otherwise, put it in an available hand, the active one preferentially.
|
||||
src.loc = user
|
||||
user.wear_mask = null
|
||||
if(!(H.l_hand) && H.r_hand) //If only the left hand is free, put the bandana there instead.
|
||||
user.put_in_l_hand(src)
|
||||
else if(!(H.r_hand) && H.l_hand) //Otherwise if only the right hand is free, put the bandana there instead.
|
||||
user.put_in_r_hand(src)
|
||||
else if(!(H.l_hand && H.r_hand)) //Otherwise if both hands are free, pick the active one to put the bandana into.
|
||||
user.put_in_active_hand(src)
|
||||
|
||||
user.put_in_hands(src)
|
||||
usr.update_inv_wear_mask()
|
||||
usr.update_inv_head()
|
||||
|
||||
@@ -421,30 +415,46 @@ BLIND // can't see anything
|
||||
//Proc that opens and closes jackets.
|
||||
/obj/item/clothing/suit/proc/adjustsuit(var/mob/user)
|
||||
if(!ignore_suitadjust)
|
||||
if(!user.canmove || user.stat || user.restrained())
|
||||
return
|
||||
if(suit_adjusted)
|
||||
var/flavour = "close"
|
||||
icon_state = initial(icon_state)
|
||||
item_state = initial(item_state)
|
||||
if(adjust_flavour)
|
||||
flavour = "[copytext(adjust_flavour, 3, lentext(adjust_flavour) + 1)] up" //Trims off the 'un' at the beginning of the word. unzip -> zip, unbutton->button.
|
||||
user << "You [flavour] \the [src]."
|
||||
suit_adjusted = 0 //Suit is no longer adjusted.
|
||||
else
|
||||
var/flavour = "close"
|
||||
icon_state += "_open"
|
||||
item_state += "_open"
|
||||
if(adjust_flavour)
|
||||
flavour = "[adjust_flavour]"
|
||||
user << "You [flavour] \the [src]."
|
||||
suit_adjusted = 1 //Suit's adjusted.
|
||||
if(!user.incapacitated())
|
||||
if(!(HULK in user.mutations))
|
||||
if(suit_adjusted)
|
||||
var/flavour = "close"
|
||||
icon_state = copytext(icon_state, 1, findtext(icon_state, "_open")) /*Trims the '_open' off the end of the icon state, thus avoiding a case where jackets that start open will
|
||||
end up with a suffix of _open_open if adjusted twice, since their initial state is _open. */
|
||||
item_state = copytext(item_state, 1, findtext(item_state, "_open"))
|
||||
if(adjust_flavour)
|
||||
flavour = "[copytext(adjust_flavour, 3, lentext(adjust_flavour) + 1)] up" //Trims off the 'un' at the beginning of the word. unzip -> zip, unbutton->button.
|
||||
user << "You [flavour] \the [src]."
|
||||
suit_adjusted = 0 //Suit is no longer adjusted.
|
||||
else
|
||||
var/flavour = "open"
|
||||
icon_state += "_open"
|
||||
item_state += "_open"
|
||||
if(adjust_flavour)
|
||||
flavour = "[adjust_flavour]"
|
||||
user << "You [flavour] \the [src]."
|
||||
suit_adjusted = 1 //Suit's adjusted.
|
||||
else
|
||||
if(user.canUnEquip(src)) //Checks to see if the item can be unequipped. If so, lets shred. Otherwise, struggle and fail.
|
||||
if(contents) //If the suit's got any storage capability...
|
||||
for(var/obj/item/O in contents) //AVOIDING ITEM LOSS. Check through everything that's stored in the jacket and see if one of the items is a pocket.
|
||||
if(istype(O, /obj/item/weapon/storage/internal)) //If it's a pocket...
|
||||
if(O.contents) //Check to see if the pocket's got anything in it.
|
||||
for(var/obj/item/I in O.contents) //Dump the pocket out onto the floor below the user.
|
||||
user.unEquip(I,1)
|
||||
|
||||
usr.update_inv_wear_suit()
|
||||
user.visible_message("<span class='warning'>[user] bellows, [pick("shredding", "ripping open", "tearing off")] their jacket in a fit of rage!</span>","<span class='warning'>You accidentally [pick("shred", "rend", "tear apart")] \the [src] with your [pick("excessive", "extreme", "insane", "monstrous", "ridiculous", "unreal", "stupendous")] [pick("power", "strength")]!</span>")
|
||||
user.unEquip(src)
|
||||
qdel(src) //Now that the pockets have been emptied, we can safely destroy the jacket.
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
|
||||
else
|
||||
user << "<span class='warning'>You yank and pull at \the [src] with your [pick("excessive", "extreme", "insane", "monstrous", "ridiculous", "unreal", "stupendous")] [pick("power", "strength")], however you are unable to change its state!</span>" //Yep, that's all they get. Avoids having to snowflake in a cooldown.
|
||||
return
|
||||
user.update_inv_wear_suit()
|
||||
else
|
||||
usr << "<span class='notice'>You attempt to button up the velcro on \the [src], before promptly realising how retarded you are.</span>"
|
||||
user << "<span class='notice'>You attempt to button up the velcro on \the [src], before promptly realising how retarded you are.</span>"
|
||||
|
||||
/obj/item/clothing/suit/verb/openjacket(var/mob/user)
|
||||
/obj/item/clothing/suit/verb/openjacket(var/mob/user) //The verb you can use to adjust jackets.
|
||||
set name = "Open/Close Jacket"
|
||||
set category = "Object"
|
||||
set src in usr
|
||||
@@ -455,7 +465,7 @@ BLIND // can't see anything
|
||||
/obj/item/clothing/suit/ui_action_click() //This is what happens when you click the HUD action button to adjust your suit.
|
||||
if(!ignore_suitadjust)
|
||||
adjustsuit(usr)
|
||||
else ..() //This is required in order to ensure that the UI buttons for hardsuits (i.e. syndicate and the chronosuit) and the RD's RA vest still work.
|
||||
else ..() //This is required in order to ensure that the UI buttons for items that have alternate functions tied to UI buttons still work.
|
||||
|
||||
//Spacesuit
|
||||
//Note: Everything in modules/clothing/spacesuits should have the entire suit grouped together.
|
||||
@@ -491,7 +501,7 @@ BLIND // can't see anything
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank)
|
||||
slowdown = 2
|
||||
armor = list(melee = 0, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 100, rad = 50)
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT||HIDETAIL
|
||||
flags_inv = HIDEGLOVES|HIDESHOES|HIDEJUMPSUIT|HIDETAIL
|
||||
cold_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
min_cold_protection_temperature = SPACE_SUIT_MIN_TEMP_PROTECT
|
||||
heat_protection = UPPER_TORSO | LOWER_TORSO | LEGS | FEET | ARMS | HANDS
|
||||
|
||||
@@ -67,10 +67,11 @@
|
||||
/obj/item/clothing/suit/armor/hos/alt
|
||||
name = "armored trenchoat"
|
||||
desc = "A trenchcoat enchanced with a special lightweight kevlar. The epitome of tactical plainclothes."
|
||||
icon_state = "hostrench"
|
||||
item_state = "hostrench"
|
||||
icon_state = "hostrench_open"
|
||||
item_state = "hostrench_open"
|
||||
flags_inv = 0
|
||||
ignore_suitadjust = 0
|
||||
suit_adjusted = 1
|
||||
action_button_name = "Open/Close Trenchcoat"
|
||||
adjust_flavour = "unbutton"
|
||||
|
||||
|
||||
@@ -166,7 +166,7 @@
|
||||
name = "blueshield coat"
|
||||
desc = "NT deluxe ripoff. You finally have your own coat."
|
||||
icon_state = "blueshieldcoat"
|
||||
item_state = "det_suit"
|
||||
item_state = "blueshieldcoat"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
|
||||
allowed = list(/obj/item/weapon/gun/energy,/obj/item/weapon/reagent_containers/spray/pepper,/obj/item/weapon/gun/projectile,/obj/item/ammo_box,/obj/item/ammo_casing,/obj/item/weapon/melee/baton,/obj/item/weapon/restraints/handcuffs,/obj/item/device/flashlight/seclite,/obj/item/weapon/melee/classic_baton/telescopic)
|
||||
@@ -226,7 +226,7 @@
|
||||
name = "\improper Internal Affairs jacket"
|
||||
desc = "A smooth black jacket."
|
||||
icon_state = "ia_jacket_open"
|
||||
item_state = "ia_jacket"
|
||||
item_state = "ia_jacket_open"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
ignore_suitadjust = 0
|
||||
@@ -238,7 +238,7 @@
|
||||
name = "\improper NanoTrasen Representative jacket"
|
||||
desc = "A fancy black jacket, standard issue to NanoTrasen Represenatives."
|
||||
icon_state = "ntrep"
|
||||
item_state = "ia_jacket"
|
||||
item_state = "ntrep"
|
||||
blood_overlay_type = "coat"
|
||||
body_parts_covered = UPPER_TORSO|ARMS
|
||||
ignore_suitadjust = 0
|
||||
@@ -250,7 +250,7 @@
|
||||
name = "first responder jacket"
|
||||
desc = "A high-visibility jacket worn by medical first responders."
|
||||
icon_state = "fr_jacket_open"
|
||||
item_state = "fr_jacket"
|
||||
item_state = "fr_jacket_open"
|
||||
blood_overlay_type = "armor"
|
||||
allowed = list(/obj/item/stack/medical, /obj/item/weapon/reagent_containers/dropper, /obj/item/weapon/reagent_containers/hypospray, /obj/item/weapon/reagent_containers/syringe, \
|
||||
/obj/item/device/healthanalyzer, /obj/item/device/antibody_scanner, /obj/item/device/flashlight, /obj/item/device/radio, /obj/item/weapon/tank/emergency_oxygen,/obj/item/device/rad_laser)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
name = "labcoat"
|
||||
desc = "A suit that protects against minor chemical spills."
|
||||
icon_state = "labcoat_open"
|
||||
item_state = "labcoat"
|
||||
item_state = "labcoat_open"
|
||||
ignore_suitadjust = 0
|
||||
suit_adjusted = 1
|
||||
blood_overlay_type = "coat"
|
||||
@@ -20,7 +20,7 @@
|
||||
name = "chief medical officer's labcoat"
|
||||
desc = "Bluer than the standard model."
|
||||
icon_state = "labcoat_cmo_open"
|
||||
item_state = "labcoat_cmo"
|
||||
item_state = "labcoat_cmo_open"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
@@ -30,7 +30,7 @@
|
||||
name = "mad scientist's labcoat"
|
||||
desc = "It makes you look capable of konking someone on the noggin and shooting them into space."
|
||||
icon_state = "labcoat_green_open"
|
||||
item_state = "labcoat_green"
|
||||
item_state = "labcoat_green_open"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
@@ -40,6 +40,7 @@
|
||||
name = "geneticist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a blue stripe on the shoulder."
|
||||
icon_state = "labcoat_gen_open"
|
||||
item_state = "labcoat_gen_open"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
@@ -49,6 +50,7 @@
|
||||
name = "chemist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has an orange stripe on the shoulder."
|
||||
icon_state = "labcoat_chem_open"
|
||||
item_state = "labcoat_chem_open"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
@@ -67,6 +69,7 @@
|
||||
name = "scientist labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a purple stripe on the shoulder."
|
||||
icon_state = "labcoat_tox_open"
|
||||
item_state = "labcoat_tox_open"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
@@ -76,6 +79,7 @@
|
||||
name = "coroner labcoat"
|
||||
desc = "A suit that protects against minor chemical spills. Has a black stripe on the shoulder."
|
||||
icon_state = "labcoat_mort_open"
|
||||
item_state = "labcoat_mort_open"
|
||||
species_fit = list("Vox")
|
||||
sprite_sheets = list(
|
||||
"Vox" = 'icons/mob/species/vox/suit.dmi'
|
||||
|
||||
@@ -340,6 +340,8 @@
|
||||
icon_state = "militaryjacket"
|
||||
item_state = "militaryjacket"
|
||||
ignore_suitadjust = 1
|
||||
action_button_name = null
|
||||
adjust_flavour = null
|
||||
allowed = list(/obj/item/device/flashlight,/obj/item/weapon/tank/emergency_oxygen,/obj/item/toy,/obj/item/weapon/storage/fancy/cigarettes,/obj/item/weapon/lighter,/obj/item/weapon/gun/projectile/automatic/pistol,/obj/item/weapon/gun/projectile/revolver,/obj/item/weapon/gun/projectile/revolver/detective)
|
||||
|
||||
/obj/item/clothing/suit/xenos
|
||||
@@ -442,6 +444,7 @@
|
||||
desc = "Pompadour not included."
|
||||
icon_state = "leatherjacket"
|
||||
ignore_suitadjust = 1
|
||||
action_button_name = null
|
||||
adjust_flavour = null
|
||||
|
||||
/obj/item/clothing/suit/officercoat
|
||||
|
||||
@@ -49,4 +49,4 @@
|
||||
L += G.gift
|
||||
if (istype(G.gift, /obj/item/weapon/storage))
|
||||
L += G.gift:return_inv()
|
||||
return L
|
||||
return L
|
||||
|
||||
@@ -138,6 +138,8 @@
|
||||
icon_state = "kidosvest"
|
||||
item_state = "kidosvest"
|
||||
ignore_suitadjust = 1
|
||||
action_button_name = null
|
||||
adjust_flavour = null
|
||||
|
||||
/obj/item/clothing/suit/fluff/kluys // Kluys: Cripty Pandaen
|
||||
name = "Nano Fibre Jacket"
|
||||
@@ -175,7 +177,6 @@
|
||||
desc = "A suit that protects against minor chemical spills. Has a red stripe on the shoulders and rolled up sleeves."
|
||||
icon = 'icons/obj/custom_items.dmi'
|
||||
icon_state = "labcoat_red_open"
|
||||
ignore_suitadjust = 1
|
||||
|
||||
/obj/item/clothing/suit/fluff/stobarico_greatcoat // Stobarico: F.U.R.R.Y
|
||||
name = "\improper F.U.R.R.Y's Nanotrasen Greatcoat"
|
||||
@@ -249,6 +250,8 @@
|
||||
icon_state = "fox_jacket"
|
||||
item_state = "fox_jacket"
|
||||
ignore_suitadjust = 1
|
||||
action_button_name = null
|
||||
adjust_flavour = null
|
||||
|
||||
/obj/item/clothing/under/fluff/fox
|
||||
name = "Aeronautics Jumpsuit"
|
||||
|
||||
Reference in New Issue
Block a user