From df8e7afa9ed21d3ba4c4fed80693362209e4137b Mon Sep 17 00:00:00 2001 From: Alberyk Date: Fri, 30 Nov 2018 07:02:31 -0200 Subject: [PATCH] Allows bayonet removal (#5658) You can now remove bayonets by using a crowbar on the gun. Suggested by ths thread: https://forums.aurorastation.org/topic/10603-detatch-bayonets/ --- code/modules/projectiles/gun.dm | 6 ++++++ html/changelogs/alberyk-bayonet.yml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 html/changelogs/alberyk-bayonet.yml diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index b6775f91684..926ddfb16cb 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -713,6 +713,12 @@ obj/item/weapon/gun/Destroy() to_chat(user, "You attach \the [I] to the front of \the [src].") update_icon() + if(iscrowbar(I) && bayonet) + to_chat(user, "You detach \the [bayonet] from \the [src].") + bayonet.forceMove(get_turf(src)) + bayonet = null + update_icon() + if(!pin) return ..() diff --git a/html/changelogs/alberyk-bayonet.yml b/html/changelogs/alberyk-bayonet.yml new file mode 100644 index 00000000000..c1be80431e0 --- /dev/null +++ b/html/changelogs/alberyk-bayonet.yml @@ -0,0 +1,6 @@ +author: Alberyk + +delete-after: True + +changes: + - rscadd: "You can now remove bayonets from guns using crowbars."