mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 12:07:27 +01:00
Shifts the checking procs to appropriate regions
This commit is contained in:
@@ -151,7 +151,7 @@
|
||||
if(buckled)
|
||||
addtimer(src, "checkBuckled", 1, TRUE)
|
||||
if(buckled_mob)
|
||||
addtimer(src, "checkBuckledMob", 1, TRUE)
|
||||
addtimer(buckled_mob, "checkBuckled", 1, TRUE)
|
||||
if(pulling)
|
||||
addtimer(src, "checkPull", 1, TRUE)
|
||||
. = ..()
|
||||
@@ -159,19 +159,6 @@
|
||||
reset_perspective(destination)
|
||||
update_canmove() //if the mob was asleep inside a container and then got forceMoved out we need to make them fall.
|
||||
|
||||
/mob/living/proc/checkBuckled()
|
||||
if(!(buckled in loc))
|
||||
buckled.unbuckle_mob(src, force=1)
|
||||
|
||||
/mob/living/proc/checkBuckledMob()
|
||||
// in lieu of "unbuckle_all_mobs"
|
||||
if(!(buckled_mob in loc))
|
||||
unbuckle_mob(buckled_mob, force=1)
|
||||
|
||||
/mob/living/proc/checkPull()
|
||||
if(!(pulling in orange(1)))
|
||||
stop_pulling()
|
||||
|
||||
|
||||
//called when src is thrown into hit_atom
|
||||
/atom/movable/proc/throw_impact(atom/hit_atom, var/speed)
|
||||
|
||||
@@ -113,3 +113,7 @@
|
||||
"<span class='italics'>You hear metal clanking.</span>")
|
||||
add_fingerprint(user)
|
||||
return M
|
||||
|
||||
/mob/living/proc/checkBuckled()
|
||||
if(buckled && !(buckled in loc))
|
||||
buckled.unbuckle_mob(src, force=1)
|
||||
|
||||
@@ -894,45 +894,6 @@ var/list/slot_equipment_priority = list( \
|
||||
if(!Adjacent(usr)) return
|
||||
show_inv(usr)
|
||||
|
||||
//this and stop_pulling really ought to be /mob/living procs
|
||||
/mob/proc/start_pulling(atom/movable/AM)
|
||||
if(src == AM) // Trying to pull yourself is a shortcut to stop pulling
|
||||
stop_pulling()
|
||||
return
|
||||
if(!AM || !isturf(AM.loc)) //if there's no object or the object being pulled is inside something: abort!
|
||||
return
|
||||
if(!(AM.anchored))
|
||||
AM.add_fingerprint(src)
|
||||
|
||||
// If we're pulling something then drop what we're currently pulling and pull this instead.
|
||||
if(pulling)
|
||||
// Are we trying to pull something we are already pulling? Then just stop here, no need to continue.
|
||||
if(AM == pulling)
|
||||
return
|
||||
stop_pulling()
|
||||
|
||||
src.pulling = AM
|
||||
AM.pulledby = src
|
||||
if(pullin)
|
||||
pullin.update_icon(src)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(!iscarbon(src))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = usr
|
||||
|
||||
/mob/verb/stop_pulling()
|
||||
|
||||
set name = "Stop Pulling"
|
||||
set category = "IC"
|
||||
|
||||
if(pulling)
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
if(pullin)
|
||||
pullin.update_icon(src)
|
||||
|
||||
/mob/proc/can_use_hands()
|
||||
return
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
//this and stop_pulling really ought to be /mob/living procs
|
||||
/mob/proc/start_pulling(atom/movable/AM)
|
||||
if(src == AM) // Trying to pull yourself is a shortcut to stop pulling
|
||||
stop_pulling()
|
||||
return
|
||||
if(!AM || !isturf(AM.loc)) //if there's no object or the object being pulled is inside something: abort!
|
||||
return
|
||||
if(!(AM.anchored))
|
||||
AM.add_fingerprint(src)
|
||||
|
||||
// If we're pulling something then drop what we're currently pulling and pull this instead.
|
||||
if(pulling)
|
||||
// Are we trying to pull something we are already pulling? Then just stop here, no need to continue.
|
||||
if(AM == pulling)
|
||||
return
|
||||
stop_pulling()
|
||||
|
||||
src.pulling = AM
|
||||
AM.pulledby = src
|
||||
if(pullin)
|
||||
pullin.update_icon(src)
|
||||
if(ismob(AM))
|
||||
var/mob/M = AM
|
||||
if(!iscarbon(src))
|
||||
M.LAssailant = null
|
||||
else
|
||||
M.LAssailant = usr
|
||||
|
||||
/mob/verb/stop_pulling()
|
||||
set name = "Stop Pulling"
|
||||
set category = "IC"
|
||||
|
||||
if(pulling)
|
||||
pulling.pulledby = null
|
||||
pulling = null
|
||||
if(pullin)
|
||||
pullin.update_icon(src)
|
||||
|
||||
/mob/living/proc/checkPull()
|
||||
if(pulling && !(pulling in orange(1)))
|
||||
stop_pulling()
|
||||
Reference in New Issue
Block a user