mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge remote-tracking branch 'upstream/dev' into 150722-TagPairs
Conflicts: code/modules/admin/topic.dm
This commit is contained in:
@@ -24,7 +24,7 @@ mob/living/carbon/slime/airflow_stun()
|
||||
|
||||
mob/living/carbon/human/airflow_stun()
|
||||
if(shoes)
|
||||
if(shoes.flags & NOSLIP) return 0
|
||||
if(shoes.item_flags & NOSLIP) return 0
|
||||
..()
|
||||
|
||||
atom/movable/proc/check_airflow_movable(n)
|
||||
@@ -62,6 +62,19 @@ obj/item/check_airflow_movable(n)
|
||||
/atom/movable/var/tmp/airflow_time = 0
|
||||
/atom/movable/var/tmp/last_airflow = 0
|
||||
|
||||
/atom/movable/proc/AirflowCanMove(n)
|
||||
return 1
|
||||
|
||||
/mob/AirflowCanMove(n)
|
||||
if(status_flags & GODMODE)
|
||||
return 0
|
||||
if(buckled)
|
||||
return 0
|
||||
var/obj/item/shoes = get_equipped_item(slot_shoes)
|
||||
if(istype(shoes) && (shoes.item_flags & NOSLIP))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/atom/movable/proc/GotoAirflowDest(n)
|
||||
if(!airflow_dest) return
|
||||
if(airflow_speed < 0) return
|
||||
@@ -69,18 +82,13 @@ obj/item/check_airflow_movable(n)
|
||||
if(airflow_speed)
|
||||
airflow_speed = n/max(get_dist(src,airflow_dest),1)
|
||||
return
|
||||
last_airflow = world.time
|
||||
if(airflow_dest == loc)
|
||||
step_away(src,loc)
|
||||
if(!src.AirflowCanMove(n))
|
||||
return
|
||||
if(ismob(src))
|
||||
if(src:status_flags & GODMODE)
|
||||
return
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:buckled)
|
||||
return
|
||||
if(src:shoes && src:shoes.flags & NOSLIP)
|
||||
return
|
||||
src << "<span class='danger'>You are sucked away by airflow!</span>"
|
||||
last_airflow = world.time
|
||||
var/airflow_falloff = 9 - sqrt((x - airflow_dest.x) ** 2 + (y - airflow_dest.y) ** 2)
|
||||
if(airflow_falloff < 1)
|
||||
airflow_dest = null
|
||||
@@ -116,8 +124,9 @@ obj/item/check_airflow_movable(n)
|
||||
if(!istype(loc, /turf))
|
||||
break
|
||||
step_towards(src, src.airflow_dest)
|
||||
if(ismob(src) && src:client)
|
||||
src:client:move_delay = world.time + vsc.airflow_mob_slowdown
|
||||
var/mob/M = src
|
||||
if(istype(M) && M.client)
|
||||
M.setMoveCooldown(vsc.airflow_mob_slowdown)
|
||||
airflow_dest = null
|
||||
airflow_speed = 0
|
||||
airflow_time = 0
|
||||
@@ -134,18 +143,11 @@ obj/item/check_airflow_movable(n)
|
||||
return
|
||||
if(airflow_dest == loc)
|
||||
step_away(src,loc)
|
||||
if(!src.AirflowCanMove(n))
|
||||
return
|
||||
if(ismob(src))
|
||||
if(src:status_flags & GODMODE)
|
||||
return
|
||||
if(istype(src, /mob/living/carbon/human))
|
||||
if(src:buckled)
|
||||
return
|
||||
if(src:shoes)
|
||||
if(istype(src:shoes, /obj/item/clothing/shoes/magboots))
|
||||
if(src:shoes.flags & NOSLIP)
|
||||
return
|
||||
src << "<span clas='danger'>You are pushed away by airflow!</span>"
|
||||
last_airflow = world.time
|
||||
last_airflow = world.time
|
||||
var/airflow_falloff = 9 - sqrt((x - airflow_dest.x) ** 2 + (y - airflow_dest.y) ** 2)
|
||||
if(airflow_falloff < 1)
|
||||
airflow_dest = null
|
||||
|
||||
@@ -97,14 +97,14 @@ obj/var/contaminated = 0
|
||||
if(!wear_mask)
|
||||
burn_eyes()
|
||||
else
|
||||
if(!(wear_mask.flags & MASKCOVERSEYES))
|
||||
if(!(wear_mask.body_parts_covered & EYES))
|
||||
burn_eyes()
|
||||
else
|
||||
if(!(head.flags & HEADCOVERSEYES))
|
||||
if(!(head.body_parts_covered & EYES))
|
||||
if(!wear_mask)
|
||||
burn_eyes()
|
||||
else
|
||||
if(!(wear_mask.flags & MASKCOVERSEYES))
|
||||
if(!(wear_mask.body_parts_covered & EYES))
|
||||
burn_eyes()
|
||||
|
||||
//Genetic Corruption
|
||||
@@ -135,19 +135,24 @@ obj/var/contaminated = 0
|
||||
if(vsc.plc.PHORONGUARD_ONLY)
|
||||
if(head.flags & PHORONGUARD)
|
||||
return 1
|
||||
else if(head.flags & HEADCOVERSEYES)
|
||||
else if(head.body_parts_covered & EYES)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/mob/living/carbon/human/proc/pl_suit_protected()
|
||||
//Checks if the suit is adequately sealed.
|
||||
if(wear_suit)
|
||||
if(vsc.plc.PHORONGUARD_ONLY)
|
||||
if(wear_suit.flags & PHORONGUARD) return 1
|
||||
else
|
||||
if(wear_suit.flags_inv & HIDEJUMPSUIT) return 1
|
||||
//should check HIDETAIL as well, but for the moment tails are not a part that can be damaged separately
|
||||
return 0
|
||||
var/coverage = 0
|
||||
for(var/obj/item/protection in list(wear_suit, gloves, shoes))
|
||||
if(!protection)
|
||||
continue
|
||||
if(vsc.plc.PHORONGUARD_ONLY && !(protection.flags & PHORONGUARD))
|
||||
return 0
|
||||
coverage |= protection.body_parts_covered
|
||||
|
||||
if(vsc.plc.PHORONGUARD_ONLY)
|
||||
return 1
|
||||
|
||||
return BIT_TEST_ALL(coverage, UPPER_TORSO|LOWER_TORSO|LEGS|FEET|ARMS|HANDS)
|
||||
|
||||
/mob/living/carbon/human/proc/suit_contamination()
|
||||
//Runs over the things that can be contaminated and does so.
|
||||
|
||||
Reference in New Issue
Block a user