mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 03:02:54 +00:00
Merge pull request #698 from Hubblenaut/master
Changes to Confused Moving
This commit is contained in:
@@ -123,12 +123,16 @@ default behaviour is:
|
||||
now_pushing = 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
|
||||
if (!now_pushing)
|
||||
now_pushing = 1
|
||||
|
||||
if (!AM.anchored)
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
|
||||
@@ -286,7 +286,7 @@
|
||||
//specific vehicle move delays are set in code\modules\vehicles\vehicle.dm
|
||||
move_delay = world.time + tickcomp
|
||||
//drunk driving
|
||||
if(mob.confused)
|
||||
if(mob.confused && prob(75))
|
||||
direct = pick(cardinal)
|
||||
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)))
|
||||
return // No hands to drive your chair? Tough luck!
|
||||
//drunk wheelchair driving
|
||||
if(mob.confused)
|
||||
direct = pick(cardinal)
|
||||
else if(mob.confused)
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(prob(75)) direct = pick(cardinal)
|
||||
if("walk")
|
||||
if(prob(25)) direct = pick(cardinal)
|
||||
move_delay += 2
|
||||
return mob.buckled.relaymove(mob,direct)
|
||||
|
||||
@@ -348,7 +352,11 @@
|
||||
return
|
||||
|
||||
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
|
||||
. = mob.SelfMove(n, direct)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user