diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm new file mode 100644 index 00000000000..12a902de928 --- /dev/null +++ b/code/game/objects/items/weapons/airlock_painter.dm @@ -0,0 +1,40 @@ +/obj/item/weapon/airlock_painter + name = "airlock painter" + desc = "This device can change the paintjob of an airlock assembly." + icon = 'icons/obj/objects.dmi' + icon_state = "paint sprayer" + item_state = "paint sprayer" + + w_class = 2.0 + + m_amt = 50 + g_amt = 50 + origin_tech = "engineering=1" + + flags = FPRINT | TABLEPASS| CONDUCT + slot_flags = SLOT_BELT + + var/obj/item/device/toner/ink = null + + New() + ink = new /obj/item/device/toner(src) + + proc/use() + if(!ink || ink.charges < 1) + return 0 + else + ink.charges-- + return 1 + + examine() + set src in usr + var/ink_level = "high" + if(!ink || ink.charges < 1) + ink_level = "empty" + else if((ink.charges/ink.max_charges) <= 0.25) //25% + ink_level = "low" + else if((ink.charges/ink.max_charges) > 1) //Over 100% (admin var edit) + ink_level = "dangerously high" + usr << "\icon[src] [src.name] is a small but effective airlock painting tool. Its ink levels look [ink_level]." + return + diff --git a/code/game/objects/structures/door_assembly.dm b/code/game/objects/structures/door_assembly.dm index bb6d0537337..3da595321e0 100644 --- a/code/game/objects/structures/door_assembly.dm +++ b/code/game/objects/structures/door_assembly.dm @@ -319,22 +319,40 @@ obj/structure/door_assembly return else if(istype(W, /obj/item/weapon/airlock_painter)) // |- Ricotez + //INFORMATION ABOUT ADDING A NEW AIRLOCK TO THE PAINT LIST: + //If your airlock has a regular version, add it to the list with regular versions. + //If your airlock has a glass version, add it to the list with glass versions. + //Do NOT add your airlock to a list if it does not have a version for that list, + // or you will get broken icons. + //If you do this properly, you can just add the typetext and icontext of your airlock + // to the big switch without having to make exceptions for glass airlocks, it will + // simply be unavailable if the painter is used on an airlock of the wrong type. + //If your airlock has both a regular and a glass version, remember to also add the + // icontext as exception in the part of the code that deals with turning a regular + // airlock into a glass airlock, else your airlock can't transition from regular to + // glass and will instead revert back to the white sprite. + // |- Ricotez var/obj/item/weapon/airlock_painter/WT = W - if(WT.ink && WT.ink.charges > 0) + if(WT.ink.charges) var/icontype + var/optionlist var/glasstext = "" var/gicontext = "" if(src.mineral) if(src.mineral == "glass") gicontext = "g" glasstext = "glass_" - icontype = WT.glass_setting + //These airlocks have a glass version. + optionlist = list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining") else user << "The painter does not work on airlocks coated in minerals!" return else - icontype = WT.solid_setting + //These airlocks have a regular version. + optionlist = list("Default", "Engineering", "Atmospherics", "Security", "Command", "Medical", "Research", "Mining", "Maintenance", "External", "High Security") + + icontype = input(user, "Please select a paintjob for this glass airlock.") in optionlist if(!in_range(src, usr) && src.loc != usr) return switch(icontype) if("Default") @@ -377,7 +395,7 @@ obj/structure/door_assembly user << "\blue You change the paintjob on the airlock assembly." WT.use() else - user << "\blue You're out of toner!" + user << "\blue There aren't any charges left!" return else if(istype(W, /obj/item/weapon/weldingtool) && !anchored ) diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index 388941d681e..332a4907d0a 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index 2f4745effcd..42c840ef6cd 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