From da3e4798f83c987bf7e80d9c121eb2e37097264b Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sun, 18 Aug 2024 17:26:52 +0200 Subject: [PATCH] [MIRROR] Adds drawing chalk outlines on dead mobs, white crayons are now called sticks of chalk (#29449) * Adds drawing chalk outlines on dead mobs, white crayons are now called sticks of chalk (#85918) ## About The Pull Request ![image](https://github.com/user-attachments/assets/1c698b33-3cd9-477c-b7a0-4a1ebb009122) *The Miami Mutilator is at large once again. Thank god we have such hardboiled detectives as Manny Pardo on the case.* This pull request allows for players to use white crayons, which have now been renamed to sticks of chalk, to generate outlines of dead or "dead" bodies found throughout the station in an attempt to let detectives actually set up crime scenes as opposed to, more typically, just causing them. Players will attempt to draw a chalk outline if the target is a mob and the mob is dead (or fake-dead), using a single charge of the crayon/chalk. Also, adds a quick macro so that we can get the proper left/right orientation of the dead mob for reference. ## Why It's Good For The Game Detective should have more thematic, simple ways to organize crime scenes in-round, and what better way to do that then through existing items and mechanics that we already have. Also, I was 100% shocked to learn that these have always been white crayons as opposed to sticks of chalk, which certainly seems odd. In essence, this change doesn't really let you do anything "new", but just makes it easier and simpler to do so in a regular round without nearly as much fiddling. This mechanic exists exclusively within the afterattack of sticks of chalk as opposed to all crayons for thematic reasons, but I'm not 100% sold on that and it would be simple to move over to all crayons if people feel strongly about that. ## Changelog :cl: add: White crayons (Renamed to Sticks of Chalk) may now be used on dead bodies to draw a body outline onto the ground easily. /:cl: --------- Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com> * Adds drawing chalk outlines on dead mobs, white crayons are now called sticks of chalk --------- Co-authored-by: ArcaneMusic <41715314+ArcaneMusic@users.noreply.github.com> Co-authored-by: Zephyr <12817816+ZephyrTFA@ users.noreply.github.com> --- code/__DEFINES/living.dm | 3 +++ code/game/objects/effects/decals/crayon.dm | 7 +++-- code/game/objects/items/crayons.dm | 27 ++++++++++++++++++- .../heretic/knowledge/lock_lore.dm | 2 +- code/modules/cargo/packs/costumes_toys.dm | 2 +- code/modules/cargo/packs/security.dm | 2 +- 6 files changed, 37 insertions(+), 6 deletions(-) diff --git a/code/__DEFINES/living.dm b/code/__DEFINES/living.dm index 63993f4bc62..340bf3608bb 100644 --- a/code/__DEFINES/living.dm +++ b/code/__DEFINES/living.dm @@ -4,3 +4,6 @@ /// Always does *deathgasp when they die /// If unset mobs will only deathgasp if supplied a death sound or custom death message #define ALWAYS_DEATHGASP (1<<1) + +/// Getter for a mob/living's lying angle, otherwise protected +#define GET_LYING_ANGLE(mob) (UNLINT(mob.lying_angle)) diff --git a/code/game/objects/effects/decals/crayon.dm b/code/game/objects/effects/decals/crayon.dm index e42ee4d491f..eced2fb66f1 100644 --- a/code/game/objects/effects/decals/crayon.dm +++ b/code/game/objects/effects/decals/crayon.dm @@ -11,11 +11,14 @@ var/rotation = 0 var/paint_colour = COLOR_WHITE -/obj/effect/decal/cleanable/crayon/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null) +/obj/effect/decal/cleanable/crayon/Initialize(mapload, main, type, e_name, graf_rot, alt_icon = null, desc_override = null) . = ..() if(e_name) name = e_name - desc = "A [name] vandalizing the station." + if(desc_override) + desc = "[desc_override]" + else + desc = "A [name] vandalizing the station." if(alt_icon) icon = alt_icon if(type) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 93c6b6bdc99..a8fd9f20054 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -645,13 +645,38 @@ dye_color = DYE_BLACK /obj/item/toy/crayon/white - name = "white crayon" + name = "stick of chalk" + desc = "A stark-white stick of chalk." icon_state = "crayonwhite" paint_color = COLOR_WHITE crayon_color = "white" reagent_contents = list(/datum/reagent/consumable/nutriment = 0.5, /datum/reagent/colorful_reagent/powder/white/crayon = 1.5) dye_color = DYE_WHITE +/obj/item/toy/crayon/white/interact_with_atom(atom/interacting_with, mob/living/user, list/modifiers) + /// Wherein, we draw a chalk body outline vaguely around the dead or "dead" mob + if(!ishuman(interacting_with) || user.combat_mode) + return ..() + + var/mob/living/carbon/human/pwned_human = interacting_with + + if(!(pwned_human.stat == DEAD || HAS_TRAIT(pwned_human, TRAIT_FAKEDEATH))) + balloon_alert_to_viewers("FEEDING TIME") + return ..() + + balloon_alert_to_viewers("drawing outline...") + if(!do_after(user, DRAW_TIME, target = pwned_human, max_interact_count = 4)) + return NONE + if(!use_charges(user, 1)) + return NONE + + var/decal_rotation = GET_LYING_ANGLE(pwned_human) - 90 + var/obj/effect/decal/cleanable/crayon/chalk_line = new(get_turf(pwned_human), paint_color, "body", "chalk outline", decal_rotation, null, "A vaguely [pwned_human] shaped outline of a body.") + to_chat(user, span_notice("You draw a chalk outline around [pwned_human].")) + chalk_line.pixel_y = (pwned_human.pixel_y + pwned_human.pixel_z) + rand(-2, 2) + chalk_line.pixel_x = (pwned_human.pixel_x + pwned_human.pixel_w) + rand(-1, 1) + return ITEM_INTERACT_SUCCESS + /obj/item/toy/crayon/mime name = "mime crayon" icon_state = "crayonmime" diff --git a/code/modules/antagonists/heretic/knowledge/lock_lore.dm b/code/modules/antagonists/heretic/knowledge/lock_lore.dm index 17e73cb162c..ac375d7942a 100644 --- a/code/modules/antagonists/heretic/knowledge/lock_lore.dm +++ b/code/modules/antagonists/heretic/knowledge/lock_lore.dm @@ -136,7 +136,7 @@ /datum/heretic_knowledge/limited_amount/concierge_rite // item that creates 3 max at a time heretic only barriers, probably should limit to 1 only, holy people can also pass name = "Concierge's Rite" - desc = "Allows you to transmute a white crayon, a wooden plank, and a multitool to create a Labyrinth Handbook. \ + desc = "Allows you to transmute a stick of chalk, a wooden plank, and a multitool to create a Labyrinth Handbook. \ It can materialize a barricade at range that only you and people resistant to magic can pass. 3 uses." gain_text = "The Concierge scribbled my name into the Handbook. \"Welcome to your new home, fellow Steward.\"" required_atoms = list( diff --git a/code/modules/cargo/packs/costumes_toys.dm b/code/modules/cargo/packs/costumes_toys.dm index de84a263597..a25c47c5d9f 100644 --- a/code/modules/cargo/packs/costumes_toys.dm +++ b/code/modules/cargo/packs/costumes_toys.dm @@ -90,7 +90,7 @@ /datum/supply_pack/costumes_toys/knucklebones name = "Knucklebones Game Crate" desc = "A fun dice game definitely not invented by a cult. Consult your local chaplain regarding \ - approved religious activity. Contains eighteen d6, one white crayon, and instructions on how to play." + approved religious activity. Contains eighteen d6, one stick of chalk, and instructions on how to play." cost = CARGO_CRATE_VALUE * 2 contains = list(/obj/item/dice/d6 = 18, /obj/item/paper/guides/knucklebone, diff --git a/code/modules/cargo/packs/security.dm b/code/modules/cargo/packs/security.dm index 05360fe913f..8a0765602b3 100644 --- a/code/modules/cargo/packs/security.dm +++ b/code/modules/cargo/packs/security.dm @@ -36,7 +36,7 @@ /datum/supply_pack/security/forensics name = "Forensics Crate" desc = "Stay hot on the criminal's heels with Nanotrasen's Detective Essentials™. \ - Contains a forensics scanner, six evidence bags, camera, tape recorder, white crayon, \ + Contains a forensics scanner, six evidence bags, camera, tape recorder, stick of chalk, \ and of course, a fedora." cost = CARGO_CRATE_VALUE * 2.5 access_view = ACCESS_MORGUE