mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
pda.dmi resprite (#28254)
* 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 <96908085+1080pCat@users.noreply.github.com> Signed-off-by: McRamon <31545294+McRamon@users.noreply.github.com> * Update code/modules/pda/PDA.dm Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com> Signed-off-by: McRamon <31545294+McRamon@users.noreply.github.com> * asd --------- Signed-off-by: McRamon <31545294+McRamon@users.noreply.github.com> Co-authored-by: 1080pCat <96908085+1080pCat@users.noreply.github.com>
This commit is contained in:
+35
-5
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
@@ -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
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user