diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm
index ef429d58c9..b0f5ae69db 100644
--- a/code/game/objects/structures/crates_lockers/closets/coffin.dm
+++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm
@@ -27,15 +27,18 @@
/obj/structure/closet/grave/attack_hand(mob/user as mob)
if(opened)
- visible_message("[user] starts to climb into \the [src.name].", \
- "You start to lower yourself into \the [src.name].")
+ visible_message(
+ SPAN_NOTICE("\The [user] starts to climb into \the [src]."),
+ SPAN_NOTICE("You start to lower yourself into \the [src]."))
if(do_after(user, 50))
user.forceMove(src.loc)
- visible_message("[user] climbs into \the [src.name].", \
- "You climb into \the [src.name].")
+ visible_message(
+ SPAN_NOTICE("\The [user] climbs into \the [src]."),
+ SPAN_NOTICE("You climb into \the [src]."))
else
- visible_message("[user] decides not to climb into \the [src.name].", \
- "You stop climbing into \the [src.name].")
+ visible_message(
+ SPAN_NOTICE("[user] decides not to climb into \the [src]."),
+ SPAN_NOTICE("You stop climbing into \the [src]."))
return
/obj/structure/closet/grave/CanPass(atom/movable/mover, turf/target)
@@ -45,19 +48,19 @@
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(IS_WALKING(H))
- to_chat(H, "You stop at the edge of \the [src.name].")
+ to_chat(H, SPAN_WARNING("You stop at the edge of \the [src]."))
return FALSE
else
- to_chat(H, "You fall into \the [src.name]!")
+ to_chat(H, SPAN_DANGER("You fall into \the [src]!"))
fall_in(H)
return TRUE
if(isrobot(M))
var/mob/living/silicon/robot/R = M
if(R.a_intent == I_HELP)
- to_chat(R, "You stop at the edge of \the [src.name].")
+ to_chat(R, SPAN_WARNING("You stop at the edge of \the [src]."))
return FALSE
else
- to_chat(R, "You enter \the [src.name].")
+ to_chat(R, SPAN_DANGER("You enter \the [src]."))
return TRUE
return TRUE //Everything else can move over the graves
@@ -71,17 +74,20 @@
/obj/structure/closet/grave/attackby(obj/item/W as obj, mob/user as mob)
if(src.opened)
if(istype(W, /obj/item/shovel))
- user.visible_message("[user] piles dirt into \the [src.name].", \
- "You start to pile dirt into \the [src.name].", \
- "You hear dirt being moved.")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] piles dirt into \the [src]."),
+ SPAN_NOTICE("You start to pile dirt into \the [src]."),
+ SPAN_NOTICE("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
- user.visible_message("[user] pats down the dirt on top of \the [src.name].", \
- "You finish filling in \the [src.name].")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] pats down the dirt on top of \the [src]."),
+ SPAN_NOTICE("You finish filling in \the [src]."))
close()
return
else
- user.visible_message("[user] stops filling in \the [src.name].", \
- "You change your mind and stop filling in \the [src.name].")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] stops filling in \the [src]."),
+ SPAN_NOTICE("You change your mind and stop filling in \the [src]."))
return
if(istype(W, /obj/item/grab))
var/obj/item/grab/G = W
@@ -94,9 +100,10 @@
var/turf/T = get_turf(src)
for(var/obj/item/I in LB.contents)
LB.remove_from_storage(I, T)
- user.visible_message("[user] empties \the [LB] into \the [src].", \
- "You empty \the [LB] into \the [src].", \
- "You hear rustling of clothes.")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] empties \the [LB] into \the [src]."),
+ SPAN_NOTICE("You empty \the [LB] into \the [src]."),
+ SPAN_NOTICE("You hear rustling of clothes."))
return
if(isrobot(user))
return
@@ -108,40 +115,49 @@
else
if(istype(W, /obj/item/shovel))
if(user.a_intent == I_HURT) // Hurt intent means you're trying to kill someone, or just get rid of the grave
- user.visible_message("[user] begins to smoothe out the dirt of \the [src.name].", \
- "You start to smoothe out the dirt of \the [src.name].", \
- "You hear dirt being moved.")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] begins to smoothe out the dirt of \the [src]."),
+ SPAN_NOTICE("You start to smoothe out the dirt of \the [src]."),
+ SPAN_NOTICE("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
- user.visible_message("[user] finishes smoothing out \the [src.name].", \
- "You finish smoothing out \the [src.name].")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] finishes smoothing out \the [src]."),
+ SPAN_NOTICE("You finish smoothing out \the [src]."))
if(LAZYLEN(contents))
alpha = 40 // If we've got stuff inside, like maybe a person, just make it hard to see us
else
qdel(src) // Else, go away
return
else
- user.visible_message("[user] stops concealing \the [src.name].", \
- "You stop concealing \the [src.name].")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] stops concealing \the [src]."),
+ SPAN_NOTICE("You stop concealing \the [src]."))
return
else
- user.visible_message("[user] begins to unearth \the [src.name].", \
- "You start to unearth \the [src.name].", \
- "You hear dirt being moved.")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] begins to unearth \the [src]."),
+ SPAN_NOTICE("You start to unearth \the [src]."),
+ SPAN_NOTICE("You hear dirt being moved."))
if(do_after(user, 40 * W.toolspeed))
- user.visible_message("[user] reaches the bottom of \the [src.name].", \
- "You finish digging out \the [src.name].")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] reaches the bottom of \the [src]."),
+ SPAN_NOTICE("You finish digging out \the [src]."))
break_open()
return
else
- user.visible_message("[user] stops digging out \the [src.name].", \
- "You stop digging out \the [src.name].")
+ user.visible_message(
+ SPAN_NOTICE("\The [user] stops digging out \the [src]."),
+ SPAN_NOTICE("You stop digging out \the [src]."))
return
return
/obj/structure/closet/grave/close()
..()
if(!opened)
- sealed = TRUE
+ if(length(contents))
+ sealed = TRUE
+ else
+ qdel(src)
/obj/structure/closet/grave/open()
.=..()
diff --git a/code/game/turfs/simulated/outdoors/outdoors.dm b/code/game/turfs/simulated/outdoors/outdoors.dm
index 06dbf9bd7c..d7f7ce5707 100644
--- a/code/game/turfs/simulated/outdoors/outdoors.dm
+++ b/code/game/turfs/simulated/outdoors/outdoors.dm
@@ -27,6 +27,11 @@ var/global/list/turf_edge_cache = list()
var/can_dig = FALSE
var/loot_count
+/turf/simulated/floor/outdoors/examine(var/mob/user)
+ . = ..()
+ if(!has_snow())
+ . += "A shovel could be used on help intent to dig up worms or rocks, harm intent to dig a grave, or any other intent to dig a plot for planting."
+
/turf/simulated/floor/outdoors/proc/get_loot_type()
if(loot_count)
return pickweight(list(
diff --git a/code/game/turfs/simulated/outdoors/outdoors_attackby.dm b/code/game/turfs/simulated/outdoors/outdoors_attackby.dm
index a6c55ff99e..91901c3119 100644
--- a/code/game/turfs/simulated/outdoors/outdoors_attackby.dm
+++ b/code/game/turfs/simulated/outdoors/outdoors_attackby.dm
@@ -27,24 +27,45 @@
. = ..()
/turf/simulated/floor/outdoors/attackby(obj/item/C, mob/user)
+
if (has_snow())
return ..()
+
if(can_dig && istype(C, /obj/item/shovel))
to_chat(user, SPAN_NOTICE("\The [user] begins digging into \the [src] with \the [C]."))
var/delay = (3 SECONDS * C.toolspeed)
user.setClickCooldown(delay)
- if(do_after(user, delay, src))
- if(!(locate(/obj/machinery/portable_atmospherics/hydroponics/soil) in contents))
- var/obj/machinery/portable_atmospherics/hydroponics/soil/soil = new(src)
- user.visible_message(SPAN_NOTICE("\The [user] digs \a [soil] into \the [src]."))
+ if(!do_after(user, delay, src))
+ return TRUE
+
+ var/dig_loot = user.a_intent == I_HELP
+ if(!dig_loot)
+ var/static/list/check_types = list(
+ /obj/machinery/portable_atmospherics/hydroponics/soil,
+ /obj/structure/animal_den,
+ /obj/structure/closet/grave
+ )
+ for(var/check_type in check_types)
+ if(locate(check_type) in contents)
+ dig_loot = TRUE
+ break
+ if(dig_loot)
+ var/loot_type = get_loot_type()
+ if(loot_type)
+ loot_count--
+ var/obj/item/loot = new loot_type(src)
+ to_chat(user, SPAN_NOTICE("You dug up \a [loot]!"))
else
- var/loot_type = get_loot_type()
- if(loot_type)
- loot_count--
- var/obj/item/loot = new loot_type(src)
- to_chat(user, SPAN_NOTICE("You dug up \a [loot]!"))
+ to_chat(user, SPAN_NOTICE("You didn't find anything of note in \the [src]."))
+ else
+ var/soil
+ switch(user.a_intent)
+ if(I_HURT)
+ soil = new /obj/structure/closet/grave(src)
else
- to_chat(user, SPAN_NOTICE("You didn't find anything of note in \the [src]."))
+ soil = new /obj/machinery/portable_atmospherics/hydroponics/soil(src)
+ if(soil)
+ user.visible_message(SPAN_NOTICE("\The [user] digs \a [soil] into \the [src]."))
return TRUE
if(istype(C, /obj/item/stack/tile/floor))