Files
Paradise/code/game/turfs/simulated/floor/asteroid_floors.dm
warriorstar-orion 62b65f8a91 Rework Lavaland tunnel themes. (#26599)
* Rework Lavaland tunnel themes.

* Fix deeprock mob density; ensure 1 vetus/bubblegum

* goddamnit

* bring spawn odds closer in line to head, fix tendril collapse range

* Move define to global dir

* don't need initial here

* define magic number properly

* make type of var clear

* CHECK_TICK during procgen

* less tendril cities, no tendrils in oasis centers

* revert no_lava helpers for now

* add NO_LAVA_GEN flag check back to safe_replace

* add blackbox feedback for themes
2024-10-10 00:05:29 +00:00

250 lines
7.3 KiB
Plaintext

/**********************Asteroid**************************/
/turf/simulated/floor/plating/asteroid
gender = PLURAL
name = "asteroid sand"
baseturf = /turf/simulated/floor/plating/asteroid
icon_state = "asteroid"
icon_plating = "asteroid"
footstep = FOOTSTEP_SAND
barefootstep = FOOTSTEP_SAND
clawfootstep = FOOTSTEP_SAND
heavyfootstep = FOOTSTEP_GENERIC_HEAVY
var/environment_type = "asteroid"
var/turf_type = /turf/simulated/floor/plating/asteroid //Because caves do whacky shit to revert to normal
var/floor_variance = 20 //probability floor has a different icon state
var/obj/item/stack/digResult = /obj/item/stack/ore/glass/basalt
var/dug
/turf/simulated/floor/plating/asteroid/Initialize(mapload)
var/proper_name = name
. = ..()
name = proper_name
if(prob(floor_variance))
icon_state = "[environment_type][rand(0,12)]"
/turf/simulated/floor/plating/asteroid/proc/getDug()
new digResult(src, 5)
icon_plating = "[environment_type]_dug"
icon_state = "[environment_type]_dug"
dug = TRUE
/turf/simulated/floor/plating/asteroid/proc/can_dig(mob/user)
if(!dug)
return TRUE
if(user)
to_chat(user, "<span class='notice'>Looks like someone has dug here already.</span>")
/turf/simulated/floor/plating/asteroid/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return
/turf/simulated/floor/plating/asteroid/burn_tile()
return
/turf/simulated/floor/plating/asteroid/remove_plating()
return
/turf/simulated/floor/plating/asteroid/ex_act(severity)
if(!can_dig())
return
switch(severity)
if(3)
return
if(2)
if(prob(20))
getDug()
if(1)
getDug()
/turf/simulated/floor/plating/asteroid/proc/attempt_ore_pickup(obj/item/storage/bag/ore/S, mob/user)
if(!istype(S))
return
if(S.pickup_all_on_tile)
for(var/obj/item/stack/ore/O in contents)
O.attackby(S, user)
return
/turf/simulated/floor/plating/asteroid/attackby(obj/item/I, mob/user, params)
//note that this proc does not call ..()
if(!I|| !user)
return FALSE
if((istype(I, /obj/item/shovel) || istype(I, /obj/item/pickaxe)))
if(!can_dig(user))
return TRUE
var/turf/T = get_turf(user)
if(!istype(T))
return
to_chat(user, "<span class='notice'>You start digging...</span>")
playsound(src, I.usesound, 50, TRUE)
if(do_after(user, 40 * I.toolspeed, target = src))
if(!can_dig(user))
return TRUE
to_chat(user, "<span class='notice'>You dig a hole.</span>")
getDug()
return TRUE
else if(istype(I, /obj/item/storage/bag/ore))
attempt_ore_pickup(I, user)
else if(istype(I, /obj/item/stack/tile))
var/obj/item/stack/tile/Z = I
if(!Z.use(1))
return
if(istype(Z, /obj/item/stack/tile/plasteel)) // Turn asteroid floors into plating by default
ChangeTurf(/turf/simulated/floor/plating, keep_icon = FALSE)
else
ChangeTurf(Z.turf_type, keep_icon = FALSE)
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
/turf/simulated/floor/plating/asteroid/welder_act(mob/user, obj/item/I)
return
/turf/simulated/floor/plating/asteroid/basalt
name = "volcanic floor"
baseturf = /turf/simulated/floor/plating/asteroid/basalt
icon_state = "basalt"
icon_plating = "basalt"
environment_type = "basalt"
floor_variance = 15
digResult = /obj/item/stack/ore/glass/basalt
/// lava underneath
/turf/simulated/floor/plating/asteroid/basalt/lava
baseturf = /turf/simulated/floor/lava
/turf/simulated/floor/plating/asteroid/basalt/airless
temperature = TCMB
oxygen = 0
nitrogen = 0
/turf/simulated/floor/plating/asteroid/ancient
digResult = /obj/item/stack/ore/glass/basalt/ancient
baseturf = /turf/simulated/floor/plating/asteroid/ancient/airless
/turf/simulated/floor/plating/asteroid/ancient/airless
temperature = TCMB
oxygen = 0
nitrogen = 0
/turf/simulated/floor/plating/asteroid/basalt/Initialize(mapload)
. = ..()
set_basalt_light(src)
/turf/simulated/floor/plating/asteroid/basalt/getDug()
set_light(0)
return ..()
/proc/set_basalt_light(turf/simulated/floor/B)
switch(B.icon_state)
if("basalt1", "basalt2", "basalt3")
B.set_light(2, 0.6, LIGHT_COLOR_LAVA) //more light
if("basalt5", "basalt9")
B.set_light(1.4, 0.6, LIGHT_COLOR_LAVA) //barely anything!
///////Surface. The surface is warm, but survivable without a suit. Internals are required. The floors break to chasms, which drop you into the underground.
/turf/simulated/floor/plating/asteroid/basalt/lava_land_surface
oxygen = LAVALAND_OXYGEN
nitrogen = LAVALAND_NITROGEN
temperature = LAVALAND_TEMPERATURE
atmos_mode = ATMOS_MODE_EXPOSED_TO_ENVIRONMENT
atmos_environment = ENVIRONMENT_LAVALAND
baseturf = /turf/simulated/floor/lava/mapping_lava
/turf/simulated/floor/plating/asteroid/basalt/lowpressure
oxygen = 8
nitrogen = 14
/turf/simulated/floor/plating/asteroid/basalt/lava_land_surface_hard
oxygen = LAVALAND_OXYGEN
nitrogen = LAVALAND_NITROGEN
temperature = LAVALAND_TEMPERATURE
atmos_mode = ATMOS_MODE_EXPOSED_TO_ENVIRONMENT
atmos_environment = ENVIRONMENT_LAVALAND
color = COLOR_FLOOR_HARD_ROCK
baseturf = /turf/simulated/floor/lava/lava_land_surface
/turf/simulated/floor/plating/asteroid/basalt/plasma
temperature = 1000
oxygen = 0
nitrogen = 0
carbon_dioxide = 1.2
toxins = 10
turf_type = /turf/simulated/floor/plating/asteroid/basalt/plasma
atmos_mode = ATMOS_MODE_NO_DECAY
/turf/simulated/floor/plating/asteroid/airless
temperature = TCMB
oxygen = 0
nitrogen = 0
turf_type = /turf/simulated/floor/plating/asteroid/airless
/obj/effect/spawner/oasisrock
name = "Oasis rock spawner"
var/passed_radius
/obj/effect/spawner/oasisrock/Initialize(mapload, radius)
. = ..()
passed_radius = radius
return INITIALIZE_HINT_LATELOAD
/obj/effect/spawner/oasisrock/LateInitialize() //Let us try this for a moment.
. = ..()
addtimer(CALLBACK(src, PROC_REF(make_rock), passed_radius), 5 SECONDS)
/obj/effect/spawner/oasisrock/proc/make_rock(radius)
var/our_turf = get_turf(src)
for(var/turf/oasis in circlerangeturfs(our_turf, radius))
if(istype(oasis.loc, /area/ruin))
continue
oasis.ChangeTurf(/turf/simulated/mineral/random/high_chance/volcanic, ignore_air = TRUE)
var/list/valid_turfs = circlerangeturfs(our_turf, radius + 1)
valid_turfs -= circlerangeturfs(our_turf, radius)
for(var/mob/M in circlerange(src, radius)) //We don't want mobs inside the ore rock
M.forceMove(pick_n_take(valid_turfs))
for(var/obj/structure/spawner/lavaland/O in circlerange(src, radius)) //We don't want tendrils in there either
O.forceMove(pick_n_take(valid_turfs))
qdel(src)
/turf/simulated/floor/plating/asteroid/snow
gender = PLURAL
name = "snow"
desc = "Looks cold."
icon = 'icons/turf/snow.dmi'
baseturf = /turf/simulated/floor/plating/asteroid/snow
icon_state = "snow"
icon_plating = "snow"
temperature = 180
slowdown = 2
environment_type = "snow"
atmos_mode = ATMOS_MODE_EXPOSED_TO_ENVIRONMENT
atmos_environment = ENVIRONMENT_COLD
digResult = /obj/item/stack/sheet/mineral/snow
/turf/simulated/floor/plating/asteroid/snow/burn_tile()
if(!burnt)
visible_message("<span class='danger'>[src] melts away!.</span>")
slowdown = 0
burnt = TRUE
icon_state = "snow_dug"
return TRUE
return FALSE
/turf/simulated/floor/plating/asteroid/snow/get_burnt_states()
return list("snow_dug")
/turf/simulated/floor/plating/asteroid/snow/airless
temperature = TCMB
oxygen = 0
nitrogen = 0
atmos_mode = ATMOS_MODE_SEALED
/turf/simulated/floor/plating/asteroid/snow/atmosphere
atmos_mode = ATMOS_MODE_SEALED