diff --git a/code/game/gamemodes/wizard/rightandwrong.dm b/code/game/gamemodes/wizard/rightandwrong.dm index d8e8301cdd1..111aeaf61fe 100644 --- a/code/game/gamemodes/wizard/rightandwrong.dm +++ b/code/game/gamemodes/wizard/rightandwrong.dm @@ -1,7 +1,7 @@ //In this file: Summon Magic/Summon Guns/Summon Events /proc/rightandwrong(var/summon_type, var/mob/user, var/survivor_probability) //0 = Summon Guns, 1 = Summon Magic - var/list/gunslist = list("taser","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","uzi","crossbow","saw","car") + var/list/gunslist = list("taser","egun","laser","revolver","detective","c20r","nuclear","deagle","gyrojet","pulse","suppressed","cannon","doublebarrel","shotgun","combatshotgun","bulldog","mateba","sabr","uzi","crossbow","saw","car","boltaction") var/list/magiclist = list("fireball","smoke","blind","mindswap","forcewall","knock","horsemask","charge", "summonitem", "wandnothing", "wanddeath", "wandresurrection", "wandpolymorph", "wandteleport", "wanddoor", "wandfireball", "staffchange", "staffhealing", "armor", "scrying", "staffdoor", "special") var/list/magicspeciallist = list("staffchange","staffanimation", "wandbelt", "contract", "staffchaos") @@ -85,6 +85,8 @@ var/obj/item/weapon/gun/projectile/automatic/m90/gat gat.pin = /obj/item/device/firing_pin new gat(get_turf(H)) + if("boltaction") + new /obj/item/weapon/gun/projectile/shotgun/boltaction(get_turf(H)) else switch (randomizemagic) if("fireball") diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index 82c8bedcf65..3f143ea19fe 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -46,6 +46,10 @@ projectilesound = 'sound/weapons/Gunshot.ogg' casingtype = /obj/item/ammo_casing/a357 +/mob/living/simple_animal/hostile/russian/ranged/New() + if(prob(50) && ispath(weapon1,/obj/item/weapon/gun/projectile/revolver/mateba)) //to preserve varedits + weapon1 = /obj/item/weapon/gun/projectile/shotgun/boltaction + casingtype = /obj/item/ammo_casing/a762 /mob/living/simple_animal/hostile/russian/Die() ..() @@ -54,4 +58,4 @@ if(weapon1) new weapon1 (src.loc) qdel(src) - return \ No newline at end of file + return diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index 0234f53051d..221df20d783 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -133,6 +133,7 @@ /obj/item/ammo_casing/a762 desc = "A 7.62mm bullet casing." + icon_state = "762-casing" caliber = "a762" projectile_type = /obj/item/projectile/bullet @@ -171,4 +172,4 @@ projectile_type = /obj/item/projectile/energy/bolt caliber = "crossbow" icon = 'icons/obj/projectiles.dmi' - icon_state = "cbbolt" \ No newline at end of file + icon_state = "cbbolt" diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index f9d940c3bfb..a41fc641756 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -44,4 +44,12 @@ name = "ammo box (crossbow bolts)" icon_state = "xbow" ammo_type = /obj/item/ammo_casing/caseless/bolt - max_ammo = 4 \ No newline at end of file + max_ammo = 4 + +/obj/item/ammo_box/a762 + name = "stripper clip (7.62mm)" + desc = "A stripper clip." + icon_state = "762" + ammo_type = /obj/item/ammo_casing/a762 + max_ammo = 5 + multiple_sprites = 1 diff --git a/code/modules/projectiles/ammunition/magazines.dm b/code/modules/projectiles/ammunition/magazines.dm index ff130fc53ae..404bd0968ba 100644 --- a/code/modules/projectiles/ammunition/magazines.dm +++ b/code/modules/projectiles/ammunition/magazines.dm @@ -99,6 +99,14 @@ /obj/item/ammo_box/magazine/internal/cylinder/crossbow/large max_ammo = 15 +/obj/item/ammo_box/magazine/internal/boltaction + name = "bolt action rifle internal magazine" + desc = "Oh god, this shouldn't be here" + ammo_type = /obj/item/ammo_casing/a762 + caliber = "a762" + max_ammo = 5 + multiload = 1 + ///////////EXTERNAL MAGAZINES//////////////// /obj/item/ammo_box/magazine/m10mm @@ -211,4 +219,4 @@ obj/item/ammo_box/magazine/tommygunm45 /obj/item/ammo_box/magazine/m12g/dragon name = "shotgun magazine (12g dragon's breath)" icon_state = "m12gf" - ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath \ No newline at end of file + ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 7d00138cdeb..2939e3f425e 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -10,7 +10,6 @@ origin_tech = "combat=4;materials=2" mag_type = /obj/item/ammo_box/magazine/internal/shot var/recentpump = 0 // to prevent spammage - var/pumped = 0 /obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob) var/num_loaded = magazine.attackby(A, user, 1) @@ -41,22 +40,30 @@ /obj/item/weapon/gun/projectile/shotgun/proc/pump(mob/M) playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) - pumped = 0 + pump_unload(M) + pump_reload(M) + update_icon() //I.E. fix the desc + return 1 + +/obj/item/weapon/gun/projectile/shotgun/proc/pump_unload(mob/M) if(chambered)//We have a shell in the chamber chambered.loc = get_turf(src)//Eject casing chambered.SpinAnimation(5, 1) chambered = null + +/obj/item/weapon/gun/projectile/shotgun/proc/pump_reload(mob/M) if(!magazine.ammo_count()) return 0 var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing. chambered = AC - update_icon() //I.E. fix the desc - return 1 + /obj/item/weapon/gun/projectile/shotgun/examine(mob/user) ..() if (chambered) user << "A [chambered.BB ? "live" : "spent"] one is in the chamber." +// COMBAT SHOTGUN // + /obj/item/weapon/gun/projectile/shotgun/combat name = "combat shotgun" desc = "A traditional shotgun with tactical furniture and an eight-shell capacity underneath." @@ -65,6 +72,8 @@ mag_type = /obj/item/ammo_box/magazine/internal/shotcom w_class = 5 +// RIOT SHOTGUN // + /obj/item/weapon/gun/projectile/shotgun/riot //for spawn in the armory name = "riot shotgun" desc = "A sturdy shotgun with a longer magazine and a fixed tactical stock designed for non-lethal riot control." @@ -81,6 +90,43 @@ if(W.active) sawoff(user) +/////////////////////// +// BOLT ACTION RIFLE // +/////////////////////// + +/obj/item/weapon/gun/projectile/shotgun/boltaction + name = "bolt action rifle" + desc = "This piece of junk looks like something that could have been used 700 years ago." + icon_state = "moistnugget" + item_state = "moistnugget" + slot_flags = 0 //no SLOT_BACK sprite, alas + mag_type = /obj/item/ammo_box/magazine/internal/boltaction + var/bolt_open = 0 + +/obj/item/weapon/gun/projectile/shotgun/boltaction/pump(mob/M) + playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1) + if(bolt_open) + pump_reload(M) + else + pump_unload(M) + bolt_open = !bolt_open + update_icon() //I.E. fix the desc + return 1 + +/obj/item/weapon/gun/projectile/shotgun/boltaction/attackby(var/obj/item/A as obj, mob/user as mob) + if(!bolt_open) + user << "The bolt is closed!" + return + . = ..() + +/obj/item/weapon/gun/projectile/shotgun/boltaction/examine(mob/user) + ..() + user << "The bolt is [bolt_open ? "open" : "closed"]." + +///////////////////////////// +// DOUBLE BARRELED SHOTGUN // +///////////////////////////// + /obj/item/weapon/gun/projectile/revolver/doublebarrel name = "double-barreled shotgun" desc = "A true classic." @@ -228,4 +274,4 @@ /obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack() ..() empty_alarm() - return \ No newline at end of file + return diff --git a/icons/mob/items_lefthand.dmi b/icons/mob/items_lefthand.dmi index 5acb3cbf1e1..19c313fbf4c 100644 Binary files a/icons/mob/items_lefthand.dmi and b/icons/mob/items_lefthand.dmi differ diff --git a/icons/mob/items_righthand.dmi b/icons/mob/items_righthand.dmi index 137450b21ce..cb7b5a8acfe 100644 Binary files a/icons/mob/items_righthand.dmi and b/icons/mob/items_righthand.dmi differ diff --git a/icons/obj/ammo.dmi b/icons/obj/ammo.dmi index 33726c6de7c..809e0a47eee 100644 Binary files a/icons/obj/ammo.dmi and b/icons/obj/ammo.dmi differ diff --git a/icons/obj/gun.dmi b/icons/obj/gun.dmi index 4e2e5c2852b..84ce7b2a073 100644 Binary files a/icons/obj/gun.dmi and b/icons/obj/gun.dmi differ