mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Refactors PDA overlays (#20708)
This commit is contained in:
+10
-3
@@ -137,6 +137,13 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
var/datum/data/pda/P = A
|
||||
P.pda = src
|
||||
|
||||
/obj/item/pda/update_overlays()
|
||||
. = ..()
|
||||
if(id)
|
||||
. += image('icons/goonstation/objects/pda_overlay.dmi', id.icon_state)
|
||||
if(length(notifying_programs))
|
||||
. += image('icons/obj/pda.dmi', "pda-r")
|
||||
|
||||
/obj/item/pda/proc/close(mob/user)
|
||||
SStgui.close_uis(src)
|
||||
|
||||
@@ -151,7 +158,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if(can_use(usr))
|
||||
start_program(find_program(/datum/data/pda/app/main_menu))
|
||||
notifying_programs.Cut()
|
||||
overlays -= image('icons/obj/pda.dmi', "pda-r")
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
to_chat(usr, "<span class='notice'>You press the reset button on \the [src].</span>")
|
||||
SStgui.update_uis(src)
|
||||
else
|
||||
@@ -185,8 +192,8 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
SStgui.update_uis(src)
|
||||
else
|
||||
id.forceMove(get_turf(src))
|
||||
overlays -= image('icons/goonstation/objects/pda_overlay.dmi', id.icon_state)
|
||||
id = null
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
playsound(src, 'sound/machines/terminal_eject.ogg', 50, TRUE)
|
||||
|
||||
if(ishuman(loc))
|
||||
@@ -295,7 +302,7 @@ GLOBAL_LIST_EMPTY(PDAs)
|
||||
if( can_use(user) )//If they can still act.
|
||||
id_check(user, 2)
|
||||
to_chat(user, "<span class='notice'>You put the ID into \the [src]'s slot.<br>You can remove it with ALT click.</span>")
|
||||
overlays += image('icons/goonstation/objects/pda_overlay.dmi', C.icon_state)
|
||||
update_icon(UPDATE_OVERLAYS)
|
||||
SStgui.update_uis(src)
|
||||
|
||||
else if(istype(C, /obj/item/paicard) && !src.pai)
|
||||
|
||||
@@ -40,14 +40,14 @@
|
||||
pda.play_ringtone()
|
||||
|
||||
if(blink && !(src in pda.notifying_programs))
|
||||
pda.overlays += image('icons/obj/pda.dmi', "pda-r")
|
||||
pda.update_icon(UPDATE_OVERLAYS)
|
||||
pda.notifying_programs |= src
|
||||
|
||||
/datum/data/pda/proc/unnotify()
|
||||
if(src in pda.notifying_programs)
|
||||
pda.notifying_programs -= src
|
||||
if(!pda.notifying_programs.len)
|
||||
pda.overlays -= image('icons/obj/pda.dmi', "pda-r")
|
||||
pda.update_icon(UPDATE_OVERLAYS)
|
||||
|
||||
// An app has a button on the home screen and its own UI
|
||||
/datum/data/pda/app
|
||||
|
||||
Reference in New Issue
Block a user