mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 13:05:44 +01:00
Adds lava interaction (#4037)
Adds lava interaction: humans walking on lava titles will suffer a slowdown then being set on fire, cyborgs and simple mobs will only take burn damage. Added the lava and basalt turfs to a random map generator, and replaces the tundra's ocean with the title just named water.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
/turf/simulated/lava,
|
||||
/turf/simulated/mineral
|
||||
)
|
||||
openspace_override_type = /turf/simulated/open/chasm/airless
|
||||
movement_cost = 4 //moving on lava should slows you down
|
||||
|
||||
// Custom behavior here - we want smoothed turfs to show basalt underneath, not lava.
|
||||
/turf/simulated/lava/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir)
|
||||
@@ -22,6 +22,38 @@
|
||||
underlay_appearance.icon_state += "[rand(0,12)]"
|
||||
return TRUE
|
||||
|
||||
/turf/simulated/lava/Entered(atom/movable/AM, atom/oldloc)
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/L = AM
|
||||
if(locate(/obj/structure/lattice/catwalk, src)) //should be safe to walk upon
|
||||
return 1
|
||||
if(!istype(oldloc,/turf/simulated/lava))
|
||||
to_chat(L, "<span class='warning'>You are covered by fire and heat from entering \the [src]!</span>")
|
||||
if(ishuman(L))
|
||||
L.fire_stacks += 25
|
||||
L.IgniteMob()
|
||||
L.bodytemperature += 150
|
||||
return 1
|
||||
if(isrobot(L))
|
||||
L.adjustFireLoss(rand(10,30))
|
||||
return 1
|
||||
if(isanimal(L))
|
||||
var/mob/living/simple_animal/H = L
|
||||
if(H.flying) //flying mobs will ignore the lava
|
||||
return 1
|
||||
else
|
||||
H.adjustFireLoss(rand(20,40))
|
||||
else
|
||||
L.adjustFireLoss(rand(10,50))
|
||||
..()
|
||||
|
||||
/turf/simulated/lava/Exited(atom/movable/AM, atom/newloc)
|
||||
if(istype(AM, /mob/living))
|
||||
var/mob/living/L = AM
|
||||
if(!istype(newloc, /turf/simulated/lava))
|
||||
to_chat(L, "<span class='warning'>You climb out of \the [src].</span>")
|
||||
..()
|
||||
|
||||
// Special asteroid variant that goes with lava better.
|
||||
/turf/simulated/floor/asteroid/basalt
|
||||
name = "basalt"
|
||||
@@ -35,7 +67,6 @@
|
||||
light_color = LIGHT_COLOR_LAVA
|
||||
smooth = SMOOTH_FALSE
|
||||
canSmoothWith = null
|
||||
openspace_override_type = /turf/simulated/open/chasm/airless
|
||||
|
||||
footstep_sound = "concretestep"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user