Merge pull request #6558 from Citadel-Station-13/upstream-merge-37486
[MIRROR] Moves several clothing-specific flags from /atom to their proper type
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
icon_state = "facehugger"
|
||||
item_state = "facehugger"
|
||||
w_class = WEIGHT_CLASS_TINY //note: can be picked up by aliens unlike most other items of w_class below 4
|
||||
flags_1 = MASKINTERNALS_1
|
||||
clothing_flags = MASKINTERNALS
|
||||
throw_range = 5
|
||||
tint = 3
|
||||
flags_cover = MASKCOVERSEYES | MASKCOVERSMOUTH
|
||||
|
||||
@@ -234,7 +234,7 @@
|
||||
if(href_list["internal"])
|
||||
var/slot = text2num(href_list["internal"])
|
||||
var/obj/item/ITEM = get_item_by_slot(slot)
|
||||
if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1))
|
||||
if(ITEM && istype(ITEM, /obj/item/tank) && wear_mask && (wear_mask.clothing_flags & MASKINTERNALS))
|
||||
visible_message("<span class='danger'>[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].</span>", \
|
||||
"<span class='userdanger'>[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM.name].</span>")
|
||||
if(do_mob(usr, src, POCKET_STRIP_DELAY))
|
||||
@@ -242,7 +242,7 @@
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else if(ITEM && istype(ITEM, /obj/item/tank))
|
||||
if((wear_mask && (wear_mask.flags_1 & MASKINTERNALS_1)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
if((wear_mask && (wear_mask.clothing_flags & MASKINTERNALS)) || getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
internal = ITEM
|
||||
update_internals_hud_icon(1)
|
||||
|
||||
|
||||
@@ -495,12 +495,17 @@
|
||||
. = 0
|
||||
// If targeting the head, see if the head item is thin enough.
|
||||
// If targeting anything else, see if the wear suit is thin enough.
|
||||
if(above_neck(target_zone))
|
||||
if(head && head.flags_1 & THICKMATERIAL_1 && !penetrate_thick)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && wear_suit.flags_1 & THICKMATERIAL_1 && !penetrate_thick)
|
||||
. = 0
|
||||
if (!penetrate_thick)
|
||||
if(above_neck(target_zone))
|
||||
if(head && is_type_in_typecache(head, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CH = head
|
||||
if (CH.clothing_flags & THICKMATERIAL)
|
||||
. = 0
|
||||
else
|
||||
if(wear_suit && is_type_in_typecache(wear_suit, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CS = wear_suit
|
||||
if (CS.clothing_flags & THICKMATERIAL)
|
||||
. = 0
|
||||
if(!. && error_msg && user)
|
||||
// Might need re-wording.
|
||||
to_chat(user, "<span class='alert'>There is no exposed flesh or thin material [above_neck(target_zone) ? "on [p_their()] head" : "on [p_their()] body"].</span>")
|
||||
|
||||
@@ -8,14 +8,21 @@
|
||||
/mob/living/carbon/human/slip(knockdown_amount, obj/O, lube)
|
||||
if(has_trait(TRAIT_NOSLIPALL))
|
||||
return 0
|
||||
if((isobj(shoes) && (shoes.flags_1&NOSLIP_1)) || has_trait(TRAIT_NOSLIPWATER) && !(lube&GALOSHES_DONT_HELP))
|
||||
return 0
|
||||
if (!(lube&GALOSHES_DONT_HELP))
|
||||
if(has_trait(TRAIT_NOSLIPWATER))
|
||||
return 0
|
||||
if(shoes && is_type_in_typecache(shoes, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CS = shoes
|
||||
if (CS.clothing_flags & NOSLIP)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/experience_pressure_difference()
|
||||
playsound(src, 'sound/effects/space_wind.ogg', 50, 1)
|
||||
if(shoes && shoes.flags_1&NOSLIP_1)
|
||||
return 0
|
||||
if(shoes && is_type_in_typecache(shoes, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/S = shoes
|
||||
if (S.clothing_flags & NOSLIP)
|
||||
return 0
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/mob_has_gravity()
|
||||
|
||||
@@ -44,14 +44,16 @@
|
||||
|
||||
|
||||
/mob/living/carbon/human/calculate_affecting_pressure(pressure)
|
||||
if((wear_suit && (wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (head && (head.flags_1 & STOPSPRESSUREDMAGE_1)))
|
||||
return ONE_ATMOSPHERE
|
||||
if(istype(loc, /obj/belly))
|
||||
if(istype(loc, /obj/belly)) //START OF CIT CHANGES - Makes it so you don't suffocate while inside vore organs. Remind me to modularize this some time - Bhijn
|
||||
return ONE_ATMOSPHERE
|
||||
if(istype(loc, /obj/item/dogborg/sleeper))
|
||||
return ONE_ATMOSPHERE
|
||||
else
|
||||
return pressure
|
||||
return ONE_ATMOSPHERE //END OF CIT CHANGES
|
||||
if (wear_suit && head && is_type_in_typecache(wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(head, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CS = wear_suit
|
||||
var/obj/item/clothing/CH = head
|
||||
if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE)
|
||||
return ONE_ATMOSPHERE
|
||||
return pressure
|
||||
|
||||
|
||||
/mob/living/carbon/human/handle_traits()
|
||||
@@ -286,13 +288,14 @@
|
||||
|
||||
/mob/living/carbon/human/has_smoke_protection()
|
||||
if(wear_mask)
|
||||
if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
|
||||
if(wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
return TRUE
|
||||
if(glasses)
|
||||
if(glasses.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
|
||||
if(glasses.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
return TRUE
|
||||
if(head)
|
||||
if(head.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
|
||||
if(head && is_type_in_typecache(head, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CH = head
|
||||
if(CH.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
return TRUE
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -24,7 +24,12 @@
|
||||
|
||||
/datum/species/plasmaman/spec_life(mob/living/carbon/human/H)
|
||||
var/datum/gas_mixture/environment = H.loc.return_air()
|
||||
var/atmos_sealed = (H.wear_suit && (H.wear_suit.flags_1 & STOPSPRESSUREDMAGE_1)) && (H.head && (H.head.flags_1 & STOPSPRESSUREDMAGE_1))
|
||||
var/atmos_sealed = FALSE
|
||||
if (H.wear_suit && H.head && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(H.head, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CS = H.wear_suit
|
||||
var/obj/item/clothing/CH = H.head
|
||||
if (CS.clothing_flags & CH.clothing_flags & STOPSPRESSUREDAMAGE)
|
||||
atmos_sealed = TRUE
|
||||
if((!istype(H.w_uniform, /obj/item/clothing/under/plasmaman) || !istype(H.head, /obj/item/clothing/head/helmet/space/plasmaman)) && !atmos_sealed)
|
||||
if(environment)
|
||||
if(environment.total_moles())
|
||||
|
||||
@@ -237,7 +237,7 @@
|
||||
if(internal.loc != src)
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else if ((!wear_mask || !(wear_mask.flags_1 & MASKINTERNALS_1)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
else if ((!wear_mask || !(wear_mask.clothing_flags & MASKINTERNALS)) && !getorganslot(ORGAN_SLOT_BREATHING_TUBE))
|
||||
internal = null
|
||||
update_internals_hud_icon(0)
|
||||
else
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
if(!client)
|
||||
if(stat == CONSCIOUS)
|
||||
if(on_fire || buckled || restrained() || (resting && canmove))
|
||||
if(on_fire || buckled || restrained() || (resting && canmove)) //CIT CHANGE - makes it so monkeys attempt to resist if they're resting
|
||||
if(!resisting && prob(MONKEY_RESIST_PROB))
|
||||
resisting = TRUE
|
||||
walk_to(src,0)
|
||||
@@ -146,7 +146,7 @@
|
||||
|
||||
/mob/living/carbon/monkey/has_smoke_protection()
|
||||
if(wear_mask)
|
||||
if(wear_mask.flags_1 & BLOCK_GAS_SMOKE_EFFECT_1)
|
||||
if(wear_mask.clothing_flags & BLOCK_GAS_SMOKE_EFFECT)
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/monkey/handle_fire()
|
||||
@@ -183,4 +183,4 @@
|
||||
|
||||
#undef COLD_DAMAGE_LEVEL_1
|
||||
#undef COLD_DAMAGE_LEVEL_2
|
||||
#undef COLD_DAMAGE_LEVEL_3
|
||||
#undef COLD_DAMAGE_LEVEL_3
|
||||
|
||||
@@ -357,8 +357,11 @@
|
||||
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
if((H.head && (H.head.flags_1 & THICKMATERIAL_1)) && (H.wear_suit && (H.wear_suit.flags_1 & THICKMATERIAL_1)))
|
||||
return FALSE // Skip over them if they have no exposed flesh.
|
||||
if (H.wear_suit && H.head && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing) && is_type_in_typecache(H.wear_suit, GLOB.typecache_clothing))
|
||||
var/obj/item/clothing/CS = H.wear_suit
|
||||
var/obj/item/clothing/CH = H.head
|
||||
if (CS.clothing_flags & CH.clothing_flags & THICKMATERIAL)
|
||||
return FALSE // Skip over them if they have no exposed flesh.
|
||||
|
||||
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
|
||||
declare(C)
|
||||
|
||||
Reference in New Issue
Block a user