here we go again (#2456)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/ballistic/automatic
|
||||
/obj/item/gun/ballistic/automatic
|
||||
origin_tech = "combat=4;materials=2"
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/alarmed = 0
|
||||
@@ -8,17 +8,17 @@
|
||||
fire_delay = 2
|
||||
actions_types = list(/datum/action/item_action/toggle_firemode)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/proto
|
||||
/obj/item/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
|
||||
/obj/item/gun/ballistic/automatic/proto/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(!select)
|
||||
@@ -27,7 +27,7 @@
|
||||
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)
|
||||
/obj/item/gun/ballistic/automatic/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -53,10 +53,10 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot seem to get \the [src] out of your hands!</span>")
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/ui_action_click()
|
||||
/obj/item/gun/ballistic/automatic/ui_action_click()
|
||||
burst_select()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/proc/burst_select()
|
||||
/obj/item/gun/ballistic/automatic/proc/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
select = !select
|
||||
if(!select)
|
||||
@@ -74,17 +74,17 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/can_shoot()
|
||||
/obj/item/gun/ballistic/automatic/can_shoot()
|
||||
return get_ammo()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/proc/empty_alarm()
|
||||
/obj/item/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
|
||||
/obj/item/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"
|
||||
@@ -96,23 +96,23 @@
|
||||
burst_size = 2
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/c20r/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/c20r/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/c20r/Initialize()
|
||||
/obj/item/gun/ballistic/automatic/c20r/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/c20r/afterattack()
|
||||
/obj/item/gun/ballistic/automatic/c20r/afterattack()
|
||||
..()
|
||||
empty_alarm()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/c20r/update_icon()
|
||||
/obj/item/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
|
||||
/obj/item/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"
|
||||
@@ -123,11 +123,11 @@
|
||||
burst_size = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/wt550/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/wt550/update_icon()
|
||||
..()
|
||||
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/mini_uzi
|
||||
/obj/item/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"
|
||||
@@ -135,7 +135,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/uzim9mm
|
||||
burst_size = 2
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/m90
|
||||
/obj/item/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"
|
||||
@@ -144,38 +144,38 @@
|
||||
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
|
||||
var/obj/item/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/Initialize()
|
||||
/obj/item/gun/ballistic/automatic/m90/Initialize()
|
||||
. = ..()
|
||||
underbarrel = new /obj/item/weapon/gun/ballistic/revolver/grenadelauncher(src)
|
||||
underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/m90/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted/Initialize()
|
||||
/obj/item/gun/ballistic/automatic/m90/unrestricted/Initialize()
|
||||
. = ..()
|
||||
underbarrel = new /obj/item/weapon/gun/ballistic/revolver/grenadelauncher/unrestricted(src)
|
||||
underbarrel = new /obj/item/gun/ballistic/revolver/grenadelauncher/unrestricted(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/m90/afterattack(atom/target, mob/living/user, flag, params)
|
||||
/obj/item/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)
|
||||
/obj/item/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()
|
||||
/obj/item/gun/ballistic/automatic/m90/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
switch(select)
|
||||
@@ -187,7 +187,7 @@
|
||||
add_overlay("[initial(icon_state)]gren")
|
||||
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
|
||||
return
|
||||
/obj/item/weapon/gun/ballistic/automatic/m90/burst_select()
|
||||
/obj/item/gun/ballistic/automatic/m90/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
switch(select)
|
||||
if(0)
|
||||
@@ -207,7 +207,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/tommygun
|
||||
/obj/item/gun/ballistic/automatic/tommygun
|
||||
name = "\improper Thompson SMG"
|
||||
desc = "Based on the classic 'Chicago Typewriter'."
|
||||
icon_state = "tommygun"
|
||||
@@ -221,7 +221,7 @@
|
||||
burst_size = 4
|
||||
fire_delay = 1
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/ar
|
||||
/obj/item/gun/ballistic/automatic/ar
|
||||
name = "\improper NT-ARG 'Boarder'"
|
||||
desc = "A robust assault rile used by Nanotrasen fighting forces."
|
||||
icon_state = "arg"
|
||||
@@ -236,7 +236,7 @@
|
||||
|
||||
// Bulldog shotgun //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog
|
||||
/obj/item/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"
|
||||
@@ -252,20 +252,20 @@
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/Initialize()
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/Initialize()
|
||||
. = ..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/update_icon()
|
||||
cut_overlays()
|
||||
if(magazine)
|
||||
add_overlay("[magazine.icon_state]")
|
||||
icon_state = "bulldog[chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/afterattack()
|
||||
/obj/item/gun/ballistic/automatic/shotgun/bulldog/afterattack()
|
||||
..()
|
||||
empty_alarm()
|
||||
return
|
||||
@@ -274,7 +274,7 @@
|
||||
|
||||
// L6 SAW //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw
|
||||
/obj/item/gun/ballistic/automatic/l6_saw
|
||||
name = "\improper L6 SAW"
|
||||
desc = "A heavily modified 1.95x129mm light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the receiver below the designation."
|
||||
icon_state = "l6closed100"
|
||||
@@ -291,11 +291,11 @@
|
||||
fire_delay = 1
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attack_self(mob/user)
|
||||
/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>")
|
||||
if(cover_open)
|
||||
@@ -305,12 +305,12 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/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)*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
|
||||
/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>")
|
||||
else
|
||||
@@ -318,7 +318,7 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attack_hand(mob/user)
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/attack_hand(mob/user)
|
||||
if(loc != user)
|
||||
..()
|
||||
return //let them pick it up
|
||||
@@ -335,7 +335,7 @@
|
||||
playsound(user, 'sound/weapons/magout.ogg', 60, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
if(!cover_open && istype(A, mag_type))
|
||||
to_chat(user, "<span class='warning'>[src]'s cover is closed! You can't insert a new mag.</span>")
|
||||
return
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
// SNIPER //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/sniper_rifle
|
||||
/obj/item/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"
|
||||
@@ -365,27 +365,27 @@
|
||||
actions_types = list()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/sniper_rifle/update_icon()
|
||||
/obj/item/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
|
||||
/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."
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
origin_tech = "combat=7;syndicate=6"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/sniper_rifle/gang
|
||||
/obj/item/gun/ballistic/automatic/sniper_rifle/gang
|
||||
name = "black market sniper rifle"
|
||||
desc = "A long ranged weapon that does significant damage. It is well worn from years of service."
|
||||
mag_type = /obj/item/ammo_box/magazine/sniper_rounds/gang
|
||||
|
||||
// Old Semi-Auto Rifle //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/surplus
|
||||
/obj/item/gun/ballistic/automatic/surplus
|
||||
name = "Surplus Rifle"
|
||||
desc = "One of countless obsolete ballistic rifles that still sees use as a cheap deterrent. Uses 10mm ammo and its bulky frame prevents one-hand firing."
|
||||
origin_tech = "combat=3;materials=2"
|
||||
@@ -401,7 +401,7 @@
|
||||
slot_flags = SLOT_BACK
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/surplus/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/surplus/update_icon()
|
||||
if(magazine)
|
||||
icon_state = "surplus"
|
||||
else
|
||||
@@ -410,7 +410,7 @@
|
||||
|
||||
// Laser rifle (rechargeable magazine) //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/laser
|
||||
/obj/item/gun/ballistic/automatic/laser
|
||||
name = "laser rifle"
|
||||
desc = "Though sometimes mocked for the relatively weak firepower of their energy weapons, the logistic miracle of rechargeable ammunition has given Nanotrasen a decisive edge over many a foe."
|
||||
icon_state = "oldrifle"
|
||||
@@ -423,7 +423,7 @@
|
||||
fire_sound = 'sound/weapons/laser.ogg'
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/laser/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/laser/update_icon()
|
||||
..()
|
||||
icon_state = "oldrifle[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
|
||||
return
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
|
||||
//The ammo/gun is stored in a back slot item
|
||||
/obj/item/weapon/minigunpack
|
||||
/obj/item/minigunpack
|
||||
name = "backpack power source"
|
||||
desc = "The massive external power source for the laser gatling gun"
|
||||
icon = 'icons/obj/guns/minigun.dmi'
|
||||
@@ -9,25 +9,25 @@
|
||||
item_state = "backpack"
|
||||
slot_flags = SLOT_BACK
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/obj/item/weapon/gun/ballistic/minigun/gun
|
||||
var/obj/item/gun/ballistic/minigun/gun
|
||||
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/Initialize()
|
||||
/obj/item/minigunpack/Initialize()
|
||||
. = ..()
|
||||
gun = new(src)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/minigunpack/Destroy()
|
||||
/obj/item/minigunpack/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/minigunpack/process()
|
||||
/obj/item/minigunpack/process()
|
||||
overheat = max(0, overheat - heat_diffusion)
|
||||
|
||||
/obj/item/weapon/minigunpack/attack_hand(var/mob/living/carbon/user)
|
||||
/obj/item/minigunpack/attack_hand(var/mob/living/carbon/user)
|
||||
if(src.loc == user)
|
||||
if(!armed)
|
||||
if(user.get_item_by_slot(slot_back) == src)
|
||||
@@ -44,17 +44,17 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/minigunpack/attackby(obj/item/weapon/W, mob/user, params)
|
||||
/obj/item/minigunpack/attackby(obj/item/W, mob/user, params)
|
||||
if(W == gun) //Don't need armed check, because if you have the gun assume its armed.
|
||||
user.dropItemToGround(gun, TRUE)
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/minigunpack/dropped(mob/user)
|
||||
/obj/item/minigunpack/dropped(mob/user)
|
||||
if(armed)
|
||||
user.dropItemToGround(gun, TRUE)
|
||||
|
||||
/obj/item/weapon/minigunpack/MouseDrop(atom/over_object)
|
||||
/obj/item/minigunpack/MouseDrop(atom/over_object)
|
||||
if(armed)
|
||||
return
|
||||
if(iscarbon(usr))
|
||||
@@ -70,13 +70,13 @@
|
||||
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
||||
|
||||
|
||||
/obj/item/weapon/minigunpack/update_icon()
|
||||
/obj/item/minigunpack/update_icon()
|
||||
if(armed)
|
||||
icon_state = "notholstered"
|
||||
else
|
||||
icon_state = "holstered"
|
||||
|
||||
/obj/item/weapon/minigunpack/proc/attach_gun(var/mob/user)
|
||||
/obj/item/minigunpack/proc/attach_gun(var/mob/user)
|
||||
if(!gun)
|
||||
gun = new(src)
|
||||
gun.forceMove(src)
|
||||
@@ -89,7 +89,7 @@
|
||||
user.update_inv_back()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/minigun
|
||||
/obj/item/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'
|
||||
@@ -109,26 +109,26 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/minigun
|
||||
casing_ejector = 0
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
var/obj/item/weapon/minigunpack/ammo_pack
|
||||
var/obj/item/minigunpack/ammo_pack
|
||||
|
||||
/obj/item/weapon/gun/ballistic/minigun/Initialize()
|
||||
if(istype(loc, /obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
|
||||
/obj/item/gun/ballistic/minigun/Initialize()
|
||||
if(istype(loc, /obj/item/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
|
||||
ammo_pack = loc
|
||||
else
|
||||
return INITIALIZE_HINT_QDEL //No pack, no gun
|
||||
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/minigun/attack_self(mob/living/user)
|
||||
/obj/item/gun/ballistic/minigun/attack_self(mob/living/user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/minigun/dropped(mob/user)
|
||||
/obj/item/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)
|
||||
/obj/item/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
|
||||
@@ -136,12 +136,12 @@
|
||||
else
|
||||
to_chat(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)
|
||||
/obj/item/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(!ammo_pack || ammo_pack.loc != user)
|
||||
to_chat(user, "You need the backpack power source to fire the gun!")
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/minigun/dropped(mob/living/user)
|
||||
/obj/item/gun/ballistic/minigun/dropped(mob/living/user)
|
||||
ammo_pack.attach_gun(user)
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//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
|
||||
/obj/item/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"
|
||||
@@ -11,15 +11,15 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
pin = /obj/item/device/firing_pin/implant/pindicate
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/grenadelauncher/unrestricted
|
||||
/obj/item/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)
|
||||
/obj/item/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
|
||||
/obj/item/gun/ballistic/revolver/grenadelauncher/cyborg
|
||||
desc = "A 6-shot grenade launcher."
|
||||
name = "multi grenade launcher"
|
||||
icon = 'icons/mecha/mecha_equipment.dmi'
|
||||
@@ -27,10 +27,10 @@
|
||||
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()
|
||||
/obj/item/gun/ballistic/revolver/grenadelauncher/cyborg/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/gyropistol
|
||||
/obj/item/gun/ballistic/automatic/gyropistol
|
||||
name = "gyrojet pistol"
|
||||
desc = "A prototype pistol designed to fire self propelled rockets."
|
||||
icon_state = "gyropistol"
|
||||
@@ -42,11 +42,11 @@
|
||||
actions_types = list()
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/gyropistol/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/gyropistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/speargun
|
||||
/obj/item/gun/ballistic/automatic/speargun
|
||||
name = "kinetic speargun"
|
||||
desc = "A weapon favored by carp hunters. Fires specialized spears using kinetic energy."
|
||||
icon_state = "speargun"
|
||||
@@ -63,20 +63,20 @@
|
||||
actions_types = list()
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/speargun/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/speargun/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/speargun/attack_self()
|
||||
/obj/item/gun/ballistic/automatic/speargun/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/speargun/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/automatic/speargun/attackby(obj/item/A, mob/user, params)
|
||||
var/num_loaded = magazine.attackby(A, user, params, 1)
|
||||
if(num_loaded)
|
||||
to_chat(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
|
||||
/obj/item/gun/ballistic/automatic/atlauncher
|
||||
desc = "A pre-loaded, single shot anti-armour launcher."
|
||||
name = "anti-armour grenade launcher"
|
||||
icon_state = "rocketlauncher"
|
||||
@@ -92,9 +92,9 @@
|
||||
casing_ejector = 0
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/atlauncher/attack_self()
|
||||
/obj/item/gun/ballistic/automatic/atlauncher/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/atlauncher/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/atlauncher/update_icon()
|
||||
..()
|
||||
icon_state = "rocketlauncher[magazine ? "-[get_ammo(1)]" : ""]"
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol
|
||||
/obj/item/gun/ballistic/automatic/pistol
|
||||
name = "stechkin pistol"
|
||||
desc = "A small, easily concealable 10mm handgun. Has a threaded barrel for suppressors."
|
||||
icon_state = "pistol"
|
||||
@@ -10,12 +10,12 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/pistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/m1911
|
||||
/obj/item/gun/ballistic/automatic/pistol/m1911
|
||||
name = "\improper M1911"
|
||||
desc = "A classic .45 handgun with a small magazine capacity."
|
||||
icon_state = "m1911"
|
||||
@@ -23,7 +23,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m45
|
||||
can_suppress = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle
|
||||
/obj/item/gun/ballistic/automatic/pistol/deagle
|
||||
name = "desert eagle"
|
||||
desc = "A robust .50 AE handgun."
|
||||
icon_state = "deagle"
|
||||
@@ -31,7 +31,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m50
|
||||
can_suppress = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/pistol/deagle/update_icon()
|
||||
..()
|
||||
if(magazine)
|
||||
cut_overlays()
|
||||
@@ -40,17 +40,17 @@
|
||||
cut_overlays()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/deagle/gold
|
||||
/obj/item/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
|
||||
/obj/item/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
|
||||
/obj/item/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"
|
||||
@@ -62,13 +62,13 @@
|
||||
fire_delay = 2
|
||||
actions_types = list(/datum/action/item_action/toggle_firemode)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/pistol/stickman
|
||||
/obj/item/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)
|
||||
/obj/item/gun/ballistic/automatic/pistol/stickman/pickup(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>As you try to pick up [src], it slips out of your grip..</span>")
|
||||
if(prob(50))
|
||||
to_chat(user, "<span class='notice'>..and vanishes from your vision! Where the hell did it go?</span>")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/ballistic/revolver
|
||||
/obj/item/gun/ballistic/revolver
|
||||
name = "\improper .357 revolver"
|
||||
desc = "A suspicious revolver. Uses .357 ammo." //usually used by syndicates
|
||||
icon_state = "revolver"
|
||||
@@ -6,22 +6,22 @@
|
||||
origin_tech = "combat=3;materials=2"
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/Initialize()
|
||||
/obj/item/gun/ballistic/revolver/Initialize()
|
||||
. = ..()
|
||||
if(!istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder))
|
||||
verbs -= /obj/item/weapon/gun/ballistic/revolver/verb/spin
|
||||
verbs -= /obj/item/gun/ballistic/revolver/verb/spin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/chamber_round(spin = 1)
|
||||
/obj/item/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)
|
||||
/obj/item/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)
|
||||
/obj/item/gun/ballistic/revolver/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -33,7 +33,7 @@
|
||||
update_icon()
|
||||
chamber_round(0)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/attack_self(mob/living/user)
|
||||
/obj/item/gun/ballistic/revolver/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
chambered = null
|
||||
while (get_ammo() > 0)
|
||||
@@ -50,7 +50,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/verb/spin()
|
||||
/obj/item/gun/ballistic/revolver/verb/spin()
|
||||
set name = "Spin Chamber"
|
||||
set category = "Object"
|
||||
set desc = "Click to spin your revolver's chamber."
|
||||
@@ -63,19 +63,19 @@
|
||||
if(do_spin())
|
||||
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
|
||||
verbs -= /obj/item/gun/ballistic/revolver/verb/spin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/proc/do_spin()
|
||||
/obj/item/gun/ballistic/revolver/proc/do_spin()
|
||||
var/obj/item/ammo_box/magazine/internal/cylinder/C = magazine
|
||||
. = istype(C)
|
||||
if(.)
|
||||
C.spin()
|
||||
chamber_round(0)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/can_shoot()
|
||||
/obj/item/gun/ballistic/revolver/can_shoot()
|
||||
return get_ammo(0,0)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/get_ammo(countchambered = 0, countempties = 1)
|
||||
/obj/item/gun/ballistic/revolver/get_ammo(countchambered = 0, countempties = 1)
|
||||
var/boolets = 0 //mature var names for mature people
|
||||
if (chambered && countchambered)
|
||||
boolets++
|
||||
@@ -83,11 +83,11 @@
|
||||
boolets += magazine.ammo_count(countempties)
|
||||
return boolets
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/examine(mob/user)
|
||||
/obj/item/gun/ballistic/revolver/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "[get_ammo(0,0)] of those are live rounds.")
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/detective
|
||||
/obj/item/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"
|
||||
@@ -100,7 +100,7 @@
|
||||
"The Peacemaker" = "detective_peacemaker"
|
||||
)
|
||||
|
||||
/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 = "")
|
||||
/obj/item/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)
|
||||
@@ -110,9 +110,9 @@
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/detective/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/revolver/detective/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/weapon/screwdriver))
|
||||
if(istype(A, /obj/item/screwdriver))
|
||||
if(magazine.caliber == "38")
|
||||
to_chat(user, "<span class='notice'>You begin to reinforce the barrel of [src]...</span>")
|
||||
if(magazine.ammo_count())
|
||||
@@ -141,12 +141,12 @@
|
||||
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/mateba
|
||||
/obj/item/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
|
||||
/obj/item/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"
|
||||
@@ -154,7 +154,7 @@
|
||||
recoil = 8
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/nagant
|
||||
/obj/item/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"
|
||||
@@ -166,20 +166,20 @@
|
||||
// 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
|
||||
/obj/item/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/Initialize()
|
||||
/obj/item/gun/ballistic/revolver/russian/Initialize()
|
||||
. = ..()
|
||||
do_spin()
|
||||
spun = TRUE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/russian/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/revolver/russian/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(get_ammo() > 0)
|
||||
spin()
|
||||
@@ -188,14 +188,14 @@
|
||||
A.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/russian/attack_self(mob/user)
|
||||
/obj/item/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)
|
||||
/obj/item/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
|
||||
@@ -233,15 +233,15 @@
|
||||
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")
|
||||
/obj/item/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
|
||||
/obj/item/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)
|
||||
/obj/item/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
|
||||
@@ -253,7 +253,7 @@
|
||||
// DOUBLE BARRELED SHOTGUN //
|
||||
/////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel
|
||||
name = "double-barreled shotgun"
|
||||
desc = "A true classic."
|
||||
icon_state = "dshotgun"
|
||||
@@ -274,18 +274,18 @@
|
||||
"Rosewood" = "dshotgun-p"
|
||||
)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/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/transforming/energy))
|
||||
var/obj/item/weapon/melee/transforming/energy/W = A
|
||||
if(istype(A, /obj/item/melee/transforming/energy))
|
||||
var/obj/item/melee/transforming/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
while (get_ammo() > 0)
|
||||
var/obj/item/ammo_casing/CB
|
||||
@@ -301,7 +301,7 @@
|
||||
|
||||
// IMPROVISED SHOTGUN //
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised
|
||||
name = "improvised shotgun"
|
||||
desc = "Essentially a tube that aims shotgun shells."
|
||||
icon_state = "ishotgun"
|
||||
@@ -315,7 +315,7 @@
|
||||
unique_reskin = null
|
||||
var/slung = FALSE
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/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
|
||||
@@ -327,19 +327,19 @@
|
||||
else
|
||||
to_chat(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()
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/update_icon()
|
||||
..()
|
||||
if(slung)
|
||||
icon_state += "sling"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/sawoff(mob/user)
|
||||
/obj/item/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()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/improvised/sawn
|
||||
/obj/item/gun/ballistic/revolver/doublebarrel/improvised/sawn
|
||||
name = "sawn-off improvised shotgun"
|
||||
desc = "A single-shot shotgun, better not miss"
|
||||
icon_state = "ishotgun"
|
||||
@@ -349,10 +349,10 @@
|
||||
slot_flags = SLOT_BELT
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
|
||||
/obj/item/gun/ballistic/revolver/reverse //Fires directly at its user... unless the user is a clown, of course.
|
||||
clumsy_check = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user)
|
||||
/obj/item/gun/ballistic/revolver/reverse/can_trigger_gun(mob/living/user)
|
||||
if((user.disabilities & CLUMSY) || (user.mind && user.mind.assigned_role == "Clown"))
|
||||
return ..()
|
||||
if(process_fire(user, user, 0, zone_override = "head"))
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/ballistic/shotgun
|
||||
/obj/item/gun/ballistic/shotgun
|
||||
name = "shotgun"
|
||||
desc = "A traditional shotgun with wood furniture and a four-shell capacity underneath."
|
||||
icon_state = "shotgun"
|
||||
@@ -13,7 +13,7 @@
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/shotgun/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -24,73 +24,73 @@
|
||||
A.update_icon()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/process_chamber(empty_chamber = 0)
|
||||
/obj/item/gun/ballistic/shotgun/process_chamber(empty_chamber = 0)
|
||||
return ..() //changed argument value
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/chamber_round()
|
||||
/obj/item/gun/ballistic/shotgun/chamber_round()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/can_shoot()
|
||||
/obj/item/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)
|
||||
/obj/item/gun/ballistic/shotgun/attack_self(mob/living/user)
|
||||
if(recentpump > world.time)
|
||||
return
|
||||
pump(user)
|
||||
recentpump = world.time + 10
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/blow_up(mob/user)
|
||||
/obj/item/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)
|
||||
/obj/item/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)
|
||||
/obj/item/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)
|
||||
/obj/item/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)
|
||||
/obj/item/gun/ballistic/shotgun/examine(mob/user)
|
||||
..()
|
||||
if (chambered)
|
||||
to_chat(user, "A [chambered.BB ? "live" : "spent"] one is in the chamber.")
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/lethal
|
||||
/obj/item/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
|
||||
/obj/item/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)
|
||||
/obj/item/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))
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/weapon/melee/transforming/energy))
|
||||
var/obj/item/weapon/melee/transforming/energy/W = A
|
||||
if(istype(A, /obj/item/melee/transforming/energy))
|
||||
var/obj/item/melee/transforming/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
// BOLT ACTION RIFLE //
|
||||
///////////////////////
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction
|
||||
/obj/item/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"
|
||||
@@ -107,7 +107,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
|
||||
var/bolt_open = FALSE
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/pump(mob/M)
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/pump(mob/M)
|
||||
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
|
||||
if(bolt_open)
|
||||
pump_reload(M)
|
||||
@@ -117,25 +117,25 @@
|
||||
update_icon() //I.E. fix the desc
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/attackby(obj/item/A, mob/user, params)
|
||||
if(!bolt_open)
|
||||
to_chat(user, "<span class='notice'>The bolt is closed!</span>")
|
||||
return
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/examine(mob/user)
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The bolt is [bolt_open ? "open" : "closed"].")
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted
|
||||
/obj/item/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
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/arcane_barrage
|
||||
name = "arcane barrage"
|
||||
desc = "Pew Pew Pew"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
@@ -147,30 +147,30 @@
|
||||
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/Initialize()
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/Initialize()
|
||||
. = ..()
|
||||
bolt_open = TRUE
|
||||
pump()
|
||||
gun_type = type
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/dropped()
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/dropped()
|
||||
..()
|
||||
guns_left = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/proc/discard_gun(mob/user)
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/proc/discard_gun(mob/user)
|
||||
throw_at(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)
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/arcane_barrage/discard_gun(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/attack_self()
|
||||
/obj/item/gun/ballistic/shotgun/boltaction/enchanted/attack_self()
|
||||
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)
|
||||
/obj/item/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
|
||||
var/obj/item/gun/ballistic/shotgun/boltaction/enchanted/GUN = new gun_type
|
||||
GUN.guns_left = guns_left - 1
|
||||
user.drop_item()
|
||||
user.swap_hand()
|
||||
@@ -181,11 +181,11 @@
|
||||
|
||||
// Automatic Shotguns//
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/shoot_live_shot(mob/living/user as mob|obj)
|
||||
/obj/item/gun/ballistic/shotgun/automatic/shoot_live_shot(mob/living/user as mob|obj)
|
||||
..()
|
||||
src.pump(user)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat
|
||||
/obj/item/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"
|
||||
@@ -193,7 +193,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/com
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/combat/compact
|
||||
/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."
|
||||
icon_state = "cshotgunc"
|
||||
@@ -203,7 +203,7 @@
|
||||
|
||||
//Dual Feed Shotgun
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube
|
||||
/obj/item/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"
|
||||
@@ -213,18 +213,18 @@
|
||||
var/toggled = FALSE
|
||||
var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
|
||||
. = ..()
|
||||
if (!alternate_magazine)
|
||||
alternate_magazine = new mag_type(src)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/attack_self(mob/living/user)
|
||||
/obj/item/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)
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/proc/toggle_tube(mob/living/user)
|
||||
var/current_mag = magazine
|
||||
var/alt_mag = alternate_magazine
|
||||
magazine = alt_mag
|
||||
@@ -235,7 +235,7 @@
|
||||
else
|
||||
to_chat(user, "You switch to tube A.")
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/AltClick(mob/living/user)
|
||||
/obj/item/gun/ballistic/shotgun/automatic/dual_tube/AltClick(mob/living/user)
|
||||
if(user.incapacitated() || !Adjacent(user) || !istype(user))
|
||||
return
|
||||
pump()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy
|
||||
/obj/item/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'
|
||||
@@ -14,10 +14,10 @@
|
||||
needs_permit = 0
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/toy/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy/pistol
|
||||
/obj/item/gun/ballistic/automatic/toy/pistol
|
||||
name = "foam force pistol"
|
||||
desc = "A small, easily concealable toy handgun. Ages 8 and up."
|
||||
icon_state = "pistol"
|
||||
@@ -28,24 +28,24 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/update_icon()
|
||||
/obj/item/gun/ballistic/automatic/toy/pistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot
|
||||
/obj/item/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/Initialize()
|
||||
/obj/item/gun/ballistic/automatic/toy/pistol/riot/Initialize()
|
||||
magazine = new /obj/item/ammo_box/magazine/toy/pistol/riot(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/toy/pistol/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/toy/pistol/riot/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/toy
|
||||
/obj/item/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'
|
||||
@@ -58,15 +58,15 @@
|
||||
casing_ejector = 0
|
||||
can_suppress = FALSE
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
|
||||
/obj/item/gun/ballistic/shotgun/toy/process_chamber(empty_chamber = 0)
|
||||
..()
|
||||
if(chambered && !chambered.BB)
|
||||
qdel(chambered)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/toy/unrestricted
|
||||
/obj/item/gun/ballistic/shotgun/toy/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/shotgun/toy/crossbow
|
||||
/obj/item/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'
|
||||
@@ -77,7 +77,7 @@
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/c20r/toy
|
||||
/obj/item/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'
|
||||
@@ -86,10 +86,10 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/smgm45
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/c20r/toy/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/c20r/toy/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/toy
|
||||
/obj/item/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'
|
||||
@@ -98,5 +98,5 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/m762
|
||||
casing_ejector = 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/automatic/l6_saw/toy/unrestricted
|
||||
/obj/item/gun/ballistic/automatic/l6_saw/toy/unrestricted
|
||||
pin = /obj/item/device/firing_pin
|
||||
Reference in New Issue
Block a user