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
+1 -1
View File
@@ -98,7 +98,7 @@
update_icon(UPDATE_ICON_STATE)
if(!wax)
new/obj/item/trash/candle(src.loc)
if(istype(src.loc, /mob))
if(ismob(src.loc))
var/mob/M = src.loc
M.unEquip(src, 1) //src is being deleted anyway
qdel(src)
@@ -75,7 +75,7 @@
if(isliving(loc))
var/mob/living/M = loc
var/turf/T = M.loc
if(istype(T, /turf))
if(isturf(T))
if(!M.moved_recently && M.last_move)
M.moved_recently = 1
step(M, M.last_move)
@@ -407,7 +407,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list(
jobname = "Cyborg"
// --- Personal AI (pAI) ---
else if(istype(M, /mob/living/silicon/pai))
else if(ispAI(M))
jobname = "Personal AI"
// --- Unidentifiable mob ---
+1 -1
View File
@@ -343,7 +343,7 @@ REAGENT SCANNER
return
var/turf/location = user.loc
if(!( istype(location, /turf) ))
if(!isturf(location))
return
var/datum/gas_mixture/environment = location.return_air()
+1 -1
View File
@@ -397,7 +397,7 @@
/obj/item/robot_parts/head/attackby(obj/item/W as obj, mob/user as mob, params)
..()
if(istype(W, /obj/item/flash))
if(istype(user,/mob/living/silicon/robot))
if(isrobot(user))
to_chat(user, "<span class='warning'>How do you propose to do that?</span>")
return
else if(flash1 && flash2)
+1 -1
View File
@@ -13,7 +13,7 @@
/obj/item/stack/nanopaste/attack(mob/living/M as mob, mob/user as mob)
if(!istype(M) || !istype(user))
return 0
if(istype(M,/mob/living/silicon/robot)) //Repairing cyborgs
if(isrobot(M)) //Repairing cyborgs
var/mob/living/silicon/robot/R = M
if(R.getBruteLoss() || R.getFireLoss() )
R.heal_overall_damage(15, 15)
+2 -2
View File
@@ -424,7 +424,7 @@
..()
playsound(src, 'sound/effects/meteorimpact.ogg', 40, 1)
for(var/mob/M in range(10, src))
if(!M.stat && !istype(M, /mob/living/silicon/ai))\
if(!M.stat && !isAI(M))\
shake_camera(M, 3, 1)
qdel(src)
@@ -833,7 +833,7 @@
user.visible_message("<span class='warning'>[user] presses the big red button.</span>", "<span class='notice'>You press the button, it plays a loud noise!</span>", "<span class='notice'>The button clicks loudly.</span>")
playsound(src, 'sound/effects/explosionfar.ogg', 50, 0, 0)
for(var/mob/M in range(10, src)) // Checks range
if(!M.stat && !istype(M, /mob/living/silicon/ai)) // Checks to make sure whoever's getting shaken is alive/not the AI
if(!M.stat && !isAI(M)) // Checks to make sure whoever's getting shaken is alive/not the AI
sleep(8) // Short delay to match up with the explosion sound
shake_camera(M, 2, 1) // Shakes player camera 2 squares for 1 second.
@@ -40,7 +40,7 @@
STOP_PROCESSING(SSobj, src)
return null
var/turf/location = loc
if(istype(location, /mob/))
if(ismob(location))
var/mob/M = location
if(M.l_hand == src || M.r_hand == src)
location = M.loc
+1 -1
View File
@@ -80,7 +80,7 @@
if(!isliving(M))
return
M.IgniteMob()
if(!istype(M, /mob))
if(!ismob(M))
return
if(istype(M.wear_mask, /obj/item/clothing/mask/cigarette) && user.zone_selected == "mouth" && lit)
@@ -186,7 +186,7 @@
icon_state = "[initial(icon_state)][contents.len]"
/obj/item/storage/fancy/cigarettes/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M, /mob))
if(!ismob(M))
return
if(istype(M) && M == user && user.zone_selected == "mouth" && contents.len > 0 && !user.wear_mask)
@@ -314,7 +314,7 @@
nanofrost_cooldown = 0
return
if(nozzle_mode == METAL_FOAM)
if(!Adj|| !istype(target, /turf))
if(!Adj|| !isturf(target))
return
if(metal_synthesis_cooldown < 5)
var/obj/effect/particle_effect/foam/F = new /obj/effect/particle_effect/foam(get_turf(target), 1)