mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)
* I wasn't done * nits
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
if(!M.anchored && (M.flags & CONDUCT))
|
||||
step_towards(M,affected_mob)
|
||||
for(var/mob/living/silicon/S in orange(2,affected_mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
step_towards(S,affected_mob)
|
||||
if(3)
|
||||
if(prob(2))
|
||||
@@ -37,7 +37,7 @@
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(M,affected_mob)
|
||||
for(var/mob/living/silicon/S in orange(4,affected_mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
var/i
|
||||
var/iter = rand(1,2)
|
||||
for(i=0,i<iter,i++)
|
||||
@@ -55,7 +55,7 @@
|
||||
for(i=0,i<iter,i++)
|
||||
step_towards(M,affected_mob)
|
||||
for(var/mob/living/silicon/S in orange(6,affected_mob))
|
||||
if(istype(S, /mob/living/silicon/ai)) continue
|
||||
if(isAI(S)) continue
|
||||
var/i
|
||||
var/iter = rand(1,3)
|
||||
for(i=0,i<iter,i++)
|
||||
|
||||
@@ -379,7 +379,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
var/location
|
||||
if(isliving(target))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
else if(isturf(target))
|
||||
location = target
|
||||
var/obj/effect/overlay/spell = new /obj/effect/overlay(location)
|
||||
spell.icon = overlay_icon
|
||||
@@ -397,7 +397,7 @@ GLOBAL_LIST_INIT(spells, typesof(/obj/effect/proc_holder/spell))
|
||||
var/location
|
||||
if(isliving(target))
|
||||
location = target.loc
|
||||
else if(istype(target,/turf))
|
||||
else if(isturf(target))
|
||||
location = target
|
||||
if(isliving(target) && message)
|
||||
to_chat(target, text("[message]"))
|
||||
|
||||
@@ -42,7 +42,7 @@ Also, you never added distance checking after target is selected. I've went ahea
|
||||
to_chat(user, "Their mind is resisting your spell.")
|
||||
return
|
||||
|
||||
if(istype(target, /mob/living/silicon))
|
||||
if(issilicon(target))
|
||||
to_chat(user, "You feel this enslaved being is just as dead as its cold, hard exoskeleton.")
|
||||
return
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item))
|
||||
return FALSE
|
||||
|
||||
// If the uplink's holder is in the user's contents
|
||||
if((U.loc in user.contents || (in_range(U.loc, user) && istype(U.loc.loc, /turf))))
|
||||
if((U.loc in user.contents || (in_range(U.loc, user) && isturf(U.loc.loc))))
|
||||
if(cost > U.uses)
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -40,9 +40,9 @@
|
||||
. = ..()
|
||||
if(.) //If true the mob is already affected, no need to keep processing
|
||||
return TRUE
|
||||
if(istype(L, /mob/living/simple_animal)) //while this might break immersion, I don't want to spam the server with calling this on simplemobs
|
||||
if(isanimal(L)) //while this might break immersion, I don't want to spam the server with calling this on simplemobs
|
||||
return FALSE
|
||||
if(istype(L, /mob/living/silicon/robot/drone)) //same with poor maint drones who just wanna have fun
|
||||
if(isdrone(L)) //same with poor maint drones who just wanna have fun
|
||||
return FALSE
|
||||
for(var/turf/T in oview(get_turf(L)))
|
||||
if(isspaceturf(T) || istransparentturf(T))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
/datum/wires/vending/interactable(mob/user)
|
||||
var/obj/machinery/vending/V = holder
|
||||
if(!istype(user, /mob/living/silicon) && V.seconds_electrified && V.shock(user, 100))
|
||||
if(!issilicon(user) && V.seconds_electrified && V.shock(user, 100))
|
||||
return FALSE
|
||||
if(V.panel_open)
|
||||
return TRUE
|
||||
|
||||
Reference in New Issue
Block a user