mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-20 04:26:03 +01:00
[MIRROR] Storm weather related fixes [MDB IGNORE] (#22179)
* Storm weather related fixes (#76367) ## About The Pull Request A bundle of stormy weather-related fixes: - ash storm visually replenishes dug basalt again; also updates refilled basalt's light, if it rolled an eligible icon variant - new proc refill_dug() for asteroid turfs, currently made use of in weather but be my guest - I THINK the lowest-light variants are so low they don't show up at all but I didn't look into the lighting subsystem so /shrug - `set_basalt_light()` is a global proc. the reason is because we have, like, an unnecessary amount of basalt turfs that don't call back to each other. `misc/basalt`, `floor/fakebasalt`, `holofloor/basalt`. bro come on. should merge them where possible but that's for a separate PR; ALSO MAKE IT USE THE `diggable` ELEMENT BRO COME ON!!! - ash storm no longer loops `end()` sounds - it was calling parent THEN removing the playlist's sounds, which caused the playlist's ash storm weak sound to be picked again and play with a hugelarge timer - snow storm no longer affects mecha pilots - I find it weird that ash storm immunity is just innate whether the mech is "sealed" or not (Ripley mk I) but for now, I've made snow storm immunity behave the same - _jaunt spells provide weather immunity while the jaunt is active_ - _the caster is supposed to be untouchable by any practical means, it don't make a lick'a sense to have weather affect them. I gave it a general weather immunity however, and that also makes jaunts protect from radiation. methinks it's fair, lmk if that's excessive_ ## Why It's Good For The Game - Fixes #76304 - Fixes #76400 - Refilled basalt tiles that should have light are consistent with mapped in basalt tiles - Consistency for mechs; the adjustment might be a balance thing, lmk ## Changelog 🆑 fix: fixed basalt turfs remaining visually dug up when refilled by an ash storm fix: fixed ash storm ending sounds looping after the storm is over fix: mechs are now snow storm immune fix: jaunt spells protect from weather when jaunting /🆑 * Storm weather related fixes --------- Co-authored-by: Sealed101 <cool.bullseye@yandex.ru>
This commit is contained in:
@@ -69,16 +69,12 @@
|
||||
victim.adjustFireLoss(4)
|
||||
|
||||
/datum/weather/ash_storm/end()
|
||||
. = ..()
|
||||
GLOB.ash_storm_sounds -= weak_sounds
|
||||
for(var/turf/open/misc/asteroid/basalt/basalt as anything in GLOB.dug_up_basalt)
|
||||
if(!(basalt.loc in impacted_areas) || !(basalt.z in impacted_z_levels))
|
||||
continue
|
||||
GLOB.dug_up_basalt -= basalt
|
||||
basalt.dug = FALSE
|
||||
basalt.icon_state = "[basalt.base_icon_state]"
|
||||
if(prob(basalt.floor_variance))
|
||||
basalt.icon_state += "[rand(0,12)]"
|
||||
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.
|
||||
/datum/weather/ash_storm/emberfall
|
||||
|
||||
@@ -50,24 +50,9 @@
|
||||
if(has_floor_variance && prob(floor_variance))
|
||||
icon_state = "[base_icon_state][rand(0,12)]"
|
||||
|
||||
/// Drops itemstack when dug and changes icon
|
||||
/turf/open/misc/asteroid/proc/getDug()
|
||||
dug = TRUE
|
||||
broken = TRUE
|
||||
new dig_result(src, 5)
|
||||
if (prob(worm_chance))
|
||||
new /obj/item/food/bait/worm(src)
|
||||
update_appearance()
|
||||
|
||||
/// If the user can dig the turf
|
||||
/turf/open/misc/asteroid/proc/can_dig(mob/user)
|
||||
if(!dug)
|
||||
return TRUE
|
||||
if(user)
|
||||
to_chat(user, span_warning("Looks like someone has dug here already!"))
|
||||
|
||||
/turf/open/misc/asteroid/burn_tile()
|
||||
return
|
||||
|
||||
/turf/open/misc/asteroid/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
|
||||
return
|
||||
|
||||
@@ -77,12 +62,12 @@
|
||||
/turf/open/misc/asteroid/ex_act(severity, target)
|
||||
return FALSE
|
||||
|
||||
/turf/open/misc/asteroid/attackby(obj/item/W, mob/user, params)
|
||||
/turf/open/misc/asteroid/attackby(obj/item/attack_item, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return TRUE
|
||||
|
||||
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))
|
||||
return TRUE
|
||||
|
||||
@@ -91,16 +76,42 @@
|
||||
|
||||
balloon_alert(user, "digging...")
|
||||
|
||||
if(W.use_tool(src, user, 40, volume=50))
|
||||
if(attack_item.use_tool(src, user, 4 SECONDS, volume = 50))
|
||||
if(!can_dig(user))
|
||||
return TRUE
|
||||
getDug()
|
||||
SSblackbox.record_feedback("tally", "pick_used_mining", 1, W.type)
|
||||
SSblackbox.record_feedback("tally", "pick_used_mining", 1, attack_item.type)
|
||||
return TRUE
|
||||
else if(istype(W, /obj/item/storage/bag/ore))
|
||||
for(var/obj/item/stack/ore/O in src)
|
||||
SEND_SIGNAL(W, COMSIG_ATOM_ATTACKBY, O)
|
||||
else if(istype(attack_item, /obj/item/storage/bag/ore))
|
||||
for(var/obj/item/stack/ore/dropped_ore in src)
|
||||
SEND_SIGNAL(attack_item, COMSIG_ATOM_ATTACKBY, dropped_ore)
|
||||
|
||||
/// Drops itemstack when dug and changes icon
|
||||
/turf/open/misc/asteroid/proc/getDug()
|
||||
if(dug || broken)
|
||||
return
|
||||
dug = TRUE
|
||||
broken = TRUE
|
||||
new dig_result(src, 5)
|
||||
if(prob(worm_chance))
|
||||
new /obj/item/food/bait/worm(src)
|
||||
update_appearance()
|
||||
|
||||
/// If the user can dig the turf
|
||||
/turf/open/misc/asteroid/proc/can_dig(mob/user)
|
||||
if(!dug && !broken)
|
||||
return TRUE
|
||||
if(user)
|
||||
balloon_alert(user, "already excavated!")
|
||||
|
||||
///Refills the previously dug tile
|
||||
/turf/open/misc/asteroid/proc/refill_dug()
|
||||
dug = FALSE
|
||||
broken = FALSE
|
||||
icon_state = base_icon_state
|
||||
if(has_floor_variance && prob(floor_variance))
|
||||
icon_state = "[base_icon_state][rand(0,12)]"
|
||||
update_appearance()
|
||||
|
||||
/turf/open/floor/plating/lavaland_baseturf
|
||||
baseturfs = /turf/open/misc/asteroid/basalt/lava_land_surface
|
||||
@@ -114,7 +125,6 @@
|
||||
/turf/open/misc/asteroid/dug/broken_states()
|
||||
return list("asteroid_dug")
|
||||
|
||||
|
||||
/turf/open/misc/asteroid/lavaland_atmos
|
||||
initial_gas_mix = LAVALAND_DEFAULT_ATMOS
|
||||
planetary_atmos = TRUE
|
||||
@@ -141,6 +151,11 @@ GLOBAL_LIST_EMPTY(dug_up_basalt)
|
||||
GLOB.dug_up_basalt -= src
|
||||
return ..()
|
||||
|
||||
/turf/open/misc/asteroid/basalt/refill_dug()
|
||||
. = ..()
|
||||
GLOB.dug_up_basalt -= src
|
||||
set_basalt_light(src)
|
||||
|
||||
/turf/open/misc/asteroid/basalt/lava //lava underneath
|
||||
baseturfs = /turf/open/lava/smooth
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
var/obj/effect/dummy/phased_mob/jaunt = new jaunt_type(loc_override || get_turf(jaunter), jaunter)
|
||||
RegisterSignal(jaunt, COMSIG_MOB_EJECTED_FROM_JAUNT, PROC_REF(on_jaunt_exited))
|
||||
spell_requirements |= SPELL_CASTABLE_WHILE_PHASED
|
||||
jaunter.add_traits(list(TRAIT_MAGICALLY_PHASED, TRAIT_RUNECHAT_HIDDEN), REF(src))
|
||||
jaunter.add_traits(list(TRAIT_MAGICALLY_PHASED, TRAIT_RUNECHAT_HIDDEN, TRAIT_WEATHER_IMMUNE), REF(src))
|
||||
// Don't do the feedback until we have runechat hidden.
|
||||
// Otherwise the text will follow the jaunt holder, which reveals where our caster is travelling.
|
||||
spell_feedback(jaunter)
|
||||
@@ -101,7 +101,7 @@
|
||||
/datum/action/cooldown/spell/jaunt/proc/on_jaunt_exited(obj/effect/dummy/phased_mob/jaunt, mob/living/unjaunter)
|
||||
SHOULD_CALL_PARENT(TRUE)
|
||||
spell_requirements &= ~SPELL_CASTABLE_WHILE_PHASED
|
||||
unjaunter.remove_traits(list(TRAIT_MAGICALLY_PHASED, TRAIT_RUNECHAT_HIDDEN), REF(src))
|
||||
unjaunter.remove_traits(list(TRAIT_MAGICALLY_PHASED, TRAIT_RUNECHAT_HIDDEN, TRAIT_WEATHER_IMMUNE), REF(src))
|
||||
// This needs to happen at the end, after all the traits and stuff is handled
|
||||
SEND_SIGNAL(unjaunter, COMSIG_MOB_AFTER_EXIT_JAUNT, src)
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@
|
||||
|
||||
AddElement(/datum/element/atmos_sensitive, mapload)
|
||||
become_hearing_sensitive(trait_source = ROUNDSTART_TRAIT)
|
||||
ADD_TRAIT(src, TRAIT_ASHSTORM_IMMUNE, ROUNDSTART_TRAIT) //protects pilots from ashstorms.
|
||||
add_traits(list(TRAIT_ASHSTORM_IMMUNE, TRAIT_SNOWSTORM_IMMUNE), ROUNDSTART_TRAIT) //stormy weather (keeps rainin' all the time)
|
||||
for(var/key in equip_by_category)
|
||||
if(key == MECHA_L_ARM || key == MECHA_R_ARM)
|
||||
var/path = equip_by_category[key]
|
||||
|
||||
Reference in New Issue
Block a user