Merge branch 'Sandstorm-Station:master' into master

This commit is contained in:
ElectoriaLegend
2025-04-21 04:29:29 -03:00
committed by GitHub
7 changed files with 62 additions and 40 deletions

View File

@@ -58,10 +58,6 @@ GLOBAL_LIST_EMPTY(ash_storm_sounds)
GLOB.ash_storm_sounds += weak_sounds GLOB.ash_storm_sounds += weak_sounds
return ..() return ..()
/datum/weather/ash_storm/end()
GLOB.ash_storm_sounds -= weak_sounds
return ..()
/datum/weather/ash_storm/proc/is_ash_immune(atom/L) /datum/weather/ash_storm/proc/is_ash_immune(atom/L)
while (L && !isturf(L)) while (L && !isturf(L))
if(ismecha(L)) //Mechs are immune if(ismecha(L)) //Mechs are immune
@@ -88,6 +84,14 @@ GLOBAL_LIST_EMPTY(ash_storm_sounds)
return return
L.adjustFireLoss(4) L.adjustFireLoss(4)
/datum/weather/ash_storm/end()
GLOB.ash_storm_sounds -= weak_sounds
for(var/turf/open/floor/plating/asteroid/basalt/basalt as anything in GLOB.dug_up_basalt)
if(!(basalt.loc in impacted_areas) || !(basalt.z in impacted_z_levels))
continue
basalt.refill_dug()
return ..()
//Emberfalls are the result of an ash storm passing by close to the playable area of lavaland. They have a 10% chance to trigger in place of an ash storm. //Emberfalls are the result of an ash storm passing by close to the playable area of lavaland. They have a 10% chance to trigger in place of an ash storm.
/datum/weather/ash_storm/emberfall /datum/weather/ash_storm/emberfall
name = "emberfall" name = "emberfall"

View File

