Defining Part 4 - Code cleanup toward defines (... and the rest) (#19388)

* I wasn't done

* nits
This commit is contained in:
Vi3trice
2022-10-28 19:28:23 +02:00
committed by GitHub
parent 9400729a28
commit 03ce2920e1
127 changed files with 268 additions and 257 deletions
+2 -2
View File
@@ -66,7 +66,7 @@
/obj/item/paper/examine(mob/user)
. = ..()
if(user.is_literate())
if(in_range(user, src) || istype(user, /mob/dead/observer))
if(in_range(user, src) || isobserver(user))
show_content(user)
else
. += "<span class='notice'>You have to go closer if you want to read it.</span>"
@@ -400,7 +400,7 @@
else if(h_user.head == src)
h_user.unEquip(src)
h_user.put_in_hands(B)
else if(!istype(src.loc, /turf))
else if(!isturf(src.loc))
src.loc = get_turf(h_user)
if(h_user.client) h_user.client.screen -= src
h_user.put_in_hands(B)
+1 -1
View File
@@ -193,7 +193,7 @@
update_icon()
else
to_chat(usr, "<span class='notice'>You need to hold it in your hands to change pages.</span>")
if(istype(loc, /mob))
if(ismob(loc))
attack_self(loc)
/obj/item/paper_bundle/AltClick(mob/user)
+3 -3
View File
@@ -154,9 +154,9 @@
if(ishuman(copymob)) //Suit checks are in check_mob
var/mob/living/carbon/human/H = copymob
temp_img = icon('icons/obj/butts.dmi', H.dna.species.butt_sprite)
else if(istype(copymob,/mob/living/silicon/robot/drone))
else if(isdrone(copymob))
temp_img = icon('icons/obj/butts.dmi', "drone")
else if(istype(copymob,/mob/living/simple_animal/diona))
else if(isnymph(copymob))
temp_img = icon('icons/obj/butts.dmi', "nymph")
else if(isalien(copymob) || istype(copymob,/mob/living/simple_animal/hostile/alien)) //Xenos have their own asses, thanks to Pybro.
temp_img = icon('icons/obj/butts.dmi', "xeno")
@@ -495,7 +495,7 @@
toner = 0
/obj/machinery/photocopier/MouseDrop_T(mob/target, mob/living/user)
if(!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || istype(user, /mob/living/silicon/ai) || target.move_resist > user.pull_force)
if(!istype(target) || target.buckled || get_dist(user, src) > 1 || get_dist(user, target) > 1 || user.stat || isAI(user) || target.move_resist > user.pull_force)
return
if(check_mob()) //is target mob or another mob on this photocopier already?
return
+2 -2
View File
@@ -252,7 +252,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
// As well as anything that isn't invisible.
for(var/atom/A in the_turf)
if(A.invisibility)
if(see_ghosts && istype(A,/mob/dead/observer))
if(see_ghosts && isobserver(A))
var/mob/dead/observer/O = A
if(O.orbiting_uid)
continue
@@ -314,7 +314,7 @@ GLOBAL_LIST_INIT(SpookyGhosts, list("ghost","shade","shade2","ghost-narsie","hor
var/mob_detail
for(var/mob/M in the_turf)
if(M.invisibility)
if(see_ghosts && istype(M,/mob/dead/observer))
if(see_ghosts && isobserver(M))
var/mob/dead/observer/O = M
if(O.orbiting_uid)
continue
@@ -151,10 +151,10 @@
deletepicture(src)
/obj/item/camera/siliconcam/proc/getsource()
if(istype(src.loc, /mob/living/silicon/ai))
if(isAI(loc))
return src
var/mob/living/silicon/robot/C = src.loc
var/mob/living/silicon/robot/C = loc
var/obj/item/camera/siliconcam/Cinfo
if(C.connected_ai)
Cinfo = C.connected_ai.aiCamera