Moves reskinning items to /obj (#28558)

This commit is contained in:
Really-Good-Soda-Flavor
2017-06-21 14:19:17 -04:00
committed by Leo
parent 7155f5feb9
commit 40de86de35
4 changed files with 51 additions and 70 deletions
+23 -1
View File
@@ -23,7 +23,8 @@
var/persistence_replacement //have something WAY too amazing to live to the next round? Set a new path here. Overuse of this var will make me upset.
var/unique_rename = FALSE // can you customize the description/name of the thing?
var/current_skin //Has the item been reskinned?
var/list/unique_reskin //List of options to reskin.
var/dangerous_possession = FALSE //Admin possession yes/no
/obj/vv_edit_var(vname, vval)
@@ -196,6 +197,27 @@
..()
if(unique_rename)
to_chat(user, "<span class='notice'>Use a pen on it to rename it or change its description.</span>")
if(unique_reskin && !current_skin)
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
/obj/AltClick(mob/user)
. = ..()
if(unique_reskin && !current_skin && in_range(user,src))
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
reskin_obj(user)
/obj/proc/reskin_obj(mob/M)
if(!LAZYLEN(unique_reskin))
return
var/choice = input(M,"Warning, you can only reskin [src] once!","Reskin Object") as null|anything in unique_reskin
if(!QDELETED(src) && choice && !current_skin && !M.incapacitated() && in_range(M,src))
if(!unique_reskin[choice])
return
current_skin = choice
icon_state = unique_reskin[choice]
to_chat(M, "[src] is now skinned as '[choice].'")
/obj/proc/gang_contraband_value()
return 0