Skip to content

Commit

Permalink
One Shot RPG (shiptest-ss13#3433)
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
Adds a one-shot rocket launcher to the code. Adjusts the code in some
places to support it being truly one shot. Also adds being able to draw
on rocket launchers for mild entertainment.
Rye did the sprite.
<!-- Describe The Pull Request. Please be sure every change is
documented or this can delay review and even discourage maintainers from
merging your PR! -->

## Why It's Good For The Game
A disposable anti-armor tool is good for people who are poor and or
frontiersmen.
<!-- 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. -->

## Changelog
Rye, Erika 
:cl:
add: One-Shot Rocket Launcher. A quick solution to an armored problem. 
add: You can now scribble profane things onto the tube of your rocket
launcher. Use this power wisely.
imageadd: Rye: A sprite for a one-shot rocket launcher
/: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
Erikafox authored and MrCat15352 committed Dec 24, 2024
1 parent 2c00539 commit e0749e6
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion code/modules/projectiles/guns/ballistic/launchers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GLOBAL_LIST_INIT(rpg_scrawlings, list(

/obj/item/gun/ballistic/rocketlauncher
name = "\improper PML-9"
desc = "A reusable rocket-propelled grenade launcher. The words \"NT this way\" and an arrow have been written near the barrel."
desc = "A reusable rocket-propelled grenade launcher."

icon_state = "rocketlauncher"
item_state = "rocketlauncher"
Expand All @@ -81,9 +81,28 @@ GLOBAL_LIST_INIT(rpg_scrawlings, list(

manufacturer = MANUFACTURER_SCARBOROUGH

attack_verb = list("bludgeoned", "hit", "slammed", "whacked")

valid_attachments = list()
slot_available = list()

var/rpg_scribble = null

/obj/item/gun/ballistic/rocketlauncher/Initialize()
. = ..()
rpg_scribble = pick(GLOB.rpg_scrawlings)
desc += " [rpg_scribble] is scrawled on the tube"

/obj/item/gun/ballistic/rocketlauncher/attackby(obj/item/A, mob/user, params)
. = ..()
if(istype(A, /obj/item/pen))
rpg_scribble = stripped_input(user, "What are you putting on [src]?", "Rocket Launcher Doodle")
if(!rpg_scribble || !length(rpg_scribble))
desc = "[src::desc]"
return
desc = "[src::desc] [rpg_scribble] is scribbled on the body."


/obj/item/gun/ballistic/rocketlauncher/afterattack()
. = ..()
magazine.get_round(FALSE) //Hack to clear the mag after it's fired
Expand Down

0 comments on commit e0749e6

Please sign in to comment.