Add new lints (#49751)

Co-authored-by: Jordan Brown <Cyberboss@users.noreply.github.com>
This commit is contained in:
spookydonut
2020-03-09 22:13:48 -07:00
committed by GitHub
co-authored by Jordan Brown
parent e0fd306c27
commit beca456c0f
16 changed files with 20 additions and 16 deletions
+1
View File
@@ -160,6 +160,7 @@
/// Is the atom obscured by a PREVENT_CLICK_UNDER_1 object above it
/atom/proc/IsObscured()
SHOULD_BE_PURE(TRUE)
if(!isturf(loc)) //This only makes sense for things directly on turfs for now
return FALSE
var/turf/T = get_turf_pixel(src)
+1 -1
View File
@@ -146,7 +146,7 @@
var/mob/living/carbon/human/victim = parent
var/chance = jostle_chance
if(victim.m_intent == MOVE_INTENT_WALK || victim.lying)
if(victim.m_intent == MOVE_INTENT_WALK || !(victim.mobility_flags & MOBILITY_STAND))
chance *= 0.5
if(harmful && prob(chance))
+2 -2
View File
@@ -42,8 +42,8 @@
return
var/mob/living/LM = parent
if(!T.footstep || LM.buckled || LM.lying || !((LM.mobility_flags & (MOBILITY_STAND | MOBILITY_MOVE)) == (MOBILITY_STAND | MOBILITY_MOVE)) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
if (LM.lying && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
if(!T.footstep || LM.buckled || !((LM.mobility_flags & (MOBILITY_STAND | MOBILITY_MOVE)) == (MOBILITY_STAND | MOBILITY_MOVE)) || LM.throwing || LM.movement_type & (VENTCRAWLING | FLYING))
if (!(LM.mobility_flags & MOBILITY_STAND) && !LM.buckled && !(!T.footstep || LM.movement_type & (VENTCRAWLING | FLYING))) //play crawling sound if we're lying
playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume)
return
+1 -1
View File
@@ -21,5 +21,5 @@
/datum/component/slippery/proc/Slip_on_wearer(datum/source, atom/movable/AM, mob/living/crossed)
if(crossed.lying && !crossed.buckle_lying)
if(!(crossed.mobility_flags & MOBILITY_STAND) && !crossed.buckle_lying)
Slip(source, AM)
+2 -2
View File
@@ -17,7 +17,7 @@
return ELEMENT_INCOMPATIBLE
var/mob/living/carbon/C = target
var/was_lying = (C.lying != 0) // is our spessmen sideways? the eternal question..
var/was_lying = !(C.mobility_flags & MOBILITY_STAND)
addtimer(CALLBACK(src, .proc/Detach, C, was_lying, reverse), duration)
if(reverse)
@@ -28,7 +28,7 @@
/datum/element/squish/Detach(mob/living/carbon/C, was_lying, reverse)
. = ..()
if(istype(C))
var/is_lying = (C.lying != 0)
var/is_lying = !(C.mobility_flags & MOBILITY_STAND)
if(reverse)
is_lying = !is_lying
+1 -1
View File
@@ -394,7 +394,7 @@
/datum/mutation/human/extrastun/proc/on_move()
if(prob(99.5)) //The brawl mutation
return
if(owner.buckled || owner.lying || !((owner.mobility_flags & (MOBILITY_STAND | MOBILITY_MOVE)) == (MOBILITY_STAND | MOBILITY_MOVE)) || owner.throwing || owner.movement_type & (VENTCRAWLING | FLYING | FLOATING))
if(owner.buckled || !(owner.mobility_flags & MOBILITY_STAND) || !((owner.mobility_flags & (MOBILITY_STAND | MOBILITY_MOVE)) == (MOBILITY_STAND | MOBILITY_MOVE)) || owner.throwing || owner.movement_type & (VENTCRAWLING | FLYING | FLOATING))
return //remove the 'edge' cases
to_chat(owner, "<span class='danger'>You trip over your own feet.</span>")
owner.Knockdown(30)
+1
View File
@@ -881,6 +881,7 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
return
/obj/item/proc/canStrip(mob/stripper, mob/owner)
SHOULD_BE_PURE(TRUE)
return !HAS_TRAIT(src, TRAIT_NODROP)
/obj/item/proc/doStrip(mob/stripper, mob/owner)
@@ -69,8 +69,8 @@
add_overlay(nest_overlay)
/obj/structure/bed/nest/post_unbuckle_mob(mob/living/M)
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
M.pixel_x = M.get_standard_pixel_x_offset(!(M.mobility_flags & MOBILITY_STAND))
M.pixel_y = M.get_standard_pixel_y_offset(!(M.mobility_flags & MOBILITY_STAND))
M.layer = initial(M.layer)
cut_overlay(nest_overlay)
@@ -100,8 +100,8 @@
/obj/structure/bed/roller/post_unbuckle_mob(mob/living/M)
density = FALSE
icon_state = "down"
M.pixel_x = M.get_standard_pixel_x_offset(M.lying)
M.pixel_y = M.get_standard_pixel_y_offset(M.lying)
M.pixel_x = M.get_standard_pixel_x_offset(!(M.mobility_flags & MOBILITY_STAND))
M.pixel_y = M.get_standard_pixel_y_offset(!(M.mobility_flags & MOBILITY_STAND))
/obj/item/roller
name = "roller bed"
+1
View File
@@ -32,6 +32,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
SEND_SIGNAL(src, COMSIG_MOVABLE_HEAR, args)
/atom/movable/proc/can_speak()
SHOULD_BE_PURE(TRUE)
return 1
/atom/movable/proc/send_speech(message, range = 7, obj/source = src, bubble_type, list/spans, datum/language/message_language = null, message_mode)
+1
View File
@@ -175,6 +175,7 @@
return TRUE
/turf/proc/can_zFall(atom/movable/A, levels = 1, turf/target)
SHOULD_BE_PURE(TRUE)
return zPassOut(A, DOWN, target) && target.zPassIn(A, DOWN, src)
/turf/proc/zFall(atom/movable/A, levels = 1, force = FALSE)
+2 -2
View File
@@ -899,8 +899,8 @@
var/amplitude = min(4, (jitteriness/100) + 1)
var/pixel_x_diff = rand(-amplitude, amplitude)
var/pixel_y_diff = rand(-amplitude/3, amplitude/3)
var/final_pixel_x = get_standard_pixel_x_offset(lying)
var/final_pixel_y = get_standard_pixel_y_offset(lying)
var/final_pixel_x = get_standard_pixel_x_offset(!(mobility_flags & MOBILITY_STAND))
var/final_pixel_y = get_standard_pixel_y_offset(!(mobility_flags & MOBILITY_STAND))
animate(src, pixel_x = pixel_x + pixel_x_diff, pixel_y = pixel_y + pixel_y_diff , time = 2, loop = 6)
animate(pixel_x = final_pixel_x , pixel_y = final_pixel_y , time = 2)
setMovetype(movement_type & ~FLOATING) // If we were without gravity, the bouncing animation got stopped, so we make sure to restart it in next life().
+1 -1
View File
@@ -28,7 +28,7 @@
var/resting = FALSE
var/lying = 0 ///number of degrees. DO NOT USE THIS IN CHECKS. CHECK FOR MOBILITY FLAGS INSTEAD!!
VAR_PROTECTED/lying = 0 ///number of degrees. DO NOT USE THIS IN CHECKS. CHECK FOR MOBILITY FLAGS INSTEAD!!
var/lying_prev = 0 ///last value of lying on update_mobility
var/confused = 0 ///Makes the mob move in random directions.
+1
View File
@@ -287,6 +287,7 @@
///Checks if the mob is able to see or not. eye_blind is temporary blindness, the trait is if they're permanently blind.
/mob/proc/is_blind()
SHOULD_BE_PURE(TRUE)
return eye_blind ? TRUE : HAS_TRAIT(src, TRAIT_BLIND)
///Is the mob hallucinating?
@@ -11,7 +11,6 @@
H.SetParalyzed(0)
H.adjustStaminaLoss(-75)
H.stuttering = 0
H.lying = 0
H.update_mobility()
H.reagents.add_reagent(/datum/reagent/medicine/stimulants, 5)
H.say(pick("A CORNERED FOX IS MORE DANGEROUS THAN A JACKAL!","HURT ME MOOORRREEE!","IMPRESSIVE!"), forced = "ninjaboost")
@@ -11,7 +11,7 @@
step_y = AM.step_y
if(iscarbon(A))
var/mob/living/carbon/C = A
turn_angle = C.lying
UNLINT(turn_angle = C.lying) // this is the only place its okay to read lying directly
. = ..()
/obj/item/camera/proc/camera_get_icon(list/turfs, turf/center, psize_x = 96, psize_y = 96, datum/turf_reservation/clone_area, size_x, size_y, total_x, total_y)