Merge pull request #8430 from Trilbyspaceclone/bad_idea

Adds improvised 7.62 rifle
This commit is contained in:
kevinz000
2019-06-05 11:31:10 -07:00
committed by GitHub
4 changed files with 27 additions and 23 deletions
@@ -6,10 +6,12 @@
max_ammo = 5
multiload = 1
/obj/item/ammo_box/magazine/internal/boltaction/improvised
max_ammo = 1
/obj/item/ammo_box/magazine/internal/boltaction/enchanted
max_ammo = 1
ammo_type = /obj/item/ammo_casing/a762/enchanted
/obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
ammo_type = /obj/item/ammo_casing/magic/arcane_barrage
@@ -268,8 +268,6 @@
empty_alarm()
return
// L6 SAW //
/obj/item/gun/ballistic/automatic/l6_saw
@@ -292,13 +290,11 @@
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/firing_pin
/obj/item/gun/ballistic/automatic/l6_saw/examine(mob/user)
..()
if(cover_open && magazine)
to_chat(user, "<span class='notice'>It seems like you could use an <b>empty hand</b> to remove the magazine.</span>")
/obj/item/gun/ballistic/automatic/l6_saw/attack_self(mob/user)
cover_open = !cover_open
to_chat(user, "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>")
@@ -308,12 +304,10 @@
playsound(user, 'sound/weapons/sawclose.ogg', 60, 1)
update_icon()
/obj/item/gun/ballistic/automatic/l6_saw/update_icon()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? CEILING(get_ammo(0)/12.5, 1)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
/obj/item/gun/ballistic/automatic/l6_saw/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params) //what I tried to do here is just add a check to see if the cover is open or not and add an icon_state change because I can't figure out how c-20rs do it with overlays
if(cover_open)
to_chat(user, "<span class='warning'>[src]'s cover is open! Close it before firing!</span>")
@@ -344,8 +338,6 @@
return
..()
// SNIPER //
/obj/item/gun/ballistic/automatic/sniper_rifle
@@ -367,14 +359,12 @@
slot_flags = ITEM_SLOT_BACK
actions_types = list()
/obj/item/gun/ballistic/automatic/sniper_rifle/update_icon()
if(magazine)
icon_state = "sniper-mag"
else
icon_state = "sniper"
/obj/item/gun/ballistic/automatic/sniper_rifle/syndicate
name = "syndicate sniper rifle"
desc = "An illegally modified .50 cal sniper rifle with suppression compatibility. Quickscoping still doesn't work."
@@ -403,7 +393,6 @@
else
icon_state = "surplus-e"
// Laser rifle (rechargeable magazine) //
/obj/item/gun/ballistic/automatic/laser
@@ -71,7 +71,6 @@
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
chambered = AC
/obj/item/gun/ballistic/shotgun/examine(mob/user)
..()
if (chambered)
@@ -117,6 +116,14 @@
knife_x_offset = 27
knife_y_offset = 13
/obj/item/gun/ballistic/shotgun/boltaction/improvised
name = "Makeshift 7.62mm Rifle"
icon_state = "ishotgun"
item_state = "shotgun"
desc = "A large zip gun more or less that takes a single 7.62mm bullet"
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/improvised
can_bayonet = FALSE
/obj/item/gun/ballistic/shotgun/boltaction/pump(mob/M)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
if(bolt_open)
@@ -137,7 +144,6 @@
..()
to_chat(user, "The bolt is [bolt_open ? "open" : "closed"].")
/obj/item/gun/ballistic/shotgun/boltaction/enchanted
name = "enchanted bolt action rifle"
desc = "Careful not to lose your head."
@@ -153,10 +159,8 @@
icon_state = "arcane_barrage"
item_state = "arcane_barrage"
can_bayonet = FALSE
item_flags = NEEDS_PERMIT | DROPDEL
flags_1 = NONE
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/Initialize()
@@ -207,7 +211,6 @@
"Slick" = "cshotgun_slick"
)
/obj/item/gun/ballistic/shotgun/automatic/combat/compact
name = "compact combat shotgun"
desc = "A compact version of the semi automatic combat shotgun. For close encounters."
@@ -218,7 +221,6 @@
"Slick" = "cshotgunc_slick"
)
//Dual Feed Shotgun
/obj/item/gun/ballistic/shotgun/automatic/dual_tube
@@ -261,5 +263,4 @@
return
pump()
// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm