Skip to content

Commit

Permalink
pda.dmi resprite (#28254)
Browse files Browse the repository at this point in the history
* first changes

* a

* b

* c

* d

* test

* eeee

* c

* guh

* hah

* maybe

* sexurity

* final sprites

* cartridge fix

* continue

* to be continued

* shit i have to do

* 1 pixel to rule them all

* library

* Update code/modules/pda/PDA.dm

Co-authored-by: 1080pCat <[email protected]>
Signed-off-by: McRamon <[email protected]>

* Update code/modules/pda/PDA.dm

Co-authored-by: 1080pCat <[email protected]>
Signed-off-by: McRamon <[email protected]>

* asd

---------

Signed-off-by: McRamon <[email protected]>
Co-authored-by: 1080pCat <[email protected]>
  • Loading branch information
McRamon and 1080pCat authored Feb 24, 2025
1 parent 1a955ca commit 80c6d6b
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 13 deletions.
1 change: 1 addition & 0 deletions code/game/machinery/PDApainter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@
H.put_in_hands(storedpda)

UnregisterSignal(storedpda, COMSIG_PARENT_QDELETING)
storedpda.update_icon(UPDATE_ICON_STATE|UPDATE_OVERLAYS)
storedpda = null
update_icon()

Expand Down
40 changes: 35 additions & 5 deletions code/modules/pda/PDA.dm
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ GLOBAL_LIST_EMPTY(PDAs)
cartridge = new default_cartridge(src)
cartridge.update_programs(src)
add_pen(new default_pen(src))
update_icon(UPDATE_OVERLAYS)
start_program(find_program(/datum/data/pda/app/main_menu))
silent = initial(silent)

Expand Down Expand Up @@ -141,14 +142,40 @@ GLOBAL_LIST_EMPTY(PDAs)

/obj/item/pda/update_overlays()
. = ..()
var/datum/data/pda/utility/flashlight/flash = find_program(/datum/data/pda/utility/flashlight)
if(flash.fon)
switch(icon_state)
if("pda-library")
. += image('icons/obj/pda.dmi', "pda-light-library")
if("pda-syndi")
. += image('icons/obj/pda.dmi', "pda-light-syndi")
else
. += image('icons/obj/pda.dmi', "pda-light")

if(id)
. += image('icons/goonstation/objects/pda_overlay.dmi', id.icon_state)
switch(icon_state)
if("pda-library")
. += image('icons/obj/pda.dmi', "pda-id-library")
if("pda-syndi")
. += image('icons/obj/pda.dmi', "pda-id-syndi")
else
. += image('icons/obj/pda.dmi', "pda-id")

if(held_pen)
if(icon_state != "pda-syndi")
if(icon_state == "pda-library")
. += image('icons/obj/pda.dmi', "pda-pen-library")
else
. += image('icons/obj/pda.dmi', "pda-pen")

if(length(notifying_programs))
if(icon_state == "pda-library")
. += image('icons/obj/pda.dmi', "pda-r-library")
else
. += image('icons/obj/pda.dmi', "pda-r")
switch(icon_state)
if("pda-library")
. += image('icons/obj/pda.dmi', "pda-dm-library")
if("pda-syndi")
. += image('icons/obj/pda.dmi', "pda-dm-syndi")
else
. += image('icons/obj/pda.dmi', "pda-dm")

/obj/item/pda/proc/close(mob/user)
SStgui.close_uis(src)
Expand Down Expand Up @@ -214,6 +241,7 @@ GLOBAL_LIST_EMPTY(PDAs)
playsound(src, 'sound/machines/pda_button2.ogg', 50, TRUE)
user.put_in_hands(held_pen)
clear_pen()
update_icon(UPDATE_OVERLAYS)
else
to_chat(user, "<span class='warning'>This PDA does not have a pen in it.</span>")
else
Expand Down Expand Up @@ -304,10 +332,12 @@ GLOBAL_LIST_EMPTY(PDAs)
P.forceMove(src)
held_pen = P
RegisterSignal(held_pen, COMSIG_PARENT_QDELETING, PROC_REF(clear_pen))
update_icon(UPDATE_OVERLAYS)

/obj/item/pda/proc/clear_pen()
UnregisterSignal(held_pen, COMSIG_PARENT_QDELETING)
held_pen = null
update_icon(UPDATE_OVERLAYS)

/obj/item/pda/attack__legacy__attackchain(mob/living/C as mob, mob/living/user as mob)
if(iscarbon(C) && scanmode)
Expand Down
9 changes: 5 additions & 4 deletions code/modules/pda/pda_tgui.dm
Original file line number Diff line number Diff line change
Expand Up @@ -80,11 +80,12 @@
start_program(A)
if("Eject")//Ejects the cart, only done from hub.
if(!isnull(cartridge))
var/turf/T = loc
if(ismob(T))
T = T.loc
var/obj/item/cartridge/C = cartridge
C.forceMove(T)
if(ismob(loc))
var/mob/T = loc
T.put_in_hands(C)
else
C.forceMove(get_turf(src))
if(scanmode in C.programs)
scanmode = null
if(current_app in C.programs)
Expand Down
5 changes: 1 addition & 4 deletions code/modules/pda/utilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
name = fon ? "Disable Flashlight" : "Enable Flashlight"
pda.update_shortcuts()
pda.set_light(fon ? f_lum : 0)
if(fon)
pda.overlays += image('icons/obj/pda.dmi', "pda-light")
else
pda.overlays -= image('icons/obj/pda.dmi', "pda-light")
pda.update_icon(UPDATE_ICON_STATE|UPDATE_OVERLAYS)
if(!pda.silent)
playsound(pda, 'sound/machines/terminal_select.ogg', 15, TRUE)

Expand Down
Binary file removed icons/goonstation/objects/pda_overlay.dmi
Binary file not shown.
Binary file modified icons/mob/screen_ai.dmi
Binary file not shown.
Binary file modified icons/mob/screen_midnight.dmi
Binary file not shown.
Binary file modified icons/mob/screen_ninja.dmi
Binary file not shown.
Binary file modified icons/mob/screen_operative.dmi
Binary file not shown.
Binary file modified icons/mob/screen_payback.dmi
Binary file not shown.
Binary file modified icons/mob/screen_plasmafire.dmi
Binary file not shown.
Binary file modified icons/mob/screen_retro.dmi
Binary file not shown.
Binary file modified icons/mob/screen_slimecore.dmi
Binary file not shown.
Binary file modified icons/mob/screen_white.dmi
Binary file not shown.
Binary file modified icons/obj/pda.dmi
Binary file not shown.

0 comments on commit 80c6d6b

Please sign in to comment.