From 1c7d1fbd3323c065980ba163bde1822ce6a137d2 Mon Sep 17 00:00:00 2001 From: "VivianFoxfoot@gmail.com" Date: Fri, 6 Jan 2012 17:12:46 +0000 Subject: [PATCH] Moves /obj/special/stop into /obj/effect/stop. Thunks people when gravity changes. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2918 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/area/area.dm | 14 +++++++++----- code/defines/obj.dm | 2 +- code/game/machinery/doors/airlock.dm | 4 ++-- code/modules/admin/verbs/randomverbs.dm | 4 ++-- code/modules/mob/mob_movement.dm | 4 ++-- 5 files changed, 16 insertions(+), 12 deletions(-) diff --git a/code/defines/area/area.dm b/code/defines/area/area.dm index 32abd000043..2d030c66cb9 100644 --- a/code/defines/area/area.dm +++ b/code/defines/area/area.dm @@ -57,14 +57,18 @@ /area/proc/thunk(mob) - if(istype(src,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to. + if(istype(mob,/mob/living/carbon/human/)) // Only humans can wear magboots, so we give them a chance to. if((istype(mob:shoes, /obj/item/clothing/shoes/magboots) && (mob:shoes.flags & NOSLIP))) return - if((istype(src,/mob/living/carbon/human/)) && (mob:m_intent == "run")) // Only clumbsy humans can fall on their asses. + + if(istype(get_turf(mob), /turf/space)) // Can't fall onto nothing. + return + + if((istype(mob,/mob/living/carbon/human/)) && (mob:m_intent == "run")) // Only clumbsy humans can fall on their asses. mob:AdjustStunned(5) mob:AdjustWeakened(5) - else if (istype(src,/mob/living/carbon/human/)) + else if (istype(mob,/mob/living/carbon/human/)) mob:AdjustStunned(2) mob:AdjustWeakened(2) @@ -75,7 +79,7 @@ A.has_gravity = gravitystate if(gravitystate) - for(var/mob/living/M in A) - thunk(A) + for(var/mob/living/carbon/human/M in A) + thunk(M) diff --git a/code/defines/obj.dm b/code/defines/obj.dm index 89ffb22063c..d114bd6ddbb 100644 --- a/code/defines/obj.dm +++ b/code/defines/obj.dm @@ -1207,7 +1207,7 @@ user.drop_item() src.throw_at(target, throw_range, throw_speed) -/obj/special/stop +/obj/effect/stop var/victim = null icon_state = "empty" name = "Geas" diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 83a51bea6eb..81933b4bb14 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1060,8 +1060,8 @@ About the new airlock wires panel: M.adjustBruteLoss(DOOR_CRUSH_DAMAGE) M.SetStunned(5) M.SetWeakened(5) - var/obj/special/stop/S - S = new /obj/special/stop + var/obj/effect/stop/S + S = new /obj/effect/stop S.victim = M S.loc = src.loc spawn(20) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index f5333a2e552..20a13a4b303 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -857,7 +857,7 @@ Traitors and the like can also be revived with the previous role mostly intact. for(var/area/A in world) - A.has_gravity = 1 + A.gravitychange(1,A) command_alert("CentComm is now beaming gravitons to your station. We appoligize for any inconvience.") @@ -872,7 +872,7 @@ Traitors and the like can also be revived with the previous role mostly intact. for(var/area/A in world) - A.has_gravity = 0 + A.gravitychange(0,A) command_alert("For budget reasons, Centcomm is no longer beaming gravitons to your station. We appoligize for any inconvience.") diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index b0de1b92b6c..5bcb2e12d70 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -144,8 +144,8 @@ if(!mob) return - if(locate(/obj/special/stop/, mob.loc)) - for(var/obj/special/stop/S in mob.loc) + if(locate(/obj/effect/stop/, mob.loc)) + for(var/obj/effect/stop/S in mob.loc) if(S.victim == mob) return