diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm
index 3d85253339..c4dd71207a 100644
--- a/code/__DEFINES/misc.dm
+++ b/code/__DEFINES/misc.dm
@@ -264,11 +264,18 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
//pda icon reskins
#define PDA_SKIN_CLASSIC "Classic"
-#define RESKIN_SUFFIX_CLASSIC ""
#define PDA_SKIN_ALT "Holographic"
-#define RESKIN_SUFFIX_ALT "_alt"
+#define PDA_SKIN_RUGGED "Rugged"
-GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = RESKIN_SUFFIX_CLASSIC, PDA_SKIN_ALT = RESKIN_SUFFIX_ALT))
+GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = 'icons/obj/pda.dmi', PDA_SKIN_ALT = 'icons/obj/pda_alt.dmi', PDA_SKIN_RUGGED = 'icons/obj/pda_rugged.dmi'))
+
+//pda icon overlays list defines
+#define PDA_OVERLAY_ALERT 1
+#define PDA_OVERLAY_SCREEN 2
+#define PDA_OVERLAY_ID 3
+#define PDA_OVERLAY_ITEM 4
+#define PDA_OVERLAY_LIGHT 5
+#define PDA_OVERLAY_PAI 6
//Color Defines
#define OOC_COLOR "#002eb8"
diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm
index 9a8e7b4f43..45a3b59661 100644
--- a/code/game/machinery/PDApainter.dm
+++ b/code/game/machinery/PDApainter.dm
@@ -42,7 +42,7 @@
var/obj/item/pda/P = A
var/PDA_name = initial(P.name)
colorlist += PDA_name
- colorlist[PDA_name] = list(initial(P.icon_state), initial(P.desc), initial(P.overlays_offsets))
+ colorlist[PDA_name] = list(initial(P.icon_state), initial(P.desc), initial(P.overlays_offsets), initial(P.overlays_icons))
/obj/machinery/pdapainter/Destroy()
QDEL_NULL(storedpda)
@@ -114,10 +114,11 @@
if(!choice || !storedpda || !in_range(src, user))
return
var/list/P = colorlist[choice]
- storedpda.base_skin = P[1]
+ storedpda.icon_state = P[1]
storedpda.desc = P[2]
storedpda.overlays_offsets = P[3]
- storedpda.set_new_overlays_offsets()
+ storedpda.overlays_icons = P[4]
+ storedpda.set_new_overlays()
storedpda.update_icon()
ejectpda()
diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm
index c59faa6e0b..0b4b69cb56 100644
--- a/code/game/objects/items/devices/PDA/PDA.dm
+++ b/code/game/objects/items/devices/PDA/PDA.dm
@@ -10,6 +10,7 @@ GLOBAL_LIST_EMPTY(PDAs)
#define PDA_SCANNER_HALOGEN 4
#define PDA_SCANNER_GAS 5
#define PDA_SPAM_DELAY 2 MINUTES
+#define PDA_STANDARD_OVERLAYS list("pda-r", "blank", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay")
/obj/item/pda
name = "\improper PDA"
@@ -31,12 +32,11 @@ GLOBAL_LIST_EMPTY(PDAs)
var/default_cartridge = 0 // Access level defined by cartridge
var/obj/item/cartridge/cartridge = null //current cartridge
var/mode = 0 //Controls what menu the PDA will display. 0 is hub; the rest are either built in or based on cartridge.
- var/icon_alert = "pda-r" //Icon to be overlayed for message alerts. Taken from the pda icon file.
- var/icon_screen = "screen_default" //Icon to be overlayed when the above is not around.
+ var/list/overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_default", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
+ var/current_overlays = PDA_STANDARD_OVERLAYS
var/font_index = 0 //This int tells DM which font is currently selected and lets DM know when the last font has been selected so that it can cycle back to the first font when "toggle font" is pressed again.
var/font_mode = "font-family:monospace;" //The currently selected font.
var/background_color = "#808000" //The currently selected background color.
- var/base_skin
#define FONT_MONO "font-family:monospace;"
#define FONT_SHARE "font-family:\"Share Tech Mono\", monospace;letter-spacing:0px;"
@@ -105,7 +105,6 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/Initialize()
. = ..()
- base_skin = icon_state
if(fon)
set_light(f_lum, f_pow, f_col)
@@ -128,28 +127,32 @@ GLOBAL_LIST_EMPTY(PDAs)
return
var/dat = "Reskin options for [name]:"
for(var/V in GLOB.pda_reskins)
- var/output = icon2html(icon, M, "[base_skin][GLOB.pda_reskins[V]]")
+ var/output = icon2html(GLOB.pda_reskins[V], M, icon_state)
dat += "\n[V]: [output]"
to_chat(M, dat)
var/choice = input(M, "Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins
- var/new_skin = GLOB.pda_reskins[choice]
- if(QDELETED(src) || isnull(new_skin) || new_skin == current_skin || M.incapacitated() || !in_range(M,src))
+ var/new_icon = GLOB.pda_reskins[choice]
+ if(QDELETED(src) || isnull(new_icon) || new_icon == icon || M.incapacitated() || !in_range(M,src))
return
- current_skin = new_skin
- set_new_overlays_offsets()
+ icon = new_icon
+ set_new_overlays()
update_icon()
to_chat(M, "[src] is now skinned as '[choice]'.")
-/obj/item/pda/proc/set_new_overlays_offsets()
- overlays_x_offset = 0
- overlays_y_offset = 0
- if(!overlays_offsets || !(current_skin in overlays_offsets))
+/obj/item/pda/proc/set_new_overlays()
+ if(!overlays_offsets || !(icon in overlays_offsets))
+ overlays_x_offset = 0
+ overlays_y_offset = 0
+ else
+ var/list/new_offsets = overlays_offsets[icon]
+ if(new_offsets)
+ overlays_x_offset = new_offsets[1]
+ overlays_y_offset = new_offsets[2]
+ if(!(icon in overlays_icons))
+ current_overlays = PDA_STANDARD_OVERLAYS
return
- var/list/new_offsets = overlays_offsets[current_skin]
- if(new_offsets)
- overlays_x_offset = new_offsets[1]
- overlays_y_offset = new_offsets[2]
+ current_overlays = overlays_icons[icon]
/obj/item/pda/equipped(mob/user, slot)
. = ..()
@@ -174,9 +177,9 @@ GLOBAL_LIST_EMPTY(PDAs)
font_index = MODE_MONO
font_mode = FONT_MONO
var/pref_skin = GLOB.pda_reskins[user.client.prefs.pda_skin]
- if(current_skin != pref_skin)
- current_skin = pref_skin
- set_new_overlays_offsets()
+ if(icon != pref_skin)
+ icon = pref_skin
+ set_new_overlays()
update_icon()
equipped = TRUE
@@ -194,26 +197,21 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/update_icon(alert = FALSE)
cut_overlays()
- icon_state = "[base_skin][current_skin]"
- add_overlay("[alert ? icon_alert : icon_screen][current_skin]")
+ add_overlay(alert ? current_overlays[PDA_OVERLAY_ALERT] : current_overlays[PDA_OVERLAY_SCREEN])
var/mutable_appearance/overlay = new()
overlay.pixel_x = overlays_x_offset
if(id)
- overlay.icon_state = "id_overlay[current_skin]"
+ overlay.icon_state = current_overlays[PDA_OVERLAY_ID]
add_overlay(new /mutable_appearance(overlay))
if(inserted_item)
- overlay.icon_state = "insert_overlay[current_skin]"
+ overlay.icon_state = current_overlays[PDA_OVERLAY_ITEM]
add_overlay(new /mutable_appearance(overlay))
if(fon)
- overlay.icon_state = "light_overlay[current_skin]"
+ overlay.icon_state = current_overlays[PDA_OVERLAY_LIGHT]
add_overlay(new /mutable_appearance(overlay))
if(pai)
- if(pai.pai)
- overlay.icon_state = "pai_overlay[current_skin]"
- add_overlay(new /mutable_appearance(overlay))
- else
- overlay.icon_state = "pai_off_overlay[current_skin]"
- add_overlay(new /mutable_appearance(overlay))
+ overlay.icon_state = "[current_overlays[PDA_OVERLAY_PAI]][pai.pai ? "" : "_off"]"
+ add_overlay(new /mutable_appearance(overlay))
/obj/item/pda/MouseDrop(obj/over_object, src_location, over_location)
var/mob/M = usr
@@ -1119,4 +1117,5 @@ GLOBAL_LIST_EMPTY(PDAs)
#undef PDA_SCANNER_HALOGEN
#undef PDA_SCANNER_GAS
#undef PDA_SPAM_DELAY
+#undef PDA_STANDARD_OVERLAYS
diff --git a/code/game/objects/items/devices/PDA/PDA_types.dm b/code/game/objects/items/devices/PDA/PDA_types.dm
index 98284daf71..54b82d8e07 100644
--- a/code/game/objects/items/devices/PDA/PDA_types.dm
+++ b/code/game/objects/items/devices/PDA/PDA_types.dm
@@ -181,13 +181,15 @@
/obj/item/pda/curator
name = "curator PDA"
icon_state = "pda-library"
- icon_alert = "pda-r-library"
+ overlays_icons = list('icons/obj/pda.dmi' = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay"),
+ 'icons/obj/pda_alt.dmi' = list("pda-r","screen_default","id_overlay","insert_overlay", "light_overlay", "pai_overlay"))
+ current_overlays = list("pda-r-library","blank","id_overlay","insert_overlay", "light_overlay", "pai_overlay")
default_cartridge = /obj/item/cartridge/curator
inserted_item = /obj/item/pen/fountain
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader."
note = "Congratulations, your station has chosen the Thinktronic 5290 WGW-11 Series E-reader and Personal Data Assistant! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft."
silent = TRUE //Quiet in the library!
- overlays_offsets = list(RESKIN_SUFFIX_CLASSIC = list(-3,0))
+ overlays_offsets = list('icons/obj/pda.dmi' = list(-3,0))
overlays_x_offset = -3
/obj/item/pda/clear
@@ -199,7 +201,7 @@
/obj/item/pda/neko
name = "neko PDA"
icon_state = "pda-neko"
- icon_screen = "screen_neko"
+ overlays_icons = list('icons/obj/pda_alt.dmi' = list("pda-r", "screen_neko", "id_overlay", "insert_overlay", "light_overlay", "pai_overlay"))
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a special feline edition."
note = "Congratulations, you have chosen the Thinktronic 5230 Personal Data Assistant Deluxe Special Mew Turbo Limited Edition NYA~! To help with navigation, we have provided the following definitions. North: Fore. South: Aft. West: Port. East: Starboard. Quarter is either side of aft."
diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm
index f7123be650..7e7da2839e 100644
--- a/code/modules/clothing/chameleon.dm
+++ b/code/modules/clothing/chameleon.dm
@@ -230,14 +230,13 @@
if(!istype(target, /obj/item/pda))
return ..()
var/obj/item/pda/P = target
- P.icon = initial(picked_item.icon)
P.name = initial(picked_item.name)
P.desc = initial(picked_item.desc)
- P.base_skin = initial(picked_item.icon_state)
+ P.icon_state = initial(picked_item.icon_state)
P.item_state = initial(picked_item.item_state)
P.item_color = initial(picked_item.item_color)
P.overlays_offsets = initial(picked_item.overlays_offsets)
- P.set_new_overlays_offsets()
+ P.set_new_overlays()
P.update_icon()
/datum/action/item_action/chameleon/change/Trigger()
diff --git a/icons/obj/pda.dmi b/icons/obj/pda.dmi
index c469bc346d..1957fb1666 100644
Binary files a/icons/obj/pda.dmi and b/icons/obj/pda.dmi differ
diff --git a/icons/obj/pda_alt.dmi b/icons/obj/pda_alt.dmi
new file mode 100644
index 0000000000..4d1c54b74a
Binary files /dev/null and b/icons/obj/pda_alt.dmi differ
diff --git a/icons/obj/pda_rugged.dmi b/icons/obj/pda_rugged.dmi
new file mode 100644
index 0000000000..d44e05c616
Binary files /dev/null and b/icons/obj/pda_rugged.dmi differ