|
|
|
|
@@ -11,19 +11,19 @@
|
|
|
|
|
righthand_file = 'icons/mob/inhands/equipment/backpack_righthand.dmi'
|
|
|
|
|
slot_flags = ITEM_SLOT_BACK
|
|
|
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
|
|
|
var/obj/item/gun/ballistic/minigun/gun
|
|
|
|
|
var/obj/item/gun/energy/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/overheat_max = 50
|
|
|
|
|
var/heat_diffusion = 1
|
|
|
|
|
|
|
|
|
|
/obj/item/minigunpack/Initialize()
|
|
|
|
|
. = ..()
|
|
|
|
|
gun = new(src)
|
|
|
|
|
START_PROCESSING(SSobj, src)
|
|
|
|
|
START_PROCESSING(SSfastprocess, src)
|
|
|
|
|
|
|
|
|
|
/obj/item/minigunpack/Destroy()
|
|
|
|
|
STOP_PROCESSING(SSobj, src)
|
|
|
|
|
STOP_PROCESSING(SSfastprocess, src)
|
|
|
|
|
return ..()
|
|
|
|
|
|
|
|
|
|
/obj/item/minigunpack/process()
|
|
|
|
|
@@ -72,7 +72,6 @@
|
|
|
|
|
var/obj/screen/inventory/hand/H = over_object
|
|
|
|
|
M.putItemFromInventoryInHandIfPossible(src, H.held_index)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/obj/item/minigunpack/update_icon_state()
|
|
|
|
|
if(armed)
|
|
|
|
|
icon_state = "notholstered"
|
|
|
|
|
@@ -92,7 +91,7 @@
|
|
|
|
|
user.update_inv_back()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/obj/item/gun/ballistic/minigun
|
|
|
|
|
/obj/item/gun/energy/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'
|
|
|
|
|
@@ -103,17 +102,20 @@
|
|
|
|
|
slot_flags = null
|
|
|
|
|
w_class = WEIGHT_CLASS_HUGE
|
|
|
|
|
custom_materials = null
|
|
|
|
|
burst_size = 3
|
|
|
|
|
automatic = 0
|
|
|
|
|
fire_delay = 1
|
|
|
|
|
automatic = 0.5
|
|
|
|
|
fire_delay = 2
|
|
|
|
|
ammo_type = list(
|
|
|
|
|
/obj/item/ammo_casing/energy/laser
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
weapon_weight = WEAPON_HEAVY
|
|
|
|
|
fire_sound = 'sound/weapons/laser.ogg'
|
|
|
|
|
mag_type = /obj/item/ammo_box/magazine/internal/minigun
|
|
|
|
|
casing_ejector = FALSE
|
|
|
|
|
charge_sections = 0
|
|
|
|
|
shaded_charge = 0
|
|
|
|
|
item_flags = NEEDS_PERMIT | SLOWS_WHILE_IN_HAND
|
|
|
|
|
var/obj/item/minigunpack/ammo_pack
|
|
|
|
|
|
|
|
|
|
/obj/item/gun/ballistic/minigun/Initialize()
|
|
|
|
|
/obj/item/gun/energy/minigun/Initialize()
|
|
|
|
|
if(istype(loc, /obj/item/minigunpack)) //We should spawn inside an ammo pack so let's use that one.
|
|
|
|
|
ammo_pack = loc
|
|
|
|
|
else
|
|
|
|
|
@@ -121,29 +123,29 @@
|
|
|
|
|
|
|
|
|
|
return ..()
|
|
|
|
|
|
|
|
|
|
/obj/item/gun/ballistic/minigun/attack_self(mob/living/user)
|
|
|
|
|
/obj/item/gun/energy/minigun/attack_self(mob/living/user)
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
/obj/item/gun/ballistic/minigun/dropped(mob/user)
|
|
|
|
|
/obj/item/gun/energy/minigun/dropped(mob/user)
|
|
|
|
|
. = ..()
|
|
|
|
|
if(ammo_pack)
|
|
|
|
|
ammo_pack.attach_gun(user)
|
|
|
|
|
else
|
|
|
|
|
qdel(src)
|
|
|
|
|
|
|
|
|
|
/obj/item/gun/ballistic/minigun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, stam_cost = 0)
|
|
|
|
|
/obj/item/gun/energy/minigun/process_fire(atom/target, mob/living/user, message = TRUE, params = null, zone_override = "", bonus_spread = 0, stam_cost = 0)
|
|
|
|
|
if(ammo_pack)
|
|
|
|
|
if(ammo_pack.overheat < ammo_pack.overheat_max)
|
|
|
|
|
ammo_pack.overheat += burst_size
|
|
|
|
|
ammo_pack.overheat++
|
|
|
|
|
..()
|
|
|
|
|
else
|
|
|
|
|
to_chat(user, "The gun's heat sensor locked the trigger to prevent lens damage.")
|
|
|
|
|
|
|
|
|
|
/obj/item/gun/ballistic/minigun/afterattack(atom/target, mob/living/user, flag, params)
|
|
|
|
|
/obj/item/gun/energy/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/gun/ballistic/minigun/dropped(mob/living/user)
|
|
|
|
|
/obj/item/gun/energy/minigun/dropped(mob/living/user)
|
|
|
|
|
. = ..()
|
|
|
|
|
ammo_pack.attach_gun(user)
|
|
|
|
|
|