tested fixed tested fixed tested.

This commit is contained in:
Ghommie
2019-06-09 19:55:08 +02:00
parent 52d217a92b
commit d2e216f2de
7 changed files with 23 additions and 25 deletions
+3 -1
View File
@@ -264,9 +264,11 @@ GLOBAL_LIST_INIT(pda_styles, list(MONO, VT, ORBITRON, SHARE))
//pda icon reskins //pda icon reskins
#define PDA_SKIN_CLASSIC "Classic" #define PDA_SKIN_CLASSIC "Classic"
#define RESKIN_SUFFIX_CLASSIC ""
#define PDA_SKIN_ALT "Holographic" #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 //Color Defines
#define OOC_COLOR "#002eb8" #define OOC_COLOR "#002eb8"
+3 -6
View File
@@ -110,13 +110,10 @@
if(!storedpda) if(!storedpda)
to_chat(user, "<span class='notice'>[src] is empty.</span>") to_chat(user, "<span class='notice'>[src] is empty.</span>")
return return
var/list/P = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist var/choice = input(user, "Select the new skin!", "PDA Painting") as null|anything in colorlist
if(!P) if(!choice || !storedpda || !in_range(src, user))
return
if(!in_range(src, user))
return
if(!storedpda)//is the pda still there?
return return
var/list/P = colorlist[choice]
storedpda.base_skin = P[1] storedpda.base_skin = P[1]
storedpda.desc = P[2] storedpda.desc = P[2]
storedpda.overlays_offsets = P[3] storedpda.overlays_offsets = P[3]
+10 -10
View File
@@ -126,19 +126,19 @@ GLOBAL_LIST_EMPTY(PDAs)
/obj/item/pda/reskin_obj(mob/M) /obj/item/pda/reskin_obj(mob/M)
if(!LAZYLEN(GLOB.pda_reskins)) if(!LAZYLEN(GLOB.pda_reskins))
return return
var/dat = "<b>Reskin options for [name]:</b>\n" var/dat = "<b>Reskin options for [name]:</b>"
for(var/V in GLOB.pda_reskins) for(var/V in GLOB.pda_reskins)
var/output = icon2html(src, M, "[base_skin][unique_reskin[V]]") var/output = icon2html(icon, M, "[base_skin][GLOB.pda_reskins[V]]")
dat += "[V]: <span class='reallybig'>[output]</span>\n" dat += "\n[V]: <span class='reallybig'>[output]</span>"
to_chat(M, dat) to_chat(M, dat)
var/choice = input(M,"Choose the a reskin for [src]","Reskin Object") as null|anything in GLOB.pda_reskins 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)) var/new_skin = GLOB.pda_reskins[choice]
if(unique_reskin[choice] == current_skin || isnull(unique_reskin[choice])) if(QDELETED(src) || isnull(new_skin) || new_skin == current_skin || M.incapacitated() || !in_range(M,src))
return return
current_skin = unique_reskin[choice] current_skin = new_skin
set_new_overlays_offsets() set_new_overlays_offsets()
update_icon() update_icon()
to_chat(M, "[src] is now skinned as '[choice]'.") to_chat(M, "[src] is now skinned as '[choice]'.")
/obj/item/pda/proc/set_new_overlays_offsets() /obj/item/pda/proc/set_new_overlays_offsets()
@@ -187,7 +187,7 @@
desc = "A portable microcomputer by Thinktronic Systems, LTD. This model is a WGW-11 series e-reader." 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." 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! 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 overlays_x_offset = -3
/obj/item/pda/clear /obj/item/pda/clear
+5 -6
View File
@@ -247,9 +247,8 @@
to_chat(M, dat) 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 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(QDELETED(src) || !choice || (current_skin && !always_reskinnable) || M.incapacitated() || !in_range(M,src) || !unique_reskin[choice] || unique_reskin[choice] == current_skin)
if(!unique_reskin[choice] || unique_reskin[choice] == current_skin) return
return current_skin = choice
current_skin = choice icon_state = unique_reskin[choice]
icon_state = unique_reskin[choice] to_chat(M, "[src] is now skinned as '[choice]'.")
to_chat(M, "[src] is now skinned as '[choice]'.")
+1 -1
View File
@@ -227,7 +227,7 @@
target.icon = initial(picked_item.icon) target.icon = initial(picked_item.icon)
/datum/action/item_action/chameleon/change/pda/update_item(obj/item/pda/picked_item) /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 ..() return ..()
var/obj/item/pda/P = target var/obj/item/pda/P = target
P.icon = initial(picked_item.icon) P.icon = initial(picked_item.icon)
BIN
View File
Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB