mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-20 19:44:46 +01:00
Changes to Confused Moving
This commit is contained in:
@@ -123,22 +123,26 @@ 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))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
if(ishuman(AM) && AM:grabbed_by)
|
||||
for(var/obj/item/weapon/grab/G in AM:grabbed_by)
|
||||
step(G:assailant, get_dir(G:assailant, AM))
|
||||
G.adjust_position()
|
||||
var/t = get_dir(src, AM)
|
||||
if (istype(AM, /obj/structure/window))
|
||||
for(var/obj/structure/window/win in get_step(AM,t))
|
||||
now_pushing = 0
|
||||
return
|
||||
step(AM, t)
|
||||
if(ishuman(AM) && AM:grabbed_by)
|
||||
for(var/obj/item/weapon/grab/G in AM:grabbed_by)
|
||||
step(G:assailant, get_dir(G:assailant, AM))
|
||||
G.adjust_position()
|
||||
now_pushing = 0
|
||||
return
|
||||
return
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
return
|
||||
|
||||
/mob/proc/setMoveCooldown(var/timeout)
|
||||
if(client)
|
||||
if(client)
|
||||
client.move_delay = max(world.time + timeout, client.move_delay)
|
||||
|
||||
/client/North()
|
||||
@@ -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)
|
||||
|
||||
@@ -450,8 +458,8 @@
|
||||
if(!Check_Dense_Object()) //Nothing to push off of so end here
|
||||
update_floating(0)
|
||||
return 0
|
||||
|
||||
update_floating(1)
|
||||
|
||||
update_floating(1)
|
||||
|
||||
if(restrained()) //Check to see if we can do things
|
||||
return 0
|
||||
@@ -477,10 +485,10 @@
|
||||
|
||||
if(istype(turf,/turf/simulated/floor)) // Floors don't count if they don't have gravity
|
||||
var/area/A = turf.loc
|
||||
if(istype(A) && A.has_gravity == 0)
|
||||
if(istype(A) && A.has_gravity == 0)
|
||||
if(shoegrip == null)
|
||||
shoegrip = Check_Shoegrip() //Shoegrip is only ever checked when a zero-gravity floor is encountered to reduce load
|
||||
if(!shoegrip)
|
||||
if(!shoegrip)
|
||||
continue
|
||||
|
||||
dense_object++
|
||||
|
||||
Reference in New Issue
Block a user