Skip to content

Commit

Permalink
[MIRROR] Graveyard update take two (#3604)
Browse files Browse the repository at this point in the history
* Graveyard update take two (#83567)

## About The Pull Request

**PR body copied from last PR (#83149). I fucked something up (I think
by leaving dream maker open while trying to fix the merge conflicts?)
and rather than try and walk backwards I'm just making a new branch.**

This implements the digging of graves on most soil/dirt/planetary type
turfs, and gives the coroner their own private burial ground.

**Change 1 - Gravedigging:**

You can right-click planetary/dirt/grass tiles using a shovel or shovel
subtype (or entrenching tool). Speed varies on the type of shovel you
are using. This creates a Makeshift Grave, an unmarked burial mound
(different from the ones at the elephant graveyard).

This is handled through the new gravedigger component, which is mostly
unremarkable but worth mentioning in case anyone wants to add this
behavior elsewhere.

**Change 2 - Icebox Morgue Graveyard:**


![image](https://github.com/tgstation/tgstation/assets/28870487/e154dd79-9431-49b4-b3fd-9c932448c8cd)

The icebox morgue now has private burial ground, sealed off by a fence.
Mourners are expected to keep out and perform their grieving at the
appropriate distance. This does not affect the chaplain's burial ground,
which is publicly accessible from the outside. This gives a more secure
place to bury bodies (I'm sure someone will have a reason for this some
day) and may lead to fighting over corpses, which I think is funny.

Also, there might be some goodies left in those graves, but you wouldn't
go graverobbing just for some useless loot, would you??

This also adds a new area type, graveyard, which is mostly just the
icemoon outdoors with the spooky ambiance of the morgue.


![image](https://github.com/tgstation/tgstation/assets/28870487/57a3d790-4941-4130-b4de-ef524383e560)
## Why It's Good For The Game

Now you can bury your friends in an unmarked grave! Bury people alive!
Bury your treasure, or reminders of the sins you've committed! Bury
anything, anywhere you want!

The morgue graveyard is a nice bit of flavor. I know the Chaplain
already gets one (I forgot this when I started this PR though) but the
Coroner is an equal-if-not-more-important corpsekeeper than them.
## Changelog
:cl: Rhials
add: Shovels and entrenching tools can be used to dig graves on
asteroid/dirt/etc. surfaces. Neat!
add: The Icebox Morgue has been given a fenced-off graveyard in the
back.
code: burn_tile() is no longer double-defined on asteroid turfs.
/:cl:

* Graveyard update take two

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Rhials <[email protected]>
Co-authored-by: NovaBot13 <[email protected]>
  • Loading branch information
4 people authored Jun 2, 2024
1 parent a616ab5 commit fa252a6
Show file tree
Hide file tree
Showing 9 changed files with 387 additions and 220 deletions.
535 changes: 318 additions & 217 deletions _maps/map_files/IceBoxStation/IceBoxStation.dmm

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions code/datums/elements/gravedigger.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
* Gravedigger element. Allows for graves to be dug from certain tiles
*/
/datum/element/gravedigger
element_flags = ELEMENT_BESPOKE
argument_hash_start_idx = 2

/// A list of turf types that can be used to dig a grave.
var/static/list/turfs_to_consider = typecacheof(list(
/turf/open/misc/asteroid,
/turf/open/misc/dirt,
/turf/open/misc/grass,
/turf/open/misc/basalt,
/turf/open/misc/ashplanet,
/turf/open/misc/snow,
/turf/open/misc/sandy_dirt,
))

/datum/element/gravedigger/Attach(datum/target)
. = ..()

if(!isitem(target)) //Must be an item to use toolspeed variable.
return ELEMENT_INCOMPATIBLE

RegisterSignal(target, COMSIG_ITEM_INTERACTING_WITH_ATOM_SECONDARY, PROC_REF(dig_checks))

/datum/element/gravedigger/Detach(datum/source, ...)
. = ..()
UnregisterSignal(source, COMSIG_ITEM_INTERACTING_WITH_ATOM_SECONDARY)

/datum/element/gravedigger/proc/dig_checks(datum/source, mob/living/user, atom/interacting_with, list/modifiers)
SIGNAL_HANDLER

if(!is_type_in_typecache(interacting_with, turfs_to_consider))
return NONE

if(locate(/obj/structure/closet/crate/grave) in interacting_with)
user.balloon_alert(user, "grave already present!")
return ITEM_INTERACT_BLOCKING

user.balloon_alert(user, "digging grave...")
playsound(interacting_with, 'sound/effects/shovel_dig.ogg', 50, TRUE)
INVOKE_ASYNC(src, PROC_REF(perform_digging), user, interacting_with, source)
return ITEM_INTERACT_BLOCKING

/datum/element/gravedigger/proc/perform_digging(mob/user, atom/dig_area, obj/item/our_tool)
if(our_tool.use_tool(dig_area, user, 10 SECONDS))
new /obj/structure/closet/crate/grave/fresh(dig_area) //We don't get_turf for the location since this is guaranteed to be a turf at this point.
10 changes: 10 additions & 0 deletions code/game/area/areas/mining.dm
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,13 @@
/area/icemoon/underground/explored // ruins can't spawn here
name = "Icemoon Underground"
area_flags = UNIQUE_AREA

/area/icemoon/underground/explored/graveyard
name = "Graveyard"
area_flags = UNIQUE_AREA
ambience_index = AMBIENCE_SPOOKY
icon = 'icons/area/areas_station.dmi'
icon_state = "graveyard"

/area/icemoon/underground/explored/graveyard/chapel
name = "Chapel Graveyard"
3 changes: 0 additions & 3 deletions code/game/turfs/open/asteroid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@
if(has_floor_variance && prob(floor_variance))
icon_state = "[base_icon_state][rand(0,12)]"

/turf/open/misc/asteroid/burn_tile()
return

/turf/open/misc/asteroid/MakeSlippery(wet_setting, min_wet_time, wet_time_to_add, max_wet_time, permanent)
return

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,14 @@
if(user.loc == src)
to_chat(user, span_warning("You fail to dig yourself out of [src]!"))

/obj/structure/closet/crate/grave/fresh
name = "makeshift grave"
desc = "A hastily-dug grave. This is definitely not six feet deep, but it'll hold a body."
icon = 'icons/obj/storage/crates.dmi'
icon_state = "grave_fresh"
base_icon_state = "grave_fresh"
material_drop_amount = 0

/obj/structure/closet/crate/grave/filled/lead_researcher
name = "ominous burial mound"
desc = "Even in a place filled to the brim with graves, this one shows a level of preperation and planning that fills you with dread."
Expand Down
2 changes: 2 additions & 0 deletions code/modules/mining/equipment/mining_tools.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
effectiveness = 40, \
)
//it's sharp, so it works, but barely.
AddElement(/datum/element/gravedigger)

/obj/item/shovel/suicide_act(mob/living/user)
user.visible_message(span_suicide("[user] begins digging their own grave! It looks like [user.p_theyre()] trying to commit suicide!"))
Expand Down Expand Up @@ -223,6 +224,7 @@
/obj/item/trench_tool/Initialize(mapload)
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddElement(/datum/element/gravedigger)

/obj/item/trench_tool/examine(mob/user)
. = ..()
Expand Down
Binary file modified icons/area/areas_station.dmi
Binary file not shown.
Binary file modified icons/obj/storage/crates.dmi
Binary file not shown.
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,7 @@
#include "code\datums\elements\frozen.dm"
#include "code\datums\elements\gags_recolorable.dm"
#include "code\datums\elements\give_turf_traits.dm"
#include "code\datums\elements\gravedigger.dm"
#include "code\datums\elements\hat_wearer.dm"
#include "code\datums\elements\haunted.dm"
#include "code\datums\elements\high_fiver.dm"
Expand Down

0 comments on commit fa252a6

Please sign in to comment.