Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
@@ -1,407 +0,0 @@
/obj/item/weapon/gun/ballistic/automatic
origin_tech = "combat=4;materials=2"
w_class = WEIGHT_CLASS_NORMAL
var/alarmed = 0
var/select = 1
can_suppress = 1
burst_size = 3
fire_delay = 2
actions_types = list(/datum/action/item_action/toggle_firemode)
/obj/item/weapon/gun/ballistic/automatic/proto
name = "\improper NanoTrasen Saber SMG"
desc = "A prototype three-round burst 9mm submachine gun, designated 'SABR'. Has a threaded barrel for suppressors."
icon_state = "saber"
mag_type = /obj/item/ammo_box/magazine/smgm9mm
pin = null
/obj/item/weapon/gun/ballistic/automatic/proto/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/update_icon()
..()
cut_overlays()
if(!select)
add_overlay("[initial(icon_state)]semi")
if(select == 1)
add_overlay("[initial(icon_state)]burst")
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/weapon/gun/ballistic/automatic/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
return
if(istype(A, /obj/item/ammo_box/magazine))
var/obj/item/ammo_box/magazine/AM = A
if(istype(AM, mag_type))
if(magazine)
user << "<span class='notice'>You perform a tactical reload on \the [src], replacing the magazine.</span>"
magazine.dropped()
magazine.forceMove(get_turf(src.loc))
magazine.update_icon()
magazine = null
else
user << "<span class='notice'>You insert the magazine into \the [src].</span>"
user.remove_from_mob(AM)
magazine = AM
magazine.loc = src
chamber_round()
A.update_icon()
update_icon()
return 1
/obj/item/weapon/gun/ballistic/automatic/ui_action_click()
burst_select()
/obj/item/weapon/gun/ballistic/automatic/proc/burst_select()
var/mob/living/carbon/human/user = usr
select = !select
if(!select)
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-automatic.</span>"
else
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
user << "<span class='notice'>You switch to [burst_size]-rnd burst.</span>"
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
for(var/X in actions)
var/datum/action/A = X
A.UpdateButtonIcon()
/obj/item/weapon/gun/ballistic/automatic/can_shoot()
return get_ammo()
/obj/item/weapon/gun/ballistic/automatic/proc/empty_alarm()
if(!chambered && !get_ammo() && !alarmed)
playsound(src.loc, 'sound/weapons/smg_empty_alarm.ogg', 40, 1)
update_icon()
alarmed = 1
return
/obj/item/weapon/gun/ballistic/automatic/c20r
name = "\improper C-20r SMG"
desc = "A bullpup two-round burst .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
icon_state = "c20r"
item_state = "c20r"
origin_tech = "combat=5;materials=2;syndicate=6"
mag_type = /obj/item/ammo_box/magazine/smgm45
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
fire_delay = 2
burst_size = 2
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/ballistic/automatic/c20r/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/c20r/New()
..()
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/c20r/afterattack()
..()
empty_alarm()
return
/obj/item/weapon/gun/ballistic/automatic/c20r/update_icon()
..()
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
/obj/item/weapon/gun/ballistic/automatic/wt550
name = "security auto rifle"
desc = "An outdated personal defence weapon. Uses 4.6x30mm rounds and is designated the WT-550 Automatic Rifle."
icon_state = "wt550"
item_state = "arg"
mag_type = /obj/item/ammo_box/magazine/wt550m9
fire_delay = 2
can_suppress = 0
burst_size = 0
actions_types = list()
/obj/item/weapon/gun/ballistic/automatic/wt550/update_icon()
..()
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
/obj/item/weapon/gun/ballistic/automatic/mini_uzi
name = "\improper 'Type U3' Uzi"
desc = "A lightweight, burst-fire submachine gun, for when you really want someone dead. Uses 9mm rounds."
icon_state = "mini-uzi"
origin_tech = "combat=4;materials=2;syndicate=4"
mag_type = /obj/item/ammo_box/magazine/uzim9mm
burst_size = 2
/obj/item/weapon/gun/ballistic/automatic/m90
name = "\improper M-90gl Carbine"
desc = "A three-round burst 5.56 toploading carbine, designated 'M-90gl'. Has an attached underbarrel grenade launcher which can be toggled on and off."
icon_state = "m90"
item_state = "m90"
origin_tech = "combat=5;materials=2;syndicate=6"
mag_type = /obj/item/ammo_box/magazine/m556
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
var/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/underbarrel
burst_size = 3
fire_delay = 2
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/ballistic/automatic/m90/New()
..()
underbarrel = new /obj/item/weapon/gun/ballistic/revolver/grenadelauncher(src)
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted/New()
..()
underbarrel = new /obj/item/weapon/gun/ballistic/revolver/grenadelauncher/unrestricted(src)
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/m90/afterattack(atom/target, mob/living/user, flag, params)
if(select == 2)
underbarrel.afterattack(target, user, flag, params)
else
..()
return
/obj/item/weapon/gun/ballistic/automatic/m90/attackby(obj/item/A, mob/user, params)
if(istype(A, /obj/item/ammo_casing))
if(istype(A, underbarrel.magazine.ammo_type))
underbarrel.attack_self()
underbarrel.attackby(A, user, params)
else
..()
/obj/item/weapon/gun/ballistic/automatic/m90/update_icon()
..()
cut_overlays()
switch(select)
if(0)
add_overlay("[initial(icon_state)]semi")
if(1)
add_overlay("[initial(icon_state)]burst")
if(2)
add_overlay("[initial(icon_state)]gren")
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
return
/obj/item/weapon/gun/ballistic/automatic/m90/burst_select()
var/mob/living/carbon/human/user = usr
switch(select)
if(0)
select = 1
burst_size = initial(burst_size)
fire_delay = initial(fire_delay)
user << "<span class='notice'>You switch to [burst_size]-rnd burst.</span>"
if(1)
select = 2
user << "<span class='notice'>You switch to grenades.</span>"
if(2)
select = 0
burst_size = 1
fire_delay = 0
user << "<span class='notice'>You switch to semi-auto.</span>"
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/tommygun
name = "\improper Thompson SMG"
desc = "Based on the classic 'Chicago Typewriter'."
icon_state = "tommygun"
item_state = "shotgun"
w_class = WEIGHT_CLASS_HUGE
slot_flags = 0
origin_tech = "combat=5;materials=1;syndicate=3"
mag_type = /obj/item/ammo_box/magazine/tommygunm45
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
burst_size = 4
fire_delay = 1
/obj/item/weapon/gun/ballistic/automatic/ar
name = "\improper NT-ARG 'Boarder'"
desc = "A robust assault rile used by Nanotrasen fighting forces."
icon_state = "arg"
item_state = "arg"
slot_flags = 0
origin_tech = "combat=6;engineering=4"
mag_type = /obj/item/ammo_box/magazine/m556
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
can_suppress = 0
burst_size = 3
fire_delay = 1
// Bulldog shotgun //
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog
name = "\improper 'Bulldog' Shotgun"
desc = "A semi-auto, mag-fed shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
icon_state = "bulldog"
item_state = "bulldog"
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "combat=6;materials=4;syndicate=6"
mag_type = /obj/item/ammo_box/magazine/m12g
fire_sound = 'sound/weapons/Gunshot.ogg'
can_suppress = 0
burst_size = 1
fire_delay = 0
pin = /obj/item/device/firing_pin/implant/pindicate
actions_types = list()
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/New()
..()
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/proc/update_magazine()
if(magazine)
src.overlays = 0
add_overlay("[magazine.icon_state]")
return
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/update_icon()
src.overlays = 0
update_magazine()
icon_state = "bulldog[chambered ? "" : "-e"]"
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/afterattack()
..()
empty_alarm()
return
// L6 SAW //
/obj/item/weapon/gun/ballistic/automatic/l6_saw
name = "\improper L6 SAW"
desc = "A heavily modified 5.56x45mm light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the receiver below the designation."
icon_state = "l6closed100"
item_state = "l6closedmag"
w_class = WEIGHT_CLASS_HUGE
slot_flags = 0
origin_tech = "combat=6;engineering=3;syndicate=6"
mag_type = /obj/item/ammo_box/magazine/mm556x45
weapon_weight = WEAPON_HEAVY
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
var/cover_open = 0
can_suppress = 0
burst_size = 3
fire_delay = 1
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/ballistic/automatic/l6_saw/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attack_self(mob/user)
cover_open = !cover_open
user << "<span class='notice'>You [cover_open ? "open" : "close"] [src]'s cover.</span>"
update_icon()
/obj/item/weapon/gun/ballistic/automatic/l6_saw/update_icon()
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? Ceiling(get_ammo(0)/12.5)*25 : "-empty"][suppressed ? "-suppressed" : ""]"
item_state = "l6[cover_open ? "openmag" : "closedmag"]"
/obj/item/weapon/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)
user << "<span class='warning'>[src]'s cover is open! Close it before firing!</span>"
else
..()
update_icon()
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attack_hand(mob/user)
if(loc != user)
..()
return //let them pick it up
if(!cover_open || (cover_open && !magazine))
..()
else if(cover_open && magazine)
//drop the mag
magazine.update_icon()
magazine.loc = get_turf(src.loc)
user.put_in_hands(magazine)
magazine = null
update_icon()
user << "<span class='notice'>You remove the magazine from [src].</span>"
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
return
if(!cover_open)
user << "<span class='warning'>[src]'s cover is closed! You can't insert a new mag.</span>"
return
..()
// SNIPER //
/obj/item/weapon/gun/ballistic/automatic/sniper_rifle
name = "sniper rifle"
desc = "A long ranged weapon that does significant damage. No, you can't quickscope."
icon_state = "sniper"
item_state = "sniper"
recoil = 2
weapon_weight = WEAPON_HEAVY
mag_type = /obj/item/ammo_box/magazine/sniper_rounds
fire_delay = 40
burst_size = 1
origin_tech = "combat=7"
can_unsuppress = 1
can_suppress = 1
w_class = WEIGHT_CLASS_NORMAL
zoomable = TRUE
zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you.
slot_flags = SLOT_BACK
actions_types = list()
/obj/item/weapon/gun/ballistic/automatic/sniper_rifle/update_icon()
if(magazine)
icon_state = "sniper-mag"
else
icon_state = "sniper"
/obj/item/weapon/gun/ballistic/automatic/sniper_rifle/syndicate
name = "syndicate sniper rifle"
desc = "An illegally modified .50 cal sniper rifle with supression compatibility. Quickscoping still doesn't work."
pin = /obj/item/device/firing_pin/implant/pindicate
origin_tech = "combat=7;syndicate=6"
// Laser rifle (rechargeable magazine) //
/obj/item/weapon/gun/ballistic/automatic/laser
name = "laser rifle"
desc = "Though sometimes mocked for the relatively weak firepower of their energy weapons, the logistic miracle of rechargable ammunition has given Nanotrasen a decisive edge over many a foe."
icon_state = "oldrifle"
item_state = "arg"
mag_type = /obj/item/ammo_box/magazine/recharge
fire_delay = 2
can_suppress = 0
burst_size = 0
actions_types = list()
fire_sound = 'sound/weapons/Laser.ogg'
casing_ejector = 0
/obj/item/weapon/gun/ballistic/automatic/laser/update_icon()
..()
icon_state = "oldrifle[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
return
@@ -1,106 +0,0 @@
/obj/item/weapon/gun/ballistic/bow
name = "bow"
desc = "A sturdy bow made out of wood and reinforced with iron."
icon_state = "bow_unloaded"
item_state = "bow"
var/icon_state_loaded = "bow_loaded"
var/icon_state_firing = "bow_firing"
var/item_state_loaded = "bow"
var/item_state_firing = "bow"
fire_sound = 'sound/weapons/grenadelaunch.ogg'
mag_type = /obj/item/ammo_box/magazine/internal/bow
flags = HANDSLOW
weapon_weight = WEAPON_HEAVY
var/draw_sound = 'sound/weapons/draw_bow.ogg'
var/ready_to_fire = 0
var/slowdown_when_ready = 2
/obj/item/weapon/gun/ballistic/bow/update_icon()
if(ready_to_fire)
icon_state = icon_state_firing
item_state = item_state_firing
slowdown = slowdown_when_ready
else if(magazine.ammo_count() && !ready_to_fire)
icon_state = icon_state_loaded
item_state = item_state_loaded
slowdown = initial(slowdown)
else
icon_state = initial(icon_state)
item_state = initial(item_state)
slowdown = initial(slowdown)
/obj/item/weapon/gun/ballistic/bow/dropped(mob/user)
if(magazine && magazine.ammo_count())
magazine.empty_magazine()
ready_to_fire = FALSE
update_icon()
/obj/item/weapon/gun/ballistic/bow/attack_self(mob/living/user)
if(!ready_to_fire && magazine.ammo_count())
ready_to_fire = TRUE
playsound(user, draw_sound, 100, 1)
update_icon()
else
ready_to_fire = FALSE
update_icon()
/obj/item/weapon/gun/ballistic/bow/attackby(obj/item/A, mob/user, params)
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You ready \the [A] into \the [src].</span>"
update_icon()
chamber_round()
/obj/item/weapon/gun/ballistic/bow/can_shoot()
. = ..()
if(!ready_to_fire)
return FALSE
/obj/item/weapon/gun/ballistic/bow/shoot_with_empty_chamber(mob/living/user as mob|obj)
return
/obj/item/weapon/gun/ballistic/bow/process_chamber(eject_casing = 0, empty_chamber = 1)
. = ..()
ready_to_fire = FALSE
update_icon()
// ammo
/obj/item/ammo_box/magazine/internal/bow
name = "bow internal magazine"
ammo_type = /obj/item/ammo_casing/caseless/arrow
caliber = "arrow"
max_ammo = 1
/obj/item/projectile/bullet/reusable/arrow
name = "arrow"
icon_state = "arrow"
ammo_type = /obj/item/ammo_casing/caseless/arrow
range = 10
damage = 25
damage_type = BRUTE
/obj/item/ammo_casing/caseless/arrow
name = "arrow"
desc = "Stab, stab, stab."
icon_state = "arrow"
force = 10
sharpness = IS_SHARP
projectile_type = /obj/item/projectile/bullet/reusable/arrow
caliber = "arrow"
//quiver
/obj/item/weapon/storage/backpack/quiver
name = "quiver"
desc = "A quiver for holding arrows."
icon_state = "quiver"
item_state = "quiver"
storage_slots = 20
can_hold = list(
/obj/item/ammo_casing/caseless/arrow
)
/obj/item/weapon/storage/backpack/quiver/full/New()
..()
for(var/i in 1 to storage_slots)
new /obj/item/ammo_casing/caseless/arrow(src)
@@ -1,148 +0,0 @@
//The ammo/gun is stored in a back slot item
/obj/item/weapon/minigunpack
name = "backpack power source"
desc = "The massive external power source for the laser gatling gun"
icon = 'icons/obj/guns/minigun.dmi'
icon_state = "holstered"
item_state = "backpack"
slot_flags = SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
var/obj/item/weapon/gun/ballistic/minigun/gun = null
var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded.
var/overheat = 0
var/overheat_max = 40
var/heat_diffusion = 1
/obj/item/weapon/minigunpack/New()
gun = new(src)
START_PROCESSING(SSobj, src)
..()
/obj/item/weapon/minigunpack/Destroy()
STOP_PROCESSING(SSobj, src)
..()
/obj/item/weapon/minigunpack/process()
overheat = max(0, overheat - heat_diffusion)
/obj/item/weapon/minigunpack/attack_hand(var/mob/living/carbon/user)
if(src.loc == user)
if(!armed)
if(user.get_item_by_slot(slot_back) == src)
armed = 1
if(!user.put_in_hands(gun))
armed = 0
user << "<span class='warning'>You need a free hand to hold the gun!</span>"
return
update_icon()
gun.forceMove(user)
user.update_inv_back()
else
user << "<span class='warning'>You are already holding the gun!</span>"
else
..()
/obj/item/weapon/minigunpack/attackby(obj/item/weapon/W, mob/user, params)
if(W == gun) //Don't need armed check, because if you have the gun assume its armed.
user.unEquip(gun,1)
else
..()
/obj/item/weapon/minigunpack/dropped(mob/user)
if(armed)
user.unEquip(gun,1)
/obj/item/weapon/minigunpack/MouseDrop(atom/over_object)
if(armed)
return
if(iscarbon(usr))
var/mob/M = usr
if(!over_object)
return
if(!M.restrained() && !M.stat)
if(istype(over_object, /obj/screen/inventory/hand))
var/obj/screen/inventory/hand/H = over_object
if(!M.unEquip(src))
return
M.put_in_hand(src, H.held_index)
/obj/item/weapon/minigunpack/update_icon()
if(armed)
icon_state = "notholstered"
else
icon_state = "holstered"
/obj/item/weapon/minigunpack/proc/attach_gun(var/mob/user)
if(!gun)
gun = new(src)
gun.forceMove(src)
armed = 0
if(user)
user << "<span class='notice'>You attach the [gun.name] to the [name].</span>"
else
src.visible_message("<span class='warning'>The [gun.name] snaps back onto the [name]!</span>")
update_icon()
user.update_inv_back()
/obj/item/weapon/gun/ballistic/minigun
name = "laser gatling gun"
desc = "An advanced laser cannon with an incredible rate of fire. Requires a bulky backpack power source to use."
icon = 'icons/obj/guns/minigun.dmi'
icon_state = "minigun_spin"
item_state = "minigun"
origin_tech = "combat=6;powerstorage=5;magnets=4"
flags = CONDUCT | HANDSLOW
slowdown = 1
slot_flags = null
w_class = WEIGHT_CLASS_HUGE
materials = list()
burst_size = 3
automatic = 0
fire_delay = 1
weapon_weight = WEAPON_HEAVY
fire_sound = 'sound/weapons/Laser.ogg'
mag_type = /obj/item/ammo_box/magazine/internal/minigun
casing_ejector = 0
var/obj/item/weapon/minigunpack/ammo_pack
/obj/item/weapon/gun/ballistic/minigun/attack_self(mob/living/user)
return
/obj/item/weapon/gun/ballistic/minigun/dropped(mob/user)
if(ammo_pack)
ammo_pack.attach_gun(user)
else
qdel(src)
/obj/item/weapon/gun/ballistic/minigun/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
if(ammo_pack)
if(ammo_pack.overheat < ammo_pack.overheat_max)
ammo_pack.overheat += burst_size
..()
else
user << "The gun's heat sensor locked the trigger to prevent lens damage."
/obj/item/weapon/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
if(!ammo_pack || ammo_pack.loc != user)
user << "You need the backpack power source to fire the gun!"
..()
/obj/item/weapon/gun/ballistic/minigun/New()
if(!ammo_pack)
if(istype(loc,/obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
ammo_pack = loc
..()
else
qdel(src)//No pack, no gun
/obj/item/weapon/gun/ballistic/minigun/dropped(mob/living/user)
ammo_pack.attach_gun(user)
@@ -1,100 +0,0 @@
//KEEP IN MIND: These are different from gun/grenadelauncher. These are designed to shoot premade rocket and grenade projectiles, not flashbangs or chemistry casings etc.
//Put handheld rocket launchers here if someone ever decides to make something so hilarious ~Paprika
/obj/item/weapon/gun/ballistic/revolver/grenadelauncher//this is only used for underbarrel grenade launchers at the moment, but admins can still spawn it if they feel like being assholes
desc = "A break-operated grenade launcher."
name = "grenade launcher"
icon_state = "dshotgun-sawn"
item_state = "gun"
mag_type = /obj/item/ammo_box/magazine/internal/grenadelauncher
fire_sound = 'sound/weapons/grenadelaunch.ogg'
w_class = WEIGHT_CLASS_NORMAL
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/cyborg
desc = "A 6-shot grenade launcher."
name = "multi grenade launcher"
icon = 'icons/mecha/mecha_equipment.dmi'
icon_state = "mecha_grenadelnchr"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenademulti
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/cyborg/attack_self()
return
/obj/item/weapon/gun/ballistic/automatic/gyropistol
name = "gyrojet pistol"
desc = "A prototype pistol designed to fire self propelled rockets."
icon_state = "gyropistol"
fire_sound = 'sound/weapons/grenadelaunch.ogg'
origin_tech = "combat=5"
mag_type = /obj/item/ammo_box/magazine/m75
burst_size = 1
fire_delay = 0
actions_types = list()
casing_ejector = 0
/obj/item/weapon/gun/ballistic/automatic/gyropistol/update_icon()
..()
icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]"
/obj/item/weapon/gun/ballistic/automatic/speargun
name = "kinetic speargun"
desc = "A weapon favored by carp hunters. Fires specialized spears using kinetic energy."
icon_state = "speargun"
item_state = "speargun"
w_class = WEIGHT_CLASS_BULKY
origin_tech = "combat=4;engineering=4"
force = 10
can_suppress = 0
mag_type = /obj/item/ammo_box/magazine/internal/speargun
fire_sound = 'sound/weapons/grenadelaunch.ogg'
burst_size = 1
fire_delay = 0
select = 0
actions_types = list()
casing_ejector = 0
/obj/item/weapon/gun/ballistic/automatic/speargun/update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/speargun/attack_self()
return
/obj/item/weapon/gun/ballistic/automatic/speargun/attackby(obj/item/A, mob/user, params)
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] spear\s into \the [src].</span>"
update_icon()
chamber_round()
/obj/item/weapon/gun/ballistic/automatic/atlauncher
desc = "A pre-loaded, single shot anti-armour launcher."
name = "anti-armour grenade launcher"
icon_state = "rocketlauncher"
item_state = "rocketlauncher"
mag_type = /obj/item/ammo_box/magazine/internal/rocketlauncher
fire_sound = 'sound/weapons/rocketlaunch.ogg'
w_class = WEIGHT_CLASS_BULKY
can_suppress = 0
burst_size = 1
fire_delay = 0
select = 0
actions_types = list()
casing_ejector = 0
weapon_weight = WEAPON_HEAVY
/obj/item/weapon/gun/ballistic/automatic/atlauncher/attack_self()
return
/obj/item/weapon/gun/ballistic/automatic/atlauncher/update_icon()
..()
icon_state = "rocketlauncher[magazine ? "-[get_ammo(1)]" : ""]"
@@ -1,76 +0,0 @@
/obj/item/weapon/gun/ballistic/automatic/pistol
name = "stechkin pistol"
desc = "A small, easily concealable 10mm handgun. Has a threaded barrel for suppressors."
icon_state = "pistol"
w_class = WEIGHT_CLASS_SMALL
origin_tech = "combat=3;materials=2;syndicate=4"
mag_type = /obj/item/ammo_box/magazine/m10mm
can_suppress = 1
burst_size = 1
fire_delay = 0
actions_types = list()
/obj/item/weapon/gun/ballistic/automatic/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
return
/obj/item/weapon/gun/ballistic/automatic/pistol/m1911
name = "\improper M1911"
desc = "A classic .45 handgun with a small magazine capacity."
icon_state = "m1911"
w_class = WEIGHT_CLASS_NORMAL
mag_type = /obj/item/ammo_box/magazine/m45
can_suppress = 0
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
name = "desert eagle"
desc = "A robust .50 AE handgun."
icon_state = "deagle"
force = 14
mag_type = /obj/item/ammo_box/magazine/m50
can_suppress = 0
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/update_icon()
..()
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/gold
desc = "A gold plated desert eagle folded over a million times by superior martian gunsmiths. Uses .50 AE ammo."
icon_state = "deagleg"
item_state = "deagleg"
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/camo
desc = "A Deagle brand Deagle for operators operating operationally. Uses .50 AE ammo."
icon_state = "deaglecamo"
item_state = "deagleg"
/obj/item/weapon/gun/ballistic/automatic/pistol/APS
name = "stechkin APS pistol"
desc = "The original russian version of a widely used Syndicate sidearm. Uses 9mm ammo."
icon_state = "aps"
w_class = WEIGHT_CLASS_NORMAL
origin_tech = "combat=3;materials=2;syndicate=3"
mag_type = /obj/item/ammo_box/magazine/pistolm9mm
can_suppress = 0
burst_size = 3
fire_delay = 2
actions_types = list(/datum/action/item_action/toggle_firemode)
/obj/item/weapon/gun/ballistic/automatic/pistol/stickman
name = "flat gun"
desc = "A 2 dimensional gun.. what?"
icon_state = "flatgun"
origin_tech = "combat=3;materials=2;abductor=3"
/obj/item/weapon/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
user << "<span class='notice'>As you try to pick up [src], it slips out of your grip..</span>"
if(prob(50))
user << "<span class='notice'>..and vanishes from your vision! Where the hell did it go?</span>"
user.unEquip(src)
qdel(src)
user.update_icons()
else
user << "<span class='notice'>..and falls into view. Whew, that was a close one.</span>"
user.unEquip(src)
@@ -1,342 +0,0 @@
/obj/item/weapon/gun/ballistic/revolver
name = "\improper .357 revolver"
desc = "A suspicious revolver. Uses .357 ammo." //usually used by syndicates
icon_state = "revolver"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
origin_tech = "combat=3;materials=2"
casing_ejector = 0
/obj/item/weapon/gun/ballistic/revolver/New()
..()
if(!istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder))
verbs -= /obj/item/weapon/gun/ballistic/revolver/verb/spin
/obj/item/weapon/gun/ballistic/revolver/chamber_round(spin = 1)
if(spin)
chambered = magazine.get_round(1)
else
chambered = magazine.stored_ammo[1]
/obj/item/weapon/gun/ballistic/revolver/shoot_with_empty_chamber(mob/living/user as mob|obj)
..()
chamber_round(1)
/obj/item/weapon/gun/ballistic/revolver/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
return
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src].</span>"
A.update_icon()
update_icon()
chamber_round(0)
/obj/item/weapon/gun/ballistic/revolver/attack_self(mob/living/user)
var/num_unloaded = 0
chambered = null
while (get_ammo() > 0)
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
if(CB)
CB.loc = get_turf(src.loc)
CB.SpinAnimation(10, 1)
CB.update_icon()
num_unloaded++
if (num_unloaded)
user << "<span class='notice'>You unload [num_unloaded] shell\s from [src].</span>"
else
user << "<span class='warning'>[src] is empty!</span>"
/obj/item/weapon/gun/ballistic/revolver/verb/spin()
set name = "Spin Chamber"
set category = "Object"
set desc = "Click to spin your revolver's chamber."
var/mob/M = usr
if(M.stat || !in_range(M,src))
return
if(istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder))
var/obj/item/ammo_box/magazine/internal/cylinder/C = magazine
C.spin()
chamber_round(0)
usr.visible_message("[usr] spins [src]'s chamber.", "<span class='notice'>You spin [src]'s chamber.</span>")
else
verbs -= /obj/item/weapon/gun/ballistic/revolver/verb/spin
/obj/item/weapon/gun/ballistic/revolver/can_shoot()
return get_ammo(0,0)
/obj/item/weapon/gun/ballistic/revolver/get_ammo(countchambered = 0, countempties = 1)
var/boolets = 0 //mature var names for mature people
if (chambered && countchambered)
boolets++
if (magazine)
boolets += magazine.ammo_count(countempties)
return boolets
/obj/item/weapon/gun/ballistic/revolver/examine(mob/user)
..()
user << "[get_ammo(0,0)] of those are live rounds."
/obj/item/weapon/gun/ballistic/revolver/detective
name = "\improper .38 Mars Special"
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
icon_state = "detective"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
unique_rename = 1
unique_reskin = 1
/obj/item/weapon/gun/ballistic/revolver/detective/New()
..()
options["Default"] = "detective"
options["Leopard Spots"] = "detective_leopard"
options["Black Panther"] = "detective_panther"
options["Gold Trim"] = "detective_gold"
options["The Peacemaker"] = "detective_peacemaker"
options["Cancel"] = null
/obj/item/weapon/gun/ballistic/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override = "")
if(magazine.caliber != initial(magazine.caliber))
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
playsound(user, fire_sound, 50, 1)
user << "<span class='userdanger'>[src] blows up in your face!</span>"
user.take_bodypart_damage(0,20)
user.unEquip(src)
return 0
..()
/obj/item/weapon/gun/ballistic/revolver/detective/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/weapon/screwdriver))
if(magazine.caliber == "38")
user << "<span class='notice'>You begin to reinforce the barrel of [src]...</span>"
if(magazine.ammo_count())
afterattack(user, user) //you know the drill
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30*A.toolspeed, target = src))
if(magazine.ammo_count())
user << "<span class='warning'>You can't modify it!</span>"
return
magazine.caliber = "357"
desc = "The barrel and chamber assembly seems to have been modified."
user << "<span class='notice'>You reinforce the barrel of [src]. Now it will fire .357 rounds.</span>"
else
user << "<span class='notice'>You begin to revert the modifications to [src]...</span>"
if(magazine.ammo_count())
afterattack(user, user) //and again
user.visible_message("<span class='danger'>[src] goes off!</span>", "<span class='userdanger'>[src] goes off in your face!</span>")
return
if(do_after(user, 30*A.toolspeed, target = src))
if(magazine.ammo_count())
user << "<span class='warning'>You can't modify it!</span>"
return
magazine.caliber = "38"
desc = initial(desc)
user << "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>"
/obj/item/weapon/gun/ballistic/revolver/mateba
name = "\improper Unica 6 auto-revolver"
desc = "A retro high-powered autorevolver typically used by officers of the New Russia military. Uses .357 ammo."
icon_state = "mateba"
/obj/item/weapon/gun/ballistic/revolver/golden
name = "\improper Golden revolver"
desc = "This ain't no game, ain't never been no show, And I'll gladly gun down the oldest lady you know. Uses .357 ammo."
icon_state = "goldrevolver"
fire_sound = 'sound/weapons/resonator_blast.ogg'
recoil = 8
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/revolver/nagant
name = "nagant revolver"
desc = "An old model of revolver that originated in Russia. Able to be suppressed. Uses 7.62x38mmR ammo."
icon_state = "nagant"
origin_tech = "combat=3"
can_suppress = 1
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev762
// A gun to play Russian Roulette!
// You can spin the chamber to randomize the position of the bullet.
/obj/item/weapon/gun/ballistic/revolver/russian
name = "\improper russian revolver"
desc = "A Russian-made revolver for drinking games. Uses .357 ammo, and has a mechanism requiring you to spin the chamber before each trigger pull."
origin_tech = "combat=2;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rus357
var/spun = FALSE
/obj/item/weapon/gun/ballistic/revolver/russian/New()
..()
spin()
spun = TRUE
update_icon()
/obj/item/weapon/gun/ballistic/revolver/russian/attackby(obj/item/A, mob/user, params)
..()
if(get_ammo() > 0)
spin()
spun = TRUE
update_icon()
A.update_icon()
return
/obj/item/weapon/gun/ballistic/revolver/russian/attack_self(mob/user)
if(!spun && can_shoot())
spin()
spun = TRUE
return
..()
/obj/item/weapon/gun/ballistic/revolver/russian/afterattack(atom/target, mob/living/user, flag, params)
if(flag)
if(!(target in user.contents) && ismob(target))
if(user.a_intent == INTENT_HARM) // Flogging action
return
if(isliving(user))
if(!can_trigger_gun(user))
return
if(target != user)
if(ismob(target))
user << "<span class='warning'>A mechanism prevents you from shooting anyone but yourself!</span>"
return
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!spun)
user << "<span class='warning'>You need to spin the revolver's chamber first!</span>"
return
spun = FALSE
if(chambered)
var/obj/item/ammo_casing/AC = chambered
if(AC.fire_casing(user, user))
playsound(user, fire_sound, 50, 1)
var/zone = check_zone(user.zone_selected)
var/obj/item/bodypart/affecting = H.get_bodypart(zone)
if(zone == "head" || zone == "eyes" || zone == "mouth")
shoot_self(user, affecting)
else
user.visible_message("<span class='danger'>[user.name] cowardly fires [src] at [user.p_their()] [affecting.name]!</span>", "<span class='userdanger'>You cowardly fire [src] at your [affecting.name]!</span>", "<span class='italics'>You hear a gunshot!</span>")
chambered = null
return
user.visible_message("<span class='danger'>*click*</span>")
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
/obj/item/weapon/gun/ballistic/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
user.apply_damage(300, BRUTE, affecting)
user.visible_message("<span class='danger'>[user.name] fires [src] at [user.p_their()] head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "<span class='italics'>You hear a gunshot!</span>")
/obj/item/weapon/gun/ballistic/revolver/russian/soul
name = "cursed russian revolver"
desc = "To play with this revolver requires wagering your very soul."
/obj/item/weapon/gun/ballistic/revolver/russian/soul/shoot_self(mob/living/user)
..()
var/obj/item/device/soulstone/anybody/SS = new /obj/item/device/soulstone/anybody(get_turf(src))
if(!SS.transfer_soul("FORCE", user)) //Something went wrong
qdel(SS)
return
user.visible_message("<span class='danger'>[user.name]'s soul is captured by \the [src]!</span>", "<span class='userdanger'>You've lost the gamble! Your soul is forfiet!</span>")
/////////////////////////////
// DOUBLE BARRELED SHOTGUN //
/////////////////////////////
/obj/item/weapon/gun/ballistic/revolver/doublebarrel
name = "double-barreled shotgun"
desc = "A true classic."
icon_state = "dshotgun"
item_state = "shotgun"
w_class = WEIGHT_CLASS_BULKY
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
sawn_desc = "Omar's coming!"
unique_rename = 1
unique_reskin = 1
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/New()
..()
options["Default"] = "dshotgun"
options["Dark Red Finish"] = "dshotgun-d"
options["Ash"] = "dshotgun-f"
options["Faded Grey"] = "dshotgun-g"
options["Maple"] = "dshotgun-l"
options["Rosewood"] = "dshotgun-p"
options["Cancel"] = null
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
chamber_round()
if(istype(A, /obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/W = A
if(W.active)
sawoff(user)
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
sawoff(user)
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/attack_self(mob/living/user)
var/num_unloaded = 0
while (get_ammo() > 0)
var/obj/item/ammo_casing/CB
CB = magazine.get_round(0)
chambered = null
CB.loc = get_turf(src.loc)
CB.update_icon()
num_unloaded++
if (num_unloaded)
user << "<span class='notice'>You break open \the [src] and unload [num_unloaded] shell\s.</span>"
else
user << "<span class='warning'>[src] is empty!</span>"
// IMPROVISED SHOTGUN //
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised
name = "improvised shotgun"
desc = "Essentially a tube that aims shotgun shells."
icon_state = "ishotgun"
item_state = "shotgun"
w_class = WEIGHT_CLASS_BULKY
force = 10
slot_flags = null
mag_type = /obj/item/ammo_box/magazine/internal/shot/improvised
sawn_desc = "I'm just here for the gasoline."
unique_rename = 0
unique_reskin = 0
var/slung = 0
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/stack/cable_coil) && !sawn_state)
var/obj/item/stack/cable_coil/C = A
if(C.use(10))
slot_flags = SLOT_BACK
user << "<span class='notice'>You tie the lengths of cable to the shotgun, making a sling.</span>"
slung = 1
update_icon()
else
user << "<span class='warning'>You need at least ten lengths of cable if you want to make a sling!</span>"
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/update_icon()
..()
if(slung)
icon_state += "sling"
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/sawoff(mob/user)
. = ..()
if(. && slung) //sawing off the gun removes the sling
new /obj/item/stack/cable_coil(get_turf(src), 10)
slung = 0
update_icon()
@@ -1,234 +0,0 @@
/obj/item/weapon/gun/ballistic/shotgun
name = "shotgun"
desc = "A traditional shotgun with wood furniture and a four-shell capacity underneath."
icon_state = "shotgun"
item_state = "shotgun"
w_class = WEIGHT_CLASS_BULKY
force = 10
flags = CONDUCT
slot_flags = SLOT_BACK
origin_tech = "combat=4;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/shot
casing_ejector = 0
var/recentpump = 0 // to prevent spammage
weapon_weight = WEAPON_MEDIUM
/obj/item/weapon/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
. = ..()
if(.)
return
var/num_loaded = magazine.attackby(A, user, params, 1)
if(num_loaded)
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
A.update_icon()
update_icon()
/obj/item/weapon/gun/ballistic/shotgun/process_chamber(empty_chamber = 0)
return ..() //changed argument value
/obj/item/weapon/gun/ballistic/shotgun/chamber_round()
return
/obj/item/weapon/gun/ballistic/shotgun/can_shoot()
if(!chambered)
return 0
return (chambered.BB ? 1 : 0)
/obj/item/weapon/gun/ballistic/shotgun/attack_self(mob/living/user)
if(recentpump)
return
pump(user)
recentpump = 1
spawn(10)
recentpump = 0
return
/obj/item/weapon/gun/ballistic/shotgun/blow_up(mob/user)
. = 0
if(chambered && chambered.BB)
process_fire(user, user,0)
. = 1
/obj/item/weapon/gun/ballistic/shotgun/proc/pump(mob/M)
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
pump_unload(M)
pump_reload(M)
update_icon() //I.E. fix the desc
return 1
/obj/item/weapon/gun/ballistic/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/ballistic/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
/obj/item/weapon/gun/ballistic/shotgun/examine(mob/user)
..()
if (chambered)
user << "A [chambered.BB ? "live" : "spent"] one is in the chamber."
/obj/item/weapon/gun/ballistic/shotgun/lethal
mag_type = /obj/item/ammo_box/magazine/internal/shot/lethal
// RIOT SHOTGUN //
/obj/item/weapon/gun/ballistic/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."
icon_state = "riotshotgun"
mag_type = /obj/item/ammo_box/magazine/internal/shot/riot
sawn_desc = "Come with me if you want to live."
/obj/item/weapon/gun/ballistic/shotgun/riot/attackby(obj/item/A, mob/user, params)
..()
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
sawoff(user)
if(istype(A, /obj/item/weapon/melee/energy))
var/obj/item/weapon/melee/energy/W = A
if(W.active)
sawoff(user)
///////////////////////
// BOLT ACTION RIFLE //
///////////////////////
/obj/item/weapon/gun/ballistic/shotgun/boltaction
name = "\improper Mosin Nagant"
desc = "This piece of junk looks like something that could have been used 700 years ago. It feels slightly moist."
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/ballistic/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/ballistic/shotgun/boltaction/attackby(obj/item/A, mob/user, params)
if(!bolt_open)
user << "<span class='notice'>The bolt is closed!</span>"
return
. = ..()
/obj/item/weapon/gun/ballistic/shotgun/boltaction/examine(mob/user)
..()
user << "The bolt is [bolt_open ? "open" : "closed"]."
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted
name = "enchanted bolt action rifle"
desc = "Careful not to lose your head."
var/guns_left = 30
var/gun_type
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/arcane_barrage
name = "arcane barrage"
desc = "Pew Pew Pew"
fire_sound = 'sound/weapons/emitter.ogg'
pin = /obj/item/device/firing_pin/magic
icon_state = "arcane_barrage"
item_state = "arcane_barrage"
flags = DROPDEL
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/New()
..()
bolt_open = 1
pump()
gun_type = type
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/dropped()
..()
guns_left = 0
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/proc/discard_gun(mob/user)
throw_at_fast(pick(oview(7,get_turf(user))),1,1)
user.visible_message("<span class='warning'>[user] tosses aside the spent rifle!</span>")
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/arcane_barrage/discard_gun(mob/user)
return
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
..()
if(guns_left)
var/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/GUN = new gun_type
GUN.guns_left = guns_left - 1
user.drop_item()
user.swap_hand()
user.put_in_hands(GUN)
else
user.drop_item()
discard_gun(user)
// Automatic Shotguns//
/obj/item/weapon/gun/ballistic/shotgun/automatic/shoot_live_shot(mob/living/user as mob|obj)
..()
src.pump(user)
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat
name = "combat shotgun"
desc = "A semi automatic shotgun with tactical furniture and a six-shell capacity underneath."
icon_state = "cshotgun"
origin_tech = "combat=6"
mag_type = /obj/item/ammo_box/magazine/internal/shot/com
w_class = WEIGHT_CLASS_HUGE
//Dual Feed Shotgun
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube
name = "cycler shotgun"
desc = "An advanced shotgun with two separate magazine tubes, allowing you to quickly toggle between ammo types."
icon_state = "cycler"
origin_tech = "combat=4;materials=2"
mag_type = /obj/item/ammo_box/magazine/internal/shot/tube
w_class = WEIGHT_CLASS_HUGE
var/toggled = 0
var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/New()
..()
if (!alternate_magazine)
alternate_magazine = new mag_type(src)
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/attack_self(mob/living/user)
if(!chambered && magazine.contents.len)
pump()
else
toggle_tube(user)
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/proc/toggle_tube(mob/living/user)
var/current_mag = magazine
var/alt_mag = alternate_magazine
magazine = alt_mag
alternate_magazine = current_mag
toggled = !toggled
if(toggled)
user << "You switch to tube B."
else
user << "You switch to tube A."
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/AltClick(mob/living/user)
if(user.incapacitated() || !Adjacent(user) || !istype(user))
return
pump()
// DOUBLE BARRELED SHOTGUN and IMPROVISED SHOTGUN are in revolver.dm
@@ -1,102 +0,0 @@
/obj/item/weapon/gun/ballistic/automatic/toy
name = "foam force SMG"
desc = "A prototype three-round burst toy submachine gun. Ages 8 and up."
icon = 'icons/obj/guns/toy.dmi'
icon_state = "saber"
item_state = "gun"
mag_type = /obj/item/ammo_box/magazine/toy/smg
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
force = 0
throwforce = 0
burst_size = 3
can_suppress = 0
clumsy_check = 0
needs_permit = 0
casing_ejector = 0
/obj/item/weapon/gun/ballistic/automatic/toy/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/toy/pistol
name = "foam force pistol"
desc = "A small, easily concealable toy handgun. Ages 8 and up."
icon_state = "pistol"
w_class = WEIGHT_CLASS_SMALL
mag_type = /obj/item/ammo_box/magazine/toy/pistol
fire_sound = 'sound/weapons/Gunshot.ogg'
can_suppress = 0
burst_size = 1
fire_delay = 0
actions_types = list()
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/update_icon()
..()
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot
mag_type = /obj/item/ammo_box/magazine/toy/pistol/riot
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot/New()
magazine = new /obj/item/ammo_box/magazine/toy/pistol/riot(src)
..()
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/shotgun/toy
name = "foam force shotgun"
desc = "A toy shotgun with wood furniture and a four-shell capacity underneath. Ages 8 and up."
icon = 'icons/obj/guns/toy.dmi'
force = 0
throwforce = 0
origin_tech = null
mag_type = /obj/item/ammo_box/magazine/internal/shot/toy
clumsy_check = 0
needs_permit = 0
casing_ejector = 0
/obj/item/weapon/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
..()
if(chambered && !chambered.BB)
qdel(chambered)
/obj/item/weapon/gun/ballistic/shotgun/toy/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/shotgun/toy/crossbow
name = "foam force crossbow"
desc = "A weapon favored by many overactive children. Ages 8 and up."
icon = 'icons/obj/toy.dmi'
icon_state = "foamcrossbow"
item_state = "crossbow"
mag_type = /obj/item/ammo_box/magazine/internal/shot/toy/crossbow
fire_sound = 'sound/items/syringeproj.ogg'
slot_flags = SLOT_BELT
w_class = WEIGHT_CLASS_SMALL
/obj/item/weapon/gun/ballistic/automatic/c20r/toy
name = "donksoft SMG"
desc = "A bullpup two-round burst toy SMG, designated 'C-20r'. Ages 8 and up."
icon = 'icons/obj/guns/toy.dmi'
can_suppress = 0
needs_permit = 0
mag_type = /obj/item/ammo_box/magazine/toy/smgm45
casing_ejector = 0
/obj/item/weapon/gun/ballistic/automatic/c20r/toy/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/l6_saw/toy
name = "donksoft LMG"
desc = "A heavily modified toy light machine gun, designated 'L6 SAW'. Ages 8 and up."
icon = 'icons/obj/guns/toy.dmi'
can_suppress = 0
needs_permit = 0
mag_type = /obj/item/ammo_box/magazine/toy/m762
casing_ejector = 0
/obj/item/weapon/gun/ballistic/automatic/l6_saw/toy/unrestricted
pin = /obj/item/device/firing_pin