From a0489f05d2b55cca24d0efa660ac409b505556c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=9B=88=E1=9B=9F=E1=9A=B2=E1=9A=B2=E1=9B=96=E1=9B=8F?= =?UTF-8?q?=E1=9B=8B?= <55299415+Pockets-byte@users.noreply.github.com> Date: Fri, 7 Jun 2024 12:31:42 -0600 Subject: [PATCH 1/3] fixes offcenter shields --- nsv13/code/modules/overmap/weapons/damage.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nsv13/code/modules/overmap/weapons/damage.dm b/nsv13/code/modules/overmap/weapons/damage.dm index 1bcd3fa46b1..775db4b4140 100644 --- a/nsv13/code/modules/overmap/weapons/damage.dm +++ b/nsv13/code/modules/overmap/weapons/damage.dm @@ -82,7 +82,10 @@ Bullet reactions blocked = TRUE damage_sound = pick('nsv13/sound/effects/ship/damage/shield_hit.ogg', 'nsv13/sound/effects/ship/damage/shield_hit2.ogg') if(!impact_sound_cooldown) - add_overlay(new /obj/effect/temp_visual/overmap_shield_hit(get_turf(src), src)) + var/obj/effect/temp_visual/overmap_shield_hit/E = new /obj/effect/temp_visual/overmap_shield_hit(get_turf(src), src) + add_overlay(E) + E.pixel_y = pixel_y + E.pixel_x = pixel_x if(!impact_sound_cooldown && damage_sound) relay(damage_sound) if(damage_amount >= 15) //Flak begone From 6579bf81975b351901bfec044ca3dccf055aab82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=9B=88=E1=9B=9F=E1=9A=B2=E1=9A=B2=E1=9B=96=E1=9B=8F?= =?UTF-8?q?=E1=9B=8B?= <55299415+Pockets-byte@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:53:17 -0600 Subject: [PATCH 2/3] shield failure sounds! --- nsv13/code/modules/overmap/overmap.dm | 1 + nsv13/code/modules/overmap/weapons/damage.dm | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/nsv13/code/modules/overmap/overmap.dm b/nsv13/code/modules/overmap/overmap.dm index 86da1c84a30..6e53094411c 100644 --- a/nsv13/code/modules/overmap/overmap.dm +++ b/nsv13/code/modules/overmap/overmap.dm @@ -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. diff --git a/nsv13/code/modules/overmap/weapons/damage.dm b/nsv13/code/modules/overmap/weapons/damage.dm index 775db4b4140..ad84b8ceb58 100644 --- a/nsv13/code/modules/overmap/weapons/damage.dm +++ b/nsv13/code/modules/overmap/weapons/damage.dm @@ -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) + 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) From 27dbb26f77a1353adf6df87f01607ab94201a738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E1=9B=88=E1=9B=9F=E1=9A=B2=E1=9A=B2=E1=9B=96=E1=9B=8F?= =?UTF-8?q?=E1=9B=8B?= <55299415+Pockets-byte@users.noreply.github.com> Date: Sat, 8 Jun 2024 14:54:14 -0600 Subject: [PATCH 3/3] Revert "fixes offcenter shields" This reverts commit a0489f05d2b55cca24d0efa660ac409b505556c0. --- nsv13/code/modules/overmap/weapons/damage.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/nsv13/code/modules/overmap/weapons/damage.dm b/nsv13/code/modules/overmap/weapons/damage.dm index ad84b8ceb58..388e73fa019 100644 --- a/nsv13/code/modules/overmap/weapons/damage.dm +++ b/nsv13/code/modules/overmap/weapons/damage.dm @@ -87,10 +87,7 @@ Bullet reactions blocked = TRUE damage_sound = pick('nsv13/sound/effects/ship/damage/shield_hit.ogg', 'nsv13/sound/effects/ship/damage/shield_hit2.ogg') if(!impact_sound_cooldown) - var/obj/effect/temp_visual/overmap_shield_hit/E = new /obj/effect/temp_visual/overmap_shield_hit(get_turf(src), src) - add_overlay(E) - E.pixel_y = pixel_y - E.pixel_x = pixel_x + add_overlay(new /obj/effect/temp_visual/overmap_shield_hit(get_turf(src), src)) if(!impact_sound_cooldown && damage_sound) relay(damage_sound) if(damage_amount >= 15) //Flak begone