Skip to content

Commit

Permalink
Death is Our Destination (New funeral rite) (#8346)
Browse files Browse the repository at this point in the history
* Fix BioReactor Respawn Reward

The Biomatter Reactor was intended to give a 15 minute bonus to the respawn timer, but never worked. I fixed this.

* Funeral Rites

Added new coffin, the Pauper's coffin. Fits two Iriskas worth of bodies.
Added lazy fire overlay because I am no artist.
Added Funeral Pyre functionality to coffins.
Tweaked how coffins are opened/closed, using tools so they're not just weird closets.

* Update coffin.dm

* Update code/game/objects/structures/crates_lockers/closets/coffin.dm

Co-authored-by: SirRichardFrancis <[email protected]>

* Update code/game/objects/structures/crates_lockers/closets/coffin.dm

Co-authored-by: SirRichardFrancis <[email protected]>

* Update code/game/objects/structures/crates_lockers/closets/coffin.dm

Co-authored-by: SirRichardFrancis <[email protected]>

* Update code/game/objects/structures/crates_lockers/closets/coffin.dm

Co-authored-by: SirRichardFrancis <[email protected]>

* crafting recipe

Added to recipe list.

* Revert "Fix BioReactor Respawn Reward"

This reverts commit 27daf85.

* Door, Body Only, Remade Proc

Added open door sprite
Tweaked coffins to only fit mobs
Turned Pyre proc into two to accomodate proper timer

* Update coffin.dm

spelling mistakes yay

* Update coffin.dm

I am tired.

* Extinguishable Quickfix

Coffin is extinguished when opened. Can be opened by occupant on walking, or via tools as normal.

Also closed casket is possible, as the coffin will close during pyre proc.

* Update code/datums/craft/recipes/furniture.dm

Co-authored-by: Firefox13 <[email protected]>

* Update code/game/objects/structures/crates_lockers/closets/coffin.dm

Co-authored-by: Firefox13 <[email protected]>

* Increased Tool Time Requirement

* Update coffin.dm

* Fire.gif updated

* Update coffin.dm

* Update code/datums/craft/recipes/furniture.dm

Co-authored-by: Firefox13 <[email protected]>

* Update code/game/objects/structures/crates_lockers/closets/coffin.dm

---------

Co-authored-by: SirRichardFrancis <[email protected]>
Co-authored-by: Firefox13 <[email protected]>
Co-authored-by: hyperioo <[email protected]>
  • Loading branch information
4 people authored Nov 10, 2023
1 parent e257bff commit 77f895e
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 1 deletion.
7 changes: 7 additions & 0 deletions code/datums/craft/recipes/furniture.dm
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@
list(CRAFT_MATERIAL, 10, MATERIAL_WOOD),
)

/datum/craft_recipe/furniture/pauper
name = "pauper's coffin"
result = /obj/structure/closet/coffin/pauper
steps = list(
list(CRAFT_MATERIAL, 30, MATERIAL_WOOD)
)

/datum/craft_recipe/furniture/bed
name = "bed"
result = /obj/structure/bed
Expand Down
110 changes: 109 additions & 1 deletion code/game/objects/structures/crates_lockers/closets/coffin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,38 @@
spawn_frequency = 10
spawn_tags = SPAWN_TAG_CLOSET_COFFIN
bad_type = /obj/structure/closet/coffin
store_items = FALSE
store_misc = FALSE //It's a coffin, not a storage bin
var/mob/living/occupant = null
var/on_fire = FALSE
var/burning = null

/obj/structure/closet/coffin/pauper
name = "pauper's coffin"
desc = "A burial receptacle for the dearly departed. Perfect for the entire family."
icon_state = "coffin_wide"
matter = list(MATERIAL_WOOD = 30)
storage_capacity = 2 * MOB_HUGE //*slaps coffin* This bad boy fits two whole Iriskas

/obj/structure/closet/coffin/close(mob/living/user)
..()
if(on_fire)
add_overlay("coffin_pyre") //Otherwise the flame visual goes away from the icon changing
for (var/mob/living/L in contents)
//When the coffin is closed we check for mobs in it.
if (L.mind && L.mind.key)
//We won't check if the mob is dead yet, maybe being spaced in a coffin is an execution method
occupant = L
break

/obj/structure/closet/coffin/open()
..()
occupant = null
if(on_fire)
on_fire = FALSE
deltimer(burning)
visible_message(SPAN_NOTICE("Opening the coffin has disrupted the fire!"))

//The coffin processes when there's a mob inside
/obj/structure/closet/coffin/lost_in_space()
//The coffin has left the ship. Burial at space
Expand All @@ -36,6 +57,20 @@

