From 31544e0b9f6674116d7aa27fa26f16f12d88851b Mon Sep 17 00:00:00 2001 From: Metis <100518708+sheepishgoat@users.noreply.github.com> Date: Fri, 31 Jan 2025 03:29:53 -0500 Subject: [PATCH] liberator --- .../crafting/recipes/recipes_misc_gs.dm | 13 ++++ GainStation13/code/modules/weapons/pistols.dm | 63 ++++++++++++++++++ GainStation13/icons/obj/weapons/gun.dmi | Bin 0 -> 1219 bytes tgstation.dme | 1 + 4 files changed, 77 insertions(+) create mode 100644 GainStation13/code/modules/weapons/pistols.dm create mode 100644 GainStation13/icons/obj/weapons/gun.dmi diff --git a/GainStation13/code/datums/components/crafting/recipes/recipes_misc_gs.dm b/GainStation13/code/datums/components/crafting/recipes/recipes_misc_gs.dm index 453c2d733d..adf6ae4e2a 100644 --- a/GainStation13/code/datums/components/crafting/recipes/recipes_misc_gs.dm +++ b/GainStation13/code/datums/components/crafting/recipes/recipes_misc_gs.dm @@ -16,3 +16,16 @@ tools = list(TOOL_WELDER, TOOL_WRENCH, TOOL_SCREWDRIVER) subcategory = CAT_MISCELLANEOUS category = CAT_MISCELLANEOUS + +/datum/crafting_recipe/liberator // It's easy to craft, but it's not a good gun. + name = "Liberator Pistol" + reqs = list( + /obj/item/stack/sheet/metal = 3, + /obj/item/weaponcrafting/receiver = 1, + /obj/item/ammo_casing/c10mm = 1, + ) + + result = /obj/item/gun/ballistic/liberator + tools = list(TOOL_WELDER, TOOL_SCREWDRIVER) + category = CAT_WEAPONRY + subcategory = CAT_WEAPON diff --git a/GainStation13/code/modules/weapons/pistols.dm b/GainStation13/code/modules/weapons/pistols.dm new file mode 100644 index 0000000000..1cf2d29c1d --- /dev/null +++ b/GainStation13/code/modules/weapons/pistols.dm @@ -0,0 +1,63 @@ +/obj/item/gun/ballistic/liberator + name = "liberator pistol" + desc = "Hey, it's better than no gun, right?" + icon = 'GainStation13/icons/obj/weapons/gun.dmi' + icon_state = "liberator" + w_class = WEIGHT_CLASS_SMALL // It's not really much of a gun... + mag_type = /obj/item/ammo_box/magazine/m10mm/ramrod + can_suppress = FALSE + /// How many bullets are currently stashed in the gun + var/list/stashed_bullets = list() + /// What is the max amount of bullets we can stash in this baby? + var/max_bullets = 5 + +/obj/item/gun/ballistic/liberator/examine(mob/user) + . = ..() + . += span_notice("Inside of the weapon there is a storage container, containing [length(stashed_bullets)] 10mm bullets.") + . += span_notice("Bullets can be removed from the internal storage using Alt+Click.") + +/obj/item/gun/ballistic/liberator/attackby(obj/item/A, mob/user, params) + if(!istype(A, /obj/item/ammo_casing/c10mm)) + return ..() + + if(length(stashed_bullets) >= max_bullets) + to_chat(user, span_notice("The storage container in the gun is already full.")) + return + + + if(!A.forceMove(src)) + return + + stashed_bullets += A + to_chat(user, span_notice("You slip the [A] inside of the storage chamber.")) + + return + +/obj/item/gun/ballistic/liberator/AltClick(mob/user) + if(!length(stashed_bullets)) + to_chat(user, span_notice("The storage container in the gun is already empty.")) + return + + var/obj/item/removed_bullet = stashed_bullets[1] + + if(!user.put_in_hands(removed_bullet)) + return + + stashed_bullets.Remove(removed_bullet) + to_chat(user, span_notice("You remove the [removed_bullet] from [src]")) + +/obj/item/gun/ballistic/liberator/can_shoot() + if(!chambered) + return FALSE + return TRUE + + +/obj/item/ammo_box/magazine/m10mm/ramrod // baaaaaaa + name = "ram rod" + desc = "Allows for bullets to be pushed into guns." + icon = 'GainStation13/icons/obj/weapons/gun.dmi' + icon_state = "ram_rod" + max_ammo = 1 + multiple_sprites = 1 + + diff --git a/GainStation13/icons/obj/weapons/gun.dmi b/GainStation13/icons/obj/weapons/gun.dmi new file mode 100644 index 0000000000000000000000000000000000000000..cb057003939b193c3b268c8c9c6218a1d6c890f2 GIT binary patch literal 1219 zcmV;!1U&nRP)V=-0C=2JR&a84_w-Y6@%7{?OD!tS%+FJ>RWQ*r;NmRLOex7wuvIWN;^NFm z%}mcIfpCgT5=&AQY!#GpGLuq^5=-)nl(;xkGK-28Y!wW-IMa#}b5kK~xXPl$-1wsW z6kP+NRT|<_sjT4Y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P-7WDEr1%!0BQl$ hSO!oFpyt>c@DGmzbkr2@CGG$K002ovPDHLkV1m+mN~!<= literal 0 HcmV?d00001 diff --git a/tgstation.dme b/tgstation.dme index 35cccafc22..29bb463a9b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4084,6 +4084,7 @@ #include "GainStation13\code\modules\vending\mealdor.dm" #include "GainStation13\code\modules\vore\fatten_vore.dm" #include "GainStation13\code\modules\weapons\grenades.dm" +#include "GainStation13\code\modules\weapons\pistols.dm" #include "GainStation13\code\obj\items\bluespace_belt.dm" #include "GainStation13\code\obj\items\circuits.dm" #include "GainStation13\code\obj\items\floor_tiles.dm"