mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
[MIRROR] Acid balance and fixes, Xeno's no longer instakill with their acid [MDB IGNORE] (#22048)
* Acid balance and fixes, Xeno's no longer instakill with their acid (#76227) ## About The Pull Request Acid, when applied to a turf, does not immediately apply acid to the turfs contents, instead just doing that in the acid component. The acid component now does not destroy things under a turf, like pipes. Alien acid no longer instakills mobs, Fixes #69577 (Acid component now has an option not to apply acid to mobs on a turf). Aliens can now touch acid. ## Why It's Good For The Game Fixes some bugs with aliens and acid. I don't really like how the acid now does not damage mobs at all, but that seems to be what is intended. I don't think that acid should be going through a turfs contents in different places, plus I like the look of it not immediately applying the acid to them better. ## Changelog 🆑 Seven balance: Acid on a turf no longer immediately applies acid to its contents fix: Acid applied on a tile will no longer damage pipes below that tile fix: Xeno's corrosive acid no longer instakills mobs fix: Xenos can now touch acid /🆑 * Acid balance and fixes, Xeno's no longer instakill with their acid --------- Co-authored-by: Lufferly <40921881+Lufferly@users.noreply.github.com> Co-authored-by: lessthanthree <83487515+lessthnthree@users.noreply.github.com>
This commit is contained in:
co-authored by
Lufferly
lessthanthree
parent
2eaabdd304
commit
3e79fe7d0a
@@ -21,6 +21,8 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
var/stage = 0
|
||||
/// Acid overlay appearance we apply
|
||||
var/acid_overlay
|
||||
/// Boolean for if we ignore mobs when applying acid to turf contents
|
||||
var/turf_acid_ignores_mobs = FALSE
|
||||
/// The ambient sound of acid eating away at the parent [/atom].
|
||||
var/datum/looping_sound/acid/sizzle
|
||||
/// Particle holder for acid particles (sick)
|
||||
@@ -28,7 +30,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/// The proc used to handle the parent [/atom] when processing. TODO: Unify damage and resistance flags so that this doesn't need to exist!
|
||||
var/datum/callback/process_effect
|
||||
|
||||
/datum/component/acid/Initialize(acid_power = ACID_POWER_MELT_TURF, acid_volume = 50, acid_overlay = GLOB.acid_overlay, acid_particles = /particles/acid)
|
||||
/datum/component/acid/Initialize(acid_power = ACID_POWER_MELT_TURF, acid_volume = 50, acid_overlay = GLOB.acid_overlay, acid_particles = /particles/acid, turf_acid_ignores_mobs = FALSE)
|
||||
if(!isatom(parent))
|
||||
return COMPONENT_INCOMPATIBLE
|
||||
|
||||
@@ -48,6 +50,7 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
src.max_volume = MOB_ACID_VOLUME_MAX
|
||||
src.process_effect = CALLBACK(src, PROC_REF(process_mob), parent)
|
||||
else if(isturf(parent))
|
||||
src.turf_acid_ignores_mobs = turf_acid_ignores_mobs
|
||||
src.max_volume = TURF_ACID_VOLUME_MAX
|
||||
src.process_effect = CALLBACK(src, PROC_REF(process_turf), parent)
|
||||
//if we failed all other checks, we must be an /atom/movable that uses integrity
|
||||
@@ -146,6 +149,13 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
var/acid_used = min(acid_volume * 0.05, 20) * seconds_per_tick
|
||||
var/applied_targets = 0
|
||||
for(var/atom/movable/target_movable as anything in target_turf)
|
||||
// Dont apply acid to things under the turf
|
||||
if(target_turf.underfloor_accessibility < UNDERFLOOR_INTERACTABLE && HAS_TRAIT(target_movable, TRAIT_T_RAY_VISIBLE))
|
||||
continue
|
||||
// Ignore mobs if turf_acid_ignores_mobs is TRUE
|
||||
if(turf_acid_ignores_mobs && ismob(target_movable))
|
||||
continue
|
||||
// Apply the acid
|
||||
if(target_movable.acid_act(acid_power, acid_used))
|
||||
applied_targets++
|
||||
|
||||
@@ -233,6 +243,8 @@ GLOBAL_DATUM_INIT(acid_overlay, /mutable_appearance, mutable_appearance('icons/e
|
||||
/datum/component/acid/proc/on_entered(datum/source, atom/movable/arrived, atom/old_loc, list/atom/old_locs)
|
||||
SIGNAL_HANDLER
|
||||
|
||||
if(turf_acid_ignores_mobs)
|
||||
return
|
||||
if(!isliving(arrived))
|
||||
return
|
||||
var/mob/living/crosser = arrived
|
||||
|
||||
@@ -603,11 +603,6 @@ GLOBAL_LIST_EMPTY(station_turfs)
|
||||
if(QDELETED(src)) //skyrat edit: fix createanddestroy
|
||||
return FALSE
|
||||
AddComponent(/datum/component/acid, acidpwr, acid_volume, GLOB.acid_overlay)
|
||||
for(var/atom/movable/movable_atom as anything in src)
|
||||
if(underfloor_accessibility < UNDERFLOOR_INTERACTABLE && HAS_TRAIT(movable_atom, TRAIT_T_RAY_VISIBLE))
|
||||
continue
|
||||
|
||||
movable_atom.acid_act(acidpwr, acid_volume)
|
||||
|
||||
return . || TRUE
|
||||
|
||||
|
||||
@@ -151,3 +151,7 @@ GLOBAL_LIST_INIT(strippable_alien_humanoid_items, create_strippable_list(list(
|
||||
log_combat(src, lucky_winner, "devoured")
|
||||
melting_pot.consume_thing(lucky_winner)
|
||||
return TRUE
|
||||
|
||||
// Aliens can touch acid
|
||||
/mob/living/carbon/alien/can_touch_acid(atom/acided_atom, acid_power, acid_volume)
|
||||
return TRUE
|
||||
|
||||
@@ -199,6 +199,10 @@ Doesn't work on other aliens/AI.*/
|
||||
desc = "Drench an object in acid, destroying it over time."
|
||||
button_icon_state = "alien_acid"
|
||||
plasma_cost = 200
|
||||
/// The acid power for the aliens acid corrosion, will ignore mobs
|
||||
var/corrosion_acid_power = 200
|
||||
/// The acid volume for the aliens acid corrosion, will ignore mobs
|
||||
var/corrosion_acid_volume = 1000
|
||||
|
||||
/datum/action/cooldown/alien/acid/corrosion/set_click_ability(mob/on_who)
|
||||
. = ..()
|
||||
@@ -227,7 +231,9 @@ Doesn't work on other aliens/AI.*/
|
||||
return ..()
|
||||
|
||||
/datum/action/cooldown/alien/acid/corrosion/Activate(atom/target)
|
||||
if(!target.acid_act(200, 1000))
|
||||
if(isturf(target))
|
||||
target.AddComponent(/datum/component/acid, corrosion_acid_power, corrosion_acid_volume, GLOB.acid_overlay, /particles/acid, turf_acid_ignores_mobs = TRUE)
|
||||
else if(!target.acid_act(corrosion_acid_power, corrosion_acid_volume))
|
||||
to_chat(owner, span_noticealien("You cannot dissolve this object."))
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user