Skip to content

Commit

Permalink
Adds a proper warning dot to thermobaric missile direct fire (#7216)
Browse files Browse the repository at this point in the history
# About the pull request

Stole code from #5957 to add a
proper warning dot.


# Explain why it's good for the game

Thermobaric is currently the only CAS direct fire missile that cannot be
dodged through the warning intended to make it possible because you
cannot clear the AoE before it pulls you back in. This fixes that.
Essentially the same kinda issue that caused the FATTY rocket to be
removed in the past. No warning = bad.

# Testing Photographs and Procedure
<details>
<summary>Screenshots & Videos</summary>



https://github.com/user-attachments/assets/a736acb2-9413-436e-932f-f908d881bee1



</details>


# Changelog
:cl:
add: Added a warning to thermobaric missile direct fire.
/:cl:

---------

Co-authored-by: harryob <[email protected]>
  • Loading branch information
GoldenDarkness55 and harryob authored Oct 26, 2024
1 parent 0f66118 commit 58a24e2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions code/modules/cm_marines/dropship_equipment.dm
Original file line number Diff line number Diff line change
Expand Up @@ -698,9 +698,9 @@
break

msg_admin_niche("[key_name(user)] is direct-firing [SA] onto [selected_target] at ([target_turf.x],[target_turf.y],[target_turf.z]) [ADMIN_JMP(target_turf)]")
if(ammo_travelling_time)
if(ammo_travelling_time && !istype(SA, /obj/structure/ship_ammo/rocket/thermobaric))
var/total_seconds = max(floor(ammo_travelling_time/10),1)
for(var/i = 0 to total_seconds)
for(var/i in 0 to total_seconds)
sleep(10)
if(!selected_target || !selected_target.loc)//if laser disappeared before we reached the target,
ammo_accuracy_range++ //accuracy decreases
Expand All @@ -710,6 +710,14 @@

var/list/possible_turfs = RANGE_TURFS(ammo_accuracy_range, target_turf)
var/turf/impact = pick(possible_turfs)

if(ammo_travelling_time && istype(SA, /obj/structure/ship_ammo/rocket/thermobaric))
playsound(impact, ammo_warn_sound, ammo_warn_sound_volume, 1, 15)
var/total_seconds = max(floor(ammo_travelling_time / 10), 1)
for(var/i in 0 to total_seconds)
sleep(1 SECONDS)
new /obj/effect/overlay/temp/blinking_laser (impact) //no decreased accuracy if laser dissapears, it will land where it is telegraphed to land

if(ammo_warn_sound)
playsound(impact, ammo_warn_sound, ammo_warn_sound_volume, 1,15)
new /obj/effect/overlay/temp/blinking_laser (impact)
Expand Down

0 comments on commit 58a24e2

Please sign in to comment.