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 0000000000..cb05700393 Binary files /dev/null and b/GainStation13/icons/obj/weapons/gun.dmi differ 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"