mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-07-11 08:14:26 +01:00
Tidies spans in coffin.dm, qdels graves if they are empty.
This commit is contained in:
@@ -27,15 +27,18 @@
|
||||
|
||||
/obj/structure/closet/grave/attack_hand(mob/user as mob)
|
||||
if(opened)
|
||||
visible_message("<span class='notice'>[user] starts to climb into \the [src.name].</span>", \
|
||||
"<span class='notice'>You start to lower yourself into \the [src.name].</span>")
|
||||
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("<span class='notice'>[user] climbs into \the [src.name].</span>", \
|
||||
"<span class='notice'>You climb into \the [src.name].</span>")
|
||||
visible_message(
|
||||
SPAN_NOTICE("\The [user] climbs into \the [src]."),
|
||||
SPAN_NOTICE("You climb into \the [src]."))
|
||||
else
|
||||
visible_message("<span class='notice'>[user] decides not to climb into \the [src.name].</span>", \
|
||||
"<span class='notice'>You stop climbing into \the [src.name].</span>")
|
||||
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, "<span class='warning'>You stop at the edge of \the [src.name].</span>")
|
||||
to_chat(H, SPAN_WARNING("You stop at the edge of \the [src]."))
|
||||
return FALSE
|
||||
else
|
||||
to_chat(H, "<span class='warning'>You fall into \the [src.name]!</span>")
|
||||
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, "<span class='warning'>You stop at the edge of \the [src.name].</span>")
|
||||
to_chat(R, SPAN_WARNING("You stop at the edge of \the [src]."))
|
||||
return FALSE
|
||||
else
|
||||
to_chat(R, "<span class='warning'>You enter \the [src.name].</span>")
|
||||
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("<span class='notice'>[user] piles dirt into \the [src.name].</span>", \
|
||||
"<span class='notice'>You start to pile dirt into \the [src.name].</span>", \
|
||||
"<span class='notice'>You hear dirt being moved.</span>")
|
||||
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("<span class='notice'>[user] pats down the dirt on top of \the [src.name].</span>", \
|
||||
"<span class='notice'>You finish filling in \the [src.name].</span>")
|
||||
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("<span class='notice'>[user] stops filling in \the [src.name].</span>", \
|
||||
"<span class='notice'>You change your mind and stop filling in \the [src.name].</span>")
|
||||
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("<span class='notice'>[user] empties \the [LB] into \the [src].</span>", \
|
||||
"<span class='notice'>You empty \the [LB] into \the [src].</span>", \
|
||||
"<span class='notice'>You hear rustling of clothes.</span>")
|
||||
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("<span class='notice'>[user] begins to smoothe out the dirt of \the [src.name].</span>", \
|
||||
"<span class='notice'>You start to smoothe out the dirt of \the [src.name].</span>", \
|
||||
"<span class='notice'>You hear dirt being moved.</span>")
|
||||
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("<span class='notice'>[user] finishes smoothing out \the [src.name].</span>", \
|
||||
"<span class='notice'>You finish smoothing out \the [src.name].</span>")
|
||||
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("<span class='notice'>[user] stops concealing \the [src.name].</span>", \
|
||||
"<span class='notice'>You stop concealing \the [src.name].</span>")
|
||||
user.visible_message(
|
||||
SPAN_NOTICE("\The [user] stops concealing \the [src]."),
|
||||
SPAN_NOTICE("You stop concealing \the [src]."))
|
||||
return
|
||||
else
|
||||
user.visible_message("<span class='notice'>[user] begins to unearth \the [src.name].</span>", \
|
||||
"<span class='notice'>You start to unearth \the [src.name].</span>", \
|
||||
"<span class='notice'>You hear dirt being moved.</span>")
|
||||
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("<span class='notice'>[user] reaches the bottom of \the [src.name].</span>", \
|
||||
"<span class='notice'>You finish digging out \the [src.name].</span>")
|
||||
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("<span class='notice'>[user] stops digging out \the [src.name].</span>", \
|
||||
"<span class='notice'>You stop digging out \the [src.name].</span>")
|
||||
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()
|
||||
.=..()
|
||||
|
||||
Reference in New Issue
Block a user