Merge pull request #698 from Hubblenaut/master

Changes to Confused Moving
This commit is contained in:
Zuhayr
2016-01-08 00:52:35 +10:30
2 changed files with 28 additions and 16 deletions

View File

@@ -123,12 +123,16 @@ default behaviour is:
now_pushing = 0 now_pushing = 0
spawn(0) spawn(0)
..() ..()
if (!istype(AM, /atom/movable)) if (!istype(AM, /atom/movable) || AM.anchored)
if(confused && prob(50) && m_intent=="run")
Paralyse(1)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='warning'>[src] [pick("ran", "slammed")] into \the [AM]!</span>")
src.take_organ_damage(5)
return return
if (!now_pushing) if (!now_pushing)
now_pushing = 1 now_pushing = 1
if (!AM.anchored)
var/t = get_dir(src, AM) var/t = get_dir(src, AM)
if (istype(AM, /obj/structure/window)) if (istype(AM, /obj/structure/window))
for(var/obj/structure/window/win in get_step(AM,t)) for(var/obj/structure/window/win in get_step(AM,t))

View File

@@ -286,7 +286,7 @@
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm //specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
move_delay = world.time + tickcomp move_delay = world.time + tickcomp
//drunk driving //drunk driving
if(mob.confused) if(mob.confused && prob(75))
direct = pick(cardinal) direct = pick(cardinal)
return mob.buckled.relaymove(mob,direct) return mob.buckled.relaymove(mob,direct)
@@ -307,8 +307,12 @@
if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED))) if((!l_hand || (l_hand.status & ORGAN_DESTROYED)) && (!r_hand || (r_hand.status & ORGAN_DESTROYED)))
return // No hands to drive your chair? Tough luck! return // No hands to drive your chair? Tough luck!
//drunk wheelchair driving //drunk wheelchair driving
if(mob.confused) else if(mob.confused)
direct = pick(cardinal) switch(mob.m_intent)
if("run")
if(prob(75)) direct = pick(cardinal)
if("walk")
if(prob(25)) direct = pick(cardinal)
move_delay += 2 move_delay += 2
return mob.buckled.relaymove(mob,direct) return mob.buckled.relaymove(mob,direct)
@@ -348,7 +352,11 @@
return return
else if(mob.confused) else if(mob.confused)
step(mob, pick(cardinal)) switch(mob.m_intent)
if("run")
if(prob(75)) step(mob, pick(cardinal))
if("walk")
if(prob(25)) step(mob, pick(cardinal))
else else
. = mob.SelfMove(n, direct) . = mob.SelfMove(n, direct)