From e0749e6fa097eb7f3f067ac7559d97ac5ac79792 Mon Sep 17 00:00:00 2001 From: Erika Fox <94164348+Bjarl@users.noreply.github.com> Date: Tue, 1 Oct 2024 17:29:27 -0400 Subject: [PATCH] One Shot RPG (#3433) ## 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. ## Why It's Good For The Game A disposable anti-armor tool is good for people who are poor and or frontiersmen. ## 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: --- .../projectiles/guns/ballistic/launchers.dm | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index 0ed069800a1e..2044fae60ee2 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -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" @@ -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