Files
Bubberstation/code/modules/admin/smites/bsa.dm
TemporalOroboros 9f598a9662 Makes the explosive compressor and blastcannon actually use the TTVs they're given + the explosion changes to support that. (#58015)
* Adds explosion SFX to the blastcannon and explosive compressor

- Extracts the explosion SFX and screenshake proc from the SSexplosions explosion handling proc and lets the explosive compressor and blastcannon use it.

* Miscellaneous changes

- Adds defines for the internal explosion arglist keys
- Reverses the values of the explosion severity defines
- Changes almost everything that uses `/proc/explosion` to use named arguments

- Removes a whole bunch of argname = 0 in explosion calls.

* Removes named callback arguments.

* Changes the explosion signals to just use the arguments list

Adds a simple framework to let objects respond to explosions occurring inside of them.

Changes a whole bunch of explosions to use the object being exploded as the origin of the explosion rather than the turf the object is on.

Makes the explosive compressor and blastcannon actually use the TTVs they are given.

Adds support for things responding to internal explosions.
Less snowflake code for the explosive compressor and blastcannon calculating bomb range.*
Less confusing explosion severity defines.
Less opaque explosion arguments

*does not guarantee that the solution to letting them actually use the TTV is any less snowflake.
2021-04-26 17:31:25 -07:00

36 lines
879 B
Plaintext

#define BSA_CHANCE_TO_BREAK_TILE_TO_PLATING 80
#define BSA_MAX_DAMAGE 99
#define BSA_PARALYZE_TIME (40 SECONDS)
#define BSA_STUTTER_TIME 20
/// Fires the BSA at the target
/datum/smite/bsa
name = "Bluespace Artillery Device"
/datum/smite/bsa/effect(client/user, mob/living/target)
. = ..()
explosion(target.loc)
var/turf/open/floor/target_turf = get_turf(target)
if (istype(target_turf))
if (prob(BSA_CHANCE_TO_BREAK_TILE_TO_PLATING))
target_turf.break_tile_to_plating()
else
target_turf.break_tile()
if (target.health <= 1)
target.gib(
/* no_brain = */ TRUE,
/* no_organs = */ TRUE,
)
else
target.adjustBruteLoss(min(BSA_MAX_DAMAGE, target.health - 1))
target.Paralyze(BSA_PARALYZE_TIME)
target.stuttering = BSA_STUTTER_TIME
#undef BSA_CHANCE_TO_BREAK_TILE_TO_PLATING
#undef BSA_MAX_DAMAGE
#undef BSA_PARALYZE_TIME
#undef BSA_STUTTER_TIME