Skip to content

Commit

Permalink
to whom it may concern
Browse files Browse the repository at this point in the history
  • Loading branch information
Gristlebee committed Oct 13, 2024
1 parent dba005e commit f90f1f6
Showing 1 changed file with 18 additions and 1 deletion.
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 add 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

0 comments on commit f90f1f6

Please sign in to comment.