@@ -20,9 +20,9 @@
var/floor_variance = 20 var/floor_variance = 20
attachment_holes = FALSE attachment_holes = FALSE
/// Itemstack to drop when dug by a shovel /// Itemstack to drop when dug by a shovel
var/obj/item/stack/digResult = /obj/item/stack/ore/glass/basalt var/obj/item/stack/dig_result = /obj/item/stack/ore/glass/basalt
/// Whether the turf has been dug or not /// Whether the turf has been dug or not
var/dug var/dug = FALSE
/// Whether to change the turf's icon_state to "[base_icon_state]_dug" when its dugged up /// Whether to change the turf's icon_state to "[base_icon_state]_dug" when its dugged up
postdig_icon_change = TRUE postdig_icon_change = TRUE
@@ -38,18 +38,31 @@
/// Drops itemstack when dug and changes icon /// Drops itemstack when dug and changes icon
/turf/open/floor/plating/asteroid/proc/getDug() /turf/open/floor/plating/asteroid/proc/getDug()
if(dug || broken)
return
dug = TRUE dug = TRUE
new digResult(src, 5) broken = TRUE
new dig_result(src, 5)
/* if(prob(worm_chance))
new /obj/item/food/bait/worm(src) */
if(postdig_icon_change) if(postdig_icon_change)
icon_plating = "[environment_type]_dug" icon_plating = "[environment_type]_dug"
icon_state = "[environment_type]_dug" icon_state = "[environment_type]_dug"
/// If the user can dig the turf /// If the user can dig the turf
/turf/open/floor/plating/asteroid/proc/can_dig(mob/user) /turf/open/floor/plating/asteroid/proc/can_dig(mob/user)
if(!dug) if(!dug && !broken)
return TRUE return TRUE
if(user) if(user)
to_chat(user, "<span class='warning'>Looks like someone has dug here already!</span>") balloon_alert(user, "already excavated!")
///Refills the previously dug tile
/turf/open/floor/plating/asteroid/proc/refill_dug()
dug = FALSE
broken = FALSE
icon_state = "[environment_type]"
if(prob(floor_variance))
icon_state = "[environment_type][rand(0,12)]"
/turf/open/floor/plating/asteroid/try_replace_tile(obj/item/stack/tile/T, mob/user, params) /turf/open/floor/plating/asteroid/try_replace_tile(obj/item/stack/tile/T, mob/user, params)
return return
@@ -66,10 +79,10 @@
// /turf/open/floor/plating/asteroid/crush() // /turf/open/floor/plating/asteroid/crush()
// return // return
/turf/open/floor/plating/asteroid/attackby(obj/item/W, mob/user, params) /turf/open/floor/plating/asteroid/attackby(obj/item/attack_item, mob/user, params)
. = ..() . = ..()
if(!.) if(!.)
if(W.tool_behaviour == TOOL_SHOVEL || W.tool_behaviour == TOOL_MINING) if(attack_item.tool_behaviour == TOOL_SHOVEL || attack_item.tool_behaviour == TOOL_MINING)
if(!can_dig(user)) if(!can_dig(user))
return TRUE return TRUE
@@ -78,16 +91,16 @@
to_chat(user, "<span class='notice'>You start digging...</span>") to_chat(user, "<span class='notice'>You start digging...</span>")
if(W.use_tool(src, user, 40, volume=50)) if(attack_item.use_tool(src, user, 4 SECONDS, volume = 50))
if(!can_dig(user)) if(!can_dig(user))
return TRUE return TRUE
to_chat(user, "<span class='notice'>You dig a hole.</span>") to_chat(user, "<span class='notice'>You dig a hole.</span>")
getDug() getDug()
SSblackbox.record_feedback("tally", "pick_used_mining", 1, W.type) SSblackbox.record_feedback("tally", "pick_used_mining", 1, attack_item.type)
return TRUE return TRUE
else if(istype(W, /obj/item/storage/bag/ore)) else if(istype(attack_item, /obj/item/storage/bag/ore))
for(var/obj/item/stack/ore/O in src) for(var/obj/item/stack/ore/dropped_ore in src)
SEND_SIGNAL(W, COMSIG_PARENT_ATTACKBY, O) SEND_SIGNAL(attack_item, COMSIG_PARENT_ATTACKBY, dropped_ore)
/turf/open/floor/plating/asteroid/ex_act(severity, target, origin) /turf/open/floor/plating/asteroid/ex_act(severity, target, origin)
. = SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target) . = SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target)
@@ -96,6 +109,9 @@
/turf/open/floor/plating/lavaland_baseturf /turf/open/floor/plating/lavaland_baseturf
baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface baseturfs = /turf/open/floor/plating/asteroid/basalt/lava_land_surface
/// Used by ashstorms to replenish basalt tiles that have been dug up without going through all of them.
GLOBAL_LIST_EMPTY(dug_up_basalt)
/turf/open/floor/plating/asteroid/basalt /turf/open/floor/plating/asteroid/basalt
name = "volcanic floor" name = "volcanic floor"
baseturfs = /turf/open/floor/plating/asteroid/basalt baseturfs = /turf/open/floor/plating/asteroid/basalt
@@ -104,10 +120,21 @@
icon_plating = "basalt" icon_plating = "basalt"
environment_type = "basalt" environment_type = "basalt"
floor_variance = 15 floor_variance = 15
digResult = /obj/item/stack/ore/glass/basalt dig_result = /obj/item/stack/ore/glass/basalt
// /turf/open/floor/plating/asteroid/basalt/setup_broken_states() /turf/open/floor/plating/asteroid/basalt/getDug()
// return list("basalt_dug") set_light(0)
GLOB.dug_up_basalt |= src
return ..()
/turf/open/floor/plating/asteroid/basalt/Destroy()
GLOB.dug_up_basalt -= src
return ..()
/turf/open/floor/plating/asteroid/basalt/refill_dug()
. = ..()
GLOB.dug_up_basalt -= src
set_basalt_light(src)
/turf/open/floor/plating/asteroid/basalt/lava //lava underneath /turf/open/floor/plating/asteroid/basalt/lava //lava underneath
baseturfs = /turf/open/lava/smooth baseturfs = /turf/open/lava/smooth
@@ -120,10 +147,6 @@
. = ..() . = ..()
set_basalt_light(src) set_basalt_light(src)
/turf/open/floor/plating/asteroid/getDug()
set_light(0)
return ..()
/proc/set_basalt_light(turf/open/floor/B) /proc/set_basalt_light(turf/open/floor/B)
switch(B.icon_state) switch(B.icon_state)
if("basalt1", "basalt2", "basalt3") if("basalt1", "basalt2", "basalt3")
@@ -164,7 +187,7 @@
burnt_states = list("snow_dug") burnt_states = list("snow_dug")
bullet_sizzle = TRUE bullet_sizzle = TRUE
bullet_bounce_sound = null bullet_bounce_sound = null
digResult = /obj/item/stack/sheet/mineral/snow dig_result = /obj/item/stack/sheet/mineral/snow
// /turf/open/floor/plating/asteroid/snow/setup_broken_states() // /turf/open/floor/plating/asteroid/snow/setup_broken_states()
// return list("snow_dug") // return list("snow_dug")

