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

Ports two of my recent /tg/ PRs #3896

Merged
merged 2 commits into from
Oct 21, 2024
Merged
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
16 changes: 9 additions & 7 deletions code/_onclick/hud/alert.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@
thealert.owner = src

if(new_master)
var/old_layer = new_master.layer
var/old_plane = new_master.plane
new_master.layer = FLOAT_LAYER
new_master.plane = FLOAT_PLANE
thealert.add_overlay(new_master)
new_master.layer = old_layer
new_master.plane = old_plane
var/mutable_appearance/master_appearance = new(new_master)
master_appearance.appearance_flags = KEEP_TOGETHER
master_appearance.layer = FLOAT_LAYER
master_appearance.plane = FLOAT_PLANE
master_appearance.dir = SOUTH
master_appearance.pixel_x = new_master.base_pixel_x
master_appearance.pixel_y = new_master.base_pixel_y
master_appearance.pixel_z = 0 /* new_master.base_pixel_z */
thealert.add_overlay(master_appearance)
thealert.icon_state = "template" // We'll set the icon to the client's ui pref in reorganize_alerts()
thealert.master = new_master
else
Expand Down
7 changes: 5 additions & 2 deletions code/modules/modular_computers/computers/item/computer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -503,12 +503,15 @@
playsound(src, sound, 50, TRUE)
loc.visible_message(span_notice("[icon2html(src)] [span_notice("The [src] displays a [origin.filedesc] notification: [alerttext]")]"))

/obj/item/modular_computer/proc/ring(ringtone) // bring bring
/obj/item/modular_computer/proc/ring(ringtone, list/balloon_alertees) // bring bring
if(HAS_TRAIT(SSstation, STATION_TRAIT_PDA_GLITCHED))
playsound(src, pick('sound/machines/twobeep_voice1.ogg', 'sound/machines/twobeep_voice2.ogg'), 50, TRUE)
else
playsound(src, 'sound/machines/twobeep_high.ogg', 50, TRUE)
audible_message("*[ringtone]*")
ringtone = "*[ringtone]*"
audible_message(ringtone)
for(var/mob/living/alertee in balloon_alertees)
alertee.balloon_alert(alertee, ringtone)

/obj/item/modular_computer/proc/send_sound()
playsound(src, 'sound/machines/terminal_success.ogg', 15, TRUE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@
to_chat(receiver_mob, span_infoplain("[icon2html(computer, receiver_mob)] <b>PDA message from [sender_title], </b>\"[inbound_message]\"[photo_message] [reply]"))

if (alert_able && should_ring)
computer.ring(ringtone)
computer.ring(ringtone, list(receiver_mob))

SStgui.update_uis(computer)
update_pictures_for_all()
Expand Down
Loading