mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-01-06 15:34:35 +00:00
New turf proc: assume_gas(). Maps to air.adjust_gas_temp(). Lots of optimizations to processing, fire, lighting, HasEntered() and more. Zones now process all fire data and existance in one go, fire objects only handle spreading. Most code has been ported straight so some of it mightn't be ideally structured for the new gas_mixtures. Signed-off-by: Mloc-Argent <colmohici@gmail.com>
131 lines
3.9 KiB
Plaintext
131 lines
3.9 KiB
Plaintext
/turf/simulated/wall/mineral
|
|
name = "mineral wall"
|
|
desc = "This shouldn't exist"
|
|
icon_state = ""
|
|
var/last_event = 0
|
|
var/active = null
|
|
|
|
/turf/simulated/wall/mineral/gold
|
|
name = "gold wall"
|
|
desc = "A wall with gold plating. Swag!"
|
|
icon_state = "gold0"
|
|
walltype = "gold"
|
|
mineral = "gold"
|
|
//var/electro = 1
|
|
//var/shocked = null
|
|
|
|
/turf/simulated/wall/mineral/silver
|
|
name = "silver wall"
|
|
desc = "A wall with silver plating. Shiny!"
|
|
icon_state = "silver0"
|
|
walltype = "silver"
|
|
mineral = "silver"
|
|
//var/electro = 0.75
|
|
//var/shocked = null
|
|
|
|
/turf/simulated/wall/mineral/diamond
|
|
name = "diamond wall"
|
|
desc = "A wall with diamond plating. You monster."
|
|
icon_state = "diamond0"
|
|
walltype = "diamond"
|
|
mineral = "diamond"
|
|
|
|
/turf/simulated/wall/mineral/sandstone
|
|
name = "sandstone wall"
|
|
desc = "A wall with sandstone plating."
|
|
icon_state = "sandstone0"
|
|
walltype = "sandstone"
|
|
mineral = "sandstone"
|
|
|
|
/turf/simulated/wall/mineral/uranium
|
|
name = "uranium wall"
|
|
desc = "A wall with uranium plating. This is probably a bad idea."
|
|
icon_state = "uranium0"
|
|
walltype = "uranium"
|
|
mineral = "uranium"
|
|
|
|
/turf/simulated/wall/mineral/uranium/proc/radiate()
|
|
if(!active)
|
|
if(world.time > last_event+15)
|
|
active = 1
|
|
for(var/mob/living/L in range(3,src))
|
|
L.apply_effect(12,IRRADIATE,0)
|
|
for(var/turf/simulated/wall/mineral/uranium/T in range(3,src))
|
|
T.radiate()
|
|
last_event = world.time
|
|
active = null
|
|
return
|
|
return
|
|
|
|
/turf/simulated/wall/mineral/uranium/attack_hand(mob/user as mob)
|
|
radiate()
|
|
..()
|
|
|
|
/turf/simulated/wall/mineral/uranium/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
radiate()
|
|
..()
|
|
|
|
/turf/simulated/wall/mineral/uranium/Bumped(AM as mob|obj)
|
|
radiate()
|
|
..()
|
|
|
|
/turf/simulated/wall/mineral/phoron
|
|
name = "phoron wall"
|
|
desc = "A wall with phoron plating. This is definately a bad idea."
|
|
icon_state = "phoron0"
|
|
walltype = "phoron"
|
|
mineral = "phoron"
|
|
|
|
/turf/simulated/wall/mineral/phoron/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if(is_hot(W) > 300)//If the temperature of the object is over 300, then ignite
|
|
ignite(is_hot(W))
|
|
return
|
|
..()
|
|
|
|
/turf/simulated/wall/mineral/phoron/proc/PhoronBurn(temperature)
|
|
spawn(2)
|
|
new /obj/structure/girder(src)
|
|
src.ChangeTurf(/turf/simulated/floor)
|
|
for(var/turf/simulated/floor/target_tile in range(0,src))
|
|
target_tile.assume_gas("phoron", 20, 400+T0C)
|
|
spawn (0) target_tile.hotspot_expose(temperature, 400)
|
|
for(var/obj/structure/falsewall/phoron/F in range(3,src))//Hackish as fuck, but until temperature_expose works, there is nothing I can do -Sieve
|
|
var/turf/T = get_turf(F)
|
|
T.ChangeTurf(/turf/simulated/wall/mineral/phoron/)
|
|
del (F)
|
|
for(var/turf/simulated/wall/mineral/phoron/W in range(3,src))
|
|
W.ignite((temperature/4))//Added so that you can't set off a massive chain reaction with a small flame
|
|
for(var/obj/machinery/door/airlock/phoron/D in range(3,src))
|
|
D.ignite(temperature/4)
|
|
|
|
/turf/simulated/wall/mineral/phoron/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)//Doesn't fucking work because walls don't interact with air :(
|
|
if(exposed_temperature > 300)
|
|
PhoronBurn(exposed_temperature)
|
|
|
|
/turf/simulated/wall/mineral/phoron/proc/ignite(exposed_temperature)
|
|
if(exposed_temperature > 300)
|
|
PhoronBurn(exposed_temperature)
|
|
|
|
/turf/simulated/wall/mineral/phoron/bullet_act(var/obj/item/projectile/Proj)
|
|
if(istype(Proj,/obj/item/projectile/beam))
|
|
PhoronBurn(2500)
|
|
else if(istype(Proj,/obj/item/projectile/ion))
|
|
PhoronBurn(500)
|
|
..()
|
|
|
|
/*
|
|
/turf/simulated/wall/mineral/proc/shock()
|
|
if (electrocute_mob(user, C, src))
|
|
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
|
s.set_up(5, 1, src)
|
|
s.start()
|
|
return 1
|
|
else
|
|
return 0
|
|
|
|
/turf/simulated/wall/mineral/proc/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
|
if((mineral == "gold") || (mineral == "silver"))
|
|
if(shocked)
|
|
shock()
|
|
*/
|