Armbands Contained Sprites (#22266)

moves the armbands sprites into a contained spritesheet and cleans up
the code and spritesheet.
This commit is contained in:
SleepyGemmy
2026-04-20 11:33:11 +00:00
committed by GitHub
parent 180dc76e45
commit 59de569705
16 changed files with 137 additions and 100 deletions
@@ -34,30 +34,33 @@ ABSTRACT_TYPE(/datum/gear/accessory)
chaps["chaps, black"] = /obj/item/clothing/accessory/chaps/black
gear_tweaks += new /datum/gear_tweak/path(chaps)
/datum/gear/accessory/armband
display_name = "armband selection"
path = /obj/item/clothing/accessory/armband
/datum/gear/accessory/armband/New()
..()
var/list/armbands = list()
armbands["red armband"] = /obj/item/clothing/accessory/armband
armbands["security armband"] = /obj/item/clothing/accessory/armband/sec
armbands["operations armband"] = /obj/item/clothing/accessory/armband/operations
armbands["paramedic armband"] = /obj/item/clothing/accessory/armband/medgreen
armbands["medical armband"] = /obj/item/clothing/accessory/armband/med
armbands["engineering armband"] = /obj/item/clothing/accessory/armband/engine
armbands["hydroponics armband"] = /obj/item/clothing/accessory/armband/hydro
armbands["science armband"] = /obj/item/clothing/accessory/armband/science
armbands["IAC armband"] = /obj/item/clothing/accessory/armband/iac
armbands["tau ceti armband"] = /obj/item/clothing/accessory/armband/tauceti
gear_tweaks += new /datum/gear_tweak/path(armbands)
/datum/gear/accessory/armband_coloured
display_name = "armband (colourable)"
path = /obj/item/clothing/accessory/armband/colourable
flags = GEAR_HAS_NAME_SELECTION | GEAR_HAS_DESC_SELECTION | GEAR_HAS_COLOR_SELECTION
/datum/gear/accessory/armband
display_name = "armband selection"
path = /obj/item/clothing/accessory/armband/white
/datum/gear/accessory/armband/New()
..()
var/list/armbands = list()
armbands["white armband"] = /obj/item/clothing/accessory/armband/white
armbands["black armband"] = /obj/item/clothing/accessory/armband/black
armbands["red armband"] = /obj/item/clothing/accessory/armband/red
armbands["research armband"] = /obj/item/clothing/accessory/armband/science
armbands["medical armband"] = /obj/item/clothing/accessory/armband/med
armbands["engineering armband"] = /obj/item/clothing/accessory/armband/engine
armbands["security armband"] = /obj/item/clothing/accessory/armband/sec
armbands["hydroponics armband"] = /obj/item/clothing/accessory/armband/hydro
armbands["operations armband"] = /obj/item/clothing/accessory/armband/operations
armbands["IAC armband"] = /obj/item/clothing/accessory/armband/iac
armbands["Tau Ceti armband"] = /obj/item/clothing/accessory/armband/tauceti
gear_tweaks += new /datum/gear_tweak/path(armbands)
/datum/gear/accessory/holster
display_name = "holster selection"
path = /obj/item/clothing/accessory/holster/armpit
@@ -1,58 +1,120 @@
/obj/item/clothing/accessory/armband
name = "red armband"
desc = "A fancy red armband!"
icon_state = "red"
slot = ACCESSORY_SLOT_ARMBAND
// Armbands
ABSTRACT_TYPE(/obj/item/clothing/accessory/armband)
name = "armband parent item"
desc = DESC_PARENT
icon = 'icons/obj/item/clothing/accessory/armband.dmi'
contained_sprite = TRUE
flippable = TRUE
slot = ACCESSORY_SLOT_ARMBAND
/obj/item/clothing/accessory/armband/sec
name = "security armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is navy blue."
icon_state = "sec"
// Colourable
/obj/item/clothing/accessory/armband/colourable
name = "armband"
desc = "An armband in 16,777,216 designer colours."
icon_state = "armband_colourable"
item_state = "armband_colourable"
/obj/item/clothing/accessory/armband/operations
name = "operations armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown."
icon_state = "cargo"
// Colours
/obj/item/clothing/accessory/armband/white
name = "white armband"
desc = "A white armband."
icon_state = "armband_white"
item_state = "armband_white"
/obj/item/clothing/accessory/armband/black
name = "black armband"
desc = "A black armband."
icon_state = "armband_black"
item_state = "armband_black"
/obj/item/clothing/accessory/armband/red
name = "red armband"
desc = "A red armband."
icon_state = "armband_red"
item_state = "armband_red"
// Departments
/obj/item/clothing/accessory/armband/science
name = "research armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is purple."
icon_state = "armband_research"
item_state = "armband_research"
/obj/item/clothing/accessory/armband/med
name = "medical armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green."
icon_state = "armband_medical"
item_state = "armband_medical"
/obj/item/clothing/accessory/armband/engine
name = "engineering armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is orange with a reflective strip!"
icon_state = "engie"
icon_state = "armband_engineering"
item_state = "armband_engineering"
/obj/item/clothing/accessory/armband/science
name = "science armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is purple."
icon_state = "sci"
/obj/item/clothing/accessory/armband/sec
name = "security armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is navy blue."
icon_state = "armband_security"
item_state = "armband_security"
/obj/item/clothing/accessory/armband/hydro
name = "hydroponics armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is green and blue."
icon_state = "hydro"
icon_state = "armband_hydroponics"
item_state = "armband_hydroponics"
/obj/item/clothing/accessory/armband/med
name = "medical armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white."
icon_state = "med"
/obj/item/clothing/accessory/armband/medgreen
name = "paramedic armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is white and green."
icon_state = "medgreen"
/obj/item/clothing/accessory/armband/operations
name = "operations armband"
desc = "An armband, worn by the crew to display which department they're assigned to. This one is brown."
icon_state = "armband_operations"
item_state = "armband_operations"
// Factions
/obj/item/clothing/accessory/armband/iac
name = "interstellar aid corps armband"
name = "\improper Interstellar Aid Corps armband"
desc = "An armband denoting its wearer as a medical worker of the Interstellar Aid Corps. This one is white and blue."
icon_state = "iac"
icon_state = "armband_iac"
item_state = "armband_iac"
/obj/item/clothing/accessory/armband/idris
name = "\improper Idris Incorporated armband"
desc = "An armband, worn by contractors to denote which company they're from. This one shows the Idris Incorporated logo displayed on a cyan background."
icon_state = "armband_idris"
item_state = "armband_idris"
/obj/item/clothing/accessory/armband/pmc
name = "\improper PMCG armband"
desc = "An armband, worn by contractors to denote which company they're from. This one bears the Private Military Contractor Group logo."
icon_state = "armband_pmcg"
item_state = "armband_pmcg"
/obj/item/clothing/accessory/armband/pmc/alt
icon_state = "armband_pmcg_alt"
item_state = "armband_pmcg_alt"
/obj/item/clothing/accessory/armband/tauceti
name = "\improper Tau Ceti armband"
desc = "An armband tailored to look like the flag of the Republic of Biesel."
desc_extended = "While initially adopted during the early days of the TCFL to account for a sudden increase in volunteers and a lack of uniforms, during the height of the Republic of Biesel's conflicts with the Sol Alliance, it has been worn as a symbol of independence and patriotism."
icon_state = "armband_tau_ceti"
item_state = "armband_tau_ceti"
/obj/item/clothing/accessory/armband/scc
name = "\improper Stellar Corporate Conglomerate armband"
desc = "An armband, tailored with all the colors of the Sellar Corporate Conglomerate."
desc_extended = "The Stellar Corporate Conglomerate, also known as Chainlink, is a joint alliance between the NanoTrasen Corporation, Hephaestus Industries, Idris Incorporated, Zeng-Hu Pharmaceuticals and Zavodskoi Interstellar to exercise an undisputed economic dominance over the Orion Spur."
icon_state = "armband_scc"
item_state = "armband_scc"
// Offworlder
/obj/item/clothing/accessory/armband/offworlder
name = "science exo-stellar ribbon"
name = "research exo-stellar ribbon"
desc = "Durable cloth meant to be worn over or attached to the chest pieces of the ESS modules. This one is purple."
icon = 'icons/obj/item/clothing/accessory/offworlder.dmi'
contained_sprite = TRUE
icon_state = "ribbon_sci"
flippable = FALSE
slot = ACCESSORY_SLOT_CAPE
flippable = 0
/obj/item/clothing/accessory/armband/offworlder/engineering
name = "engineering exo-stellar ribbon"
@@ -63,37 +125,3 @@
name = "medical exo-stellar ribbon"
desc = "Durable cloth meant to be worn over or attached to the chest pieces of the ESS modules. This one is white and green."
icon_state = "ribbon_med"
/obj/item/clothing/accessory/armband/idris
name = "\improper Idris Incorporated armband"
desc = "An armband, worn by contractors to denote which company they're from. This one shows the Idris Incorporated logo displayed on a cyan background."
icon_state = "idris_armband"
overlay_state = "idris_armband"
/obj/item/clothing/accessory/armband/pmc
name = "\improper PMCG armband"
desc = "An armband, worn by contractors to denote which company they're from. This one bears the Private Military Contractor Group logo."
icon_state = "pmc_armband"
overlay_state = "pmc_armband"
/obj/item/clothing/accessory/armband/pmc/alt
icon_state = "pmc_alt_armband"
overlay_state = "pmc_alt_armband"
/obj/item/clothing/accessory/armband/colourable
name = "armband"
desc = "An armband in 16,777,216 designer colors."
icon_state = "armband_colour"
/obj/item/clothing/accessory/armband/tauceti
name = "tau ceti armband"
desc = "An armband tailored to look like the flag of the Republic of Biesel."
desc_extended = "While initially adopted during the early days of the TCFL to account for a sudden increase in volunteers and a lack of uniforms, during the height of the Republic of Biesel's conflicts with the Sol Alliance,\
it has been worn as a symbol of independence and patriotism."
icon_state = "tauceti"
/obj/item/clothing/accessory/armband/scc
name = "Stellar Corporate Conglomerate armband"
desc = "An armband, tailored with all the colors of the Sellar Corporate Conglomerate."
desc_extended = "The Stellar Corporate Conglomerate, also known as Chainlink, is a joint alliance between the NanoTrasen Corporation, Hephaestus Industries, Idris Incorporated, Zeng-Hu Pharmaceuticals and Zavodskoi Interstellar to exercise an undisputed economic dominance over the Orion Spur."
icon_state = "scc"
@@ -0,0 +1,6 @@
author: SleepyGemmy
delete-after: True
changes:
- refactor: "Refactored the armbands to use contained sprites and cleaned up the code and spritesheet."
Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 56 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

@@ -11832,7 +11832,7 @@
dir = 5
},
/obj/structure/table/steel,
/obj/item/clothing/accessory/armband/medgreen{
/obj/item/clothing/accessory/armband/med{
pixel_x = 5;
pixel_y = 12
},
@@ -2962,7 +2962,7 @@
},
/obj/item/reagent_containers/hypospray,
/obj/item/storage/belt/medical/paramedic,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/item/clothing/accessory/stethoscope,
/obj/item/reagent_containers/glass/bottle/thetamycin,
/obj/item/reagent_containers/glass/bottle/mortaphenyl,
@@ -7025,7 +7025,7 @@
/obj/item/clothing/accessory/storage/white_vest,
/obj/item/clothing/accessory/storage/pouches/white,
/obj/item/storage/belt/medical/paramedic/combat/full,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/item/clothing/head/beret/elyra,
/turf/simulated/floor/carpet/rubber,
/area/ship/elyran_corvette/dorm)
+1 -1
View File
@@ -10310,7 +10310,7 @@
/obj/item/storage/belt/medical/paramedic/combat,
/obj/item/clothing/head/beret/medical,
/obj/item/clothing/head/softcap/medical,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/item/reagent_containers/hypospray,
/obj/item/auto_cpr,
/obj/item/auto_cpr,
@@ -714,7 +714,7 @@
/obj/item/clothing/accessory/storage/white_vest,
/obj/item/clothing/accessory/storage/pouches/white,
/obj/item/storage/belt/medical/paramedic/combat/full,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/effect/floor_decal/corner_wide/dark_blue{
dir = 6
},
+1 -1
View File
@@ -7816,7 +7816,7 @@
/obj/item/clothing/accessory/armband/science{
pixel_y = 1
},
/obj/item/clothing/accessory/armband/medgreen{
/obj/item/clothing/accessory/armband/med{
pixel_y = -2
},
/obj/item/clothing/accessory/armband/scc{
@@ -7147,7 +7147,7 @@
/obj/item/clothing/accessory/storage/pouches/white,
/obj/item/clothing/glasses/hud/health,
/obj/item/clothing/glasses/hud/health,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/item/clothing/accessory/armband/med,
/obj/item/clothing/accessory/stethoscope,
/obj/item/clothing/accessory/stethoscope,
+1 -1
View File
@@ -2279,7 +2279,7 @@
/obj/item/reagent_containers/glass/bottle/thetamycin,
/obj/item/clothing/accessory/stethoscope,
/obj/item/cane/crutch,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/item/storage/belt/medical/paramedic,
/obj/item/reagent_containers/hypospray,
/obj/item/mass_spectrometer,
+1 -1
View File
@@ -9360,7 +9360,7 @@
/obj/item/clothing/accessory/storage/pouches/white,
/obj/item/clothing/glasses/hud/health,
/obj/item/clothing/glasses/hud/health,
/obj/item/clothing/accessory/armband/medgreen,
/obj/item/clothing/accessory/armband/med,
/obj/item/clothing/accessory/armband/med,
/obj/item/clothing/accessory/stethoscope,
/obj/item/clothing/accessory/stethoscope,
+5 -5
View File
@@ -174888,19 +174888,19 @@
pixel_x = 4;
pixel_y = -40
},
/obj/item/clothing/accessory/armband{
/obj/item/clothing/accessory/armband/red{
pixel_y = -2
},
/obj/item/clothing/accessory/armband{
/obj/item/clothing/accessory/armband/red{
pixel_y = -2
},
/obj/item/clothing/accessory/armband{
/obj/item/clothing/accessory/armband/red{
pixel_y = -2
},
/obj/item/clothing/accessory/armband{
/obj/item/clothing/accessory/armband/red{
pixel_y = -2
},
/obj/item/clothing/accessory/armband{
/obj/item/clothing/accessory/armband/red{
pixel_y = -2
},
/obj/item/clothing/accessory/armband/sec{