Skip to content

Commit

Permalink
CAS Fire Mission ghost notification (#4328)
Browse files Browse the repository at this point in the history
# About the pull request

This PR adds a ghost notification for CAS Fire Missions.

# Explain why it's good for the game

Observer QoL

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

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl: Morrow
add: Added CAS Fire Mission ghost notification
/:cl:
  • Loading branch information
morrowwolf committed Sep 9, 2023
1 parent 8e1502c commit 2a84b74
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
4 changes: 0 additions & 4 deletions code/game/cas_manager/datums/cas_fire_envelope.dm
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,6 @@
mission_error = mission.error_message(check_result)
return 0

if(target_turf && target_turf.signal_loc)
var/turf/TT = get_turf(target_turf.signal_loc)
if(TT && TT.z)
msg_admin_niche("[key_name(usr)] launching Fire Mission '[mission.name]' onto [target_turf.name] at ([TT.x],[TT.y],[TT.z]) [ADMIN_JMP(TT)]")
//actual firemission code
execute_firemission_unsafe(target_turf, offset, dir, mission)
return 1
Expand Down
11 changes: 11 additions & 0 deletions code/game/cas_manager/datums/cas_fire_mission.dm
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,17 @@
if(initial_turf == null || check(linked_console) != FIRE_MISSION_ALL_GOOD)
return FIRE_MISSION_NOT_EXECUTABLE

var/obj/effect/firemission_effect = new(initial_turf)

firemission_effect.icon = 'icons/obj/items/weapons/projectiles.dmi'
firemission_effect.icon_state = "laser_target2"
firemission_effect.mouse_opacity = MOUSE_OPACITY_TRANSPARENT
firemission_effect.invisibility = INVISIBILITY_MAXIMUM
QDEL_IN(firemission_effect, 5 SECONDS)

notify_ghosts(header = "CAS Fire Mission", message = "[usr ? usr : "Someone"] is launching Fire Mission '[name]' at [get_area(initial_turf)].", source = firemission_effect)
msg_admin_niche("[usr ? key_name(usr) : "Someone"] is launching Fire Mission '[name]' at ([initial_turf.x],[initial_turf.y],[initial_turf.z]) [ADMIN_JMP(initial_turf)]")

var/relative_dir
for(var/mob/M in range(15, initial_turf))
if(get_turf(M) == initial_turf)
Expand Down

0 comments on commit 2a84b74

Please sign in to comment.