Files
VOREStation/code/game/objects/items/weapons/material/gravemarker.dm
T
Cameron Lennox d5849910e5 Begin clickcode attack_self fix (#18797)
* Begin clickcode attack_self fix

Begins the work to make everything call back to parent for attack_self so that signals are sacred.

* Makes MORE things call the attack_self() parent

Yes, I could make special_handling a var on obj/item HOWEVER i want it to be specific so it can be tracked down later and ONLY the objects that use it can be refactored instead of sitting there literally forever and it just becoming 'a thing'.

* Finishes making the rest of attack_self call parent.

As mentioned, things such as 'specialty_goggles' 'special_handling' and the such are only there to help with attack_self until the attack_self is recoded for those items.

* begone foul demon

* some more cleanup

* These

* GOD this was annoying

* yeh

* Fix this

* fLARES

* Thesee too

* toys!

* Even more!

* More fixes

* Even more

* rest of em

* these too

* Update syndie.dm

* hardref clear

* Update code/game/gamemodes/nuclear/pinpointer.dm

* Update code/game/objects/effects/mines.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/blueprints_vr.dm

* Update code/game/objects/items/contraband_vr.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/gunbox_vr.dm

* Update code/game/objects/items/weapons/gift_wrappaper.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/crayons.dm

* Update code/game/objects/items/gunbox.dm

* these too

* Update maintpanel_stack.dm

* angry warning

* Fixes packaged snacks.

Fixes improper var default.

* Special handling for these

* proper poly types

* Fixes magclaws

Makes the 'features' it had just part  of base magboots that can be adjusted via varswap.

* Fixes jackets

Fixes https://github.com/VOREStation/VOREStation/issues/18941

* Small bugfix

Makes p_Theyre properly capitialize
Makes examine show proper wording

* Update gift_wrappaper.dm
2025-12-29 13:21:10 -05:00

82 lines
3.0 KiB
Plaintext

/obj/item/material/gravemarker
name = "grave marker"
desc = "An object used in marking graves."
icon_state = "gravemarker"
w_class = ITEMSIZE_LARGE
fragile = 1
force_divisor = 0.65
thrown_force_divisor = 0.25
var/icon_changes = 1 //Does the sprite change when you put words on it?
var/grave_name = "" //Name of the intended occupant
var/epitaph = "" //A quick little blurb
/obj/item/material/gravemarker/attackby(obj/item/W, mob/user as mob)
if(W.has_tool_quality(TOOL_SCREWDRIVER))
var/carving_1 = sanitizeSafe(tgui_input_text(user, "Who is \the [src.name] for?", "Gravestone Naming", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_1)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
grave_name += carving_1
update_icon()
var/carving_2 = sanitizeSafe(tgui_input_text(user, "What message should \the [src.name] have?", "Epitaph Carving", null, MAX_NAME_LEN, encode = FALSE), MAX_NAME_LEN)
if(carving_2)
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed, target = src))
user.visible_message("[user] carves something into \the [src.name].", "You carve your message into \the [src.name].")
epitaph += carving_2
update_icon()
if(W.has_tool_quality(TOOL_WRENCH))
user.visible_message("[user] starts carving \the [src.name].", "You start carving \the [src.name].")
if(do_after(user, material.hardness * W.toolspeed, target = src))
material.place_dismantled_product(get_turf(src))
user.visible_message("[user] dismantles down \the [src.name].", "You dismantle \the [src.name].")
qdel(src)
..()
/obj/item/material/gravemarker/examine(mob/user)
. = ..()
if(grave_name && get_dist(src, user) < 4)
. += "Here Lies [grave_name]"
if(epitaph && get_dist(src, user) < 2)
. += epitaph
/obj/item/material/gravemarker/update_icon()
if(icon_changes)
if(grave_name && epitaph)
icon_state = "[initial(icon_state)]_3"
else if(grave_name)
icon_state = "[initial(icon_state)]_1"
else if(epitaph)
icon_state = "[initial(icon_state)]_2"
else
icon_state = initial(icon_state)
..()
/obj/item/material/gravemarker/attack_self(mob/user)
. = ..(user)
if(.)
return TRUE
src.add_fingerprint(user)
if(!isturf(user.loc))
return 0
if(locate(/obj/structure/gravemarker, user.loc))
to_chat(user, span_warning("There's already something there."))
return 0
else
to_chat(user, span_notice("You begin to place \the [src.name]."))
if(!do_after(user, 1 SECOND, target = src))
return 0
var/obj/structure/gravemarker/G = new /obj/structure/gravemarker/(user.loc, src.get_material())
to_chat(user, span_notice("You place \the [src.name]."))
G.grave_name = grave_name
G.epitaph = epitaph
G.add_fingerprint(user)
G.dir = user.dir
QDEL_NULL(src)
return