Merge pull request #7875 from VOREStation/upstream-merge-7082

[MIRROR] Refactor move/click code and cooldowns
This commit is contained in:
Aronai Sieyes
2020-05-15 20:57:31 -04:00
committed by GitHub
10 changed files with 66 additions and 64 deletions

View File

@@ -1658,7 +1658,7 @@
var/obj/item/organ/external/e = organs_by_name[name]
if(!e)
continue
if((e.status & ORGAN_BROKEN && (!e.splinted || (e.splinted && e.splinted in e.contents && prob(30))) || e.status & ORGAN_BLEEDING) && (getBruteLoss() + getFireLoss() >= 100))
if((e.status & ORGAN_BROKEN && (!e.splinted || (e.splinted in e.contents && prob(30))) || e.status & ORGAN_BLEEDING) && (getBruteLoss() + getFireLoss() >= 100))
return 1
else
return ..()

View File

@@ -785,6 +785,8 @@ default behaviour is:
to_chat(usr, "OOC Metadata is not supported by this server!")
//VOREStation Edit End - Making it so SSD people have prefs with fallback to original style.
return
// Almost all of this handles pulling movables behind us
/mob/living/Move(atom/newloc, direct, movetime)
if(buckled && buckled.loc != newloc) //not updating position
@@ -797,9 +799,8 @@ default behaviour is:
// Prior to our move it's already too far away
if(pullee && get_dist(src, pullee) > 1)
stop_pulling()
// Shenanigans!
// Shenanigans! Pullee closed into locker for eg.
if(pullee && !isturf(pullee.loc) && pullee.loc != loc)
log_debug("[src]'s pull on [pullee] was broken despite [pullee] being in [pullee.loc]. Pull stopped manually.")
stop_pulling()
// Can't pull with no hands
if(restrained())
@@ -1235,7 +1236,7 @@ default behaviour is:
//actually throw it!
src.visible_message("<span class='warning'>[src] has thrown [item].</span>")
if((istype(src.loc, /turf/space)) || (src.lastarea?.has_gravity == 0))
if((isspace(src.loc)) || (src.lastarea?.has_gravity == 0))
src.inertia_dir = get_dir(target, src)
step(src, inertia_dir)

View File

@@ -8,7 +8,10 @@
return !P.can_hit_target(src, P.permutated, src == P.original, TRUE)
return (!mover.density || !density || lying)
/mob/living/SelfMove(turf/n, direct)
/mob/CanZASPass(turf/T, is_zone)
return ATMOS_PASS_YES
/mob/living/SelfMove(turf/n, direct, movetime)
// If on walk intent, don't willingly step into hazardous tiles.
// Unless the walker is confused.
if(m_intent == "walk" && confused <= 0)

View File

@@ -25,7 +25,7 @@
. += ..()
// NEW: Use power while moving.
/mob/living/silicon/robot/SelfMove(turf/n, direct)
/mob/living/silicon/robot/SelfMove(turf/n, direct, movetime)
if (!is_component_functioning("actuator"))
return 0

View File

@@ -193,7 +193,7 @@
. = ..()
to_chat(src,"<b>You are \the [src].</b> [player_msg]")
/mob/living/simple_mob/SelfMove(turf/n, direct)
/mob/living/simple_mob/SelfMove(turf/n, direct, movetime)
var/turf/old_turf = get_turf(src)
var/old_dir = dir
. = ..()

View File

@@ -42,8 +42,6 @@
var/load_offset_y = 0 //pixel_y offset for item overlay
var/mob_offset_y = 0 //pixel_y offset for mob overlay
//var/datum/riding/riding_datum = null //VOREStation Edit - Moved to movables.
//-------------------------------------------
// Standard procs
//-------------------------------------------