Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To Whom It May Concern - Bullet Writing #3552

Merged
merged 2 commits into from
Oct 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion code/modules/projectiles/ammunition/_ammo_casing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,20 @@
var/stack_size = 12

/obj/item/ammo_casing/attackby(obj/item/attacking_item, mob/user, params)
if(istype(attacking_item, /obj/item/ammo_box) && user.is_holding(src))
if(istype(attacking_item, /obj/item/pen))
if(!user.is_literate())
to_chat(user, "<span class='notice'>You scribble illegibly on the [src]!</span>")
return
var/inputvalue = stripped_input(user, "What would you like to label the round?", "Bullet Labelling", "", MAX_NAME_LEN)

if(!inputvalue)
return

if(user.canUseTopic(src, BE_CLOSE))
name = "[initial(src.name)][(inputvalue ? " - '[inputvalue]'" : null)]"
if(BB)
BB.name = "[initial(BB.name)][(inputvalue ? " - '[inputvalue]'" : null)]"
else if(istype(attacking_item, /obj/item/ammo_box) && user.is_holding(src))
add_fingerprint(user)
var/obj/item/ammo_box/ammo_box = attacking_item
var/obj/item/ammo_casing/other_casing = ammo_box.get_round(TRUE)
Expand Down Expand Up @@ -90,6 +103,10 @@

return ..()

/obj/item/ammo_casing/examine(mob/user)
. = ..()
span_notice("You could write a message on \the [src] by writing on it with a pen.")

/obj/item/ammo_casing/proc/try_stacking(obj/item/ammo_casing/other_casing, mob/living/user)
if(user)
add_fingerprint(user)
Expand Down
Loading