diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 136bb89585..3d85253339 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -264,9 +264,11 @@ 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" -GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = "", PDA_SKIN_ALT = "_alt")) +GLOBAL_LIST_INIT(pda_reskins, list(PDA_SKIN_CLASSIC = RESKIN_SUFFIX_CLASSIC, PDA_SKIN_ALT = RESKIN_SUFFIX_ALT)) //Color Defines #define OOC_COLOR "#002eb8" diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index 886eadea68..9a8e7b4f43 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -110,13 +110,10 @@ if(!storedpda) to_chat(user, "[src] is empty.") return - var/list/P = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist - if(!P) - return - if(!in_range(src, user)) - return - if(!storedpda)//is the pda still there? + var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist + if(!choice || !storedpda || !in_range(src, user)) return + var/list/P = colorlist[choice] storedpda.base_skin = P[1] storedpda.desc = P[2] storedpda.overlays_offsets = P[3] diff --git a/code/game/objects/items/devices/PDA/PDA.dm b/code/game/objects/items/devices/PDA/PDA.dm index 7f70635b64..72b52524d4 100644 --- a/code/game/objects/items/devices/PDA/PDA.dm +++ b/code/game/objects/items/devices/PDA/PDA.dm @@ -126,19 +126,19 @@ GLOBAL_LIST_EMPTY(PDAs) /obj/item/pda/reskin_obj(mob/M) if(!LAZYLEN(GLOB.pda_reskins)) return - var/dat = "Reskin options for [name]:\n" + var/dat = "Reskin options for [name]:" for(var/V in GLOB.pda_reskins) - var/output = icon2html(src, M, "[base_skin][unique_reskin[V]]") - dat += "[V]: [output]\n" + var/output = icon2html(icon, M, "[base_skin][GLOB.pda_reskins[V]]") + 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 - if(!QDELETED(src) && choice && !M.incapacitated() && in_range(M,src)) - if(unique_reskin[choice] == current_skin || isnull(unique_reskin[choice])) - return - current_skin = unique_reskin[choice] - set_new_overlays_offsets() - update_icon() + 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)) + return + current_skin = new_skin + set_new_overlays_offsets() + update_icon() to_chat(M, "[src] is now skinned as '[choice]'.") /obj/item/pda/proc/set_new_overlays_offsets() diff --git a/code/game/objects/items/devices/PDA/PDA_types.dm b/code/game/objects/items/devices/PDA/PDA_types.dm index b06fbe91f3..98284daf71 100644 --- a/code/game/objects/items/devices/PDA/PDA_types.dm +++ b/code/game/objects/items/devices/PDA/PDA_types.dm @@ -187,7 +187,7 @@ 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(PDA_SKIN_CLASSIC = list(-3,0)) + overlays_offsets = list(RESKIN_SUFFIX_CLASSIC = list(-3,0)) overlays_x_offset = -3 /obj/item/pda/clear diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 85b60dab90..fd6a9f2141 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -247,9 +247,8 @@ to_chat(M, dat) var/choice = input(M, always_reskinnable ? "Choose the a reskin for [src]" : "Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin - if(!QDELETED(src) && choice && (!current_skin || always_reskinnable) && !M.incapacitated() && in_range(M,src)) - if(!unique_reskin[choice] || unique_reskin[choice] == current_skin) - return - current_skin = choice - icon_state = unique_reskin[choice] - to_chat(M, "[src] is now skinned as '[choice]'.") + if(QDELETED(src) || !choice || (current_skin && !always_reskinnable) || M.incapacitated() || !in_range(M,src) || !unique_reskin[choice] || unique_reskin[choice] == current_skin) + return + current_skin = choice + icon_state = unique_reskin[choice] + to_chat(M, "[src] is now skinned as '[choice]'.") diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 55dfa9a942..f7123be650 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -227,7 +227,7 @@ target.icon = initial(picked_item.icon) /datum/action/item_action/chameleon/change/pda/update_item(obj/item/pda/picked_item) - if(!istype(picked_item) || !istype(target, /obj/item/pda)) + if(!istype(target, /obj/item/pda)) return ..() var/obj/item/pda/P = target P.icon = initial(picked_item.icon) diff --git a/icons/obj/pda.dmi b/icons/obj/pda.dmi index 20aa4613f8..c469bc346d 100644 Binary files a/icons/obj/pda.dmi and b/icons/obj/pda.dmi differ