mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user