Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP Refactor armor.dm and add a new item armor painter to change icon state (skull, paddles etc...) #5726

Closed
wants to merge 12 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,9 @@
list("Falling Falcons Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch/falcon, VENDOR_ITEM_REGULAR),
list("USCM Shoulder Patch", round(scale * 15), /obj/item/clothing/accessory/patch, VENDOR_ITEM_REGULAR),
list("Bedroll", round(scale * 20), /obj/item/roller/bedroll, VENDOR_ITEM_REGULAR),
list("Armor Painter", round(scale * 20), /obj/item/device/armor_painter, VENDOR_ITEM_REGULAR),
list("Armor Painter", round(scale * 20), /obj/item/device/floor_painter, VENDOR_ITEM_REGULAR),
list("Armor Painter", round(scale * 20), /obj/item/device/pipe_painter, VENDOR_ITEM_REGULAR),
Huffie56 marked this conversation as resolved.
Show resolved Hide resolved

list("OPTICS", -1, null, null, null),
list("Advanced Medical Optic (CORPSMAN ONLY)", round(scale * 4), /obj/item/device/helmet_visor/medical/advanced, VENDOR_ITEM_REGULAR),
Expand Down
74 changes: 74 additions & 0 deletions code/modules/clothing/suits/marine_armor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1892,3 +1892,77 @@
armor_bio = CLOTHING_ARMOR_GIGAHIGHPLUS
armor_rad = CLOTHING_ARMOR_GIGAHIGHPLUS
armor_internaldamage = CLOTHING_ARMOR_HIGHPLUS

//proc that allow to repaint/change sprite for

GLOBAL_LIST_INIT(armor_paints_light, list("padded" = "L1", "padless" = "L2", "padless_lines" = "L3", "carrier" = "L4", "skull" = "L5", "smooth" = "L6"))
GLOBAL_LIST_INIT(armor_paints_medium, list("padded" = "1", "padless" = "2", "padless_lines" = "3", "carrier" = "4", "skull" = "5", "smooth" = "6"))
GLOBAL_LIST_INIT(armor_paints_heavy, list("padded" = "H1", "padless" = "H2", "padless_lines" = "H3", "carrier" = "H4", "skull" = "H5", "smooth" = "H6"))
/obj/item/device/armor_painter
name = "armor painter"
icon = 'icons/obj/items/paper.dmi'
icon_state = "labeler1"
item_state = "flight"
var/list/modes_light
var/list/modes_medium
var/list/modes_heavy
var/mode

/obj/item/device/armor_painter/New()
..()

modes_light = new()
for(var/C in GLOB.armor_paints_light)
modes_light += "[C]"
mode = pick(modes_light)

modes_medium = new()
for(var/C in GLOB.armor_paints_medium)
modes_medium += "[C]"
mode = pick(modes_medium)

modes_heavy = new()
for(var/C in GLOB.armor_paints_heavy)
modes_heavy += "[C]"
mode = pick(modes_heavy)


/obj/item/device/armor_painter/afterattack(atom/A, mob/user as mob, proximity)
if(!proximity)
to_chat(user, "target isn't at proximity.")
return

if(!in_range(user, A))
to_chat(user, "target isn't in range.")
return

if(istype(A,/obj/item/clothing/suit/storage/marine/light))
to_chat(user, "it's an light armor.")
A.icon_state = (GLOB.armor_paints_light[mode])
return

if(istype(A,/obj/item/clothing/suit/storage/marine/medium))
to_chat(user, "it's an medium armor.")
A.icon_state = (GLOB.armor_paints_medium[mode])
return

if(istype(A,/obj/item/clothing/suit/storage/marine/heavy))
A.icon_state = (GLOB.armor_paints_heavy[mode])
to_chat(user, "it's an heavy armor.")
return

/obj/item/device/armor_painter/attack_self(mob/user)
..()
var/type = tgui_input_list(usr, "What type of armor?", "Armor painter", list("light", "medium", "heavy"))
switch(type)
if("light")
mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes_light)
if("medium")
mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes_medium)
if("heavy")
mode = tgui_input_list(usr, "Which armor tag do you want to use?", "Armor painter", modes_heavy)

/obj/item/device/armor_painter/get_examine_text(mob/user)
. = ..()
. += "It is in [mode] mode."

Loading