return TRUE

/obj/structure/closet/coffin/proc/pyre()
if(opened)
close() //If someone wanted an open casket funeral, we still need the casket to close to determine occupant
if(occupant && occupant.is_dead())
var/mob/N = key2mob(occupant.mind.key)
to_chat(N, SPAN_NOTICE("Your remains have been reduced to ash. Your crew respawn time has been reduced by [round(COFFIN_RESPAWN_BONUS/(1 MINUTE))] minutes."))
N << 'sound/effects/magic/blind.ogg'
N.set_respawn_bonus("CORPSE_HANDLING", COFFIN_RESPAWN_BONUS)
new /obj/effect/decal/cleanable/ash(loc)
qdel(occupant)
qdel(src)

return

/obj/structure/closet/coffin/Destroy()
occupant = null
return ..()
Expand All @@ -51,4 +86,77 @@
var/atom/A = pick(/obj/landmark/corpse/chef, /obj/landmark/corpse/doctor, /obj/landmark/corpse/engineer, /obj/landmark/corpse/engineer/rig, /obj/landmark/corpse/clown, \
/obj/landmark/corpse/scientist, /obj/landmark/corpse/miner, /obj/landmark/corpse/miner/rig, /obj/landmark/corpse/bridgeofficer, /obj/landmark/corpse/commander, \
/obj/landmark/corpse/russian)
new A
new A

/obj/structure/closet/coffin/attack_hand(mob/user)
add_fingerprint(user)
if(opened)
to_chat(user, SPAN_NOTICE("You can't fit the cover back on without hammering it into place!"))
else
to_chat(user, SPAN_NOTICE("The cover is too heavy to lift without a prying tool!"))

/obj/structure/closet/coffin/proc/burn()
add_overlay("coffin_pyre")
on_fire = TRUE
burning = addtimer(CALLBACK(src, PROC_REF(pyre), src), 60 SECONDS, TIMER_STOPPABLE) //TODO: Add TIMER_STOPPABLE to being extinguished, which involves giving reagents touch effects to structures, which they currently don't affect

/obj/structure/closet/coffin/attackby(obj/item/I, mob/user)
if(!on_fire && isflamesource(I))
user.visible_message(
SPAN_WARNING("[user] has lit the [src] on fire! In a couple minutes, it and its occupant will be ash!"), \
SPAN_WARNING("You've started the pyre, committing a poor soul unto the afterlife."), \
SPAN_WARNING("You smell wood burning.")
)
burn()

var/list/usable_qualities = list()
if(opened)
usable_qualities += QUALITY_SAWING
usable_qualities += QUALITY_PRYING
usable_qualities += QUALITY_HAMMERING
if(!opened)
usable_qualities += QUALITY_PRYING

var/tool_type = I.get_tool_type(user, usable_qualities, src)
switch(tool_type)
if(QUALITY_PRYING)
if(!opened)
if(I.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_EASY, required_stat = STAT_MEC))
user.visible_message(
SPAN_NOTICE("[user] pried open the [src] with \the [I]."), \
SPAN_NOTICE("You pried open the [src]."), \
SPAN_NOTICE("You hear nails being pried from wood.")
)
open()
else
if(I.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_EASY, required_stat = STAT_MEC))
user.visible_message(
SPAN_NOTICE("[user] tore apart the [src] with \the [I]."), \
SPAN_NOTICE("You pried apart the planks of the [src]."), \
SPAN_NOTICE("You hear a something wooden being torn apart.")
)
drop_materials(drop_location())
qdel(src)
return

if(QUALITY_SAWING)
if(opened)
if(I.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_EASY, required_stat = STAT_MEC))
user.visible_message(
SPAN_NOTICE("[user] carved the [src] apart with \the [I]."), \
SPAN_NOTICE("You carved off the planks of the [src]."), \
SPAN_NOTICE("You hear wood being sawn.")
)
drop_materials(drop_location())
qdel(src)
return
if(QUALITY_HAMMERING)
if(opened)
if(I.use_tool(user, src, WORKTIME_NORMAL, tool_type, FAILCHANCE_EASY, required_stat = STAT_MEC))
user.visible_message(
SPAN_NOTICE("[user] diligently hammered the [src] cover in place with \the [I]."), \
SPAN_NOTICE("You hammered the [src] cover on."), \
SPAN_NOTICE("You hear nails being driven into wood.")
)
close()
return
Binary file modified icons/obj/closet.dmi
Binary file not shown.

0 comments on commit 77f895e

Please sign in to comment.