View File

@@ -1641,15 +1641,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
H.Jitter(5) H.Jitter(5)
hunger_rate = 3 * HUNGER_FACTOR hunger_rate = 3 * HUNGER_FACTOR
hunger_rate *= H.physiology.hunger_mod hunger_rate *= H.physiology.hunger_mod
H.adjust_nutrition(-hunger_rate)
// SANDSTORM EDIT
if (H.client)
H.adjust_nutrition(-hunger_rate)
else
// Do not allow SSD players to get too hungry.
if (H.nutrition >= NUTRITION_LEVEL_FED)
H.adjust_nutrition(-hunger_rate)
// End of sandstorm edit
if (H.nutrition > NUTRITION_LEVEL_FULL) if (H.nutrition > NUTRITION_LEVEL_FULL)

View File

@@ -35,7 +35,7 @@
icon_state = "wasteland" icon_state = "wasteland"
environment_type = "wasteland" environment_type = "wasteland"
baseturfs = /turf/open/floor/plating/asteroid/basalt/wasteland baseturfs = /turf/open/floor/plating/asteroid/basalt/wasteland
digResult = /obj/item/stack/ore/glass/basalt dig_result = /obj/item/stack/ore/glass/basalt
initial_gas_mix = LAVALAND_DEFAULT_ATMOS initial_gas_mix = LAVALAND_DEFAULT_ATMOS
slowdown = 0.5 slowdown = 0.5
floor_variance = 30 floor_variance = 30

View File

@@ -0,0 +1,4 @@
author: ElectoriaLegend
delete-after: true
changes:
- rscadd: Frotting but awesome.

View File

@@ -0,0 +1,4 @@
author: SandPoot
delete-after: true
changes:
- rscadd: Ashstorms cover dug up holes in lavaland.

View File

@@ -3,12 +3,7 @@
return return
//Put more things here if you plan on adding more things. I know this proc is a bit empty at the moment //Put more things here if you plan on adding more things. I know this proc is a bit empty at the moment
if (H.client) H.adjust_thirst(-THIRST_FACTOR)
H.adjust_thirst(-THIRST_FACTOR)
else
// Do not allow SSD players to too thirsty.
if (H.thirst >= THIRST_LEVEL_QUENCHED)
H.adjust_thirst(-THIRST_FACTOR)
/* switch(get_thirst(src)) /* switch(get_thirst(src))
if(THIRST_LEVEL_THIRSTY to INFINITY) if(THIRST_LEVEL_THIRSTY to INFINITY)