Skip to content

Commit

Permalink
To Whom It May Concern - Bullet Writing (#3552)
Browse files Browse the repository at this point in the history
<!-- Write **BELOW** The Headers and **ABOVE** The comments else it may
not be viewable. -->
<!-- You can view Contributing.MD for a detailed description of the pull
request process. -->

## About The Pull Request

<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

You can now write on bullets with a pen to give your ~~victim~~
recipient a lovely message when they're hit.


![image](https://github.com/user-attachments/assets/859b62ac-5597-40f2-bc70-59bb6091015e)


## Why It's Good For The Game

<!-- Please add a short description of why you think these changes would
benefit the game. If you can't justify it in words, it might not be
worth adding. -->

Adds a little personalization to your death dealing, and I think it'd be
funny.
## Changelog

:cl:
add: Bullets can have a message written on them.
/:cl:

<!-- Both :cl:'s are required for the changelog to work! You can put
your name to the right of the first :cl: if you want to overwrite your
GitHub username as author ingame. -->
<!-- You can use multiple of the same prefix (they're only used for the
icon ingame) and delete the unneeded ones. Despite some of the tags,
changelogs should generally represent how a player might be affected by
the changes rather than a summary of the PR's contents. -->
  • Loading branch information
Gristlebee authored Oct 18, 2024
1 parent 4b47a6c commit 744c61a
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 @@ -51,7 +51,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 @@ -92,6 +105,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

0 comments on commit 744c61a

Please sign in to comment.