mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 03:55:11 +01:00
Adds a few turf istype helpers (#20754)
* a very calming act when the world is too much, too fast * i'm tired but i have to be efficient, infinite * lick your lips at the sight of me a fantasy made reality
This commit is contained in:
@@ -688,7 +688,7 @@ var/global/BSACooldown = 0
|
||||
ai_number++
|
||||
if(isAI(S))
|
||||
usr << "<b>AI [key_name(S, usr)]'s laws:</b>"
|
||||
else if(isrobot(S))
|
||||
else if(iscyborg(S))
|
||||
var/mob/living/silicon/robot/R = S
|
||||
usr << "<b>CYBORG [key_name(S, usr)] [R.connected_ai?"(Slaved to: [R.connected_ai])":"(Independant)"]: laws:</b>"
|
||||
else if (ispAI(S))
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
M_job = "AI"
|
||||
else if(ispAI(M))
|
||||
M_job = "pAI"
|
||||
else if(isrobot(M))
|
||||
else if(iscyborg(M))
|
||||
M_job = "Cyborg"
|
||||
else
|
||||
M_job = "Silicon-based"
|
||||
|
||||
@@ -1929,7 +1929,7 @@
|
||||
|
||||
switch(where)
|
||||
if("inhand")
|
||||
if (!iscarbon(usr) && !isrobot(usr))
|
||||
if (!iscarbon(usr) && !iscyborg(usr))
|
||||
usr << "Can only spawn in hand when you're a carbon mob or cyborg."
|
||||
where = "onfloor"
|
||||
target = usr
|
||||
@@ -1972,7 +1972,7 @@
|
||||
var/mob/living/L = usr
|
||||
var/obj/item/I = O
|
||||
L.put_in_hands(I)
|
||||
if(isrobot(L))
|
||||
if(iscyborg(L))
|
||||
var/mob/living/silicon/robot/R = L
|
||||
if(R.module)
|
||||
R.module.add_module(I)
|
||||
|
||||
@@ -244,20 +244,20 @@
|
||||
if(BASIC_BUILDMODE)
|
||||
if(istype(object,/turf) && left_click && !alt_click && !ctrl_click)
|
||||
var/turf/T = object
|
||||
if(istype(object,/turf/open/space))
|
||||
if(isspaceturf(object))
|
||||
T.ChangeTurf(/turf/open/floor/plasteel)
|
||||
else if(istype(object,/turf/open/floor))
|
||||
else if(isfloorturf(object))
|
||||
T.ChangeTurf(/turf/closed/wall)
|
||||
else if(istype(object,/turf/closed/wall))
|
||||
else if(iswallturf(object))
|
||||
T.ChangeTurf(/turf/closed/wall/r_wall)
|
||||
log_admin("Build Mode: [key_name(user)] built [T] at ([T.x],[T.y],[T.z])")
|
||||
return
|
||||
else if(right_click)
|
||||
log_admin("Build Mode: [key_name(user)] deleted [object] at ([object.x],[object.y],[object.z])")
|
||||
if(istype(object,/turf/closed/wall))
|
||||
if(iswallturf(object))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/open/floor/plasteel)
|
||||
else if(istype(object,/turf/open/floor))
|
||||
else if(isfloorturf(object))
|
||||
var/turf/T = object
|
||||
T.ChangeTurf(/turf/open/space)
|
||||
else if(istype(object,/turf/closed/wall/r_wall))
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
var/datum/gas_mixture/GM = target.return_air()
|
||||
var/list/GM_gases
|
||||
var/burning = 0
|
||||
if(istype(target, /turf/open))
|
||||
if(isopenturf(target))
|
||||
var/turf/open/T = target
|
||||
if(T.active_hotspot)
|
||||
burning = 1
|
||||
|
||||
@@ -144,7 +144,7 @@ var/pipenetwarnings = 10
|
||||
var/target_temperature
|
||||
var/target_heat_capacity
|
||||
|
||||
if(istype(target, /turf/open))
|
||||
if(isopenturf(target))
|
||||
|
||||
var/turf/open/modeled_location = target
|
||||
target_temperature = modeled_location.GetTemperature()
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
ruins_wizard_loadout = 1
|
||||
|
||||
for(var/mob/living/carbon/human/H in living_mob_list)
|
||||
if(ruins_spaceworthiness && (H.z != 1 || istype(H.loc, /turf/open/space) || isplasmaman(H)))
|
||||
if(ruins_spaceworthiness && (H.z != 1 || isspaceturf(H.loc) || isplasmaman(H)))
|
||||
continue //#savetheminers
|
||||
if(ruins_wizard_loadout && H.mind && ((H.mind in ticker.mode.wizards) || (H.mind in ticker.mode.apprentices)))
|
||||
continue
|
||||
|
||||
@@ -74,7 +74,7 @@
|
||||
var/trans = src.reagents.trans_to(target, amount_per_transfer_from_this)
|
||||
user << "<span class='notice'>You transfer [trans] units of the solution to [target].</span>"
|
||||
|
||||
if(isrobot(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
if(iscyborg(user)) //Cyborg modules that include drinks automatically refill themselves, but drain the borg's cell
|
||||
var/mob/living/silicon/robot/bro = user
|
||||
bro.cell.use(30)
|
||||
addtimer(reagents, "add_reagent", 600, FALSE, refill, trans)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
for(var/obj/effect/landmark/R in landmarks_list)
|
||||
if(R.name != "blobspawn")
|
||||
if(prob(35))
|
||||
if(istype(R.loc,/turf/open/space))
|
||||
if(isspaceturf(R.loc))
|
||||
new /mob/living/simple_animal/chicken/rabbit/space(R.loc)
|
||||
else
|
||||
new /mob/living/simple_animal/chicken/rabbit(R.loc)
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
continue
|
||||
|
||||
if(platingRequired)
|
||||
if(istype(B, /turf/open/space))
|
||||
if(isspaceturf(B))
|
||||
continue
|
||||
|
||||
var/old_dir1 = T.dir
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
|
||||
/obj/machinery/computer/holodeck/proc/floorcheck()
|
||||
for(var/turf/T in linked)
|
||||
if(!T.intact || istype(T,/turf/open/space))
|
||||
if(!T.intact || isspaceturf(T))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
return
|
||||
if(default_deconstruction_crowbar(I))
|
||||
return
|
||||
if(isrobot(user))
|
||||
if(iscyborg(user))
|
||||
return
|
||||
|
||||
if(istype(I, /obj/item/seeds))
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
return (BRUTELOSS)
|
||||
|
||||
/obj/item/seeds/kudzu/proc/plant(mob/user)
|
||||
if(istype(user.loc,/turf/open/space))
|
||||
if(isspaceturf(user.loc))
|
||||
return
|
||||
var/turf/T = get_turf(src)
|
||||
message_admins("Kudzu planted by [key_name_admin(user)](<A HREF='?_src_=holder;adminmoreinfo=\ref[user]'>?</A>) (<A HREF='?_src_=holder;adminplayerobservefollow=\ref[user]'>FLW</A>) at ([T.x],[T.y],[T.z] - <A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[T.x];Y=[T.y];Z=[T.z]'>(JMP)</a>)",0,1)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
origin_tech = "biotech=4;programming=5"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/walkingmushroom/attack_self(mob/user)
|
||||
if(istype(user.loc,/turf/open/space))
|
||||
if(isspaceturf(user.loc))
|
||||
return
|
||||
var/mob/living/simple_animal/hostile/mushroom/M = new /mob/living/simple_animal/hostile/mushroom(user.loc)
|
||||
M.maxHealth += round(seed.endurance / 4)
|
||||
@@ -241,7 +241,7 @@
|
||||
origin_tech = "biotech=4;plasmatech=6"
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/mushroom/glowshroom/attack_self(mob/user)
|
||||
if(istype(user.loc,/turf/open/space))
|
||||
if(isspaceturf(user.loc))
|
||||
return
|
||||
var/obj/structure/glowshroom/planted = new effect_path(user.loc)
|
||||
planted.delay = planted.delay - seed.production * 100 //So the delay goes DOWN with better stats instead of up. :I
|
||||
|
||||
@@ -124,7 +124,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/weapon/reagent_containers/food/snacks/grown/tomato/killer/attack_self(mob/user)
|
||||
if(awakening || istype(user.loc,/turf/open/space))
|
||||
if(awakening || isspaceturf(user.loc))
|
||||
return
|
||||
user << "<span class='notice'>You begin to awaken the Killer Tomato...</span>"
|
||||
awakening = 1
|
||||
|
||||
@@ -134,7 +134,7 @@
|
||||
|
||||
|
||||
/obj/structure/bonfire/proc/CheckOxygen()
|
||||
if(istype(loc,/turf/open))
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/O = loc
|
||||
if(O.air)
|
||||
var/G = O.air.gases
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
|
||||
/obj/effect/resonance/proc/burst(turf/T)
|
||||
playsound(src,'sound/weapons/resonator_blast.ogg',50,1)
|
||||
if(istype(T, /turf/closed/mineral))
|
||||
if(ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.gets_drilled(creator)
|
||||
for(var/mob/living/L in T)
|
||||
@@ -522,7 +522,7 @@
|
||||
L.underlays += I
|
||||
hammer_synced.marked_image = I
|
||||
var/target_turf = get_turf(target)
|
||||
if(istype(target_turf, /turf/closed/mineral))
|
||||
if(ismineralturf(target_turf))
|
||||
var/turf/closed/mineral/M = target_turf
|
||||
PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, M)
|
||||
M.gets_drilled(firer)
|
||||
|
||||
@@ -794,7 +794,7 @@
|
||||
addtimer(src, "aoe_burst", 0, FALSE, T, user)
|
||||
add_logs(user, target, "fired 3x3 blast at", src)
|
||||
else
|
||||
if(istype(target, /turf/closed/mineral) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
|
||||
if(ismineralturf(target) && get_dist(user, target) < 6) //target is minerals, we can hit it(even if we can't see it)
|
||||
addtimer(src, "cardinal_blasts", 0, FALSE, T, user)
|
||||
timer = world.time + cooldown_time
|
||||
else if(target in view(5, get_turf(user))) //if the target is in view, hit it
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
var/path = pickweight(mineralSpawnChanceList)
|
||||
var/turf/T = ChangeTurf(path)
|
||||
|
||||
if(T && istype(T, /turf/closed/mineral))
|
||||
if(T && ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.mineralAmt = rand(1, 5)
|
||||
M.environment_type = src.environment_type
|
||||
@@ -358,7 +358,7 @@
|
||||
/turf/open/floor/plating/asteroid/airless/cave/proc/SpawnFloor(turf/T)
|
||||
for(var/S in RANGE_TURFS(1, src))
|
||||
var/turf/NT = S
|
||||
if(!NT || istype(NT, /turf/open/space) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored))
|
||||
if(!NT || isspaceturf(NT) || istype(NT.loc, /area/mine/explored) || istype(NT.loc, /area/lavaland/surface/outdoors/explored))
|
||||
sanity = 0
|
||||
break
|
||||
if(!sanity)
|
||||
@@ -400,7 +400,7 @@
|
||||
P.playDigSound()
|
||||
|
||||
if(do_after(user,P.digspeed, target = src))
|
||||
if(istype(src, /turf/closed/mineral))
|
||||
if(ismineralturf(src))
|
||||
user << "<span class='notice'>You finish cutting into the rock.</span>"
|
||||
gets_drilled(user)
|
||||
feedback_add_details("pick_used_mining","[P.type]")
|
||||
@@ -715,7 +715,7 @@
|
||||
for(var/i in 1 to 5)
|
||||
AM.pixel_y--
|
||||
sleep(2)
|
||||
if(isrobot(AM))
|
||||
if(iscyborg(AM))
|
||||
var/mob/living/silicon/robot/S = AM
|
||||
qdel(S.mmi)
|
||||
qdel(AM)
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
..()
|
||||
|
||||
/obj/item/device/mmi/Destroy()
|
||||
if(isrobot(loc))
|
||||
if(iscyborg(loc))
|
||||
var/mob/living/silicon/robot/borg = loc
|
||||
borg.mmi = null
|
||||
if(brainmob)
|
||||
|
||||
@@ -48,7 +48,7 @@ Doesn't work on other aliens/AI.*/
|
||||
if(!silent)
|
||||
user << "<span class='noticealien'>Not enough plasma stored.</span>"
|
||||
return 0
|
||||
if(check_turf && (!isturf(user.loc) || istype(user.loc, /turf/open/space)))
|
||||
if(check_turf && (!isturf(user.loc) || isspaceturf(user.loc)))
|
||||
if(!silent)
|
||||
user << "<span class='noticealien'>Bad place for a garden!</span>"
|
||||
return 0
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
/mob/living/movement_delay()
|
||||
. = ..()
|
||||
if(istype(loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/T = loc
|
||||
. += T.slowdown
|
||||
switch(m_intent)
|
||||
@@ -739,7 +739,7 @@
|
||||
else if(istype(loc, /obj/structure/transit_tube_pod))
|
||||
loc_temp = environment.temperature
|
||||
|
||||
else if(istype(get_turf(src), /turf/open/space))
|
||||
else if(isspaceturf(get_turf(src)))
|
||||
var/turf/heat_turf = get_turf(src)
|
||||
loc_temp = heat_turf.temperature
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
/mob/living/silicon/ai/proc/lacks_power()
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/A = get_area(src)
|
||||
return !T || !A || ((!A.master.power_equip || istype(T, /turf/open/space)) && !is_type_in_list(src.loc, list(/obj/item, /obj/mecha)))
|
||||
return !T || !A || ((!A.master.power_equip || isspaceturf(T)) && !is_type_in_list(loc, list(/obj/item, /obj/mecha)))
|
||||
|
||||
/mob/living/silicon/ai/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
@@ -88,7 +88,7 @@
|
||||
var/turf/T = get_turf(src)
|
||||
var/area/AIarea = get_area(src)
|
||||
if(AIarea && AIarea.master.power_equip)
|
||||
if(!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
src << "Fault confirmed: missing external power. Shutting down main control system to save power."
|
||||
@@ -96,7 +96,7 @@
|
||||
src << "Emergency control system online. Verifying connection to power network."
|
||||
sleep(50)
|
||||
T = get_turf(src)
|
||||
if (istype(T, /turf/open/space))
|
||||
if(isspaceturf(T))
|
||||
src << "Unable to verify! No power connection detected!"
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
|
||||
return
|
||||
@@ -123,7 +123,7 @@
|
||||
aiRestorePowerRoutine = POWER_RESTORATION_SEARCH_APC
|
||||
return
|
||||
if(AIarea.master.power_equip)
|
||||
if (!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
ai_restore_power()
|
||||
return
|
||||
switch(PRP)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
return
|
||||
|
||||
if(emagged == 2) //Emag functions
|
||||
if(istype(loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
|
||||
for(var/mob/living/carbon/victim in loc)
|
||||
if(victim != target)
|
||||
|
||||
@@ -187,10 +187,10 @@
|
||||
if(!target && emagged < 2)
|
||||
if(targetdirection != null) //The bot is in line mode.
|
||||
var/turf/T = get_step(src, targetdirection)
|
||||
if(istype(T, /turf/open/space)) //Check for space
|
||||
if(isspaceturf(T)) //Check for space
|
||||
target = T
|
||||
process_type = LINE_SPACE_MODE
|
||||
if(istype(T, /turf/open/floor)) //Check for floor
|
||||
if(isfloorturf(T)) //Check for floor
|
||||
target = T
|
||||
|
||||
if(!target)
|
||||
@@ -250,7 +250,7 @@
|
||||
return
|
||||
if(istype(target, /turf/) && emagged < 2)
|
||||
repair(target)
|
||||
else if(emagged == 2 && istype(target,/turf/open/floor))
|
||||
else if(emagged == 2 && isfloorturf(target))
|
||||
var/turf/open/floor/F = target
|
||||
anchored = 1
|
||||
mode = BOT_REPAIRING
|
||||
@@ -291,7 +291,7 @@
|
||||
result = F
|
||||
if(REPLACE_TILE)
|
||||
F = scan_target
|
||||
if(istype(F, /turf/open/floor) && !istype(F, /turf/open/floor/plating)) //The floor must already have a tile.
|
||||
if(isfloorturf(F) && !istype(F, /turf/open/floor/plating)) //The floor must already have a tile.
|
||||
result = F
|
||||
if(FIX_TILE) //Selects only damaged floors.
|
||||
F = scan_target
|
||||
@@ -307,14 +307,14 @@
|
||||
|
||||
/mob/living/simple_animal/bot/floorbot/proc/repair(turf/target_turf)
|
||||
|
||||
if(istype(target_turf, /turf/open/space/))
|
||||
if(isspaceturf(target_turf))
|
||||
//Must be a hull breach or in line mode to continue.
|
||||
if(!is_hull_breach(target_turf) && !targetdirection)
|
||||
target = null
|
||||
return
|
||||
else if(!istype(target_turf, /turf/open/floor))
|
||||
else if(!isfloorturf(target_turf))
|
||||
return
|
||||
if(istype(target_turf, /turf/open/space/)) //If we are fixing an area not part of pure space, it is
|
||||
if(isspaceturf(target_turf)) //If we are fixing an area not part of pure space, it is
|
||||
anchored = 1
|
||||
icon_state = "floorbot-c"
|
||||
visible_message("<span class='notice'>[targetdirection ? "[src] begins installing a bridge plating." : "[src] begins to repair the hole."] </span>")
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr)))
|
||||
return
|
||||
var/remove_from = href_list["remove_inv"]
|
||||
switch(remove_from)
|
||||
@@ -140,7 +140,7 @@
|
||||
|
||||
//Adding things to inventory
|
||||
else if(href_list["add_inv"])
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr)))
|
||||
if(!Adjacent(usr) || !(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr)))
|
||||
return
|
||||
|
||||
var/add_to = href_list["add_inv"]
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
return
|
||||
|
||||
var/turf/beacon_loc = get_turf(src.loc)
|
||||
if(!istype(beacon_loc, /turf/open/floor))
|
||||
if(!isfloorturf(beacon_loc))
|
||||
return
|
||||
|
||||
if(beacon)
|
||||
|
||||
@@ -108,7 +108,7 @@
|
||||
LayEggs()
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/proc/SpreadPlants()
|
||||
if(!isturf(loc) || istype(loc, /turf/open/space))
|
||||
if(!isturf(loc) || isspaceturf(loc))
|
||||
return
|
||||
if(locate(/obj/structure/alien/weeds/node) in get_turf(src))
|
||||
return
|
||||
@@ -116,7 +116,7 @@
|
||||
new /obj/structure/alien/weeds/node(loc)
|
||||
|
||||
/mob/living/simple_animal/hostile/alien/proc/LayEggs()
|
||||
if(!isturf(loc) || istype(loc, /turf/open/space))
|
||||
if(!isturf(loc) || isspaceturf(loc))
|
||||
return
|
||||
if(locate(/obj/structure/alien/egg) in get_turf(src))
|
||||
return
|
||||
|
||||
@@ -352,7 +352,7 @@
|
||||
EscapeConfinement()
|
||||
for(var/dir in cardinal)
|
||||
var/turf/T = get_step(targets_from, dir)
|
||||
if(istype(T, /turf/closed/wall) || istype(T, /turf/closed/mineral))
|
||||
if(iswallturf(T) || ismineralturf(T))
|
||||
if(T.Adjacent(targets_from))
|
||||
T.attack_animal(src)
|
||||
for(var/a in T)
|
||||
|
||||
@@ -496,7 +496,7 @@ Difficulty: Very Hard
|
||||
for(var/atom/Stuff in A)
|
||||
if(isturf(Stuff))
|
||||
var/turf/T = Stuff
|
||||
if((istype(T, /turf/open/space) || istype(T, /turf/open/floor)) && NewTerrainFloors)
|
||||
if((isspaceturf(T) || isfloorturf(T)) && NewTerrainFloors)
|
||||
var/turf/open/O = T.ChangeTurf(NewTerrainFloors)
|
||||
if(O.air)
|
||||
var/datum/gas_mixture/G = O.air
|
||||
@@ -505,7 +505,7 @@ Difficulty: Very Hard
|
||||
var/atom/Picked = pick(NewFlora)
|
||||
new Picked(O)
|
||||
continue
|
||||
if(istype(T, /turf/closed/wall) && NewTerrainWalls)
|
||||
if(iswallturf(T) && NewTerrainWalls)
|
||||
T.ChangeTurf(NewTerrainWalls)
|
||||
continue
|
||||
if(istype(Stuff, /obj/structure/chair) && NewTerrainChairs)
|
||||
@@ -759,7 +759,7 @@ Difficulty: Very Hard
|
||||
sound = null
|
||||
|
||||
/obj/effect/proc_holder/spell/targeted/exit_possession/cast(list/targets, mob/user = usr)
|
||||
if(!istype(user.loc, /turf/open/floor))
|
||||
if(!isfloorturf(user.loc))
|
||||
return
|
||||
var/datum/mind/target_mind = user.mind
|
||||
for(var/i in user)
|
||||
|
||||
@@ -492,7 +492,7 @@ Difficulty: Hard
|
||||
friendly_fire_check = friendly_fire
|
||||
if(new_caster)
|
||||
hit_things += new_caster
|
||||
if(istype(loc, /turf/closed/mineral)) //drill mineral turfs
|
||||
if(ismineralturf(loc)) //drill mineral turfs
|
||||
var/turf/closed/mineral/M = loc
|
||||
M.gets_drilled(caster)
|
||||
addtimer(src, "blast", 0)
|
||||
|
||||
@@ -199,7 +199,7 @@ var/global/list/protected_objects = list(/obj/structure/table, /obj/structure/ca
|
||||
/mob/living/simple_animal/hostile/mimic/copy/machine/CanAttack(atom/the_target)
|
||||
if(the_target == creator) // Don't attack our creator AI.
|
||||
return 0
|
||||
if(isrobot(the_target))
|
||||
if(iscyborg(the_target))
|
||||
var/mob/living/silicon/robot/R = the_target
|
||||
if(R.connected_ai == creator) // Only attack robots that aren't synced to our creator AI.
|
||||
return 0
|
||||
|
||||
@@ -483,7 +483,7 @@
|
||||
|
||||
/obj/effect/goliath_tentacle/New()
|
||||
var/turftype = get_turf(src)
|
||||
if(istype(turftype, /turf/closed/mineral))
|
||||
if(ismineralturf(turftype))
|
||||
var/turf/closed/mineral/M = turftype
|
||||
M.gets_drilled()
|
||||
addtimer(src, "Trip", 10)
|
||||
@@ -987,7 +987,7 @@
|
||||
/mob/living/simple_animal/hostile/spawner/lavaland/New()
|
||||
..()
|
||||
for(var/F in RANGE_TURFS(1, src))
|
||||
if(istype(F, /turf/closed/mineral))
|
||||
if(ismineralturf(F))
|
||||
var/turf/closed/mineral/M = F
|
||||
M.ChangeTurf(M.turf_type)
|
||||
gps = new /obj/item/device/gps/internal(src)
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
/mob/living/simple_animal/hostile/tree/Life()
|
||||
..()
|
||||
if(istype(src.loc, /turf/open))
|
||||
if(isopenturf(loc))
|
||||
var/turf/open/T = src.loc
|
||||
if(T.air && T.air.gases["co2"])
|
||||
var/co2 = T.air.gases["co2"][MOLES]
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
return
|
||||
|
||||
//Is the usr's mob type able to do this? (lolaliens)
|
||||
if(ishuman(usr) || ismonkey(usr) || isrobot(usr) || isalienadult(usr))
|
||||
if(ishuman(usr) || ismonkey(usr) || iscyborg(usr) || isalienadult(usr))
|
||||
|
||||
//Removing from inventory
|
||||
if(href_list["remove_inv"])
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
//world << "changed from [bodytemperature] by [diff] to [bodytemperature + diff]"
|
||||
bodytemperature += diff
|
||||
|
||||
if(istype(T,/turf/open))
|
||||
if(isopenturf(T))
|
||||
var/turf/open/ST = T
|
||||
if(ST.air)
|
||||
var/ST_gases = ST.air.gases
|
||||
|
||||
@@ -318,7 +318,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(hud_used && hud_used.action_intent)
|
||||
hud_used.action_intent.icon_state = "[a_intent]"
|
||||
|
||||
else if(isrobot(src) || ismonkey(src) || islarva(src))
|
||||
else if(iscyborg(src) || ismonkey(src) || islarva(src))
|
||||
switch(input)
|
||||
if("help")
|
||||
a_intent = "help"
|
||||
@@ -342,7 +342,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
if(!istype(M))
|
||||
return 0
|
||||
if(issilicon(M))
|
||||
if(isrobot(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor.
|
||||
if(iscyborg(M)) //For cyborgs, returns 1 if the cyborg has a law 0 and special_role. Returns 0 if the borg is merely slaved to an AI traitor.
|
||||
var/mob/living/silicon/robot/R = M
|
||||
if(R.mind && R.mind.special_role)
|
||||
if(R.laws && R.laws.zeroth && R.syndicate)
|
||||
|
||||
@@ -85,7 +85,7 @@
|
||||
|
||||
/client/verb/drop_item()
|
||||
set hidden = 1
|
||||
if(!isrobot(mob))
|
||||
if(!iscyborg(mob))
|
||||
mob.drop_item_v()
|
||||
return
|
||||
|
||||
@@ -283,7 +283,7 @@
|
||||
continue
|
||||
else if(isturf(A))
|
||||
var/turf/turf = A
|
||||
if(istype(turf,/turf/open/space))
|
||||
if(isspaceturf(turf))
|
||||
continue
|
||||
if(!turf.density && !mob_negates_gravity())
|
||||
continue
|
||||
|
||||
@@ -304,7 +304,7 @@
|
||||
|
||||
var/mob/living/character = create_character() //creates the human and transfers vars and mind
|
||||
var/equip = SSjob.EquipRank(character, rank, 1)
|
||||
if(isrobot(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
|
||||
if(iscyborg(equip)) //Borgs get borged in the equip, so we need to make sure we handle the new mob.
|
||||
character = equip
|
||||
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
|
||||
/obj/item/weapon/hand_labeler/borg/afterattack(atom/A, mob/user, proximity)
|
||||
..(A, user, proximity)
|
||||
if(!isrobot(user))
|
||||
if(!iscyborg(user))
|
||||
return
|
||||
|
||||
var/mob/living/silicon/robot/borgy = user
|
||||
|
||||
@@ -411,7 +411,7 @@
|
||||
qdel(P) //so 10 thousand picture items are not left in memory should an AI take them and then view them all
|
||||
|
||||
/obj/item/device/camera/siliconcam/proc/viewpictures(user)
|
||||
if(isrobot(user)) // Cyborg
|
||||
if(iscyborg(user)) // Cyborg
|
||||
var/mob/living/silicon/robot/C = src.loc
|
||||
var/obj/item/device/camera/siliconcam/Cinfo
|
||||
if(C.connected_ai)
|
||||
|
||||
@@ -117,7 +117,7 @@
|
||||
if(istype(W, /obj/item/stack/cable_coil))
|
||||
var/obj/item/stack/cable_coil/coil = W
|
||||
var/turf/T = user.loc
|
||||
if(T.intact || !istype(T, /turf/open/floor))
|
||||
if(T.intact || !isfloorturf(T))
|
||||
return
|
||||
if(get_dist(src, user) > 1)
|
||||
return
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
|
||||
return //Yeah just stop.
|
||||
|
||||
if(istype(T, /turf/open/space)) // Stop processing this stuff if we've been ejected.
|
||||
if(isspaceturf(T)) // Stop processing this stuff if we've been ejected.
|
||||
return
|
||||
|
||||
if(damage > warning_point) // while the core is still damaged and it's still worth noting its status
|
||||
@@ -243,7 +243,7 @@
|
||||
return(gain)
|
||||
|
||||
/obj/machinery/power/supermatter_shard/blob_act(obj/structure/blob/B)
|
||||
if(B && !istype(loc, /turf/open/space)) //does nothing in space
|
||||
if(B && !isspaceturf(loc)) //does nothing in space
|
||||
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
|
||||
damage += B.health * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us
|
||||
if(B.health > 100)
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
if(A.density)
|
||||
. = 0
|
||||
break
|
||||
if(!allowAtomsOnSpace && (istype(T,/turf/open/space)))
|
||||
if(!allowAtomsOnSpace && (isspaceturf(T)))
|
||||
. = 0
|
||||
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/robocharge()
|
||||
if(isrobot(src.loc))
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||
|
||||
@@ -182,7 +182,7 @@
|
||||
var/turf/target_turf = get_turf(target)
|
||||
if(!target_turf)
|
||||
target_turf = get_turf(src)
|
||||
if(istype(target_turf, /turf/closed/mineral))
|
||||
if(ismineralturf(target_turf))
|
||||
var/turf/closed/mineral/M = target_turf
|
||||
M.gets_drilled(firer)
|
||||
var/obj/effect/overlay/temp/kinetic_blast/K = PoolOrNew(/obj/effect/overlay/temp/kinetic_blast, target_turf)
|
||||
@@ -191,7 +191,7 @@
|
||||
PoolOrNew(type, target_turf)
|
||||
if(turf_aoe)
|
||||
for(var/T in RANGE_TURFS(1, target_turf) - target_turf)
|
||||
if(istype(T, /turf/closed/mineral))
|
||||
if(ismineralturf(T))
|
||||
var/turf/closed/mineral/M = T
|
||||
M.gets_drilled(firer)
|
||||
if(mob_aoe)
|
||||
|
||||
@@ -126,7 +126,7 @@
|
||||
OpenDoor(target)
|
||||
else
|
||||
var/turf/T = get_turf(target)
|
||||
if(istype(T,/turf/closed) && !istype(T, /turf/closed/indestructible))
|
||||
if(isclosedturf(T) && !istype(T, /turf/closed/indestructible))
|
||||
CreateDoor(T)
|
||||
|
||||
/obj/item/projectile/magic/door/proc/CreateDoor(turf/T)
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
|
||||
/obj/item/projectile/plasma/on_hit(atom/target)
|
||||
. = ..()
|
||||
if(istype(target, /turf/closed/mineral))
|
||||
if(ismineralturf(target))
|
||||
var/turf/closed/mineral/M = target
|
||||
M.gets_drilled(firer)
|
||||
Range()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
/datum/reagent/drug/space_drugs/on_mob_life(mob/living/M)
|
||||
M.set_drugginess(15)
|
||||
if(isturf(M.loc) && !istype(M.loc, /turf/open/space))
|
||||
if(isturf(M.loc) && !isspaceturf(M.loc))
|
||||
if(M.canmove)
|
||||
if(prob(10)) step(M, pick(cardinal))
|
||||
if(prob(7))
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
for(var/mob/living/simple_animal/slime/M in T)
|
||||
M.adjustToxLoss(rand(15,30))
|
||||
if(reac_volume >= 1) // Make Freezy Foam and anti-fire grenades!
|
||||
if(istype(T, /turf/open))
|
||||
if(isopenturf(T))
|
||||
var/turf/open/OT = T
|
||||
OT.MakeSlippery(wet_setting=TURF_WET_ICE, min_wet_time=10, wet_time_to_add=reac_volume) // Is less effective in high pressure/high heat capacity environments. More effective in low pressure.
|
||||
OT.air.temperature -= MOLES_CELLSTANDARD*100*reac_volume/OT.air.heat_capacity() // reduces environment temperature by 5K per unit.
|
||||
@@ -392,7 +392,7 @@
|
||||
color = "#FFFFFF" // rgb: 0, 0, 0
|
||||
|
||||
/datum/reagent/consumable/flour/reaction_turf(turf/T, reac_volume)
|
||||
if(!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
var/obj/effect/decal/cleanable/reagentdecal = new/obj/effect/decal/cleanable/flour(T)
|
||||
reagentdecal.reagents.add_reagent("flour", reac_volume)
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@
|
||||
M.apply_water()
|
||||
|
||||
var/obj/effect/hotspot/hotspot = (locate(/obj/effect/hotspot) in T)
|
||||
if(hotspot && !istype(T, /turf/open/space))
|
||||
if(hotspot && !isspaceturf(T))
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
G.temperature = max(min(G.temperature-(CT*1000),G.temperature/CT),0)
|
||||
@@ -500,7 +500,7 @@
|
||||
color = "#484848" // rgb: 72, 72, 72
|
||||
|
||||
/datum/reagent/mercury/on_mob_life(mob/living/M)
|
||||
if(M.canmove && istype(M.loc, /turf/open/space))
|
||||
if(M.canmove && isspaceturf(M.loc))
|
||||
step(M, pick(cardinal))
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
@@ -522,7 +522,7 @@
|
||||
color = "#1C1300" // rgb: 30, 20, 0
|
||||
|
||||
/datum/reagent/carbon/reaction_turf(turf/T, reac_volume)
|
||||
if(!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
var/obj/effect/decal/cleanable/dirt/D = locate() in T.contents
|
||||
if(!D)
|
||||
new /obj/effect/decal/cleanable/dirt(T)
|
||||
@@ -573,7 +573,7 @@
|
||||
color = "#808080" // rgb: 128, 128, 128
|
||||
|
||||
/datum/reagent/lithium/on_mob_life(mob/living/M)
|
||||
if(M.canmove && istype(M.loc, /turf/open/space))
|
||||
if(M.canmove && isspaceturf(M.loc))
|
||||
step(M, pick(cardinal))
|
||||
if(prob(5))
|
||||
M.emote(pick("twitch","drool","moan"))
|
||||
@@ -598,7 +598,7 @@
|
||||
|
||||
/datum/reagent/radium/reaction_turf(turf/T, reac_volume)
|
||||
if(reac_volume >= 3)
|
||||
if(!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents
|
||||
if(!GG)
|
||||
GG = new/obj/effect/decal/cleanable/greenglow(T)
|
||||
@@ -676,7 +676,7 @@
|
||||
|
||||
/datum/reagent/uranium/reaction_turf(turf/T, reac_volume)
|
||||
if(reac_volume >= 3)
|
||||
if(!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
var/obj/effect/decal/cleanable/greenglow/GG = locate() in T.contents
|
||||
if(!GG)
|
||||
GG = new/obj/effect/decal/cleanable/greenglow(T)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
color = "#550000"
|
||||
|
||||
/datum/reagent/thermite/reaction_turf(turf/T, reac_volume)
|
||||
if(reac_volume >= 1 && istype(T, /turf/closed/wall))
|
||||
if(reac_volume >= 1 && iswallturf(T))
|
||||
var/turf/closed/wall/Wall = T
|
||||
if(istype(Wall, /turf/closed/wall/r_wall))
|
||||
Wall.thermite = Wall.thermite+(reac_volume*2.5)
|
||||
@@ -54,17 +54,17 @@
|
||||
var/turf/open/floor/plating/F = T
|
||||
if(prob(10 + F.burnt + 5*F.broken)) //broken or burnt plating is more susceptible to being destroyed
|
||||
F.ChangeTurf(F.baseturf)
|
||||
if(istype(T, /turf/open/floor/))
|
||||
if(isfloorturf(T))
|
||||
var/turf/open/floor/F = T
|
||||
if(prob(reac_volume))
|
||||
F.make_plating()
|
||||
else if(prob(reac_volume))
|
||||
F.burn_tile()
|
||||
if(istype(F, /turf/open/floor/))
|
||||
if(isfloorturf(F))
|
||||
for(var/turf/turf in range(1,F))
|
||||
if(!locate(/obj/effect/hotspot) in turf)
|
||||
PoolOrNew(/obj/effect/hotspot, F)
|
||||
if(istype(T, /turf/closed/wall/))
|
||||
if(iswallturf(T))
|
||||
var/turf/closed/wall/W = T
|
||||
if(prob(reac_volume))
|
||||
W.ChangeTurf(/turf/open/floor/plating)
|
||||
|
||||
@@ -74,7 +74,7 @@ Borg Hypospray
|
||||
R.add_reagent(reagent, 30)
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/proc/regenerate_reagents()
|
||||
if(isrobot(src.loc))
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in 1 to reagent_ids.len)
|
||||
@@ -162,7 +162,7 @@ Borg Shaker
|
||||
return //Can't inject stuff with a shaker, can we? //not with that attitude
|
||||
|
||||
/obj/item/weapon/reagent_containers/borghypo/borgshaker/regenerate_reagents()
|
||||
if(isrobot(src.loc))
|
||||
if(iscyborg(src.loc))
|
||||
var/mob/living/silicon/robot/R = src.loc
|
||||
if(R && R.cell)
|
||||
for(var/i in modes) //Lots of reagents in this one, so it's best to regenrate them all at once to keep it from being tedious.
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
..()
|
||||
update_icon()
|
||||
spawn(80)
|
||||
if(isrobot(user) && !reagents.total_volume)
|
||||
if(iscyborg(user) && !reagents.total_volume)
|
||||
var/mob/living/silicon/robot/R = user
|
||||
if(R.cell.use(100))
|
||||
reagents.add_reagent_list(list_reagents)
|
||||
|
||||
@@ -297,7 +297,7 @@
|
||||
id = C.id
|
||||
|
||||
/obj/item/conveyor_construct/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity || user.stat || !istype(A, /turf/open/floor) || istype(A, /area/shuttle))
|
||||
if(!proximity || user.stat || !isfloorturf(A) || istype(A, /area/shuttle))
|
||||
return
|
||||
var/cdir = get_dir(A, user)
|
||||
if(A == user.loc)
|
||||
@@ -321,7 +321,7 @@
|
||||
id = rand() //this couldn't possibly go wrong
|
||||
|
||||
/obj/item/conveyor_switch_construct/afterattack(atom/A, mob/user, proximity)
|
||||
if(!proximity || user.stat || !istype(A, /turf/open/floor) || istype(A, /area/shuttle))
|
||||
if(!proximity || user.stat || !isfloorturf(A) || istype(A, /area/shuttle))
|
||||
return
|
||||
var/found = 0
|
||||
for(var/obj/machinery/conveyor/C in view())
|
||||
|
||||
@@ -182,11 +182,11 @@
|
||||
nicetype = "pipe"
|
||||
|
||||
var/turf/T = loc
|
||||
if(T.intact && istype(T, /turf/open/floor))
|
||||
if(T.intact && isfloorturf(T))
|
||||
user << "<span class='warning'>You can only attach the [nicetype] if the floor plating is removed!</span>"
|
||||
return
|
||||
|
||||
if(!ispipe && istype(T, /turf/closed/wall))
|
||||
if(!ispipe && iswallturf(T))
|
||||
user << "<span class='warning'>You can't build [nicetype]s on walls, only disposal pipes!</span>"
|
||||
return
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
// update the icon_state to reflect hidden status
|
||||
/obj/structure/disposalpipe/proc/update()
|
||||
var/turf/T = src.loc
|
||||
hide(T.intact && !istype(T,/turf/open/space)) // space never hides pipes
|
||||
hide(T.intact && !isspaceturf(T)) // space never hides pipes
|
||||
|
||||
// hide called by levelupdate if turf intact status changes
|
||||
// change visibility status and force update of icon
|
||||
@@ -256,14 +256,14 @@
|
||||
|
||||
var/turf/target
|
||||
|
||||
if(istype(T, /turf/open/floor)) //intact floor, pop the tile
|
||||
if(isfloorturf(T)) //intact floor, pop the tile
|
||||
var/turf/open/floor/myturf = T
|
||||
if(myturf.floor_tile)
|
||||
PoolOrNew(myturf.floor_tile, T)
|
||||
myturf.make_plating()
|
||||
|
||||
if(direction) // direction is specified
|
||||
if(istype(T, /turf/open/space)) // if ended in space, then range is unlimited
|
||||
if(isspaceturf(T)) // if ended in space, then range is unlimited
|
||||
target = get_edge_target_turf(T, direction)
|
||||
else // otherwise limit to 10 tiles
|
||||
target = get_ranged_target_turf(T, direction, 10)
|
||||
|
||||
@@ -472,7 +472,7 @@
|
||||
areaInstance.contents += T1
|
||||
|
||||
//copy over air
|
||||
if(istype(T1, /turf/open))
|
||||
if(isopenturf(T1))
|
||||
var/turf/open/Ts1 = T1
|
||||
Ts1.copy_air_with_tile(T0)
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
x_max = x - 6
|
||||
|
||||
for(var/turf/T in block(locate(x_min,y-1,z),locate(x_max,y+1,z)))
|
||||
if(T.density || istype(T, /turf/open/space))
|
||||
if(T.density || isspaceturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
|
||||
/obj/machinery/satellite/meteor_shield/proc/space_los(meteor)
|
||||
for(var/turf/T in getline(src,meteor))
|
||||
if(!istype(T, /turf/open/space))
|
||||
if(!isspaceturf(T))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
else
|
||||
user << "<span class='warning'>You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!</span>"
|
||||
return 1 //returns 1 so we don't stab the guy in the dick or wherever.
|
||||
if(isrobot(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache
|
||||
if(iscyborg(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache
|
||||
return 1
|
||||
return 0
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
prob_chance = implements[implement_type]
|
||||
prob_chance *= surgery.get_propability_multiplier()
|
||||
|
||||
if(prob(prob_chance) || isrobot(user))
|
||||
if(prob(prob_chance) || iscyborg(user))
|
||||
if(success(user, target, target_zone, tool, surgery))
|
||||
advance = 1
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user