From 19b708126c1f592dadb54713fc52ef3912dd0ed4 Mon Sep 17 00:00:00 2001 From: thekillfish Date: Thu, 9 Jan 2025 21:13:23 +0100 Subject: [PATCH 1/3] Now we have an IC way to tell the time., and groundwork for other wrist accessories now exists. --- code/__DEFINES/equipment.dm | 2 + .../devices/personal_data_transmitter.dm | 20 +++---- code/modules/client/preferences_gear.dm | 5 ++ code/modules/clothing/clothing_accessories.dm | 2 +- code/modules/clothing/gloves/marine_gloves.dm | 2 + code/modules/clothing/under/ties.dm | 55 +++++++++++++++++- code/modules/clothing/under/under.dm | 2 +- code/modules/cm_marines/radar.dm | 2 +- code/modules/cm_tech/implements/armor.dm | 4 +- .../obj/items/clothing/accessory/watches.dmi | Bin 559 -> 964 bytes .../clothing/accessory/wrist_accessories.dmi | Bin 0 -> 642 bytes 11 files changed, 79 insertions(+), 15 deletions(-) create mode 100644 icons/obj/items/clothing/accessory/wrist_accessories.dmi diff --git a/code/__DEFINES/equipment.dm b/code/__DEFINES/equipment.dm index 90d78389890b..a4ac7484fb2a 100644 --- a/code/__DEFINES/equipment.dm +++ b/code/__DEFINES/equipment.dm @@ -479,6 +479,8 @@ GLOBAL_LIST_INIT(slot_to_contained_sprite_shorthand, list( #define ACCESSORY_SLOT_PONCHO "Ponchos" #define ACCESSORY_SLOT_TROPHY "Trophy" #define ACCESSORY_SLOT_MASK "Mask" +#define ACCESSORY_SLOT_WRIST_L "Left wrist" +#define ACCESSORY_SLOT_WRIST_R "Right wrist" /// Used for uniform armor inserts. #define ACCESSORY_SLOT_ARMOR_C "Chest armor" diff --git a/code/game/objects/items/devices/personal_data_transmitter.dm b/code/game/objects/items/devices/personal_data_transmitter.dm index fa2e6c26d797..8a4a446fdf40 100644 --- a/code/game/objects/items/devices/personal_data_transmitter.dm +++ b/code/game/objects/items/devices/personal_data_transmitter.dm @@ -13,10 +13,10 @@ icon_state = "pdt_locator_tube" w_class = SIZE_SMALL - var/obj/item/clothing/accessory/pdt_bracelet/linked_bracelet + var/obj/item/clothing/accessory/wrist/pdt_bracelet/linked_bracelet var/obj/item/cell/crap/battery -/obj/item/device/pdt_locator_tube/Initialize(mapload, obj/item/clothing/accessory/pdt_bracelet/bracelet) +/obj/item/device/pdt_locator_tube/Initialize(mapload, obj/item/clothing/accessory/wrist/pdt_bracelet/bracelet) . = ..() if(bracelet) linked_bracelet = bracelet @@ -142,7 +142,7 @@ QDEL_NULL(battery) return ..() -/obj/item/clothing/accessory/pdt_bracelet +/obj/item/clothing/accessory/wrist/pdt_bracelet name = "\improper PDT bracelet" desc = "A personal data transmitter bracelet, also known as a PDT, is a form of personal locator typically surgically implanted into the body of extrasolar colonists, among others. Its purpose is to allow rapid location of the associated personnel anywhere within a certain radius of the receiving equipment, sometimes up to 30km distance. This bracelet forms part of the PDT/L variant, which is a wearable version of the PDT technology. Both it and the linked locator tube share a serial number for ease of detection in case of mixup." icon = 'icons/obj/items/clothing/accessory/watches.dmi' @@ -154,12 +154,12 @@ var/dummy_icon_state = "pdt_watch" var/copied_serial_number = null -/obj/item/clothing/accessory/pdt_bracelet/get_examine_text(mob/user) +/obj/item/clothing/accessory/wrist/pdt_bracelet/get_examine_text(mob/user) . = ..() if(!isxeno(user) && (get_dist(user, src) < 2 || isobserver(user)) && copied_serial_number) . += SPAN_INFO("The serial number is [copied_serial_number].") -/obj/item/clothing/accessory/pdt_bracelet/Initialize() +/obj/item/clothing/accessory/wrist/pdt_bracelet/Initialize() . = ..() icon_state = "[dummy_icon_state]_[rand(0, 2)]" @@ -169,14 +169,14 @@ desc_lore = "This kit was distributed in the 200th (Season 4) Issue of the Boots! magazine, 'Privates die without their battlebuddy!', to drive up sales. Many have noted the poor battery life of these units, leading many to speculate that these were faulty units that were repackaged and shipped off to various USCM-adjacent mil-surplus good stores. The Department of the Navy Observation in Photographs (DNOP) has not released a statement regarding these theories." icon = 'icons/obj/items/storage/kits.dmi' icon_state = "pdt_box" - can_hold = list(/obj/item/device/pdt_locator_tube, /obj/item/clothing/accessory/pdt_bracelet) + can_hold = list(/obj/item/device/pdt_locator_tube, /obj/item/clothing/accessory/wrist/pdt_bracelet) foldable = /obj/item/stack/sheet/cardboard storage_slots = 3 w_class = SIZE_SMALL max_w_class = SIZE_SMALL /obj/item/storage/box/pdt_kit/fill_preset_inventory() - new /obj/item/device/pdt_locator_tube(src, new /obj/item/clothing/accessory/pdt_bracelet(src)) + new /obj/item/device/pdt_locator_tube(src, new /obj/item/clothing/accessory/wrist/pdt_bracelet(src)) new /obj/item/cell/crap(src) //it not fitting is intentional /// THE ADVANCED VERSION... ADMIN SPAWN ONLY... USES TGUI RADAR... /// @@ -186,14 +186,14 @@ desc = "Contains a PDT/L set, consisting of the advanced PDT bracelet and its sister locator tube, alongside a spare cell seemingly wedged into the kit." /obj/item/storage/box/pdt_kit/advanced/fill_preset_inventory() - new /obj/item/device/pdt_locator_tube/advanced(src, new /obj/item/clothing/accessory/pdt_bracelet/advanced(src)) + new /obj/item/device/pdt_locator_tube/advanced(src, new /obj/item/clothing/accessory/wrist/pdt_bracelet/advanced(src)) new /obj/item/cell/crap(src) //it not fitting is intentional /obj/item/device/pdt_locator_tube/advanced name = "advanced PDT locator tube" var/datum/radar/advanced_pdtl/radar -/obj/item/device/pdt_locator_tube/advanced/Initialize(mapload, obj/item/clothing/accessory/pdt_bracelet/bracelet) +/obj/item/device/pdt_locator_tube/advanced/Initialize(mapload, obj/item/clothing/accessory/wrist/pdt_bracelet/bracelet) . = ..() radar = new /datum/radar/advanced_pdtl(src) @@ -208,5 +208,5 @@ /obj/item/device/pdt_locator_tube/advanced/locate_bracelet(mob/user) radar.tgui_interact(user) -/obj/item/clothing/accessory/pdt_bracelet/advanced +/obj/item/clothing/accessory/wrist/pdt_bracelet/advanced name = "advanced PDT bracelet" diff --git a/code/modules/client/preferences_gear.dm b/code/modules/client/preferences_gear.dm index db613cbb563d..77023cf7951a 100644 --- a/code/modules/client/preferences_gear.dm +++ b/code/modules/client/preferences_gear.dm @@ -992,3 +992,8 @@ GLOBAL_LIST_EMPTY_TYPED(gear_datums_by_name, /datum/gear) display_name = "Cut-throat razor" path = /obj/item/weapon/straight_razor cost = 3 + +/datum/gear/misc/watch + display_name = "Cheap wrist watch" + path = /obj/item/clothing/accessory/wrist/watch + cost = 1 // Cheap and crappy diff --git a/code/modules/clothing/clothing_accessories.dm b/code/modules/clothing/clothing_accessories.dm index ccda7c1b7d33..1d3cb894d1ba 100644 --- a/code/modules/clothing/clothing_accessories.dm +++ b/code/modules/clothing/clothing_accessories.dm @@ -74,7 +74,7 @@ /obj/item/clothing/get_examine_text(mob/user) . = ..() for(var/obj/item/clothing/accessory/A in accessories) - . += "[icon2html(A, user)] \A [A] is attached to it[A.additional_examine_text()]" //The spacing of the examine text proc is deliberate. By default it returns ".". + . += "[icon2html(A, user)] \A [A] is [A.additional_examine_text()]" //The spacing of the examine text proc is deliberate. By default it returns ".". /** * Attach accessory A to src diff --git a/code/modules/clothing/gloves/marine_gloves.dm b/code/modules/clothing/gloves/marine_gloves.dm index b181d4fe225a..a8cc15355dc3 100644 --- a/code/modules/clothing/gloves/marine_gloves.dm +++ b/code/modules/clothing/gloves/marine_gloves.dm @@ -21,6 +21,8 @@ armor_bio = CLOTHING_ARMOR_MEDIUM armor_rad = CLOTHING_ARMOR_NONE armor_internaldamage = CLOTHING_ARMOR_LOW + valid_accessory_slots = list(ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) + restricted_accessory_slots = list(ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) // To prevent infinitely putting watches on your gloves. That can be reserved for uniforms, where you have the whole ARM var/adopts_squad_color = TRUE /// The dmi where the grayscale squad overlays are contained var/squad_overlay_icon = 'icons/mob/humans/onmob/clothing/hands_garb.dmi' diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 04025018e241..b63a1daa6826 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -73,7 +73,7 @@ ///Extra text to append when attached to another clothing item and the host clothing is examined. /obj/item/clothing/accessory/proc/additional_examine_text() - return "." + return "attached to it." /obj/item/clothing/accessory/blue name = "blue tie" @@ -1052,3 +1052,56 @@ desc = "This is a fancy-looking ballistics vest, meant to be attached to a uniform." //No stats for these yet, just placeholder implementation. icon_state = "owlf_vest" item_state = "owlf_vest" + +/* +Wrist Accessories +*/ + +/obj/item/clothing/accessory/wrist + name = "bracelet" + desc = "A simple bracelet made from a strip of fabric." + icon = 'icons/obj/items/clothing/accessory/wrist_accessories.dmi' + icon_state = "bracelet" + inv_overlay_icon = null + slot = ACCESSORY_SLOT_WRIST_L + var/which_wrist = "left wrist" + +/obj/item/clothing/accessory/wrist/get_examine_text(mob/user) + . = ..() + + switch(slot) + if(ACCESSORY_SLOT_WRIST_L) + which_wrist = "left wrist" + if(ACCESSORY_SLOT_WRIST_R) + which_wrist = "right wrist" + . += "It will be worn on the [which_wrist]." + +/obj/item/clothing/accessory/wrist/additional_examine_text() + return "on the [which_wrist]." + +/obj/item/clothing/accessory/wrist/attack_self(mob/user) + ..() + + switch(slot) + if(ACCESSORY_SLOT_WRIST_L) + slot = ACCESSORY_SLOT_WRIST_R + to_chat(user, SPAN_NOTICE("The [src] will be worn on the right wrist.")) + if(ACCESSORY_SLOT_WRIST_R) + slot = ACCESSORY_SLOT_WRIST_L + to_chat(user, SPAN_NOTICE("The [src] will be worn on the left wrist.")) + +/obj/item/clothing/accessory/wrist/watch + name = "digital wrist watch" + desc = "A cheap 24-hour only digital wrist watch. It has a crappy red display, great for looking at in the dark!" + icon = 'icons/obj/items/clothing/accessory/watches.dmi' + icon_state = "cheap_watch" + +/obj/item/clothing/accessory/wrist/watch/get_examine_text(mob/user) + . = ..() + + . += "It reads: [SPAN_NOTICE("[worldtime2text()]")]" + +/obj/item/clothing/accessory/wrist/watch/additional_examine_text() + . = ..() + + . += " It reads: [SPAN_NOTICE("[worldtime2text()]")]" diff --git a/code/modules/clothing/under/under.dm b/code/modules/clothing/under/under.dm index 6f089483c4c2..f7a28f3f7948 100644 --- a/code/modules/clothing/under/under.dm +++ b/code/modules/clothing/under/under.dm @@ -30,7 +30,7 @@ var/worn_state = null var/hood_state //for uniforms with hoods. drag_unequip = TRUE - valid_accessory_slots = list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND, ACCESSORY_SLOT_RANK, ACCESSORY_SLOT_DECOR, ACCESSORY_SLOT_MEDAL, ACCESSORY_SLOT_ARMOR_C) + valid_accessory_slots = list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND, ACCESSORY_SLOT_RANK, ACCESSORY_SLOT_DECOR, ACCESSORY_SLOT_MEDAL, ACCESSORY_SLOT_ARMOR_C, ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) restricted_accessory_slots = list(ACCESSORY_SLOT_UTILITY, ACCESSORY_SLOT_ARMBAND, ACCESSORY_SLOT_RANK, ACCESSORY_SLOT_ARMOR_C) sprite_sheets = list(SPECIES_MONKEY = 'icons/mob/humans/species/monkeys/onmob/uniform_monkey_0.dmi') equip_sounds = list('sound/handling/clothing_on.ogg') diff --git a/code/modules/cm_marines/radar.dm b/code/modules/cm_marines/radar.dm index f12f0e79d81c..e2f0e3c7715f 100644 --- a/code/modules/cm_marines/radar.dm +++ b/code/modules/cm_marines/radar.dm @@ -177,7 +177,7 @@ /datum/radar/advanced_pdtl/scan() . = ..() objects = list() - var/obj/item/clothing/accessory/pdt_bracelet/bracelet = typed_holder.linked_bracelet + var/obj/item/clothing/accessory/wrist/pdt_bracelet/bracelet = typed_holder.linked_bracelet if(!bracelet) return objects += list(list( diff --git a/code/modules/cm_tech/implements/armor.dm b/code/modules/cm_tech/implements/armor.dm index e8829427ca26..4116eb6b1ed3 100644 --- a/code/modules/cm_tech/implements/armor.dm +++ b/code/modules/cm_tech/implements/armor.dm @@ -57,7 +57,9 @@ . += SPAN_NOTICE(get_damage_status()) /obj/item/clothing/accessory/health/additional_examine_text() - return ". [get_damage_status()]" + . = ..() + + . += "[get_damage_status()]" /obj/item/clothing/accessory/health/on_attached(obj/item/clothing/S, mob/living/carbon/human/user) . = ..() diff --git a/icons/obj/items/clothing/accessory/watches.dmi b/icons/obj/items/clothing/accessory/watches.dmi index b5b85b72f43516f42e77049aadfa700c2d4dca51..4ccb4f1cbac2ca14f242bec7b3b750f9bcfa4402 100644 GIT binary patch delta 847 zcmV-V1F-zB1jGlB84Lyh0063Kaozv`0D+N-ZGVDllQU8i3m~d-sZ~~R^>YDx5CCT` zLq?ljpq>B#0{%%vK~#90V?1!+0K-TIOatwJfd(T!09Yu|oSdBcAI6?LcQzyC&Y{2k zWTya-b&ff}`hwxwt$Pg4uI@BR1-R^gEau7}`)W5?_LE!)f=b!f?>;h!3h~3m)OAc4ZeBUV z025!bavjaG05<#IaH}(je7#AQ{UnzGAj3hHh>8d^u=7ALs1X9<)7ta6?3ZSIL$>{+ zeF1VEFxnRwCVhd?6hN-V(G)P60)IwRz{pMkpb=T*P=EdUCB=>z2>Zzn0NBXvKmlsm zPj*XixPTEqIXW5u1MPr;1|vQIM%M>WV)^L$fRWk~99!$p!vHz@1Lt`C4=a_lEL3x9w@UQJn! zf%DiFxR~rQ2(4!21D>A)O-|BkeE`h=4~+P}z-S5}SL0|37)=4ADPUx$fYJ2~_ ZqX3zweeqL*K)wI~002ovPDHLkV1feVf1&^Y delta 453 zcmV;$0XqJ~2d@N>8Gi!+005o0f$RVP083CzR7JqRz#}6iLqkSxZ*&e04jdN}F)Jk- zK3z^mJ#=YX!o}1vT!KSUVSROXLNG9JfRai|N^3zu2L%HNB00doz(Zt1V76eBD*(=V z07%D;m;e9(0d!JMQvg8b*k%9#0C;*-Sad{Xb7OL8aCB*JZjm%ze_U#n6Wq0 zu_iV#gwy6^0003FNklaLjh!tNMKq7Wv5m(vbI zX&L7>r=lqGxcA-~fw=Q!S^5lK6;;L8Y|aVg33^7v|6mQW69ghEDVY3V@t9JoQ`APh zc%ySi=_pEc()d}Ve{vph5hZFheifgw)Gr^q(1p6Ne z_dj;{@fu_&kpAz@|2~*6{XZD}k3{J%()%A9JVbi`e{C>xJ3jaSXrT2!(%Aol(f>%V v{_m~+hYqm+k=B0}_5@2Lfc=lO#{Pc-wHOSju!urm00000NkvXXu0mjf;Izk- diff --git a/icons/obj/items/clothing/accessory/wrist_accessories.dmi b/icons/obj/items/clothing/accessory/wrist_accessories.dmi new file mode 100644 index 0000000000000000000000000000000000000000..ffea9d4e77878d1fecc3929cc1a1ef4cd60e5d21 GIT binary patch literal 642 zcmV-|0)737P)we|08a@Dekm(@93Nve5TG?TkwE~#F*L|R9Xk&XE(ZtyhybytxI_Q|00DGTPE!Ct z=GbNc003}$R9JLGWpiV4X>fFDZ*Bkpc$`yKaB_9`^iy#0_2eo`Eh^5;&r`5fFwryM z;w;ZhDainGjE%TBGg33tGfE(w;*!LYR3KAHiHkEOv#1!zH00t;D@x2wg|OiYl8O?O zQ*%;Fa4A$)aP@NmTMYoBv?J^CEUV?aRl~TOR5b)$XNXSXrh=<-9u)w}uc|_jSW8u)<7G|PTi?afKyBKV*%D9q zzTYcX^`WEd#)F{C05B<||!l)>s=_T>wwdxi?9~c0WeEnv>C-G=$iZ!wtazL@vq`T{Q zivk!xu%Cu7&zilpto!xt${QEJJY*I@kMMbaSngO!cJ?YuLC9G+1=t67d|t}XcA2z^ zd6D!K9>C#19r#$bme*#0;_*(=JuLUrRwKePtnD~;Uwip9=yxKg!{TGzbmLBHv3y$O z9$D}Qg?5R$E2i6?iTlF$(0F0M#u_ia2*;u9icTR!-wz{%PLot3NW!EVkeGxqsr+w# cwfJ9r0x1J+_wMY`X#fBK07*qoM6N<$f*uMW=l}o! literal 0 HcmV?d00001 From 6d10ad6ecd36f3780c9a1c897fb9d4804dbcdcfb Mon Sep 17 00:00:00 2001 From: thekillfish Date: Thu, 9 Jan 2025 21:17:35 +0100 Subject: [PATCH 2/3] Switcheroo on where wrist accessory slots are defined for gloves. --- code/modules/clothing/clothing.dm | 2 ++ code/modules/clothing/gloves/marine_gloves.dm | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c9831c91b0ea..a6ea1ce2c842 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -229,6 +229,8 @@ flags_armor_protection = BODY_FLAG_HANDS flags_equip_slot = SLOT_HANDS attack_verb = list("challenged") + valid_accessory_slots = list(ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) + restricted_accessory_slots = list(ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) // To prevent infinitely putting watches/wrist accessories on your gloves. That can be reserved for uniforms, where you have the whole ARM to put shit on sprite_sheets = list(SPECIES_MONKEY = 'icons/mob/humans/species/monkeys/onmob/hands_monkey.dmi') blood_overlay_type = "hands" var/gloves_blood_amt = 0 //taken from blood.dm diff --git a/code/modules/clothing/gloves/marine_gloves.dm b/code/modules/clothing/gloves/marine_gloves.dm index a8cc15355dc3..b181d4fe225a 100644 --- a/code/modules/clothing/gloves/marine_gloves.dm +++ b/code/modules/clothing/gloves/marine_gloves.dm @@ -21,8 +21,6 @@ armor_bio = CLOTHING_ARMOR_MEDIUM armor_rad = CLOTHING_ARMOR_NONE armor_internaldamage = CLOTHING_ARMOR_LOW - valid_accessory_slots = list(ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) - restricted_accessory_slots = list(ACCESSORY_SLOT_WRIST_L, ACCESSORY_SLOT_WRIST_R) // To prevent infinitely putting watches on your gloves. That can be reserved for uniforms, where you have the whole ARM var/adopts_squad_color = TRUE /// The dmi where the grayscale squad overlays are contained var/squad_overlay_icon = 'icons/mob/humans/onmob/clothing/hands_garb.dmi' From 1078ac4a9e9e5f458e05ea480ef0c390a479177b Mon Sep 17 00:00:00 2001 From: harryob Date: Mon, 13 Jan 2025 09:12:47 +0000 Subject: [PATCH 3/3] Update code/modules/clothing/under/ties.dm --- code/modules/clothing/under/ties.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index b63a1daa6826..6d5a700cb758 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -1085,10 +1085,10 @@ Wrist Accessories switch(slot) if(ACCESSORY_SLOT_WRIST_L) slot = ACCESSORY_SLOT_WRIST_R - to_chat(user, SPAN_NOTICE("The [src] will be worn on the right wrist.")) + to_chat(user, SPAN_NOTICE("[src] will be worn on the right wrist.")) if(ACCESSORY_SLOT_WRIST_R) slot = ACCESSORY_SLOT_WRIST_L - to_chat(user, SPAN_NOTICE("The [src] will be worn on the left wrist.")) + to_chat(user, SPAN_NOTICE("[src] will be worn on the left wrist.")) /obj/item/clothing/accessory/wrist/watch name = "digital wrist watch"