Defining Part 1 - Code cleanup toward defines (#19262)

* This is only the beginning

* Update stack.dm
This commit is contained in:
Vi3trice
2022-10-10 20:50:29 +02:00
committed by GitHub
parent 9235117b40
commit 9e90c81282
107 changed files with 161 additions and 161 deletions
+3 -3
View File
@@ -765,7 +765,7 @@ Returns 1 if the chain up to the area contains the given typepath
X.icon = old_icon1 //Shuttle floors are in shuttle.dmi while the defaults are floors.dmi
// Give the new turf our air, if simulated
if(istype(X, /turf/simulated) && istype(T, /turf/simulated))
if(issimulatedturf(X) && issimulatedturf(T))
var/turf/simulated/sim = X
sim.copy_air_with_tile(T)
@@ -785,7 +785,7 @@ Returns 1 if the chain up to the area contains the given typepath
// Find a new turf to take on the property of
var/turf/nextturf = get_step(corner, direction)
if(!nextturf || !istype(nextturf, /turf/space))
if(!nextturf || !isspaceturf(nextturf))
nextturf = get_step(corner, turn(direction, 180))
@@ -928,7 +928,7 @@ Returns 1 if the chain up to the area contains the given typepath
var/old_icon1 = T.icon
if(platingRequired)
if(istype(B, /turf/space))
if(isspaceturf(B))
continue moving
var/turf/X = new T.type(B)
+1 -1
View File
@@ -441,7 +441,7 @@
/obj/screen/click_catcher/Click(location, control, params)
var/list/modifiers = params2list(params)
if(modifiers["middle"] && istype(usr, /mob/living/carbon))
if(modifiers["middle"] && iscarbon(usr))
var/mob/living/carbon/C = usr
C.swap_hand()
else
+1 -1
View File
@@ -82,7 +82,7 @@
break
var/list/next_shocked = list()
for(var/atom/movable/AM in orange(3, target_atom))
if(AM == user || istype(AM, /obj/effect) || isobserver(AM))
if(AM == user || iseffect(AM) || isobserver(AM))
continue
next_shocked.Add(AM)
+2 -2
View File
@@ -462,7 +462,7 @@ so as to remain in compliance with the most up-to-date laws."
/obj/screen/alert/mech_port_available/Click()
if(!usr || !usr.client)
return
if(!istype(usr.loc, /obj/mecha) || !target)
if(!ismecha(usr.loc) || !target)
return
var/obj/mecha/M = usr.loc
if(M.connect(target))
@@ -478,7 +478,7 @@ so as to remain in compliance with the most up-to-date laws."
/obj/screen/alert/mech_port_disconnect/Click()
if(!usr || !usr.client)
return
if(!istype(usr.loc, /obj/mecha))
if(!ismecha(usr.loc))
return
var/obj/mecha/M = usr.loc
if(M.disconnect())
+2 -2
View File
@@ -43,7 +43,7 @@
/obj/screen/close/Click()
if(master)
if(istype(master, /obj/item/storage))
if(isstorage(master))
var/obj/item/storage/S = master
S.close(usr)
return 1
@@ -181,7 +181,7 @@
return FALSE
/obj/screen/storage/MouseDrop_T(obj/item/I, mob/user)
if(!user || !istype(I) || user.incapacitated(ignore_restraints = TRUE) || istype(user.loc, /obj/mecha) || !master)
if(!user || !istype(I) || user.incapacitated(ignore_restraints = TRUE) || ismecha(user.loc) || !master)
return
var/obj/item/storage/S = master
+2 -2
View File
@@ -168,7 +168,7 @@
update_icon(UPDATE_OVERLAYS)
apply_focus_overlay()
// Make it behave like other equipment
if(istype(target, /obj/item))
if(isitem(target))
if(target in user.tkgrabbed_objects)
// Release the old grab first
user.unEquip(user.tkgrabbed_objects[target])
@@ -177,7 +177,7 @@
/obj/item/tk_grab/proc/release_object()
if(!focus)
return
if(istype(focus, /obj/item))
if(isitem(focus))
// Delete the key/value pair of item to TK grab
host.tkgrabbed_objects -= focus
focus = null
+1 -1
View File
@@ -449,7 +449,7 @@ SUBSYSTEM_DEF(ticker)
if(desc_override)
I.desc = desc_override
if(istype(H.back, /obj/item/storage)) // Try to place it in something on the mob's back
if(isstorage(H.back)) // Try to place it in something on the mob's back
var/obj/item/storage/S = H.back
if(length(S.contents) < S.storage_slots)
I.forceMove(H.back)
+1 -1
View File
@@ -19,7 +19,7 @@
can_contaminate = _can_contaminate
if(istype(parent, /atom))
RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/rad_examine)
if(istype(parent, /obj/item))
if(isitem(parent))
RegisterSignal(parent, COMSIG_ITEM_ATTACK, .proc/rad_attack)
RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, .proc/rad_attack)
else
+1 -1
View File
@@ -38,7 +38,7 @@
do_disease_transformation(affected_mob)
/datum/disease/transformation/proc/do_disease_transformation(mob/living/affected_mob)
if(istype(affected_mob, /mob/living/carbon) && affected_mob.stat != DEAD)
if(iscarbon(affected_mob) && affected_mob.stat != DEAD)
if(stage5)
to_chat(affected_mob, pick(stage5))
if(jobban_isbanned(affected_mob, job_role))
+3 -3
View File
@@ -52,7 +52,7 @@
//must succeed in most cases
/datum/teleport/proc/setTeleatom(atom/movable/ateleatom)
if(istype(ateleatom, /obj/effect) && !istype(ateleatom, /obj/effect/dummy/chameleon))
if(iseffect(ateleatom) && !istype(ateleatom, /obj/effect/dummy/chameleon))
qdel(ateleatom)
return 0
if(istype(ateleatom))
@@ -107,7 +107,7 @@
center = destination
if(safe_turf_first)
for(var/turf/T in range(precision, center))
if(istype(T, /turf/space))
if(isspaceturf(T))
continue
if(T.density)
continue
@@ -191,7 +191,7 @@
else
precision = max(rand(1, 100) * length(bagholding), 100)
if(istype(teleatom, /mob/living))
if(isliving(teleatom))
var/mob/living/MM = teleatom
to_chat(MM, "<span class='warning'>The bluespace interface on your bag of holding interferes with the teleport!</span>")
return 1
+1 -1
View File
@@ -18,7 +18,7 @@
var/charged_item = null
var/burnt_out = FALSE
if(L.pulling && (istype(L.pulling, /mob/living)))
if(L.pulling && (isliving(L.pulling)))
var/mob/living/M = L.pulling
if(M.mob_spell_list.len != 0 || (M.mind && M.mind.spell_list.len != 0))
for(var/obj/effect/proc_holder/spell/S in M.mob_spell_list)
+2 -2
View File
@@ -536,7 +536,7 @@
if(M.buckled) //Cam't fall down if you are buckled
return
if(istype(get_turf(M), /turf/space)) // Can't fall onto nothing.
if(isspaceturf(get_turf(M))) // Can't fall onto nothing.
return
if((istype(M,/mob/living/carbon/human/)) && (M.m_intent == MOVE_INTENT_RUN))
@@ -552,7 +552,7 @@
if(!T)
T = get_turf(AT)
var/area/A = get_area(T)
if(istype(T, /turf/space)) // Turf never has gravity
if(isspaceturf(T)) // Turf never has gravity
return 0
else if(A && A.has_gravity) // Areas which always has gravity
return 1
+1 -1
View File
@@ -241,7 +241,7 @@
reagents.conditional_update()
else if(istype(A, /atom/movable))
var/atom/movable/M = A
if(istype(M.loc, /mob/living))
if(isliving(M.loc))
var/mob/living/L = M.loc
L.unEquip(M)
M.forceMove(src)
+1 -1
View File
@@ -122,7 +122,7 @@ GLOBAL_LIST_EMPTY(blob_nodes)
if(GLOB.directory[ckey(blob.key)])
blob_client = GLOB.directory[ckey(blob.key)]
location = get_turf(C)
if(!is_station_level(location.z) || istype(location, /turf/space))
if(!is_station_level(location.z) || isspaceturf(location))
if(!warned)
to_chat(C, "<span class='userdanger'>You feel ready to burst, but this isn't an appropriate place! You must return to the station!</span>")
message_admins("[key_name_admin(C)] was in space when the blobs burst, and will die if [C.p_they()] [C.p_do()] not return to the station.")
+3 -3
View File
@@ -50,14 +50,14 @@
else
src.floor += 1
if(istype(T, /turf/simulated/wall))
if(iswallturf(T))
var/turf/simulated/wall/W = T
if(W.intact)
src.wall += 2
else
src.wall += 1
if(istype(T, /turf/simulated/wall/r_wall))
if(isreinforcedwallturf(T))
var/turf/simulated/wall/r_wall/R = T
if(R.intact)
src.r_wall += 2
@@ -74,7 +74,7 @@
grille += 1
else if(istype(O, /obj/machinery/door))
src.door += 1
else if(istype(O, /obj/machinery))
else if(ismachinery(O))
src.mach += 1
/datum/station_state/proc/score(datum/station_state/result)
+1 -1
View File
@@ -135,7 +135,7 @@
/obj/structure/blob/proc/expand(turf/T = null, prob = 1, a_color, _overmind = null)
if(prob && !prob(obj_integrity))
return
if(istype(T, /turf/space) && prob(75)) return
if(isspaceturf(T) && prob(75)) return
if(!T)
var/list/dirs = list(1,2,4,8)
for(var/i = 1 to 4)
+2 -2
View File
@@ -294,9 +294,9 @@ GLOBAL_LIST_INIT(blacklisted_pylon_turfs, typecacheof(list(
var/turf/T = safepick(validturfs)
if(T)
if(istype(T, /turf/simulated/floor))
if(isfloorturf(T))
T.ChangeTurf(/turf/simulated/floor/engine/cult)
if(istype(T, /turf/simulated/wall))
if(iswallturf(T))
T.ChangeTurf(/turf/simulated/wall/cult/artificer)
else
var/turf/simulated/floor/engine/cult/F = safepick(cultturfs)
@@ -89,7 +89,7 @@
else
to_chat(src, "<span class='holoparasite'>You moved out of range, and were pulled back! You can only move [range] meters from [summoner.real_name]!</span>")
visible_message("<span class='danger'>\The [src] jumps back to its user.</span>")
if(istype(summoner.loc, /obj/effect))
if(iseffect(summoner.loc))
Recall(TRUE)
else
new /obj/effect/temp_visual/guardian/phase/out(loc)
@@ -90,7 +90,7 @@
set desc = "Mark a floor as your beacon point, allowing you to warp targets to it. Your beacon will not work in unfavorable atmospheric conditions."
if(beacon_cooldown < world.time)
var/turf/beacon_loc = get_turf(loc)
if(istype(beacon_loc, /turf/simulated/floor))
if(isfloorturf(beacon_loc))
var/turf/simulated/floor/F = beacon_loc
F.icon = 'icons/turf/floors.dmi'
F.name = "bluespace recieving pad"
@@ -48,7 +48,7 @@
if(get_dist(get_turf(summoner),get_turf(src)) <= range)
return
else
if(istype(summoner.loc, /obj/effect))
if(iseffect(summoner.loc))
to_chat(src, "<span class='holoparasite'>You moved out of range, and were pulled back! You can only move [range] meters from [summoner.real_name]!</span>")
visible_message("<span class='danger'>[src] jumps back to its user.</span>")
Recall(TRUE)
@@ -249,7 +249,7 @@
if(holy_check(src))
return
var/turf/T = get_turf(src)
if(istype(T, /turf/simulated/wall))
if(iswallturf(T))
to_chat(src, "<span class='revenwarning'>You cannot use abilities from inside of a wall.</span>")
return 0
if(inhibited)
+2 -2
View File
@@ -100,10 +100,10 @@
if(L.stat == CONSCIOUS) // Probably a troublemaker - I'd like to see YOU fight when unconscious
to_chat(L, "<span class='userdanger'>STOP FIGHTING.</span>")
L.ghostize()
if(istype(L, /mob/living/carbon/brain))
if(isbrain(L))
// diediedie
var/mob/living/carbon/brain/B = L
if(istype(B.loc, /obj/item))
if(isitem(B.loc))
qdel(B.loc)
if(B && B.container)
qdel(B.container)
@@ -237,7 +237,7 @@
/obj/machinery/computer/HolodeckControl/proc/checkInteg(area/A)
for(var/turf/T in A)
if(istype(T, /turf/space))
if(isspaceturf(T))
return 0
return 1
@@ -540,7 +540,7 @@
visible_message("<span class='warning'>[G.assailant] dunks [G.affecting] into [src]!</span>")
qdel(W)
return
else if(istype(W, /obj/item) && get_dist(src,user)<2)
else if(isitem(W) && get_dist(src,user)<2)
user.drop_item(src)
visible_message("<span class='notice'>[user] dunks [W] into [src]!</span>")
return
+1 -1
View File
@@ -469,7 +469,7 @@
playsound(loc, 'sound/effects/splat.ogg', 50, TRUE)
M.adjust_nutrition(-50) //lose a lot of food
var/turf/location = usr.loc
if(istype(location, /turf/simulated))
if(issimulatedturf(location))
location.add_vomit_floor(TRUE)
if(ORION_TRAIL_FLUX)
if(prob(75))
+1 -1
View File
@@ -95,7 +95,7 @@
else if(total_loss)
health_display = "HURT ([total_loss])"
var/turf/implant_location = get_turf(T)
if(!istype(implant_location, /turf/space))
if(!isspaceturf(implant_location))
loc_display = "[get_area(implant_location)]"
var/list/implant_info = list(
+1 -1
View File
@@ -169,7 +169,7 @@
update_req_desc()
return
if(istype(P, /obj/item))
if(isitem(P))
var/success
for(var/I in req_components)
if(istype(P, I) && (req_components[I] > 0) && (!(P.flags & NODROP) || istype(P, /obj/item/stack)))
+1 -1
View File
@@ -740,7 +740,7 @@ GLOBAL_LIST_EMPTY(airlock_emissive_underlays)
attack_ai(user)
/obj/machinery/door/airlock/CanPass(atom/movable/mover, turf/target, height=0)
if(isElectrified() && density && istype(mover, /obj/item))
if(isElectrified() && density && isitem(mover))
var/obj/item/I = mover
if(I.flags & CONDUCT)
do_sparks(5, 1, src)
+1 -1
View File
@@ -117,7 +117,7 @@
/obj/machinery/door/airlock/Bumped(atom/AM)
..(AM)
if(istype(AM, /obj/mecha))
if(ismecha(AM))
var/obj/mecha/mecha = AM
if(density && radio_connection && mecha.occupant && (allowed(mecha.occupant) || check_access_list(mecha.operation_req_access)))
send_status(1)
+1 -1
View File
@@ -104,7 +104,7 @@
if((disable) || (last_flash && world.time < last_flash + 150))
return
if(istype(AM, /mob/living/carbon))
if(iscarbon(AM))
var/mob/living/carbon/M = AM
if((M.m_intent != MOVE_INTENT_WALK) && (anchored))
flash()
+1 -1
View File
@@ -45,7 +45,7 @@
var/O_limit = 0
var/atom/target = get_edge_target_turf(src, dir)
for(var/atom/movable/O in loc)
if((!O.anchored && O.move_resist != INFINITY) || istype(O, /obj/mecha)) //Mechs need their launch platforms. Also checks if something is anchored or has move resist INFINITY, which should stop ghost flinging.
if((!O.anchored && O.move_resist != INFINITY) || ismecha(O)) //Mechs need their launch platforms. Also checks if something is anchored or has move resist INFINITY, which should stop ghost flinging.
O_limit++
if(O_limit >= 20)//so no more than 20 items are sent at a time, probably for counter-lag purposes
+2 -2
View File
@@ -520,7 +520,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
if(AA.invisibility > SEE_INVISIBLE_LIVING) //Let's not do typechecks and stuff on invisible things
continue
if(istype(A, /obj/mecha))
if(ismecha(A))
var/obj/mecha/ME = A
assess_and_assign(ME.occupant, targets, secondarytargets)
@@ -922,7 +922,7 @@ GLOBAL_LIST_EMPTY(turret_icons)
build_step = 6
return
if(istype(I, /obj/item/pen)) //you can rename turrets like bots!
if(is_pen(I)) //you can rename turrets like bots!
var/t = input(user, "Enter new turret name", name, finish_name) as text
t = sanitize(copytext(t, 1, MAX_MESSAGE_LEN))
if(!t)
+2 -2
View File
@@ -108,7 +108,7 @@
/obj/machinery/recycler/proc/eat(atom/AM0, sound = 1)
var/list/to_eat = list(AM0)
if(istype(AM0, /obj/item))
if(isitem(AM0))
to_eat += AM0.GetAllContents()
var/items_recycled = 0
@@ -121,7 +121,7 @@
crush_living(AM)
else
emergency_stop(AM)
else if(istype(AM, /obj/item))
else if(isitem(AM))
recycle_item(AM)
items_recycled++
else
+1 -1
View File
@@ -287,7 +287,7 @@
visible_message("<span class='warning'>[src] shuts off!</span>")
shields_down()
else
if(istype(get_turf(src), /turf/space))
if(isspaceturf(get_turf(src)))
return //No wrenching these in space!
WRENCH_ANCHOR_MESSAGE
anchored = !anchored
+4 -4
View File
@@ -38,12 +38,12 @@
// Get the turf 1 tile to the EAST.
var/turf/east = locate(T.x + 1, T.y, T.z)
if(istype(east, /turf/simulated/floor))
if(isfloorturf(east))
new /obj/machinery/conveyor/auto(east, WEST)
// Get the turf 1 tile to the WEST.
var/turf/west = locate(T.x - 1, T.y, T.z)
if(istype(west, /turf/simulated/floor))
if(isfloorturf(west))
new /obj/machinery/conveyor/auto(west, WEST)
/obj/machinery/transformer/power_change()
@@ -156,12 +156,12 @@
// Get the turf 2 tiles to the EAST.
var/turf/east2 = locate(T.x + 2, T.y, T.z)
if(istype(east2, /turf/simulated/floor))
if(isfloorturf(east2))
new /obj/machinery/conveyor/auto(east2, EAST)
// Get the turf 2 tiles to the WEST.
var/turf/west2 = locate(T.x - 2, T.y, T.z)
if(istype(west2, /turf/simulated/floor))
if(isfloorturf(west2))
new /obj/machinery/conveyor/auto(west2, EAST)
/obj/machinery/transformer/xray/power_change()
+1 -1
View File
@@ -26,7 +26,7 @@
set category = "Object"
set src in oview(1)
if(!istype(usr, /mob/living)) //ew ew ew usr, but it's the only way to check.
if(!isliving(usr)) //ew ew ew usr, but it's the only way to check.
return
if( state != 4 )
@@ -230,8 +230,8 @@
switch(mode)
if(MECH_RCD_MODE_DECONSTRUCT)
if(istype(target, /turf/simulated/wall))
if((istype(target, /turf/simulated/wall/r_wall) && !canRwall) || istype(target, /turf/simulated/wall/indestructible))
if(iswallturf(target))
if((isreinforcedwallturf(target) && !canRwall) || istype(target, /turf/simulated/wall/indestructible))
return 0
var/turf/simulated/wall/W = target
occupant_message("Deconstructing [target]...")
@@ -239,7 +239,7 @@
chassis.spark_system.start()
W.ChangeTurf(/turf/simulated/floor/plating)
playsound(W, usesound, 50, 1)
else if(istype(target, /turf/simulated/floor))
else if(isfloorturf(target))
var/turf/simulated/floor/F = target
occupant_message("Deconstructing [target]...")
if(do_after_cooldown(F))
@@ -254,14 +254,14 @@
qdel(target)
playsound(target, usesound, 50, 1)
if(MECH_RCD_MODE_WALL_OR_FLOOR)
if(istype(target, /turf/space))
if(isspaceturf(target))
var/turf/space/S = target
occupant_message("Building Floor...")
if(do_after_cooldown(S))
S.ChangeTurf(/turf/simulated/floor/plating)
playsound(S, usesound, 50, 1)
chassis.spark_system.start()
else if(istype(target, /turf/simulated/floor))
else if(isfloorturf(target))
var/turf/simulated/floor/F = target
occupant_message("Building Wall...")
if(do_after_cooldown(F))
@@ -269,7 +269,7 @@
playsound(F, usesound, 50, 1)
chassis.spark_system.start()
if(MECH_RCD_MODE_AIRLOCK)
if(istype(target, /turf/simulated/floor))
if(isfloorturf(target))
occupant_message("Building Airlock...")
if(do_after_cooldown(target))
chassis.spark_system.start()
@@ -318,7 +318,7 @@
if(!action_checks(target) || get_dist(chassis, target)>3)
return
if(istype(target, /turf/simulated/floor))
if(isfloorturf(target))
occupant_message("Building Wall...")
if(do_after_cooldown(target))
new /obj/structure/barricade/mime/mrcd(target)
@@ -416,7 +416,7 @@
last_piece = null
/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(turf/new_turf)
if(istype(new_turf, /turf/simulated/floor))
if(isfloorturf(new_turf))
var/turf/simulated/floor/T = new_turf
if(!istype(T, /turf/simulated/floor/plating))
if(!T.broken && !T.burnt)
+1 -1
View File
@@ -210,7 +210,7 @@
/obj/machinery/mecha_part_fabricator/proc/build_design_timer_finish(datum/design/D, list/final_cost)
// Spawn the item (in a lockbox if restricted) OR mob (e.g. IRC body)
var/atom/A = new D.build_path(get_step(src, output_dir))
if(istype(A, /obj/item))
if(isitem(A))
var/obj/item/I = A
I.materials = final_cost
if(D.locked)
+1 -1
View File
@@ -1209,7 +1209,7 @@
/obj/mecha/proc/pilot_is_mmi()
var/atom/movable/mob_container
if(istype(occupant, /mob/living/carbon/brain))
if(isbrain(occupant))
var/mob/living/carbon/brain/brain = occupant
mob_container = brain.container
if(istype(mob_container, /obj/item/mmi))
+1 -1
View File
@@ -156,7 +156,7 @@
qdel(src)
/obj/item/mecha_parts/mecha_tracking/proc/in_mecha()
if(istype(loc, /obj/mecha))
if(ismecha(loc))
return loc
return FALSE
@@ -28,7 +28,7 @@
if(metal)
var/turf/T = get_turf(src)
if(istype(T, /turf/space) && !istype(T, /turf/space/transit))
if(isspaceturf(T) && !istype(T, /turf/space/transit))
T.ChangeTurf(/turf/simulated/floor/plating/metalfoam)
var/turf/simulated/floor/plating/metalfoam/MF = get_turf(src)
MF.metal = metal
@@ -149,7 +149,7 @@
var/blast = FALSE
/datum/effect_system/smoke_spread/freezing/proc/Chilled(atom/A)
if(istype(A, /turf/simulated))
if(issimulatedturf(A))
var/turf/simulated/T = A
if(T.air)
var/datum/gas_mixture/G = T.air
+1 -1
View File
@@ -43,7 +43,7 @@
return TRUE
if(istype(mover, /mob/living/simple_animal/hostile/poison/giant_spider) || isterrorspider(mover))
return TRUE
else if(istype(mover, /mob/living))
else if(isliving(mover))
if(prob(50))
to_chat(mover, "<span class='danger'>You get stuck in [src] for a moment.</span>")
return FALSE
+2 -2
View File
@@ -156,10 +156,10 @@
//------- TURF FIRES -------
if(T)
if(flame_dist && prob(40) && !istype(T, /turf/space) && !T.density)
if(flame_dist && prob(40) && !isspaceturf(T) && !T.density)
new /obj/effect/hotspot(T) //Mostly for ambience!
if(dist > 0)
if(istype(T, /turf/simulated))
if(issimulatedturf(T))
var/turf/simulated/S = T
var/affecting_level
if(dist == 1)
+5 -5
View File
@@ -147,7 +147,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
. = ..()
for(var/path in actions_types)
new path(src, action_icon[path], action_icon_state[path])
if(istype(loc, /obj/item/storage)) //marks all items in storage as being such
if(isstorage(loc)) //marks all items in storage as being such
in_storage = TRUE
/obj/item/proc/determine_move_resist()
@@ -299,7 +299,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage
H.UpdateDamageIcon()
if(istype(src.loc, /obj/item/storage))
if(isstorage(src.loc))
//If the item is in a storage item, take it out
var/obj/item/storage/S = src.loc
S.remove_from_storage(src)
@@ -348,7 +348,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
// Due to storage type consolidation this should get used more now.
// I have cleaned it up a little, but it could probably use more. -Sayu
/obj/item/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/storage))
if(isstorage(I))
var/obj/item/storage/S = I
if(S.use_to_pickup)
if(S.pickup_all_on_tile) //Mode is set to collect all items on a tile and we clicked on a valid one.
@@ -376,7 +376,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
else if(S.can_be_inserted(src))
S.handle_item_insertion(src)
else if(istype(I, /obj/item/stack/tape_roll))
if(istype(src, /obj/item/storage)) //Don't tape the bag if we can put the duct tape inside it instead
if(isstorage(src)) //Don't tape the bag if we can put the duct tape inside it instead
var/obj/item/storage/bag = src
if(bag.can_be_inserted(I))
return ..()
@@ -740,7 +740,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons
if(!user || HAS_TRAIT(user, TRAIT_HANDS_BLOCKED) || src == I)
return
if(loc && I.loc == loc && istype(loc, /obj/item/storage) && loc.Adjacent(user)) // Are we trying to swap two items in the storage?
if(loc && I.loc == loc && isstorage(loc) && loc.Adjacent(user)) // Are we trying to swap two items in the storage?
var/obj/item/storage/S = loc
S.swap_items(src, I, user)
remove_outline() //get rid of the hover effect in case the mouse exit isn't called if someone drags and drops an item and somthing goes wrong
+4 -4
View File
@@ -271,15 +271,15 @@
//TODO: much much more. Unnamed airlocks, cameras, etc.
/obj/item/areaeditor/proc/check_tile_is_border(turf/T2, dir)
if(istype(T2, /turf/space))
if(isspaceturf(T2))
return BORDER_SPACE //omg hull breach we all going to die here
if(get_area_type(T2.loc)!=AREA_SPACE)
return BORDER_BETWEEN
if(istype(T2, /turf/simulated/wall))
if(iswallturf(T2))
return BORDER_2NDTILE
if(istype(T2, /turf/simulated/mineral))
if(ismineralturf(T2))
return BORDER_2NDTILE
if(!istype(T2, /turf/simulated))
if(!issimulatedturf(T2))
return BORDER_BETWEEN
for(var/obj/structure/window/W in T2)
+1 -1
View File
@@ -29,7 +29,7 @@
/obj/structure/closet/body_bag/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/pen))
if(is_pen(I))
var/t = rename_interactive(user, I)
if(isnull(t))
return
+1 -1
View File
@@ -66,7 +66,7 @@
chemtraces += V
/obj/item/autopsy_scanner/attackby(obj/item/P, mob/user)
if(istype(P, /obj/item/pen))
if(is_pen(P))
var/dead_name = input("Insert name of deceased individual")
var/dead_rank = input("Insert rank of deceased individual")
var/dead_tod = input("Insert time of death")
@@ -148,7 +148,7 @@
master.disrupt()
/obj/effect/dummy/chameleon/relaymove(mob/user, direction)
if(!isturf(loc) || istype(loc, /turf/space) || !direction)
if(!isturf(loc) || isspaceturf(loc) || !direction)
return // No magical movement!
if(can_move)
@@ -112,7 +112,7 @@
qdel(L)
return
if(istype(I, /obj/item/storage))
if(isstorage(I))
var/obj/item/storage/S = I
var/found_lightbulbs = FALSE
var/replaced_something = TRUE
+1 -1
View File
@@ -242,7 +242,7 @@
if(pai.master_dna)
return
var/mob/M = usr
if(!istype(M, /mob/living/carbon))
if(!iscarbon(M))
to_chat(usr, "<font color=blue>You don't have any DNA, or your DNA is incompatible with this device.</font>")
else
var/datum/dna/dna = usr.dna
@@ -338,7 +338,7 @@
update_icon(UPDATE_OVERLAYS)
/obj/item/tape/attackby(obj/item/I, mob/user)
if(istype(I, /obj/item/pen))
if(is_pen(I))
rename_interactive(user, I)
/obj/item/tape/screwdriver_act(mob/living/user, obj/item/I)
@@ -125,7 +125,7 @@
to_chat(M, "<span class='danger'>[src] will not work here!</span>")
/obj/item/teleporter/proc/tile_check(turf/T)
if(istype(T, /turf/simulated/floor) || istype(T, /turf/space))
if(isfloorturf(T) || isspaceturf(T))
return TRUE
/obj/item/teleporter/proc/dir_correction(mob/user) //Direction movement, screws with teleport distance and saving throw, and thus must be removed first
@@ -375,7 +375,7 @@ GLOBAL_LIST_INIT(cardboard_recipes, list (
))
/obj/item/stack/sheet/cardboard/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/stamp/clown) && !istype(loc, /obj/item/storage))
if(istype(I, /obj/item/stamp/clown) && !isstorage(loc))
var/atom/droploc = drop_location()
if(use(1))
playsound(I, 'sound/items/bikehorn.ogg', 50, 1, -1)
+4 -4
View File
@@ -207,10 +207,10 @@
to_chat(usr, "<span class='warning'>There is another [R.title] here!</span>")
return FALSE
if(R.on_floor && !istype(get_turf(src), /turf/simulated))
if(R.on_floor && !issimulatedturf(get_turf(src)))
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor!</span>")
return FALSE
if(R.on_floor_or_lattice && !(istype(get_turf(src), /turf/simulated) || locate(/obj/structure/lattice) in get_turf(src)))
if(R.on_floor_or_lattice && !(issimulatedturf(get_turf(src)) || locate(/obj/structure/lattice) in get_turf(src)))
to_chat(usr, "<span class='warning'>\The [R.title] must be constructed on the floor or lattice!</span>")
return FALSE
@@ -252,12 +252,12 @@
src = null //dont kill proc after qdel()
usr.unEquip(oldsrc, 1)
qdel(oldsrc)
if(istype(O, /obj/item))
if(isitem(O))
usr.put_in_hands(O)
O.add_fingerprint(usr)
//BubbleWrap - so newly formed boxes are empty
if(istype(O, /obj/item/storage))
if(isstorage(O))
for(var/obj/item/I in O)
qdel(I)
//BubbleWrap END
+1 -1
View File
@@ -440,7 +440,7 @@
*/
/obj/item/rcd/proc/mode_decon(atom/A, mob/user)
if(iswallturf(A))
if(istype(A, /turf/simulated/wall/r_wall) && !canRwall)
if(isreinforcedwallturf(A) && !canRwall)
return FALSE
if(istype(A, /turf/simulated/wall/indestructible))
return FALSE
+1 -1
View File
@@ -55,7 +55,7 @@ RSF
/obj/item/rsf/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity) return
if(!(istype(A, /obj/structure/table) || istype(A, /turf/simulated/floor)))
if(!(istype(A, /obj/structure/table) || isfloorturf(A)))
return
var/spawn_location
var/turf/T = get_turf(A)
+1 -1
View File
@@ -382,7 +382,7 @@
return
if(istype(O, /obj/item/card/id))
var/obj/item/card/id/I = O
if(istype(user, /mob/living) && user.mind)
if(isliving(user) && user.mind)
if(user.mind.special_role)
to_chat(usr, "<span class='notice'>The card's microscanners activate as you pass it over \the [I], copying its access.</span>")
src.access |= I.access //Don't copy access if user isn't an antag -- to prevent metagaming
+1 -1
View File
@@ -46,7 +46,7 @@
/obj/item/caution/proximity_sign/HasProximity(atom/movable/AM)
if(armed)
if(istype(AM, /mob/living/carbon) && !istype(AM, /mob/living/carbon/brain))
if(iscarbon(AM) && !isbrain(AM))
var/mob/living/carbon/C = AM
if(C.m_intent != MOVE_INTENT_WALK)
src.visible_message("[src] beeps, \"Running on wet floors is hazardous to your health.\"")
@@ -153,7 +153,7 @@
if(target)
if(!QDELETED(target))
location = get_turf(target)
if(!ex_breach && istype(target, /turf/simulated/wall)) //Walls get dismantled instead of destroyed to avoid making unwanted holes to space.
if(!ex_breach && iswallturf(target)) //Walls get dismantled instead of destroyed to avoid making unwanted holes to space.
var/turf/simulated/wall/W = target
W.dismantle_wall(TRUE, TRUE)
else
@@ -46,7 +46,7 @@
/obj/item/implantcase/attackby(obj/item/W, mob/user)
..()
if(istype(W, /obj/item/pen))
if(is_pen(W))
rename_interactive(user, W)
else if(istype(W, /obj/item/implanter))
var/obj/item/implanter/I = W
@@ -41,7 +41,7 @@
/obj/item/implanter/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/pen))
if(is_pen(W))
rename_interactive(user, W)
/obj/item/implanter/Initialize(mapload)
+1 -1
View File
@@ -92,7 +92,7 @@
/obj/item/restraints/legcuffs/beartrap/Crossed(AM as mob|obj, oldloc)
if(armed && isturf(src.loc))
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !istype(AM, /mob/living/simple_animal/hostile/construct) && !istype(AM, /mob/living/simple_animal/shade) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
if( (iscarbon(AM) || isanimal(AM)) && !istype(AM, /mob/living/simple_animal/parrot) && !isconstruct(AM) && !isshade(AM) && !istype(AM, /mob/living/simple_animal/hostile/viscerator))
var/mob/living/L = AM
armed = FALSE
update_icon()
@@ -56,7 +56,7 @@
if(loadedWeightClass >= maxWeightClass)
to_chat(user, "<span class='warning'>\The [src] can't hold any more items!</span>")
return
if(istype(W, /obj/item))
if(isitem(W))
var/obj/item/IW = W
if(IW.flags & (ABSTRACT | NODROP | DROPDEL))
to_chat(user, "<span class='warning'>You can't put [IW] into [src]!</span>")
@@ -83,7 +83,7 @@
return TRUE
/obj/item/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params)
if(istype(target, /obj/item/storage)) //So you can store it in backpacks
if(isstorage(target)) //So you can store it in backpacks
return ..()
if(istype(target, /obj/structure/closet)) //So you can store it in closets
return ..()
+1 -1
View File
@@ -50,7 +50,7 @@
return
if(isturf(AM))
return
if(istype(AM, /obj/item/storage))
if(isstorage(AM))
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
+1 -1
View File
@@ -13,7 +13,7 @@
var/label = ""
/obj/item/picket_sign/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen) || istype(W, /obj/item/toy/crayon))
if(is_pen(W) || istype(W, /obj/item/toy/crayon))
var/txt = stripped_input(user, "What would you like to write on the sign?", "Sign Label", null , 30)
if(txt)
label = txt
+1 -1
View File
@@ -60,7 +60,7 @@
user.visible_message("<span class='warning'>[user] begins to smear [src] on \the [target.name].</span>")
if(do_after(user, cleanspeed, target = target))
to_chat(user, "<span class='notice'>You 'clean' \the [target.name].</span>")
if(istype(target, /turf/simulated))
if(issimulatedturf(target))
new /obj/effect/decal/cleanable/blood/gibs/cleangibs(target)
else if(istype(target,/mob/living/carbon))
for(var/obj/item/carried_item in target.contents)
@@ -746,7 +746,7 @@
icon_state = "[item_state]_closed"
/obj/item/storage/box/papersack/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(is_pen(W))
//if a pen is used on the sack, dialogue to change its design appears
if(contents.len)
to_chat(user, "<span class='warning'>You can't modify [src] with items still inside!</span>")
@@ -297,7 +297,7 @@
return ..()
/obj/item/storage/pill_bottle/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/pen) || istype(I, /obj/item/flashlight/pen))
if(is_pen(I) || istype(I, /obj/item/flashlight/pen))
rename_interactive(user, I)
else
return ..()
@@ -98,7 +98,7 @@
return
var/mob/M = usr
if(istype(M.loc, /obj/mecha) || M.incapacitated(FALSE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
if(ismecha(M.loc) || M.incapacitated(FALSE, TRUE)) // Stops inventory actions in a mech as well as while being incapacitated
return
if(over_object == M && Adjacent(M)) // this must come before the screen objects only block
@@ -170,7 +170,7 @@
L += S.return_inv()
for(var/obj/item/gift/G in src)
L += G.gift
if(istype(G.gift, /obj/item/storage)) // If the gift contains a storage item
if(isstorage(G.gift)) // If the gift contains a storage item
var/obj/item/storage/S = G.gift
L += S.return_inv()
for(var/obj/item/folder/F in src)
@@ -361,7 +361,7 @@
to_chat(usr, "<span class='warning'>[src] cannot hold [I].</span>")
return FALSE
if(length(cant_hold) && istype(I, /obj/item/storage)) //Checks nested storage contents for restricted objects, we don't want people sneaking the NAD in via boxes now, do we?
if(length(cant_hold) && isstorage(I)) //Checks nested storage contents for restricted objects, we don't want people sneaking the NAD in via boxes now, do we?
var/obj/item/storage/S = I
for(var/obj/A in S.return_inv())
if(is_type_in_typecache(A, cant_hold))
@@ -383,7 +383,7 @@
to_chat(usr, "<span class='warning'>[src] is full, make some space.</span>")
return FALSE
if(I.w_class >= w_class && istype(I, /obj/item/storage))
if(I.w_class >= w_class && isstorage(I))
if(!istype(src, /obj/item/storage/backpack/holding)) //BoHs should be able to hold backpacks again. The override for putting a BoH in a BoH is in backpack.dm.
if(!stop_messages)
to_chat(usr, "<span class='warning'>[src] cannot hold [I] as it's a storage item of the same size.</span>")
@@ -649,7 +649,7 @@
while(cur_atom && !(cur_atom in container.contents))
if(isarea(cur_atom))
return -1
if(istype(cur_atom.loc, /obj/item/storage))
if(isstorage(cur_atom.loc))
depth++
cur_atom = cur_atom.loc
@@ -670,7 +670,7 @@
while(cur_atom && !isturf(cur_atom))
if(isarea(cur_atom))
return -1
if(istype(cur_atom.loc, /obj/item/storage))
if(isstorage(cur_atom.loc))
depth++
cur_atom = cur_atom.loc
+2 -2
View File
@@ -817,12 +817,12 @@
Z.gib()
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
if(wielded)
if(istype(A, /turf/simulated/wall))
if(iswallturf(A))
var/turf/simulated/wall/Z = A
Z.ex_act(2)
charged = 3
playsound(user, 'sound/weapons/marauder.ogg', 50, 1)
else if(istype(A, /obj/structure) || istype(A, /obj/mecha))
else if(istype(A, /obj/structure) || ismecha(A))
var/obj/Z = A
Z.ex_act(2)
charged = 3
+3 -3
View File
@@ -129,7 +129,7 @@
/obj/structure/alien/weeds/New(pos, node)
..()
linked_node = node
if(istype(loc, /turf/space))
if(isspaceturf(loc))
qdel(src)
return
if(icon_state == "weeds")
@@ -146,7 +146,7 @@
/obj/structure/alien/weeds/proc/Life()
var/turf/U = get_turf(src)
if(istype(U, /turf/space))
if(isspaceturf(U))
qdel(src)
return
@@ -155,7 +155,7 @@
for(var/turf/T in U.GetAtmosAdjacentTurfs())
if(locate(/obj/structure/alien/weeds) in T || istype(T, /turf/space))
if(locate(/obj/structure/alien/weeds) in T || isspaceturf(T))
continue
new /obj/structure/alien/weeds(T, linked_node)
@@ -71,7 +71,7 @@
M.show_message("<span class='notice'>\The [src] has been cut apart by [user] with \the [WC].</span>", 3, "You hear cutting.", 2)
qdel(src)
return
if(istype(W, /obj/item/pen))
if(is_pen(W))
var/decalselection = input("Please select a decal") as null|anything in list("Atmospherics", "Bartender", "Barber", "Blueshield", "Captain",
"Cargo", "Chief Engineer", "Chaplain", "Chef", "Chemist", "Assistant", "Clown", "CMO", "Coroner", "Detective", "Engineering", "Genetics", "HOP",
"HOS", "Hydroponics", "Internal Affairs Agent", "Janitor", "Magistrate", "Medical", "Mime", "Mining", "NT Representative", "Paramedic",
@@ -39,7 +39,7 @@
to_chat(user, "<span class = 'caution'> You disable the locking modules.</span>")
update_icon(UPDATE_ICON_STATE)
return
else if(istype(O, /obj/item))
else if(isitem(O))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/W = O
if(smashed || localopened)
@@ -57,7 +57,7 @@
. += "<span class='notice'>There is a small <i>paper</i> placard on the assembly[doorname].</span>"
/obj/structure/door_assembly/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(is_pen(W))
// The door assembly gets renamed to "Assembly - Foobar",
// but the `t` returned from the proc is just "Foobar" without the prefix.
var/t = rename_interactive(user, W)
+1 -1
View File
@@ -128,7 +128,7 @@
to_chat(user, "<span class='warning'>[src] is blocked!</span>")
return TRUE
if(!istype(T, /turf/simulated/floor))
if(!isfloorturf(T))
to_chat(user, "<span class='warning'>[src] bolts must be tightened on the floor!</span>")
return TRUE
user.visible_message("<span class='notice'>[user] tightens some bolts on the wall.</span>", "<span class='warning'>You tighten the bolts on the wall.</span>")
+1 -1
View File
@@ -156,7 +156,7 @@
deconstruct()
/obj/structure/grille/screwdriver_act(mob/user, obj/item/I)
if(!(anchored || istype(loc, /turf/simulated) || locate(/obj/structure/lattice) in get_turf(src)))
if(!(anchored || issimulatedturf(loc) || locate(/obj/structure/lattice) in get_turf(src)))
return
. = TRUE
if(shock(user, 90))
+1 -1
View File
@@ -148,7 +148,7 @@
operate()
else
operate()
else if(istype(user, /obj/mecha))
else if(ismecha(user))
operate()
/obj/structure/inflatable/door/proc/operate()
@@ -78,7 +78,7 @@
operate()
else
operate()
else if(istype(user, /obj/mecha))
else if(ismecha(user))
operate()
/obj/structure/mineral_door/proc/operate()
+2 -2
View File
@@ -133,7 +133,7 @@
return
/obj/structure/morgue/attackby(P as obj, mob/user as mob, params)
if(istype(P, /obj/item/pen))
if(is_pen(P))
var/t = rename_interactive(user, P)
if(isnull(t))
@@ -355,7 +355,7 @@ GLOBAL_LIST_EMPTY(crematoriums)
update_icon(UPDATE_OVERLAYS)
/obj/structure/crematorium/attackby(P as obj, mob/user as mob, params)
if(istype(P, /obj/item/pen))
if(is_pen(P))
rename_interactive(user, P)
add_fingerprint(user)
return
+2 -2
View File
@@ -65,11 +65,11 @@
var/obj/item/P = locate(href_list["write"])
if((P && P.loc == src)) //ifthe paper's on the board
if(istype(usr.r_hand, /obj/item/pen)) //and you're holding a pen
if(is_pen(usr.r_hand)) //and you're holding a pen
add_fingerprint(usr)
P.attackby(usr.r_hand, usr) //then do ittttt
else
if(istype(usr.l_hand, /obj/item/pen)) //check other hand for pen
if(is_pen(usr.l_hand)) //check other hand for pen
add_fingerprint(usr)
P.attackby(usr.l_hand, usr)
else
@@ -88,7 +88,7 @@
occupant.Weaken(12 SECONDS)
occupant.Stuttering(12 SECONDS)
playsound(src.loc, 'sound/weapons/punch1.ogg', 50, 1, -1)
if(istype(A, /mob/living))
if(isliving(A))
var/mob/living/victim = A
victim.Weaken(12 SECONDS)
victim.Stuttering(12 SECONDS)
+2 -2
View File
@@ -177,7 +177,7 @@
/obj/structure/table/MouseDrop_T(obj/O, mob/user)
..()
if((!( istype(O, /obj/item) ) || user.get_active_hand() != O))
if((!( isitem(O) ) || user.get_active_hand() != O))
return
if(isrobot(user))
return
@@ -841,7 +841,7 @@
. = . || mover.checkpass(PASSTABLE)
/obj/structure/rack/MouseDrop_T(obj/O, mob/user)
if((!( istype(O, /obj/item) ) || user.get_active_hand() != O))
if((!( isitem(O) ) || user.get_active_hand() != O))
return
if(isrobot(user))
return
@@ -165,7 +165,7 @@
else
W.forceMove(loc)
else if(istype(W, /obj/item/pen))
else if(is_pen(W))
var/t = rename_interactive(user, W)
if(!isnull(t))
created_name = t
+1 -1
View File
@@ -131,7 +131,7 @@ GLOBAL_LIST_INIT(icons_to_ignore_at_floor_init, list("damaged1","damaged2","dama
return ChangeTurf(/turf/simulated/floor/plating)
/turf/simulated/floor/ChangeTurf(turf/simulated/floor/T, defer_change = FALSE, keep_icon = TRUE, ignore_air = FALSE, copy_existing_baseturf = TRUE)
if(!istype(src, /turf/simulated/floor))
if(!isfloorturf(src))
return ..() //fucking turfs switch the fucking src of the fucking running procs
if(!ispath(T, /turf/simulated/floor))
return ..()
+1 -1
View File
@@ -292,7 +292,7 @@ GLOBAL_LIST_INIT(megafauna_spawn_list, list(/mob/living/simple_animal/hostile/me
for(var/thing in urange(12, T)) //prevents mob clumps
if(!ishostile(thing) && !istype(thing, /obj/structure/spawner))
continue
if((ispath(randumb, /mob/living/simple_animal/hostile/megafauna) || ismegafauna(thing)) && get_dist(T, thing) <= 7)
if((ismegafauna(randumb) || ismegafauna(thing)) && get_dist(T, thing) <= 7)
return //if there's a megafauna within standard view don't spawn anything at all
if(ispath(randumb, /mob/living/simple_animal/hostile/asteroid) || istype(thing, /mob/living/simple_animal/hostile/asteroid))
return //if the random is a standard mob, avoid spawning if there's another one within 12 tiles
+2 -2
View File
@@ -304,10 +304,10 @@
var/turf_count = 0
for(var/turf/T in atmos_adjacent_turfs)
if(istype(T, /turf/space))//Counted as no air
if(isspaceturf(T))//Counted as no air
turf_count++//Considered a valid turf for air calcs
continue
else if(istype(T, /turf/simulated/floor))
else if(isfloorturf(T))
var/turf/simulated/S = T
if(S.air)//Add the air's contents to the holders
aoxy += S.air.oxygen
+1 -1
View File
@@ -893,7 +893,7 @@ GLOBAL_VAR_INIT(gamma_ship_location, 1) // 0 = station , 1 = space
if(!frommob.ckey)
return 0
if(istype(tothing, /obj/item))
if(isitem(tothing))
var/mob/living/toitem = tothing
var/ask = alert("Are you sure you want to allow [frommob.name]([frommob.key]) to possess [toitem.name]?", "Place ghost in control of item?", "Yes", "No")
+2 -2
View File
@@ -787,7 +787,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
return
if(!istype(H))
if(istype(H, /mob/living/carbon/brain))
if(isbrain(H))
var/mob/living/carbon/brain/B = H
if(istype(B.container, /obj/item/mmi/robotic_brain/positronic))
var/obj/item/mmi/robotic_brain/positronic/C = B.container
@@ -813,7 +813,7 @@ GLOBAL_LIST_INIT(admin_verbs_maintainer, list(
return
if(!istype(H))
if(istype(H, /mob/living/carbon/brain))
if(isbrain(H))
var/mob/living/carbon/brain/B = H
if(istype(B.container, /obj/item/mmi/robotic_brain/positronic))
var/obj/item/mmi/robotic_brain/positronic/C = B.container
+2 -2
View File
@@ -2667,7 +2667,7 @@
if(istype(O,/mob))
var/mob/M = O
M.real_name = obj_name
if(where == "inhand" && isliving(usr) && istype(O, /obj/item))
if(where == "inhand" && isliving(usr) && isitem(O))
var/mob/living/L = usr
var/obj/item/I = O
L.put_in_hands(I)
@@ -2972,7 +2972,7 @@
if("fakeguns")
SSblackbox.record_feedback("tally", "admin_secrets_fun_used", 1, "Fake Guns")
for(var/obj/item/W in world)
if(istype(W, /obj/item/clothing) || istype(W, /obj/item/card/id) || istype(W, /obj/item/disk) || istype(W, /obj/item/tank))
if(isclothing(W) || istype(W, /obj/item/card/id) || istype(W, /obj/item/disk) || istype(W, /obj/item/tank))
continue
W.icon = 'icons/obj/guns/projectile.dmi'
W.icon_state = "revolver"
+1 -1
View File
@@ -10,7 +10,7 @@
var/datum/gas_mixture/GM = target.return_air()
var/burning = 0
if(istype(target, /turf/simulated))
if(issimulatedturf(target))
var/turf/simulated/T = target
if(T.active_hotspot)
burning = 1
@@ -275,7 +275,7 @@
if(blocked >= 100)
return 0
var/mob/living/carbon/human/H = firer
if(istype(target, /obj/item))
if(isitem(target))
var/obj/item/I = target
if(!I.anchored)
to_chat(firer, "<span class='notice'>You pull [I] towards yourself.</span>")
@@ -472,7 +472,7 @@
var/obj/item/I = hitby
if(!istype(I.loc, /mob/living))
if(!isliving(I.loc))
// Maybe it's on the ground? Maybe it's being used telekinetically? IDK
return
@@ -263,7 +263,7 @@
hud.show_hud(hud.hud_version)
hud.vampire_blood_display.maptext = "<div align='center' valign='middle' style='position:relative; top:0px; left:6px'><font face='Small Fonts' color='#ce0202'>[bloodusable]</font></div>"
handle_vampire_cloak()
if(istype(get_turf(owner.current), /turf/space))
if(isspaceturf(get_turf(owner.current)))
check_sun()
if(istype(get_area(owner.current), /area/chapel) && !get_ability(/datum/vampire_passive/full))
vamp_burn(7)
+1 -1
View File
@@ -267,7 +267,7 @@
/obj/effect/beam/i_beam/Crossed(atom/movable/AM, oldloc)
if(!isobj(AM) && !isliving(AM))
return
if(istype(AM, /obj/effect))
if(iseffect(AM))
return
hit()
+1 -1
View File
@@ -45,7 +45,7 @@
/obj/item/assembly/prox_sensor/HasProximity(atom/movable/AM)
if(!isobj(AM) && !isliving(AM))
return
if(istype(AM, /obj/effect))
if(iseffect(AM))
return
if(AM.move_speed < 12)
sense()
@@ -166,7 +166,7 @@
return ..()
/obj/effect/hotspot/proc/DestroyTurf()
if(istype(loc, /turf/simulated))
if(issimulatedturf(loc))
var/turf/simulated/T = loc
if(T.to_be_destroyed && !T.changing_turf)
var/chance_of_deletion
@@ -76,7 +76,7 @@
//alldir includes adjacent diagonal tiles that can share
// air with both of the related adjacent cardinal tiles
/turf/proc/GetAtmosAdjacentTurfs(alldir = 0)
if(!istype(src, /turf/simulated))
if(!issimulatedturf(src))
return list()
var/adjacent_turfs = atmos_adjacent_turfs.Copy()
@@ -162,7 +162,7 @@
for(var/t in adjacent_turfs)
var/turf/enemy_tile = t
if(istype(enemy_tile, /turf/simulated))
if(issimulatedturf(enemy_tile))
var/turf/simulated/enemy_simulated = enemy_tile
if(fire_count > enemy_simulated.current_cycle)
@@ -441,7 +441,7 @@
if(!neighbor.thermal_conductivity)
continue
if(istype(neighbor, /turf/simulated)) //anything under this subtype will share in the exchange
if(issimulatedturf(neighbor)) //anything under this subtype will share in the exchange
var/turf/simulated/T = neighbor
if(T.archived_cycle < SSair.times_fired)
@@ -517,7 +517,7 @@
update_visuals()
for(var/tile in atmos_adjacent_turfs)
var/turf/enemy_tile = tile
if(istype(enemy_tile, /turf/simulated))
if(issimulatedturf(enemy_tile))
var/turf/simulated/enemy_simulated = enemy_tile
if(!air.compare(enemy_simulated.air))
excited = 1
@@ -212,7 +212,7 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(is_pen(W))
rename_interactive(user, W)
return
else if(!istype(W, /obj/item/wrench))
@@ -206,7 +206,7 @@ Thus, the two variables affect pump operation are set in New():
update_icon()
/obj/machinery/atmospherics/binary/volume_pump/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(is_pen(W))
rename_interactive(user, W)
return
else if(!istype(W, /obj/item/wrench))
@@ -230,7 +230,7 @@
investigate_log("was set to [target_pressure] kPa by [key_name(usr)]", "atmos")
/obj/machinery/atmospherics/trinary/filter/attackby(obj/item/W, mob/user, params)
if(istype(W, /obj/item/pen))
if(is_pen(W))
rename_interactive(user, W)
return
else

Some files were not shown because too many files have changed in this diff Show More