mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 16:38:22 +01:00
Merge remote-tracking branch 'bay12-upstream/master' into development
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
return (!mover.density || !density || lying)
|
||||
return
|
||||
|
||||
/mob/proc/setMoveCooldown(var/timeout)
|
||||
if(client)
|
||||
client.move_delay = max(world.time + timeout, client.move_delay)
|
||||
|
||||
/client/North()
|
||||
..()
|
||||
@@ -27,35 +30,43 @@
|
||||
..()
|
||||
|
||||
|
||||
/client/proc/client_dir(input, direction=-1)
|
||||
return turn(input, direction*dir2angle(dir))
|
||||
|
||||
/client/Northeast()
|
||||
swap_hand()
|
||||
return
|
||||
|
||||
|
||||
/client/Southeast()
|
||||
attack_self()
|
||||
return
|
||||
|
||||
|
||||
/client/Southwest()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_throw_mode()
|
||||
else
|
||||
usr << "\red This mob type cannot throw items."
|
||||
return
|
||||
|
||||
|
||||
diagonal_action(NORTHEAST)
|
||||
/client/Northwest()
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.get_active_hand())
|
||||
usr << "\red You have nothing to drop in your hand."
|
||||
diagonal_action(NORTHWEST)
|
||||
/client/Southeast()
|
||||
diagonal_action(SOUTHEAST)
|
||||
/client/Southwest()
|
||||
diagonal_action(SOUTHWEST)
|
||||
|
||||
/client/proc/diagonal_action(direction)
|
||||
switch(client_dir(direction, 1))
|
||||
if(NORTHEAST)
|
||||
swap_hand()
|
||||
return
|
||||
if(SOUTHEAST)
|
||||
attack_self()
|
||||
return
|
||||
if(SOUTHWEST)
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
C.toggle_throw_mode()
|
||||
else
|
||||
usr << "\red This mob type cannot throw items."
|
||||
return
|
||||
if(NORTHWEST)
|
||||
if(iscarbon(usr))
|
||||
var/mob/living/carbon/C = usr
|
||||
if(!C.get_active_hand())
|
||||
usr << "\red You have nothing to drop in your hand."
|
||||
return
|
||||
drop_item()
|
||||
else
|
||||
usr << "\red This mob type cannot drop items."
|
||||
return
|
||||
drop_item()
|
||||
else
|
||||
usr << "\red This mob type cannot drop items."
|
||||
return
|
||||
|
||||
//This gets called when you press the delete button.
|
||||
/client/verb/delete_key_pressed()
|
||||
@@ -196,7 +207,7 @@
|
||||
if(mob.eyeobj)
|
||||
return mob.EyeMove(n,direct)
|
||||
|
||||
if(mob.monkeyizing) return//This is sota the goto stop mobs from moving var
|
||||
if(mob.transforming) return//This is sota the goto stop mobs from moving var
|
||||
|
||||
if(isliving(mob))
|
||||
var/mob/living/L = mob
|
||||
@@ -222,7 +233,6 @@
|
||||
|
||||
if(Process_Grab()) return
|
||||
|
||||
|
||||
if(!mob.canmove)
|
||||
return
|
||||
|
||||
@@ -235,7 +245,6 @@
|
||||
if((istype(mob.loc, /turf/space)) || (mob.lastarea.has_gravity == 0))
|
||||
if(!mob.Process_Spacemove(0)) return 0
|
||||
|
||||
|
||||
if(isobj(mob.loc) || ismob(mob.loc))//Inside an object, tell it we moved
|
||||
var/atom/O = mob.loc
|
||||
return O.relaymove(mob, direct)
|
||||
@@ -256,7 +265,7 @@
|
||||
return 0
|
||||
|
||||
move_delay = world.time//set move delay
|
||||
mob.last_move_intent = world.time + 10
|
||||
|
||||
switch(mob.m_intent)
|
||||
if("run")
|
||||
if(mob.drowsyness > 0)
|
||||
@@ -291,8 +300,8 @@
|
||||
if(istype(mob.pulledby, /obj/structure/bed/chair/wheelchair))
|
||||
return mob.pulledby.relaymove(mob, direct)
|
||||
else if(istype(mob.buckled, /obj/structure/bed/chair/wheelchair))
|
||||
if(ishuman(mob.buckled))
|
||||
var/mob/living/carbon/human/driver = mob.buckled
|
||||
if(ishuman(mob))
|
||||
var/mob/living/carbon/human/driver = mob
|
||||
var/obj/item/organ/external/l_hand = driver.get_organ("l_hand")
|
||||
var/obj/item/organ/external/r_hand = driver.get_organ("r_hand")
|
||||
if((!l_hand || l_hand.is_stump()) && (!r_hand || r_hand.is_stump()))
|
||||
@@ -448,8 +457,8 @@
|
||||
return 0
|
||||
|
||||
//Check to see if we slipped
|
||||
if(prob(Process_Spaceslipping(5)))
|
||||
src << "\blue <B>You slipped!</B>"
|
||||
if(prob(slip_chance(5)) && !buckled)
|
||||
src << "<span class='warning'>You slipped!</span>"
|
||||
src.inertia_dir = src.last_move
|
||||
step(src, src.inertia_dir)
|
||||
return 0
|
||||
@@ -459,46 +468,30 @@
|
||||
|
||||
/mob/proc/Check_Dense_Object() //checks for anything to push off in the vicinity. also handles magboots on gravity-less floors tiles
|
||||
|
||||
var/dense_object = 0
|
||||
var/shoegrip
|
||||
var/shoegrip = Check_Shoegrip()
|
||||
|
||||
for(var/turf/turf in oview(1,src))
|
||||
if(istype(turf,/turf/space))
|
||||
continue
|
||||
for(var/turf/simulated/T in trange(1,src)) //we only care for non-space turfs
|
||||
if(T.density) //walls work
|
||||
return 1
|
||||
else
|
||||
var/area/A = T.loc
|
||||
if(A.has_gravity || shoegrip)
|
||||
return 1
|
||||
|
||||
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(shoegrip == null)
|
||||
shoegrip = Check_Shoegrip() //Shoegrip is only ever checked when a zero-gravity floor is encountered to reduce load
|
||||
if(!shoegrip)
|
||||
continue
|
||||
for(var/obj/O in orange(1, src))
|
||||
if(istype(O, /obj/structure/lattice))
|
||||
return 1
|
||||
if(O && O.density && O.anchored)
|
||||
return 1
|
||||
|
||||
dense_object++
|
||||
break
|
||||
|
||||
if(!dense_object && (locate(/obj/structure/lattice) in oview(1, src)))
|
||||
dense_object++
|
||||
|
||||
//Lastly attempt to locate any dense objects we could push off of
|
||||
//TODO: If we implement objects drifing in space this needs to really push them
|
||||
//Due to a few issues only anchored and dense objects will now work.
|
||||
if(!dense_object)
|
||||
for(var/obj/O in oview(1, src))
|
||||
if((O) && (O.density) && (O.anchored))
|
||||
dense_object++
|
||||
break
|
||||
|
||||
return dense_object
|
||||
return 0
|
||||
|
||||
/mob/proc/Check_Shoegrip()
|
||||
return 0
|
||||
|
||||
/mob/proc/Process_Spaceslipping(var/prob_slip = 5)
|
||||
//Setup slipage
|
||||
//If knocked out we might just hit it and stop. This makes it possible to get dead bodies and such.
|
||||
/mob/proc/slip_chance(var/prob_slip = 5)
|
||||
if(stat)
|
||||
prob_slip = 0 // Changing this to zero to make it line up with the comment.
|
||||
|
||||
prob_slip = round(prob_slip)
|
||||
return(prob_slip)
|
||||
return 0
|
||||
if(Check_Shoegrip())
|
||||
return 0
|
||||
return prob_slip
|
||||
|
||||
Reference in New Issue
Block a user