Towels
This commit is contained in:
@@ -91,7 +91,7 @@
|
||||
else
|
||||
return initial(pixel_x)
|
||||
|
||||
/mob/living/carbon/alien/humanoid/get_permeability_protection()
|
||||
/mob/living/carbon/alien/humanoid/get_permeability_protection(list/target_zones)
|
||||
return 0.8
|
||||
|
||||
/mob/living/carbon/alien/humanoid/alien_evolve(mob/living/carbon/alien/humanoid/new_xeno)
|
||||
|
||||
@@ -634,6 +634,18 @@
|
||||
else
|
||||
. += INFINITY
|
||||
|
||||
/mob/living/carbon/get_permeability_protection(list/target_zones = list(HANDS,CHEST,GROIN,LEGS,FEET,ARMS,HEAD))
|
||||
var/list/tally = list()
|
||||
for(var/obj/item/I in get_equipped_items())
|
||||
for(var/zone in target_zones)
|
||||
if(I.body_parts_covered & zone)
|
||||
tally["[zone]"] = max(1 - I.permeability_coefficient, target_zones["[zone]"])
|
||||
var/protection = 0
|
||||
for(var/key in tally)
|
||||
protection += tally[key]
|
||||
protection *= INVERSE(target_zones.len)
|
||||
return protection
|
||||
|
||||
//this handles hud updates
|
||||
/mob/living/carbon/update_damage_hud()
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
for(var/bp in body_parts)
|
||||
if(!bp)
|
||||
continue
|
||||
if(bp && istype(bp , /obj/item/clothing))
|
||||
if(istype(bp, /obj/item/clothing))
|
||||
var/obj/item/clothing/C = bp
|
||||
if(C.body_parts_covered & def_zone.body_part)
|
||||
protection += C.armor.getRating(d_type)
|
||||
|
||||
@@ -111,26 +111,6 @@
|
||||
|
||||
return ..()
|
||||
|
||||
/mob/living/carbon/human/get_permeability_protection()
|
||||
var/list/prot = list("hands"=0, "chest"=0, "groin"=0, "legs"=0, "feet"=0, "arms"=0, "head"=0)
|
||||
for(var/obj/item/I in get_equipped_items())
|
||||
if(I.body_parts_covered & HANDS)
|
||||
prot["hands"] = max(1 - I.permeability_coefficient, prot["hands"])
|
||||
if(I.body_parts_covered & CHEST)
|
||||
prot["chest"] = max(1 - I.permeability_coefficient, prot["chest"])
|
||||
if(I.body_parts_covered & GROIN)
|
||||
prot["groin"] = max(1 - I.permeability_coefficient, prot["groin"])
|
||||
if(I.body_parts_covered & LEGS)
|
||||
prot["legs"] = max(1 - I.permeability_coefficient, prot["legs"])
|
||||
if(I.body_parts_covered & FEET)
|
||||
prot["feet"] = max(1 - I.permeability_coefficient, prot["feet"])
|
||||
if(I.body_parts_covered & ARMS)
|
||||
prot["arms"] = max(1 - I.permeability_coefficient, prot["arms"])
|
||||
if(I.body_parts_covered & HEAD)
|
||||
prot["head"] = max(1 - I.permeability_coefficient, prot["head"])
|
||||
var/protection = (prot["head"] + prot["arms"] + prot["feet"] + prot["legs"] + prot["groin"] + prot["chest"] + prot["hands"])/7
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/human/can_use_guns(obj/item/G)
|
||||
. = ..()
|
||||
|
||||
|
||||
@@ -167,9 +167,9 @@
|
||||
dropItemToGround(r_store, TRUE) //Again, makes sense for pockets to drop.
|
||||
if(l_store)
|
||||
dropItemToGround(l_store, TRUE)
|
||||
if(wear_id)
|
||||
if(wear_id && !CHECK_BITFIELD(wear_id.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
dropItemToGround(wear_id)
|
||||
if(belt)
|
||||
if(belt && !CHECK_BITFIELD(belt.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
dropItemToGround(belt)
|
||||
w_uniform = null
|
||||
update_suit_sensors()
|
||||
|
||||
@@ -1019,13 +1019,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(SLOT_BELT)
|
||||
if(H.belt)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if(!CHECK_BITFIELD(I.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if(!(I.slot_flags & ITEM_SLOT_BELT))
|
||||
return
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
@@ -1062,12 +1061,12 @@ GLOBAL_LIST_EMPTY(roundstart_races)
|
||||
if(SLOT_WEAR_ID)
|
||||
if(H.wear_id)
|
||||
return FALSE
|
||||
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if(!CHECK_BITFIELD(I.obj_flags, NO_UNIFORM_REQUIRED))
|
||||
var/obj/item/bodypart/O = H.get_bodypart(BODY_ZONE_CHEST)
|
||||
if(!H.w_uniform && !nojumpsuit && (!O || O.status != BODYPART_ROBOTIC))
|
||||
if(!disable_warning)
|
||||
to_chat(H, "<span class='warning'>You need a jumpsuit before you can attach this [I.name]!</span>")
|
||||
return FALSE
|
||||
if( !(I.slot_flags & ITEM_SLOT_ID) )
|
||||
return FALSE
|
||||
return equip_delay_self_check(I, H, bypass_equip_delay_self)
|
||||
|
||||
@@ -152,15 +152,6 @@
|
||||
|
||||
return threatcount
|
||||
|
||||
/mob/living/carbon/monkey/get_permeability_protection()
|
||||
var/protection = 0
|
||||
if(head)
|
||||
protection = 1 - head.permeability_coefficient
|
||||
if(wear_mask)
|
||||
protection = max(1 - wear_mask.permeability_coefficient, protection)
|
||||
protection = protection/7 //the rest of the body isn't covered.
|
||||
return protection
|
||||
|
||||
/mob/living/carbon/monkey/IsVocal()
|
||||
if(!getorganslot(ORGAN_SLOT_LUNGS))
|
||||
return 0
|
||||
|
||||
@@ -813,7 +813,7 @@
|
||||
return 1
|
||||
|
||||
//used in datum/reagents/reaction() proc
|
||||
/mob/living/proc/get_permeability_protection()
|
||||
/mob/living/proc/get_permeability_protection(list/target_zones)
|
||||
return 0
|
||||
|
||||
/mob/living/proc/harvest(mob/living/user) //used for extra objects etc. in butchering
|
||||
|
||||
@@ -65,6 +65,7 @@
|
||||
var/active_hand_index = 1
|
||||
var/list/held_items = list() //len = number of hands, eg: 2 nulls is 2 empty hands, 1 item and 1 null is 1 full hand and 1 empty hand.
|
||||
//held_items[active_hand_index] is the actively held item, but please use get_active_held_item() instead, because OOP
|
||||
var/bloody_hands = 0
|
||||
|
||||
var/datum/component/storage/active_storage = null//Carbon
|
||||
|
||||
|
||||
Reference in New Issue
Block a user