From 8c7464d0baa36ccff508c00313381e943a3ab089 Mon Sep 17 00:00:00 2001 From: Casper3667 <8396443+Casper3667@users.noreply.github.com> Date: Sun, 25 Jan 2026 19:56:22 +0100 Subject: [PATCH] Adds Tulkir's custom item and changes the machete draw/sheath message (#21725) Implements Tulkir's custom item as per https://forums.aurorastation.org/topic/22812-tulkir-zarkiirrans-amohdan-ritual-dagger/ As part of it, holsters were modified so that holstering and unholstering messages can be defined per item, which is implemented for machetes, and that there can be custom sprites for filled holsters, currently only implemented for Tulkir's new item. Sprites made by ElorgRHG. --------- Signed-off-by: Casper3667 <8396443+Casper3667@users.noreply.github.com> Co-authored-by: VMSolidus --- .../clothing/under/accessories/accessory.dm | 36 ++-- .../clothing/under/accessories/holster.dm | 30 +++- code/modules/customitems/item_defines.dm | 165 ++++++++++++++++++ html/changelogs/SheathLog.yml | 7 + icons/obj/custom_items/tulkir_knife.dmi | Bin 0 -> 628 bytes icons/obj/custom_items/tulkir_sheath.dmi | Bin 0 -> 1267 bytes 6 files changed, 216 insertions(+), 22 deletions(-) create mode 100644 html/changelogs/SheathLog.yml create mode 100644 icons/obj/custom_items/tulkir_knife.dmi create mode 100644 icons/obj/custom_items/tulkir_sheath.dmi diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index 1e53ca8ef43..2c0e2d5a59f 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -135,22 +135,8 @@ //default attack_self behaviour /obj/item/clothing/accessory/attack_self(mob/user as mob) if(flippable) - if(!flipped) - if(!overlay_state) - icon_state = "[initial(icon_state)]_flip" - item_state = "[initial(item_state)]_flip" - flipped = 1 - else - overlay_state = "[overlay_state]_flip" - flipped = 1 - else - if(!overlay_state) - icon_state = initial(icon_state) - item_state = initial(item_state) - flipped = 0 - else - overlay_state = initial(overlay_state) - flipped = 0 + flipped = !flipped + update_icon() flip_message(user) update_clothing_icon() inv_overlay = null @@ -158,6 +144,24 @@ return ..() +/obj/item/clothing/accessory/update_icon() + . = ..() + flip_sprite() + +/obj/item/clothing/accessory/proc/flip_sprite() + if(flipped) + if(!overlay_state) + icon_state = "[initial(icon_state)]_flip" + item_state = "[initial(item_state)]_flip" + else + overlay_state = "[overlay_state]_flip" + else + if(!overlay_state) + icon_state = initial(icon_state) + item_state = initial(item_state) + else + overlay_state = initial(overlay_state) + /obj/item/clothing/accessory/proc/flip_message(mob/user) to_chat(user, "You change \the [src] to be on your [src.flipped ? "right" : "left"] side.") diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index 6d48eebd17b..703b048814d 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -15,6 +15,10 @@ var/sound_out = 'sound/weapons/holster/holsterout.ogg' flippable = 1 w_class = WEIGHT_CLASS_NORMAL + var/holster_message = "holster" + var/draw_peace = "pointing it at the ground." + var/draw_hostile = "ready to shoot!" + var/filled_sprite = FALSE /obj/item/clothing/accessory/holster/Initialize() . = ..() @@ -45,9 +49,10 @@ user.drop_from_inventory(holstered, src) holstered.add_fingerprint(user) w_class = max(w_class, holstered.w_class) - user.visible_message(SPAN_NOTICE("[user] holsters \the [holstered]."), - SPAN_NOTICE("You holster \the [holstered].")) + user.visible_message(SPAN_NOTICE("[user] [holster_message] \the [holstered]."), + SPAN_NOTICE("You [holster_message] \the [holstered].")) update_name() + update_icon() /obj/item/clothing/accessory/holster/proc/clear_holster() holstered = null @@ -66,13 +71,13 @@ if(user.a_intent == I_HURT) sound_vol = 50 user.visible_message( - SPAN_DANGER("[user] draws \the [holstered], ready to shoot!"), - SPAN_WARNING("You draw \the [holstered], ready to shoot!") + SPAN_DANGER("[user] draws \the [holstered], [draw_hostile]"), + SPAN_WARNING("You draw \the [holstered], [draw_hostile]") ) else user.visible_message( - SPAN_NOTICE("[user] draws \the [holstered], pointing it at the ground."), - SPAN_NOTICE("You draw \the [holstered], pointing it at the ground.") + SPAN_NOTICE("[user] draws \the [holstered], [draw_peace]"), + SPAN_NOTICE("You draw \the [holstered], [draw_peace]") ) if(sound_out) @@ -82,6 +87,16 @@ holstered.add_fingerprint(user) w_class = initial(w_class) clear_holster() + update_icon() + +/obj/item/clothing/accessory/holster/flip_sprite() + . = ..() + if(filled_sprite && holstered) + icon_state = "[icon_state]_filled" + item_state = "[item_state]_filled" + else + icon_state = "[icon_state]" + item_state = "[item_state]" /obj/item/clothing/accessory/holster/attack_hand(mob/user) if (!ishuman(user)) @@ -260,6 +275,9 @@ icon_state = "holster_machete" item_state = "holster_machete" icon = 'icons/obj/item/clothing/accessory/holster.dmi' + holster_message = "sheath" + draw_peace = "holding it low." + draw_hostile = "ready to fight!" allowed_items = list( /obj/item/material/hatchet/machete, /obj/item/material/hatchet/machete/deluxe, diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm index 9e7d2e2a830..677f9192ff1 100644 --- a/code/modules/customitems/item_defines.dm +++ b/code/modules/customitems/item_defines.dm @@ -2188,3 +2188,168 @@ All custom items with worn sprites must follow the contained sprite system: http icon_state = "shepherd_coat" item_state = "shepherd_coat" contained_sprite = TRUE + +/obj/item/material/knife/raskariim/fluff/tulkir_knife // amohdan ritual dagger - Tulkir Zarkiirran - TheGreyWolf + name = "amohdan ritual dagger" + desc = "An old amohdan heirloom dagger. The handle appears to have been repaired with parts from a mrrazhak pistol grip and the edge of the dagger has been dulled to comply with regulations, though the broken tip remains sharp, if useless for fighting." + desc_extended = "As hunters, priests of Mata'ke often carry daggers with them to skin their kills. These daggers are typically made of silver to emulate Mata'ke's spear and his strength. Older and more valuable daggers have been known to be shipped off-planet during the wars by opportunistic smugglers, with Zephyr Shipping Company having been accused of selling them since its establishment, despite the company vehemently opposing such accusations." + icon = 'icons/obj/custom_items/tulkir_knife.dmi' + icon_override = 'icons/obj/custom_items/tulkir_knife.dmi' + icon_state = "tulkir_knife" + item_state = "tulkir_knife" + slot_flags = SLOT_BELT|SLOT_HOLSTER + thrown_force_divisor = 0.02 + force_divisor = 0.02 // 1.2 when wielded with hardness 60 (steel) + contained_sprite = TRUE + applies_material_colour = FALSE + use_material_name = FALSE + unbreakable = TRUE + +/obj/item/material/knife/raskariim/fluff/tulkir_knife/attack(mob/living/target_mob, mob/living/user, target_zone) + . = ..() + if(target_mob != user || !(target_zone == BP_L_HAND || target_zone == BP_R_HAND)) + return + + ritualslice(user, target_mob, target_zone) + +/obj/item/material/knife/raskariim/fluff/tulkir_knife/get_examine_text(mob/user, distance, is_adjacent, infix, suffix, get_extended) + . = ..() + if(!ishuman(user)) + return + + var/mob/living/carbon/human/U = user + if(!(U.religion == RELIGION_RASKARA || U.religion == RELIGION_RASKARA_ALT)) + return + + var/raskara_text = SPAN_CULT("\The [src] is drawn from the depths of the Maggot's hoard.") + if(blood_overlay) + raskara_text += SPAN_DANGER(" The debts are being drawn.") + . += raskara_text + +/obj/item/material/knife/raskariim/fluff/tulkir_knife/proc/ritualslice(mob/living/user, mob/living/carbon/human/target, target_zone) + var/obj/item/organ/external/affected = target.get_organ(target_zone) + + if(affected.is_stump()) + to_chat(user, SPAN_WARNING("You can't cut open the palm of a hand that is gone.")) + return + if(target.gloves) + to_chat(user, SPAN_WARNING("You can't cut through the gloves.")) + return + + if(istype(target) && (target.species.flags & NO_BLOOD)) + to_chat(user, SPAN_WARNING("You are unable to sacrifice blood.")) + return + + user.visible_message(SPAN_WARNING("[user] begins slicing open their palm with \the [src]!")) + if(!do_after(user, 4 SECOND, src)) + user.visible_message(SPAN_WARNING("[user] stops slicing open their palm.")) + return + user.visible_message(SPAN_WARNING("[user] slices open their palm with \the [src]!")) + + affected.status |= ORGAN_BLEEDING + + target.apply_damage(6, DAMAGE_BRUTE, target_zone, src, DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE) + add_blood(target) + playsound(target.loc, 'sound/weapons/bloodyslice.ogg', 15, 1) + +/obj/item/material/knife/raskariim/fluff/tulkir_knife/attack_self(mob/user, modifiers) + . = ..() + if(!ishuman(user)) + return + + var/mob/living/carbon/human/U = user + if(!(U.religion == RELIGION_RASKARA || U.religion == RELIGION_RASKARA_ALT)) + return + + if(blood_overlay) + var/alist/l = alist("invite" = "2", "claim" = "3", "bind" = "4", "transform" = "5", "witness" = "6") + var/runetype = tgui_input_list(user, "What kind of ritual is to be done?", "Ritual", l) + if(runetype) + runetype = l[runetype] + create_raskariim_rune(user, runetype, get_turf(user)) + else + to_chat(user, SPAN_INFO("The knife is not blooded enough to draw with.")) + +/obj/effect/decal/cleanable/fluff/rune + name = "rune" + desc = "A strange collection of symbols drawn in blood." + icon = 'icons/obj/rune.dmi' + icon_state = "1" + color = COLOR_HUMAN_BLOOD + anchored = TRUE + unacidable = TRUE + layer = RUNE_LAYER + mouse_opacity = MOUSE_OPACITY_OPAQUE + +/obj/effect/decal/cleanable/fluff/rune/feedback_hints(mob/user, distance, is_adjacent) + . = ..() + if(iscultist(user) || isobserver(user)) + . += "This rune belongs to The Stranger." + else + . += SPAN_WARNING("A heavy smell of blood permeates the area around the arcane drawings.") + if(!ishuman(user)) + return + + var/mob/living/carbon/human/U = user + if(!(U.religion == RELIGION_RASKARA || U.religion == RELIGION_RASKARA_ALT))\ + return + + . += SPAN_CULT("\The [src] pays a debt to the King of Maggots.") + +/obj/item/material/knife/raskariim/fluff/tulkir_knife/proc/create_raskariim_rune(var/mob/living/carbon/human/user, var/chosen_rune, var/turf/target_turf) + if(user.stat || user.incapacitated()) + to_chat(user, SPAN_WARNING("You are in no shape to do this.")) + return + + if(locate(/obj/effect/decal/cleanable/fluff/rune) in get_turf(user)) + to_chat(user, SPAN_WARNING("There is already a rune in this location.")) + return + + if(!target_turf) + target_turf = get_turf(user) + + user.visible_message(SPAN_WARNING("[user] begins drawing on the floor with the blood from \the [src]!")) + if(!do_after(user, 4 SECOND, src)) + user.visible_message(SPAN_WARNING("[user] stops drawing on the floor.")) + return + + // Crates a cleanable rune that looks like a cult rune to people who are neither cultists or raskariim + var/obj/effect/decal/cleanable/fluff/rune/R = new(target_turf) + user.visible_message(SPAN_CULT("[user] finishes drawing \the [R] on the floor!"), + SPAN_CULT("You finish drawing the markings of the King of Maggots.")) + + R.blood_DNA = list() + R.blood_DNA = src.blood_DNA + R.color = src.blood_color + R.filters = filter(type="drop_shadow", x = 1, y = 1, size = 4, color = src.blood_color) + + R.icon_state = chosen_rune + +/obj/item/clothing/accessory/holster/utility/fluff/tulkir_sheath // amohdan dagger sheath - Tulkir Zarkiirran - TheGreyWolf + name = "amohdan dagger sheath" + desc = "A leather sheath for an amohdan dagger." + desc_extended = "As hunters, priests of Mata'ke often carry daggers with them to skin their kills. These daggers are typically made of silver to emulate Mata'ke's spear and his strength. Older and more valuable daggers have been known to be shipped off-planet during the wars by opportunistic smugglers, with Zephyr Shipping Company having been accused of selling them since its establishment, despite the company vehemently opposing such accusations." + icon = 'icons/obj/custom_items/tulkir_sheath.dmi' + icon_override = 'icons/obj/custom_items/tulkir_sheath.dmi' + icon_state = "tulkir_holster_alt" + item_state = "tulkir_holster_alt" + holster_message = "sheath" + draw_peace = "holding it low." + draw_hostile = "ready to draw blood!" + filled_sprite = TRUE + allowed_items = list( + /obj/item/material/knife/raskariim, + /obj/item/material/knife/raskariim/fluff/tulkir_knife + ) + +/obj/item/clothing/accessory/holster/utility/fluff/tulkir_sheath/get_examine_text(mob/user, distance, is_adjacent, infix, suffix) + . = ..() + if(!ishuman(user)) + return + + var/mob/living/carbon/human/U = user + if(!(U.religion == RELIGION_RASKARA || U.religion == RELIGION_RASKARA_ALT) || !holstered) + return + + var/raskara_text = SPAN_CULT("\The [src] holds a treasure from the depths of the Maggot's hoard.") + . += raskara_text diff --git a/html/changelogs/SheathLog.yml b/html/changelogs/SheathLog.yml new file mode 100644 index 00000000000..e98d54ac0be --- /dev/null +++ b/html/changelogs/SheathLog.yml @@ -0,0 +1,7 @@ +author: TheGreyWolf + +delete-after: True + +changes: + - rscadd: "It is now possible for holsters to have a filled sprite. This is currently not implemented anywhere." + - rscadd: "Holsters can now have their draw descriptions modified. Currently only the machete holster does it differently from ordinary holsters." diff --git a/icons/obj/custom_items/tulkir_knife.dmi b/icons/obj/custom_items/tulkir_knife.dmi new file mode 100644 index 0000000000000000000000000000000000000000..e310e266c075100e8ff6e30efc2abb4ee37852a6 GIT binary patch literal 628 zcmV-)0*n2LP)iOdZ&G1hxvPh_PdZRAycQ=<@Ebnlpj?`GJ(933X}t(fb0mr5I7bJjKuyIBK6s&mFnFzbb%0{@IS)9o3K56L-Rin`u~H zJimeNxoI1DQQmM$_b7M z9oC)Ba7?hgy3sf$Fth1;Vz#DF&sQe`fk5ETVSm6HcQZ(VFn5Oykyak4e-rcf`8~TR z(CXqZDFk+RNcM3OHQhNIIfMBzF?`Lh06zaFS-d9v;6IhGXwoqD O0000l2y*77%i`XIY=0{p3<@nr+*ude_Q3gowjMtyMLf zOYy*-Tq;&eDIDO@Q7$4Gf+P#N`4a~11|JE6Hl7M8dJHi&7gE?@&XDyFL|gP8dJbt0 zZ>sv6+5?BO97PNl_-g=}hHC%- z1FT6zK~#90?VRCuqaYB4ZB3W~10=rx!!D?4v#sM8H3zbLzjN9jxt!sm26Q6RGys4V ze0-L6u#b<=_Eg%#9+LmFq0%mPko=QjTiV7BtR-vS`W%p@bPil;8=E295?S{y=b-Dl zAD>uiTIE+1|IbIh>u%ws9`{a=0O>(H|#TaLk zVRpBa4E}Ve>E+2&`m{J%*WZ4RK+!9}e=V-A?_-SY=qWuDf=`QdCogb*)I*q;JD+0& zFRt_5xO&PB2BLG!EYJ6%Zh~11tT*(YLz?E+MUjY29A`^m1hO7@Z67S0f)t%;?_)8M`L?!?n>5sT-T&B>4UP_Jwi{WWZ$AeMS7%ycR>u$-4Cdz-S{T5rZdczV z373hr%=;&|z8PZJ{7rpMcdO67oxM06*@GUtwWA>EtDiW9hVH0G)_$iB0000000000 z007>L;`x0gzUHrz{Jt1p^;b!LUyQH%t0ccK##jASlHV8OtNtp zYpA~iyg0vq*zXVk006f0`BB=zK2Gg>kATeitw&(lP#QsL8=E0x>|t+q6u_n9PsiLG z7lDkkL~VT|(8>mlx;tMCIonEaJr%*jv?n|7E>2$=@v* zBrD_|HN7<1-)(yJd0G(sGkR$Tf4BageCo!ULhJR?kmDF*-+!fyI{%bDP;mc2p5K|- zNfp>MeW2j}gY0jZALD%45ltT{xc|US{u;rcrcbuY?LT0e)+fQBrjHcdf55p~P`eqOf!0ELAB00000000000RBr*UkLSu z7UQG7&_gKH7upgZ^@Y@is4oNn00000000000E&S6LibjvFSN7&#R#Y`v=h`9LVcnA dpuP||l0O|4JRLqxnI`}M002ovPDHLkV1jo>V88$X literal 0 HcmV?d00001