Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds a warning noise when ships with shields take damage to the hull #2680

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nsv13/code/modules/overmap/overmap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
var/sprite_size = 64 //Pixels. This represents 64x64 and allows for the bullets that you fire to align properly.
var/area_type = null //Set the type of the desired area you want a ship to link to, assuming it's not the main player ship.
var/impact_sound_cooldown = FALSE //Avoids infinite spamming of the ship taking damage.
var/failure_sound_cooldown = FALSE //keeps shield failure sound from being played a bunch- maybe
var/datum/star_system/current_system //What star_system are we currently in? Used for parallax.
var/resize = 0 //Factor by which we should shrink a ship down. 0 means don't shrink it.
var/list/docking_points = list() //Where we can land on this ship. Usually right at the edge of a z-level.
Expand Down
5 changes: 5 additions & 0 deletions nsv13/code/modules/overmap/weapons/damage.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Bullet reactions
return BULLET_ACT_FORCE_PIERCE // :)
else
return FALSE //Shields absorbed the hit, so don't relay the projectile
if(shield_result == SHIELD_NOEFFECT && !failure_sound_cooldown)
Copy link
Contributor

@SerynEngi SerynEngi Jun 9, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, now I have a comment on the code. If I'm reading this right, it looks like it will play the shields down effect at the same time it would play the projectile hitting sound with a cooldown of 5 seconds.

To make it plain- this is adding a sound just to add a sound. It does not provide any useful information or tell people things they don't already know, and clutters the already loud sounds of combat.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally think it's nice to have the little extra warning- it can be hard to tell sometimes, but I could look into moving the trigger into when the shield's charge is dropped to zero- but that'll play even when you aren't actually taking damage

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have nearly 300hrs in engineering and probably a solid 20hrs of that standing at that shield generator. It is never at zero for more than a moment unless the power requested is higher than the power provided.

It is also extremely obvious to everyone when the shield are down because the shield deflect sounds stop playing and the hull hit effects start.

If you want to add in a warning effect for when the shields are at 33% of effective strength or less with an appropriate cooldown, that would be useful- and would not be attached to actual projectile hits. It would belong in the shield generator dm file and not in damage.dm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even more importantly, this sound effect will also trigger with the PDSR, as this is damage.dm and the PDSR uses this sound for another reason. So you're going to have that PDSR sound playing for 2 separate reasons on the Galactica.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine whatever. I'll just close this then

var/warningsound = 'nsv13/sound/effects/ship/ship_hit_shields_down.ogg'
relay(warningsound)
failure_sound_cooldown = TRUE
addtimer(VARSET_CALLBACK(src, failure_sound_cooldown, FALSE), 5 SECONDS)
P.spec_overmap_hit(src)
var/relayed_type = P.relay_projectile_type ? P.relay_projectile_type : P.type
relay_damage(relayed_type)
Expand Down
Loading