Merge branch 'master' into upstream-merge-29923
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
desc = "A bullet casing."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
icon_state = "s-casing"
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
throwforce = 0
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
@@ -303,7 +303,7 @@
|
||||
|
||||
/obj/item/ammo_casing/shotgun/dart/New()
|
||||
..()
|
||||
container_type |= OPENCONTAINER
|
||||
container_type |= OPENCONTAINER_1
|
||||
create_reagents(30)
|
||||
reagents.set_reacting(FALSE)
|
||||
|
||||
|
||||
@@ -78,13 +78,13 @@
|
||||
|
||||
/obj/item/ammo_casing/caseless/foam_dart/attackby(obj/item/A, mob/user, params)
|
||||
var/obj/item/projectile/bullet/reusable/foam_dart/FD = BB
|
||||
if (istype(A, /obj/item/weapon/screwdriver) && !modified)
|
||||
if (istype(A, /obj/item/screwdriver) && !modified)
|
||||
modified = 1
|
||||
FD.modified = 1
|
||||
FD.damage_type = BRUTE
|
||||
to_chat(user, "<span class='notice'>You pop the safety cap off [src].</span>")
|
||||
update_icon()
|
||||
else if (istype(A, /obj/item/weapon/pen))
|
||||
else if (istype(A, /obj/item/pen))
|
||||
if(modified)
|
||||
if(!FD.pen)
|
||||
if(!user.transferItemToLoc(A, FD))
|
||||
|
||||
@@ -158,7 +158,7 @@
|
||||
projectile_type = /obj/item/projectile/beam/wormhole
|
||||
e_cost = 0
|
||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||
var/obj/item/weapon/gun/energy/wormhole_projector/gun = null
|
||||
var/obj/item/gun/energy/wormhole_projector/gun = null
|
||||
select_name = "blue"
|
||||
|
||||
/obj/item/ammo_casing/energy/wormhole/orange
|
||||
@@ -211,9 +211,9 @@
|
||||
fire_sound = 'sound/weapons/wave.ogg'
|
||||
select_name = "repulse"
|
||||
delay = 50
|
||||
var/obj/item/weapon/gun/energy/gravity_gun/gun = null
|
||||
var/obj/item/gun/energy/gravity_gun/gun = null
|
||||
|
||||
/obj/item/ammo_casing/energy/gravityrepulse/New(var/obj/item/weapon/gun/energy/gravity_gun/G)
|
||||
/obj/item/ammo_casing/energy/gravityrepulse/New(var/obj/item/gun/energy/gravity_gun/G)
|
||||
gun = G
|
||||
|
||||
/obj/item/ammo_casing/energy/gravityattract
|
||||
@@ -222,10 +222,10 @@
|
||||
fire_sound = 'sound/weapons/wave.ogg'
|
||||
select_name = "attract"
|
||||
delay = 50
|
||||
var/obj/item/weapon/gun/energy/gravity_gun/gun = null
|
||||
var/obj/item/gun/energy/gravity_gun/gun = null
|
||||
|
||||
|
||||
/obj/item/ammo_casing/energy/gravityattract/New(var/obj/item/weapon/gun/energy/gravity_gun/G)
|
||||
/obj/item/ammo_casing/energy/gravityattract/New(var/obj/item/gun/energy/gravity_gun/G)
|
||||
gun = G
|
||||
|
||||
/obj/item/ammo_casing/energy/gravitychaos
|
||||
@@ -234,9 +234,9 @@
|
||||
fire_sound = 'sound/weapons/wave.ogg'
|
||||
select_name = "chaos"
|
||||
delay = 50
|
||||
var/obj/item/weapon/gun/energy/gravity_gun/gun = null
|
||||
var/obj/item/gun/energy/gravity_gun/gun = null
|
||||
|
||||
/obj/item/ammo_casing/energy/gravitychaos/New(var/obj/item/weapon/gun/energy/gravity_gun/G)
|
||||
/obj/item/ammo_casing/energy/gravitychaos/New(var/obj/item/gun/energy/gravity_gun/G)
|
||||
gun = G
|
||||
|
||||
/obj/item/ammo_casing/energy/plasma
|
||||
|
||||
@@ -49,12 +49,12 @@
|
||||
/obj/item/ammo_casing/syringegun/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
if(!BB)
|
||||
return
|
||||
if(istype(loc, /obj/item/weapon/gun/syringe))
|
||||
var/obj/item/weapon/gun/syringe/SG = loc
|
||||
if(istype(loc, /obj/item/gun/syringe))
|
||||
var/obj/item/gun/syringe/SG = loc
|
||||
if(!SG.syringes.len)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = SG.syringes[1]
|
||||
var/obj/item/reagent_containers/syringe/S = SG.syringes[1]
|
||||
|
||||
S.reagents.trans_to(BB, S.reagents.total_volume)
|
||||
BB.name = S.name
|
||||
@@ -73,12 +73,12 @@
|
||||
/obj/item/ammo_casing/dnainjector/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
if(!BB)
|
||||
return
|
||||
if(istype(loc, /obj/item/weapon/gun/syringe/dna))
|
||||
var/obj/item/weapon/gun/syringe/dna/SG = loc
|
||||
if(istype(loc, /obj/item/gun/syringe/dna))
|
||||
var/obj/item/gun/syringe/dna/SG = loc
|
||||
if(!SG.syringes.len)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/dnainjector/S = popleft(SG.syringes)
|
||||
var/obj/item/dnainjector/S = popleft(SG.syringes)
|
||||
var/obj/item/projectile/bullet/dnainjector/D = BB
|
||||
S.forceMove(D)
|
||||
D.injector = S
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
desc = "A box of ammo."
|
||||
icon_state = "357"
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
item_state = "syringe_kit"
|
||||
lefthand_file = 'icons/mob/inhands/equipment/medical_lefthand.dmi'
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
|
||||
#define DUALWIELD_PENALTY_EXTRA_MULTIPLIER 1.4
|
||||
|
||||
/obj/item/weapon/gun
|
||||
/obj/item/gun
|
||||
name = "gun"
|
||||
desc = "It's a gun. It's pretty terrible, though."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "detective"
|
||||
item_state = "gun"
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BELT
|
||||
materials = list(MAT_METAL=2000)
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
var/obj/item/device/flashlight/gun_light
|
||||
var/can_flashlight = 0
|
||||
var/obj/item/weapon/kitchen/knife/bayonet
|
||||
var/obj/item/kitchen/knife/bayonet
|
||||
var/can_bayonet = FALSE
|
||||
var/datum/action/item_action/toggle_gunlight/alight
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
var/zoom_out_amt = 0
|
||||
var/datum/action/toggle_scope_zoom/azoom
|
||||
|
||||
/obj/item/weapon/gun/Initialize()
|
||||
/obj/item/gun/Initialize()
|
||||
. = ..()
|
||||
if(pin)
|
||||
pin = new pin(src)
|
||||
@@ -74,9 +74,9 @@
|
||||
build_zooming()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/CheckParts(list/parts_list)
|
||||
/obj/item/gun/CheckParts(list/parts_list)
|
||||
..()
|
||||
var/obj/item/weapon/gun/G = locate(/obj/item/weapon/gun) in contents
|
||||
var/obj/item/gun/G = locate(/obj/item/gun) in contents
|
||||
if(G)
|
||||
G.loc = loc
|
||||
qdel(G.pin)
|
||||
@@ -84,35 +84,35 @@
|
||||
visible_message("[G] can now fit a new pin, but the old one was destroyed in the process.", null, null, 3)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/gun/examine(mob/user)
|
||||
/obj/item/gun/examine(mob/user)
|
||||
..()
|
||||
if(pin)
|
||||
to_chat(user, "It has [pin] installed.")
|
||||
else
|
||||
to_chat(user, "It doesn't have a firing pin installed, and won't fire.")
|
||||
|
||||
/obj/item/weapon/gun/equipped(mob/living/user, slot)
|
||||
/obj/item/gun/equipped(mob/living/user, slot)
|
||||
. = ..()
|
||||
if(zoomable && user.get_active_held_item() != src)
|
||||
zoom(user, FALSE) //we can only stay zoomed in if it's in our hands
|
||||
|
||||
//called after the gun has successfully fired its chambered ammo.
|
||||
/obj/item/weapon/gun/proc/process_chamber()
|
||||
/obj/item/gun/proc/process_chamber()
|
||||
return 0
|
||||
|
||||
|
||||
//check if there's enough ammo/energy/whatever to shoot one time
|
||||
//i.e if clicking would make it shoot
|
||||
/obj/item/weapon/gun/proc/can_shoot()
|
||||
/obj/item/gun/proc/can_shoot()
|
||||
return 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
/obj/item/gun/proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='danger'>*click*</span>")
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/proc/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
|
||||
/obj/item/gun/proc/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
|
||||
if(recoil)
|
||||
shake_camera(user, recoil + 1, recoil)
|
||||
|
||||
@@ -126,12 +126,12 @@
|
||||
else
|
||||
user.visible_message("<span class='danger'>[user] fires [src]!</span>", null, null, COMBAT_MESSAGE_RANGE)
|
||||
|
||||
/obj/item/weapon/gun/emp_act(severity)
|
||||
/obj/item/gun/emp_act(severity)
|
||||
for(var/obj/O in contents)
|
||||
O.emp_act(severity)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
/obj/item/gun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(firing_burst)
|
||||
return
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
@@ -176,24 +176,24 @@
|
||||
var/loop_counter = 0
|
||||
if(ishuman(user) && user.a_intent == INTENT_HARM)
|
||||
var/mob/living/carbon/human/H = user
|
||||
for(var/obj/item/weapon/gun/G in H.held_items)
|
||||
for(var/obj/item/gun/G in H.held_items)
|
||||
if(G == src || G.weapon_weight >= WEAPON_MEDIUM)
|
||||
continue
|
||||
else if(G.can_trigger_gun(user))
|
||||
bonus_spread += 24 * G.weapon_weight
|
||||
loop_counter++
|
||||
addtimer(CALLBACK(G, /obj/item/weapon/gun.proc/process_fire, target, user, 1, params, null, bonus_spread), loop_counter)
|
||||
addtimer(CALLBACK(G, /obj/item/gun.proc/process_fire, target, user, 1, params, null, bonus_spread), loop_counter)
|
||||
|
||||
process_fire(target,user,1,params, null, bonus_spread)
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/can_trigger_gun(mob/living/user)
|
||||
/obj/item/gun/can_trigger_gun(mob/living/user)
|
||||
. = ..()
|
||||
if(!handle_pins(user))
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/proc/handle_pins(mob/living/user)
|
||||
/obj/item/gun/proc/handle_pins(mob/living/user)
|
||||
if(pin)
|
||||
if(pin.pin_auth(user) || pin.emagged)
|
||||
return 1
|
||||
@@ -204,10 +204,10 @@
|
||||
to_chat(user, "<span class='warning'>[src]'s trigger is locked. This weapon doesn't have a firing pin installed!</span>")
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/proc/recharge_newshot()
|
||||
/obj/item/gun/proc/recharge_newshot()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0)
|
||||
/obj/item/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(semicd)
|
||||
@@ -274,7 +274,7 @@
|
||||
SSblackbox.add_details("gun_fired","[src.type]")
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/update_icon()
|
||||
/obj/item/gun/update_icon()
|
||||
..()
|
||||
cut_overlays()
|
||||
if(gun_light && can_flashlight)
|
||||
@@ -294,7 +294,7 @@
|
||||
knife_overlay.pixel_y = knife_y_offset
|
||||
add_overlay(knife_overlay)
|
||||
|
||||
/obj/item/weapon/gun/attack(mob/M as mob, mob/user)
|
||||
/obj/item/gun/attack(mob/M as mob, mob/user)
|
||||
if(user.a_intent == INTENT_HARM) //Flogging
|
||||
if(bayonet)
|
||||
M.attackby(bayonet, user)
|
||||
@@ -303,14 +303,14 @@
|
||||
return ..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/attack_obj(obj/O, mob/user)
|
||||
/obj/item/gun/attack_obj(obj/O, mob/user)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
if(bayonet)
|
||||
O.attackby(bayonet, user)
|
||||
return
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gun/attackby(obj/item/I, mob/user, params)
|
||||
if(user.a_intent == INTENT_HARM)
|
||||
return ..()
|
||||
else if(istype(I, /obj/item/device/flashlight/seclite))
|
||||
@@ -329,17 +329,17 @@
|
||||
alight = new /datum/action/item_action/toggle_gunlight(src)
|
||||
if(loc == user)
|
||||
alight.Grant(user)
|
||||
else if(istype(I, /obj/item/weapon/kitchen/knife))
|
||||
else if(istype(I, /obj/item/kitchen/knife))
|
||||
if(!can_bayonet)
|
||||
return ..()
|
||||
var/obj/item/weapon/kitchen/knife/K = I
|
||||
var/obj/item/kitchen/knife/K = I
|
||||
if(!bayonet)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You attach \the [K] to the front of \the [src].</span>")
|
||||
bayonet = K
|
||||
update_icon()
|
||||
else if(istype(I, /obj/item/weapon/screwdriver))
|
||||
else if(istype(I, /obj/item/screwdriver))
|
||||
if(gun_light)
|
||||
var/obj/item/device/flashlight/seclite/S = gun_light
|
||||
to_chat(user, "<span class='notice'>You unscrew the seclite from \the [src].</span>")
|
||||
@@ -350,14 +350,14 @@
|
||||
update_icon()
|
||||
QDEL_NULL(alight)
|
||||
if(bayonet)
|
||||
var/obj/item/weapon/kitchen/knife/K = bayonet
|
||||
var/obj/item/kitchen/knife/K = bayonet
|
||||
K.forceMove(get_turf(user))
|
||||
bayonet = null
|
||||
update_icon()
|
||||
else
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/proc/toggle_gunlight()
|
||||
/obj/item/gun/proc/toggle_gunlight()
|
||||
if(!gun_light)
|
||||
return
|
||||
|
||||
@@ -369,7 +369,7 @@
|
||||
update_gunlight(user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/proc/update_gunlight(mob/user = null)
|
||||
/obj/item/gun/proc/update_gunlight(mob/user = null)
|
||||
if(gun_light)
|
||||
if(gun_light.on)
|
||||
set_light(gun_light.brightness_on)
|
||||
@@ -383,14 +383,14 @@
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/pickup(mob/user)
|
||||
/obj/item/gun/pickup(mob/user)
|
||||
..()
|
||||
if(azoom)
|
||||
azoom.Grant(user)
|
||||
if(alight)
|
||||
alight.Grant(user)
|
||||
|
||||
/obj/item/weapon/gun/dropped(mob/user)
|
||||
/obj/item/gun/dropped(mob/user)
|
||||
..()
|
||||
zoom(user,FALSE)
|
||||
if(azoom)
|
||||
@@ -398,7 +398,7 @@
|
||||
if(alight)
|
||||
alight.Remove(user)
|
||||
|
||||
/obj/item/weapon/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params)
|
||||
/obj/item/gun/proc/handle_suicide(mob/living/carbon/human/user, mob/living/carbon/human/target, params)
|
||||
if(!ishuman(user) || !ishuman(target))
|
||||
return
|
||||
|
||||
@@ -432,7 +432,7 @@
|
||||
|
||||
process_fire(target, user, 1, params)
|
||||
|
||||
/obj/item/weapon/gun/proc/unlock() //used in summon guns and as a convience for admins
|
||||
/obj/item/gun/proc/unlock() //used in summon guns and as a convience for admins
|
||||
if(pin)
|
||||
qdel(pin)
|
||||
pin = new /obj/item/device/firing_pin
|
||||
@@ -446,7 +446,7 @@
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUN|AB_CHECK_LYING
|
||||
icon_icon = 'icons/mob/actions/actions_items.dmi'
|
||||
button_icon_state = "sniper_zoom"
|
||||
var/obj/item/weapon/gun/gun = null
|
||||
var/obj/item/gun/gun = null
|
||||
|
||||
/datum/action/toggle_scope_zoom/Trigger()
|
||||
gun.zoom(owner)
|
||||
@@ -461,7 +461,7 @@
|
||||
..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/proc/zoom(mob/living/user, forced_zoom)
|
||||
/obj/item/gun/proc/zoom(mob/living/user, forced_zoom)
|
||||
if(!user || !user.client)
|
||||
return
|
||||
|
||||
@@ -496,7 +496,7 @@
|
||||
return zoomed
|
||||
|
||||
//Proc, so that gun accessories/scopes/etc. can easily add zooming.
|
||||
/obj/item/weapon/gun/proc/build_zooming()
|
||||
/obj/item/gun/proc/build_zooming()
|
||||
if(azoom)
|
||||
return
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/ballistic
|
||||
/obj/item/gun/ballistic
|
||||
desc = "Now comes in flavors like GUN. Uses 10mm ammo, for some reason"
|
||||
name = "projectile gun"
|
||||
icon_state = "pistol"
|
||||
@@ -9,7 +9,7 @@
|
||||
var/obj/item/ammo_box/magazine/magazine
|
||||
var/casing_ejector = 1 //whether the gun ejects the chambered casing
|
||||
|
||||
/obj/item/weapon/gun/ballistic/Initialize()
|
||||
/obj/item/gun/ballistic/Initialize()
|
||||
. = ..()
|
||||
if(!spawnwithmagazine)
|
||||
update_icon()
|
||||
@@ -19,7 +19,7 @@
|
||||
chamber_round()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/update_icon()
|
||||
/obj/item/gun/ballistic/update_icon()
|
||||
..()
|
||||
if(current_skin)
|
||||
icon_state = "[unique_reskin[current_skin]][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
|
||||
@@ -27,7 +27,7 @@
|
||||
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/process_chamber(empty_chamber = 1)
|
||||
/obj/item/gun/ballistic/process_chamber(empty_chamber = 1)
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
if(istype(AC)) //there's a chambered round
|
||||
if(casing_ejector)
|
||||
@@ -39,19 +39,19 @@
|
||||
chamber_round()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/proc/chamber_round()
|
||||
/obj/item/gun/ballistic/proc/chamber_round()
|
||||
if (chambered || !magazine)
|
||||
return
|
||||
else if (magazine.ammo_count())
|
||||
chambered = magazine.get_round()
|
||||
chambered.forceMove(src)
|
||||
|
||||
/obj/item/weapon/gun/ballistic/can_shoot()
|
||||
/obj/item/gun/ballistic/can_shoot()
|
||||
if(!magazine || !magazine.ammo_count(0))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/ballistic/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/ballistic/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if (istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
@@ -68,8 +68,8 @@
|
||||
return
|
||||
else if (magazine)
|
||||
to_chat(user, "<span class='notice'>There's already a magazine in \the [src].</span>")
|
||||
if(istype(A, /obj/item/weapon/suppressor))
|
||||
var/obj/item/weapon/suppressor/S = A
|
||||
if(istype(A, /obj/item/suppressor))
|
||||
var/obj/item/suppressor/S = A
|
||||
if(can_suppress)
|
||||
if(!suppressed)
|
||||
if(!user.transferItemToLoc(A, src))
|
||||
@@ -90,10 +90,10 @@
|
||||
return
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/ballistic/attack_hand(mob/user)
|
||||
/obj/item/gun/ballistic/attack_hand(mob/user)
|
||||
if(loc == user)
|
||||
if(suppressed && can_unsuppress)
|
||||
var/obj/item/weapon/suppressor/S = suppressed
|
||||
var/obj/item/suppressor/S = suppressed
|
||||
if(!user.is_holding(src))
|
||||
..()
|
||||
return
|
||||
@@ -106,7 +106,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/ballistic/attack_self(mob/living/user)
|
||||
/obj/item/gun/ballistic/attack_self(mob/living/user)
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
if(magazine)
|
||||
magazine.loc = get_turf(src.loc)
|
||||
@@ -125,11 +125,11 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/examine(mob/user)
|
||||
/obj/item/gun/ballistic/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Has [get_ammo()] round\s remaining.")
|
||||
|
||||
/obj/item/weapon/gun/ballistic/proc/get_ammo(countchambered = 1)
|
||||
/obj/item/gun/ballistic/proc/get_ammo(countchambered = 1)
|
||||
var/boolets = 0 //mature var names for mature people
|
||||
if (chambered && countchambered)
|
||||
boolets++
|
||||
@@ -137,7 +137,7 @@
|
||||
boolets += magazine.ammo_count()
|
||||
return boolets
|
||||
|
||||
/obj/item/weapon/gun/ballistic/suicide_act(mob/user)
|
||||
/obj/item/gun/ballistic/suicide_act(mob/user)
|
||||
if (chambered && chambered.BB && can_trigger_gun(user) && !chambered.BB.nodamage)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
sleep(25)
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/ballistic/proc/sawoff(mob/user)
|
||||
/obj/item/gun/ballistic/proc/sawoff(mob/user)
|
||||
if(sawn_state == SAWN_OFF)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
|
||||
return
|
||||
@@ -182,7 +182,7 @@
|
||||
return 1
|
||||
|
||||
// Sawing guns related proc
|
||||
/obj/item/weapon/gun/ballistic/proc/blow_up(mob/user)
|
||||
/obj/item/gun/ballistic/proc/blow_up(mob/user)
|
||||
. = 0
|
||||
for(var/obj/item/ammo_casing/AC in magazine.stored_ammo)
|
||||
if(AC.BB)
|
||||
@@ -190,7 +190,7 @@
|
||||
. = 1
|
||||
|
||||
|
||||
/obj/item/weapon/suppressor
|
||||
/obj/item/suppressor
|
||||
name = "suppressor"
|
||||
desc = "A universal syndicate small-arms suppressor for maximum espionage."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
@@ -200,7 +200,7 @@
|
||||
var/initial_w_class = null
|
||||
|
||||
|
||||
/obj/item/weapon/suppressor/specialoffer
|
||||
/obj/item/suppressor/specialoffer
|
||||
name = "cheap suppressor"
|
||||
desc = "A foreign knock-off suppressor, it feels flimsy, cheap, and brittle. Still fits all weapons."
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
|
||||
@@ -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,14 +89,14 @@
|
||||
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'
|
||||
icon_state = "minigun_spin"
|
||||
item_state = "minigun"
|
||||
origin_tech = "combat=6;powerstorage=5;magnets=4"
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slowdown = 1
|
||||
slot_flags = null
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
@@ -108,28 +108,27 @@
|
||||
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
|
||||
flags_2 = SLOWS_WHILE_IN_HAND_2
|
||||
var/obj/item/minigunpack/ammo_pack
|
||||
|
||||
/obj/item/weapon/gun/ballistic/minigun/Initialize()
|
||||
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
|
||||
|
||||
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
|
||||
@@ -137,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"
|
||||
@@ -261,7 +261,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BACK
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/dual
|
||||
sawn_desc = "Omar's coming!"
|
||||
@@ -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,11 +1,11 @@
|
||||
/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"
|
||||
item_state = "shotgun"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "combat=4;materials=2"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot
|
||||
@@ -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'
|
||||
@@ -143,34 +143,34 @@
|
||||
icon_state = "arcane_barrage"
|
||||
item_state = "arcane_barrage"
|
||||
|
||||
flags = DROPDEL
|
||||
flags_1 = DROPDEL_1
|
||||
|
||||
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
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
#define AIMING_BEAM_ANGLE_CHANGE_THRESHOLD 0.1
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle
|
||||
/obj/item/gun/energy/beam_rifle
|
||||
name = "particle acceleration rifle"
|
||||
desc = "An energy-based anti material marksman rifle that uses highly charged particle beams moving at extreme velocities to decimate whatever is unfortunate enough to be targetted by one. \
|
||||
<span class='boldnotice'>Hold down left click while scoped to aim, when weapon is fully aimed (Tracer goes from red to green as it charges), release to fire. Moving while aiming or \
|
||||
@@ -31,7 +31,7 @@
|
||||
weapon_weight = WEAPON_HEAVY
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/beam_rifle/hitscan)
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/beam_rifle
|
||||
cell_type = /obj/item/stock_parts/cell/beam_rifle
|
||||
canMouseDown = TRUE
|
||||
pin = null
|
||||
var/aiming = FALSE
|
||||
@@ -81,26 +81,26 @@
|
||||
var/datum/action/item_action/zoom_speed_action/zoom_speed_action
|
||||
var/datum/action/item_action/zoom_lock_action/zoom_lock_action
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/debug
|
||||
/obj/item/gun/energy/beam_rifle/debug
|
||||
delay = 0
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/infinite
|
||||
cell_type = /obj/item/stock_parts/cell/infinite
|
||||
aiming_time = 0
|
||||
recoil = 0
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/equipped(mob/user)
|
||||
/obj/item/gun/energy/beam_rifle/equipped(mob/user)
|
||||
set_user(user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/pickup(mob/user)
|
||||
/obj/item/gun/energy/beam_rifle/pickup(mob/user)
|
||||
set_user(user)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/dropped()
|
||||
/obj/item/gun/energy/beam_rifle/dropped()
|
||||
set_user()
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/ui_action_click(owner, action)
|
||||
/obj/item/gun/energy/beam_rifle/ui_action_click(owner, action)
|
||||
if(istype(action, /datum/action/item_action/zoom_speed_action))
|
||||
zoom_speed++
|
||||
if(zoom_speed > 1)
|
||||
@@ -125,7 +125,7 @@
|
||||
to_chat(owner, "<span class='boldnotice'>You disable [src]'s zooming system.</span>")
|
||||
reset_zooming()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/smooth_zooming(delay_override = null)
|
||||
/obj/item/gun/energy/beam_rifle/proc/smooth_zooming(delay_override = null)
|
||||
if(!check_user() || !zooming || zoom_lock == ZOOM_LOCK_OFF || zoom_lock == ZOOM_LOCK_CENTER_VIEW)
|
||||
return
|
||||
if(zoom_animating && delay_override != 0)
|
||||
@@ -139,13 +139,13 @@
|
||||
animate(current_user.client, pixel_x = current_zoom_x, pixel_y = current_zoom_y , total_time, SINE_EASING, ANIMATION_PARALLEL)
|
||||
zoom_animating = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/set_autozoom_pixel_offsets_immediate(current_angle)
|
||||
/obj/item/gun/energy/beam_rifle/proc/set_autozoom_pixel_offsets_immediate(current_angle)
|
||||
if(zoom_lock == ZOOM_LOCK_CENTER_VIEW || zoom_lock == ZOOM_LOCK_OFF)
|
||||
return
|
||||
current_zoom_x = sin(current_angle) + sin(current_angle) * AUTOZOOM_PIXEL_STEP_FACTOR * zoom_current_view_increase
|
||||
current_zoom_y = cos(current_angle) + cos(current_angle) * AUTOZOOM_PIXEL_STEP_FACTOR * zoom_current_view_increase
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/handle_zooming()
|
||||
/obj/item/gun/energy/beam_rifle/proc/handle_zooming()
|
||||
if(!zooming || !check_user())
|
||||
return
|
||||
if(zoom_speed == ZOOM_SPEED_INSTANT)
|
||||
@@ -161,16 +161,16 @@
|
||||
set_autozoom_pixel_offsets_immediate(zooming_angle)
|
||||
smooth_zooming(SSfastprocess.wait * zoom_target_view_increase * zoom_speed)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/start_zooming()
|
||||
/obj/item/gun/energy/beam_rifle/proc/start_zooming()
|
||||
if(zoom_lock == ZOOM_LOCK_OFF)
|
||||
return
|
||||
zooming = TRUE
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/stop_zooming()
|
||||
/obj/item/gun/energy/beam_rifle/proc/stop_zooming()
|
||||
zooming = FALSE
|
||||
reset_zooming()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/reset_zooming()
|
||||
/obj/item/gun/energy/beam_rifle/proc/reset_zooming()
|
||||
if(!check_user(FALSE))
|
||||
return
|
||||
zoom_animating = 0
|
||||
@@ -181,7 +181,7 @@
|
||||
current_zoom_x = 0
|
||||
current_zoom_y = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/update_icon()
|
||||
/obj/item/gun/energy/beam_rifle/update_icon()
|
||||
cut_overlays()
|
||||
var/obj/item/ammo_casing/energy/primary_ammo = ammo_type[1]
|
||||
if(cell.charge > primary_ammo.e_cost)
|
||||
@@ -189,34 +189,34 @@
|
||||
else
|
||||
add_overlay(drained_overlay)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/attack_self(mob/user)
|
||||
/obj/item/gun/energy/beam_rifle/attack_self(mob/user)
|
||||
projectile_setting_pierce = !projectile_setting_pierce
|
||||
to_chat(user, "<span class='boldnotice'>You set \the [src] to [projectile_setting_pierce? "pierce":"impact"] mode.</span>")
|
||||
aiming_beam()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/update_slowdown()
|
||||
/obj/item/gun/energy/beam_rifle/proc/update_slowdown()
|
||||
if(aiming)
|
||||
slowdown = scoped_slow
|
||||
else
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/Initialize()
|
||||
/obj/item/gun/energy/beam_rifle/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSfastprocess, src)
|
||||
zoom_speed_action = new(src)
|
||||
zoom_lock_action = new(src)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/Destroy()
|
||||
/obj/item/gun/energy/beam_rifle/Destroy()
|
||||
STOP_PROCESSING(SSfastprocess, src)
|
||||
set_user(null)
|
||||
QDEL_NULL(current_tracer)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/emp_act(severity)
|
||||
/obj/item/gun/energy/beam_rifle/emp_act(severity)
|
||||
chambered = null
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/aiming_beam(force_update = FALSE)
|
||||
/obj/item/gun/energy/beam_rifle/proc/aiming_beam(force_update = FALSE)
|
||||
var/diff = abs(aiming_lastangle - lastangle)
|
||||
check_user()
|
||||
if(diff < AIMING_BEAM_ANGLE_CHANGE_THRESHOLD && !force_update)
|
||||
@@ -241,7 +241,7 @@
|
||||
P.preparePixelProjectile(targloc, targloc, current_user, current_user.client.mouseParams, 0)
|
||||
P.fire(lastangle)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/process()
|
||||
/obj/item/gun/energy/beam_rifle/process()
|
||||
if(!aiming)
|
||||
return
|
||||
check_user()
|
||||
@@ -250,7 +250,7 @@
|
||||
aiming_time_left--
|
||||
aiming_beam(TRUE)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/check_user(automatic_cleanup = TRUE)
|
||||
/obj/item/gun/energy/beam_rifle/proc/check_user(automatic_cleanup = TRUE)
|
||||
if(!istype(current_user) || !isturf(current_user.loc) || !(src in current_user.held_items) || current_user.incapacitated()) //Doesn't work if you're not holding it!
|
||||
if(automatic_cleanup)
|
||||
stop_aiming()
|
||||
@@ -258,7 +258,7 @@
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/process_aim()
|
||||
/obj/item/gun/energy/beam_rifle/proc/process_aim()
|
||||
if(istype(current_user) && current_user.client && current_user.client.mouseParams)
|
||||
var/angle = mouse_angle_from_client(current_user.client)
|
||||
switch(angle)
|
||||
@@ -278,14 +278,14 @@
|
||||
delay_penalty(difference * aiming_time_increase_angle_multiplier)
|
||||
lastangle = angle
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/on_mob_move()
|
||||
/obj/item/gun/energy/beam_rifle/on_mob_move()
|
||||
check_user()
|
||||
if(aiming)
|
||||
delay_penalty(aiming_time_increase_user_movement)
|
||||
process_aim()
|
||||
aiming_beam(TRUE)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/start_aiming()
|
||||
/obj/item/gun/energy/beam_rifle/proc/start_aiming()
|
||||
aiming_time_left = aiming_time
|
||||
aiming = TRUE
|
||||
process_aim()
|
||||
@@ -293,14 +293,14 @@
|
||||
zooming_angle = lastangle
|
||||
start_zooming()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/stop_aiming()
|
||||
/obj/item/gun/energy/beam_rifle/proc/stop_aiming()
|
||||
set waitfor = FALSE
|
||||
aiming_time_left = aiming_time
|
||||
aiming = FALSE
|
||||
QDEL_NULL(current_tracer)
|
||||
stop_zooming()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/set_user(mob/user)
|
||||
/obj/item/gun/energy/beam_rifle/proc/set_user(mob/user)
|
||||
if(user == current_user)
|
||||
return
|
||||
stop_aiming()
|
||||
@@ -311,7 +311,7 @@
|
||||
current_user = user
|
||||
LAZYADD(current_user.mousemove_intercept_objects, src)
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
/obj/item/gun/energy/beam_rifle/onMouseDrag(src_object, over_object, src_location, over_location, params, mob)
|
||||
if(aiming)
|
||||
process_aim()
|
||||
aiming_beam()
|
||||
@@ -321,7 +321,7 @@
|
||||
smooth_zooming(2)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/onMouseDown(object, location, params, mob/mob)
|
||||
/obj/item/gun/energy/beam_rifle/onMouseDown(object, location, params, mob/mob)
|
||||
if(istype(mob))
|
||||
set_user(mob)
|
||||
if(istype(object, /obj/screen) && !istype(object, /obj/screen/click_catcher))
|
||||
@@ -331,7 +331,7 @@
|
||||
start_aiming()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/onMouseUp(object, location, params, mob/M)
|
||||
/obj/item/gun/energy/beam_rifle/onMouseUp(object, location, params, mob/M)
|
||||
if(istype(object, /obj/screen) && !istype(object, /obj/screen/click_catcher))
|
||||
return
|
||||
process_aim()
|
||||
@@ -342,7 +342,7 @@
|
||||
QDEL_NULL(current_tracer)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/afterattack(atom/target, mob/living/user, flag, params, passthrough = FALSE)
|
||||
/obj/item/gun/energy/beam_rifle/afterattack(atom/target, mob/living/user, flag, params, passthrough = FALSE)
|
||||
if(flag) //It's adjacent, is the user, or is on the user's person
|
||||
if(target in user.contents) //can't shoot stuff inside us.
|
||||
return
|
||||
@@ -358,11 +358,11 @@
|
||||
stop_aiming()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/sync_ammo()
|
||||
/obj/item/gun/energy/beam_rifle/proc/sync_ammo()
|
||||
for(var/obj/item/ammo_casing/energy/beam_rifle/AC in contents)
|
||||
AC.sync_stats()
|
||||
|
||||
/obj/item/weapon/gun/energy/beam_rifle/proc/delay_penalty(amount)
|
||||
/obj/item/gun/energy/beam_rifle/proc/delay_penalty(amount)
|
||||
aiming_time_left = Clamp(aiming_time_left + amount, 0, aiming_time)
|
||||
|
||||
/obj/item/ammo_casing/energy/beam_rifle
|
||||
@@ -382,10 +382,10 @@
|
||||
var/structure_piercing = 2
|
||||
var/structure_bleed_coeff = 0.7
|
||||
var/do_pierce = TRUE
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/host
|
||||
var/obj/item/gun/energy/beam_rifle/host
|
||||
|
||||
/obj/item/ammo_casing/energy/beam_rifle/proc/sync_stats()
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/BR = loc
|
||||
var/obj/item/gun/energy/beam_rifle/BR = loc
|
||||
if(!istype(BR))
|
||||
stack_trace("Beam rifle syncing error")
|
||||
host = BR
|
||||
@@ -430,7 +430,7 @@
|
||||
var/turf/curloc = get_turf(user)
|
||||
if(!istype(curloc) || !BB)
|
||||
return FALSE
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/gun = loc
|
||||
var/obj/item/gun/energy/beam_rifle/gun = loc
|
||||
if(!targloc && gun)
|
||||
targloc = get_turf_in_angle(gun.lastangle, curloc, 10)
|
||||
else if(!targloc)
|
||||
@@ -460,7 +460,7 @@
|
||||
flag = "energy"
|
||||
range = 150
|
||||
jitter = 10
|
||||
var/obj/item/weapon/gun/energy/beam_rifle/gun
|
||||
var/obj/item/gun/energy/beam_rifle/gun
|
||||
var/structure_pierce_amount = 0 //All set to 0 so the gun can manually set them during firing.
|
||||
var/structure_bleed_coeff = 0
|
||||
var/structure_pierce = 0
|
||||
@@ -678,7 +678,7 @@
|
||||
pixel_x = pixel_x_offset
|
||||
pixel_y = pixel_y_offset
|
||||
else
|
||||
animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = max(1, (delay <= 3 ? delay - 1 : delay)), flags = ANIMATION_END_NOW)
|
||||
animate(src, pixel_x = pixel_x_offset, pixel_y = pixel_y_offset, time = max(1, (delay <= 3 ? delay - 1 : delay)), flags_1 = ANIMATION_END_NOW)
|
||||
old_pixel_x = pixel_x_offset
|
||||
old_pixel_y = pixel_y_offset
|
||||
if(can_hit_target(original, permutated))
|
||||
@@ -714,8 +714,8 @@
|
||||
light_power = 1
|
||||
light_range = 2
|
||||
light_color = "#00ffff"
|
||||
mouse_opacity = 0
|
||||
flags = ABSTRACT
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
flags_1 = ABSTRACT_1
|
||||
appearance_flags = 0
|
||||
|
||||
/obj/effect/projectile_beam/proc/scale_to(nx,ny,override=TRUE)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/projectiles/guns/beam_rifle.dm b/code/modules/projectiles/guns/beam_rifle.dm (rejected hunks)
|
||||
@@ -715,7 +715,7 @@
|
||||
light_range = 2
|
||||
light_color = "#00ffff"
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
- flags = ABSTRACT
|
||||
+ flags_1 = ABSTRACT_1
|
||||
appearance_flags = 0
|
||||
|
||||
/obj/effect/projectile_beam/proc/scale_to(nx,ny,override=TRUE)
|
||||
@@ -1,11 +1,11 @@
|
||||
/obj/item/weapon/gun/energy
|
||||
/obj/item/gun/energy
|
||||
icon_state = "energy"
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun."
|
||||
icon = 'icons/obj/guns/energy.dmi'
|
||||
|
||||
var/obj/item/weapon/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/weapon/stock_parts/cell
|
||||
var/obj/item/stock_parts/cell/cell //What type of power cell this uses
|
||||
var/cell_type = /obj/item/stock_parts/cell
|
||||
var/modifystate = 0
|
||||
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
|
||||
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
|
||||
@@ -19,16 +19,16 @@
|
||||
var/charge_delay = 4
|
||||
var/use_cyborg_cell = 0 //whether the gun's cell drains the cyborg user's cell to recharge
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
/obj/item/gun/energy/emp_act(severity)
|
||||
cell.use(round(cell.charge / severity))
|
||||
chambered = null //we empty the chamber
|
||||
recharge_newshot() //and try to charge a new shot
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/get_cell()
|
||||
/obj/item/gun/energy/get_cell()
|
||||
return cell
|
||||
|
||||
/obj/item/weapon/gun/energy/Initialize()
|
||||
/obj/item/gun/energy/Initialize()
|
||||
. = ..()
|
||||
if(cell_type)
|
||||
cell = new cell_type(src)
|
||||
@@ -41,7 +41,7 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/update_ammo_types()
|
||||
/obj/item/gun/energy/proc/update_ammo_types()
|
||||
var/obj/item/ammo_casing/energy/shot
|
||||
for (var/i = 1, i <= ammo_type.len, i++)
|
||||
var/shottype = ammo_type[i]
|
||||
@@ -51,12 +51,12 @@
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
|
||||
/obj/item/weapon/gun/energy/Destroy()
|
||||
/obj/item/gun/energy/Destroy()
|
||||
QDEL_NULL(cell)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/process()
|
||||
/obj/item/gun/energy/process()
|
||||
if(selfcharge)
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
@@ -69,16 +69,16 @@
|
||||
recharge_newshot(1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/attack_self(mob/living/user as mob)
|
||||
/obj/item/gun/energy/attack_self(mob/living/user as mob)
|
||||
if(ammo_type.len > 1)
|
||||
select_fire(user)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/can_shoot()
|
||||
/obj/item/gun/energy/can_shoot()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
return cell.charge >= shot.e_cost
|
||||
|
||||
/obj/item/weapon/gun/energy/recharge_newshot(no_cyborg_drain)
|
||||
/obj/item/gun/energy/recharge_newshot(no_cyborg_drain)
|
||||
if (!ammo_type || !cell)
|
||||
return
|
||||
if(use_cyborg_cell && !no_cyborg_drain)
|
||||
@@ -95,14 +95,14 @@
|
||||
if(!chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/weapon/gun/energy/process_chamber()
|
||||
/obj/item/gun/energy/process_chamber()
|
||||
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
|
||||
var/obj/item/ammo_casing/energy/shot = chambered
|
||||
cell.use(shot.e_cost)//... drain the cell cell
|
||||
chambered = null //either way, released the prepared shot
|
||||
recharge_newshot() //try to charge a new shot
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/select_fire(mob/living/user)
|
||||
/obj/item/gun/energy/proc/select_fire(mob/living/user)
|
||||
select++
|
||||
if (select > ammo_type.len)
|
||||
select = 1
|
||||
@@ -116,7 +116,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
/obj/item/gun/energy/update_icon()
|
||||
..()
|
||||
if(!automatic_charge_overlays)
|
||||
return
|
||||
@@ -146,10 +146,10 @@
|
||||
itemState += "[ratio]"
|
||||
item_state = itemState
|
||||
|
||||
/obj/item/weapon/gun/energy/ui_action_click()
|
||||
/obj/item/gun/energy/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/weapon/gun/energy/suicide_act(mob/user)
|
||||
/obj/item/gun/energy/suicide_act(mob/user)
|
||||
if (src.can_shoot() && can_trigger_gun(user))
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of [src] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
sleep(25)
|
||||
@@ -169,7 +169,7 @@
|
||||
return (OXYLOSS)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/vv_edit_var(var_name, var_value)
|
||||
/obj/item/gun/energy/vv_edit_var(var_name, var_value)
|
||||
switch(var_name)
|
||||
if("selfcharge")
|
||||
if(var_value)
|
||||
@@ -179,7 +179,7 @@
|
||||
. = ..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/ignition_effect(atom/A, mob/living/user)
|
||||
/obj/item/gun/energy/ignition_effect(atom/A, mob/living/user)
|
||||
if(!can_shoot() || !ammo_type[select])
|
||||
shoot_with_empty_chamber()
|
||||
. = ""
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/e_gun
|
||||
/obj/item/gun/energy/e_gun
|
||||
name = "energy gun"
|
||||
desc = "A basic hybrid energy gun with two settings: disable and kill."
|
||||
icon_state = "energy"
|
||||
@@ -11,47 +11,47 @@
|
||||
flight_x_offset = 15
|
||||
flight_y_offset = 10
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/mini
|
||||
/obj/item/gun/energy/e_gun/mini
|
||||
name = "miniature energy gun"
|
||||
desc = "A small, pistol-sized energy gun with a built-in flashlight. It has two settings: stun and kill."
|
||||
icon_state = "mini"
|
||||
item_state = "gun"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
cell_type = /obj/item/weapon/stock_parts/cell{charge = 600; maxcharge = 600}
|
||||
cell_type = /obj/item/stock_parts/cell{charge = 600; maxcharge = 600}
|
||||
ammo_x_offset = 2
|
||||
charge_sections = 3
|
||||
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/mini/Initialize()
|
||||
/obj/item/gun/energy/e_gun/mini/Initialize()
|
||||
gun_light = new /obj/item/device/flashlight/seclite(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/mini/update_icon()
|
||||
/obj/item/gun/energy/e_gun/mini/update_icon()
|
||||
..()
|
||||
if(gun_light && gun_light.on)
|
||||
add_overlay("mini-light")
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/stun
|
||||
/obj/item/gun/energy/e_gun/stun
|
||||
name = "tactical energy gun"
|
||||
desc = "Military issue energy gun, is able to fire stun rounds."
|
||||
icon_state = "energytac"
|
||||
ammo_x_offset = 2
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode/spec, /obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/old
|
||||
/obj/item/gun/energy/e_gun/old
|
||||
name = "prototype energy gun"
|
||||
desc = "NT-P:01 Prototype Energy Gun. Early stage development of a unique laser rifle that has multifaceted energy lens allowing the gun to alter the form of projectile it fires on command."
|
||||
icon_state = "protolaser"
|
||||
ammo_x_offset = 2
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser, /obj/item/ammo_casing/energy/electrode/old)
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/mini/practice_phaser
|
||||
/obj/item/gun/energy/e_gun/mini/practice_phaser
|
||||
name = "practice phaser"
|
||||
desc = "A modified version of the basic phaser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler, /obj/item/ammo_casing/energy/laser/practice)
|
||||
icon_state = "decloner"
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/hos
|
||||
/obj/item/gun/energy/e_gun/hos
|
||||
name = "\improper X-01 MultiPhase Energy Gun"
|
||||
desc = "This is an expensive, modern recreation of an antique laser gun. This gun has several unique firemodes, but lacks the ability to recharge over time."
|
||||
icon_state = "hoslaser"
|
||||
@@ -61,7 +61,7 @@
|
||||
ammo_x_offset = 4
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/dragnet
|
||||
/obj/item/gun/energy/e_gun/dragnet
|
||||
name = "\improper DRAGnet"
|
||||
desc = "The \"Dynamic Rapid-Apprehension of the Guilty\" net is a revolution in law enforcement technology."
|
||||
icon_state = "dragnet"
|
||||
@@ -70,12 +70,12 @@
|
||||
can_flashlight = 0
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/dragnet/snare
|
||||
/obj/item/gun/energy/e_gun/dragnet/snare
|
||||
name = "Energy Snare Launcher"
|
||||
desc = "Fires an energy snare that slows the target down"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/trap)
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/turret
|
||||
/obj/item/gun/energy/e_gun/turret
|
||||
name = "hybrid turret gun"
|
||||
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
|
||||
icon_state = "turretlaser"
|
||||
@@ -88,7 +88,7 @@
|
||||
trigger_guard = TRIGGER_GUARD_NONE
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/nuclear
|
||||
/obj/item/gun/energy/e_gun/nuclear
|
||||
name = "advanced energy gun"
|
||||
desc = "An energy gun with an experimental miniaturized nuclear reactor that automatically charges the internal power cell."
|
||||
icon_state = "nucgun"
|
||||
@@ -103,17 +103,17 @@
|
||||
var/fail_tick = 0
|
||||
var/fail_chance = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/nuclear/process()
|
||||
/obj/item/gun/energy/e_gun/nuclear/process()
|
||||
if(fail_tick > 0)
|
||||
fail_tick--
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/nuclear/shoot_live_shot()
|
||||
/obj/item/gun/energy/e_gun/nuclear/shoot_live_shot()
|
||||
failcheck()
|
||||
update_icon()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/nuclear/proc/failcheck()
|
||||
/obj/item/gun/energy/e_gun/nuclear/proc/failcheck()
|
||||
if(prob(fail_chance) && isliving(loc))
|
||||
var/mob/living/M = loc
|
||||
switch(fail_tick)
|
||||
@@ -127,11 +127,11 @@
|
||||
crit_fail = 1
|
||||
to_chat(M, "<span class='userdanger'>Your [name]'s reactor overloads!</span>")
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/nuclear/emp_act(severity)
|
||||
/obj/item/gun/energy/e_gun/nuclear/emp_act(severity)
|
||||
..()
|
||||
fail_chance = min(fail_chance + round(15/severity), 100)
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/nuclear/update_icon()
|
||||
/obj/item/gun/energy/e_gun/nuclear/update_icon()
|
||||
..()
|
||||
if(crit_fail)
|
||||
add_overlay("[icon_state]_fail_3")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator
|
||||
/obj/item/gun/energy/kinetic_accelerator
|
||||
name = "proto-kinetic accelerator"
|
||||
desc = "A self recharging, ranged mining tool that does increased damage in low pressure."
|
||||
icon_state = "kineticgun"
|
||||
item_state = "kineticgun"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/kinetic)
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/emproof
|
||||
cell_type = /obj/item/stock_parts/cell/emproof
|
||||
needs_permit = 0
|
||||
unique_rename = 1
|
||||
origin_tech = "combat=3;powerstorage=3;engineering=3"
|
||||
@@ -26,7 +26,7 @@
|
||||
var/empty_state = "kineticgun_empty"
|
||||
var/recharge_timerid
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/examine(mob/user)
|
||||
/obj/item/gun/energy/kinetic_accelerator/examine(mob/user)
|
||||
..()
|
||||
if(max_mod_capacity)
|
||||
to_chat(user, "<b>[get_remaining_mod_capacity()]%</b> mod capacity remaining.")
|
||||
@@ -34,8 +34,8 @@
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
to_chat(user, "<span class='notice'>There is a [M.name] mod installed, using <b>[M.cost]%</b> capacity.</span>")
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/weapon/crowbar))
|
||||
/obj/item/gun/energy/kinetic_accelerator/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/crowbar))
|
||||
if(modkits.len)
|
||||
to_chat(user, "<span class='notice'>You pry the modifications out.</span>")
|
||||
playsound(loc, A.usesound, 100, 1)
|
||||
@@ -49,59 +49,59 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/get_remaining_mod_capacity()
|
||||
var/current_capacity_used = 0
|
||||
for(var/A in get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
current_capacity_used += M.cost
|
||||
return max_mod_capacity - current_capacity_used
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/get_modkits()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/get_modkits()
|
||||
. = list()
|
||||
for(var/A in modkits)
|
||||
. += A
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.kinetic_gun = src //do something special on-hit, easy!
|
||||
for(var/A in get_modkits())
|
||||
var/obj/item/borg/upgrade/modkit/M = A
|
||||
M.modify_projectile(K)
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg
|
||||
/obj/item/gun/energy/kinetic_accelerator/cyborg
|
||||
holds_charge = TRUE
|
||||
unique_frequency = TRUE
|
||||
max_mod_capacity = 80
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/Initialize()
|
||||
/obj/item/gun/energy/kinetic_accelerator/Initialize()
|
||||
. = ..()
|
||||
if(!holds_charge)
|
||||
empty()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/shoot_live_shot()
|
||||
/obj/item/gun/energy/kinetic_accelerator/shoot_live_shot()
|
||||
. = ..()
|
||||
attempt_reload()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/equipped(mob/user)
|
||||
/obj/item/gun/energy/kinetic_accelerator/equipped(mob/user)
|
||||
. = ..()
|
||||
if(!can_shoot())
|
||||
attempt_reload()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/dropped()
|
||||
/obj/item/gun/energy/kinetic_accelerator/dropped()
|
||||
. = ..()
|
||||
if(!holds_charge)
|
||||
// Put it on a delay because moving item from slot to hand
|
||||
// calls dropped().
|
||||
addtimer(CALLBACK(src, .proc/empty_if_not_held), 2)
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/empty_if_not_held()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/empty_if_not_held()
|
||||
if(!ismob(loc))
|
||||
empty()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/empty()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/empty()
|
||||
cell.use(cell.charge)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time)
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload(recharge_time)
|
||||
if(overheat)
|
||||
return
|
||||
if(!recharge_time)
|
||||
@@ -110,7 +110,7 @@
|
||||
|
||||
var/carried = 0
|
||||
if(!unique_frequency)
|
||||
for(var/obj/item/weapon/gun/energy/kinetic_accelerator/K in loc.GetAllContents())
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/K in loc.GetAllContents())
|
||||
|
||||
carried++
|
||||
|
||||
@@ -121,10 +121,10 @@
|
||||
deltimer(recharge_timerid)
|
||||
recharge_timerid = addtimer(CALLBACK(src, .proc/reload), recharge_time * carried, TIMER_STOPPABLE)
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/emp_act(severity)
|
||||
/obj/item/gun/energy/kinetic_accelerator/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/reload()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/reload()
|
||||
cell.give(cell.maxcharge)
|
||||
recharge_newshot(1)
|
||||
if(!suppressed)
|
||||
@@ -134,7 +134,7 @@
|
||||
update_icon()
|
||||
overheat = FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/update_icon()
|
||||
/obj/item/gun/energy/kinetic_accelerator/update_icon()
|
||||
..()
|
||||
|
||||
if(empty_state && !can_shoot())
|
||||
@@ -149,8 +149,8 @@
|
||||
|
||||
/obj/item/ammo_casing/energy/kinetic/ready_proj(atom/target, mob/living/user, quiet, zone_override = "")
|
||||
..()
|
||||
if(loc && istype(loc, /obj/item/weapon/gun/energy/kinetic_accelerator))
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/KA = loc
|
||||
if(loc && istype(loc, /obj/item/gun/energy/kinetic_accelerator))
|
||||
var/obj/item/gun/energy/kinetic_accelerator/KA = loc
|
||||
KA.modify_projectile(BB)
|
||||
|
||||
//Projectiles
|
||||
@@ -165,7 +165,7 @@
|
||||
|
||||
var/pressure_decrease_active = FALSE
|
||||
var/pressure_decrease = 0.25
|
||||
var/obj/item/weapon/gun/energy/kinetic_accelerator/kinetic_gun
|
||||
var/obj/item/gun/energy/kinetic_accelerator/kinetic_gun
|
||||
|
||||
/obj/item/projectile/kinetic/Destroy()
|
||||
kinetic_gun = null
|
||||
@@ -217,7 +217,7 @@
|
||||
origin_tech = "programming=2;materials=2;magnets=4"
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/miner
|
||||
module_type = /obj/item/robot_module/miner
|
||||
var/denied_type = null
|
||||
var/maximum_of_type = 1
|
||||
var/cost = 30
|
||||
@@ -228,7 +228,7 @@
|
||||
to_chat(user, "<span class='notice'>Occupies <b>[cost]%</b> of mod capacity.</span>")
|
||||
|
||||
/obj/item/borg/upgrade/modkit/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/weapon/gun/energy/kinetic_accelerator) && !issilicon(user))
|
||||
if(istype(A, /obj/item/gun/energy/kinetic_accelerator) && !issilicon(user))
|
||||
install(A, user)
|
||||
else
|
||||
..()
|
||||
@@ -237,10 +237,10 @@
|
||||
if(..())
|
||||
return
|
||||
|
||||
for(var/obj/item/weapon/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules)
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/cyborg/H in R.module.modules)
|
||||
return install(H, usr)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
/obj/item/borg/upgrade/modkit/proc/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = TRUE
|
||||
if(denied_type)
|
||||
var/number_of_denied = 0
|
||||
@@ -264,18 +264,18 @@
|
||||
to_chat(user, "<span class='notice'>You don't have room(<b>[KA.get_remaining_mod_capacity()]%</b> remaining, [cost]% needed) to install this modkit. Use a crowbar to remove existing modkits.</span>")
|
||||
. = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/proc/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
forceMove(get_turf(KA))
|
||||
KA.modkits -= src
|
||||
|
||||
/obj/item/borg/upgrade/modkit/proc/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
|
||||
//use this one for effects you want to trigger before any damage is done at all and before damage is decreased by pressure
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
//use this one for effects you want to trigger before mods that do damage
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
//and this one for things that don't need to trigger before other damage-dealing mods
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/proc/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
|
||||
//Range
|
||||
/obj/item/borg/upgrade/modkit/range
|
||||
@@ -304,12 +304,12 @@
|
||||
desc = "Decreases the cooldown of a kinetic accelerator."
|
||||
modifier = 2.5
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
/obj/item/borg/upgrade/modkit/cooldown/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
KA.overheat_time -= modifier
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/cooldown/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
KA.overheat_time += modifier
|
||||
..()
|
||||
|
||||
@@ -320,7 +320,7 @@
|
||||
var/turf_aoe = FALSE
|
||||
var/stats_stolen = FALSE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
/obj/item/borg/upgrade/modkit/aoe/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
for(var/obj/item/borg/upgrade/modkit/aoe/AOE in KA.modkits) //make sure only one of the aoe modules has values if somebody has multiple
|
||||
@@ -332,7 +332,7 @@
|
||||
AOE.turf_aoe = FALSE
|
||||
AOE.stats_stolen = TRUE
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/aoe/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
..()
|
||||
modifier = initial(modifier) //get our modifiers back
|
||||
turf_aoe = initial(turf_aoe)
|
||||
@@ -341,7 +341,7 @@
|
||||
/obj/item/borg/upgrade/modkit/aoe/modify_projectile(obj/item/projectile/kinetic/K)
|
||||
K.name = "kinetic explosion"
|
||||
|
||||
/obj/item/borg/upgrade/modkit/aoe/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/aoe/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(stats_stolen)
|
||||
return
|
||||
new /obj/effect/temp_visual/explosion/fast(target_turf)
|
||||
@@ -381,7 +381,7 @@
|
||||
modifier = -14 //Makes the cooldown 3 seconds(with no cooldown mods) if you miss. Don't miss.
|
||||
cost = 50
|
||||
|
||||
/obj/item/borg/upgrade/modkit/cooldown/repeater/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/cooldown/repeater/projectile_strike_predamage(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
var/valid_repeat = FALSE
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
@@ -401,7 +401,7 @@
|
||||
cost = 20
|
||||
var/static/list/damage_heal_order = list(BRUTE, BURN, OXY)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/lifesteal/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/lifesteal/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target) && isliving(K.firer))
|
||||
var/mob/living/L = target
|
||||
if(L.stat == DEAD)
|
||||
@@ -416,7 +416,7 @@
|
||||
cost = 30
|
||||
modifier = 0.25 //A bonus 15 damage if you burst the field on a target, 60 if you lure them into it.
|
||||
|
||||
/obj/item/borg/upgrade/modkit/resonator_blasts/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/resonator_blasts/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(target_turf && !ismineralturf(target_turf)) //Don't make fields on mineral turfs.
|
||||
var/obj/effect/temp_visual/resonance/R = locate(/obj/effect/temp_visual/resonance) in target_turf
|
||||
if(R)
|
||||
@@ -434,7 +434,7 @@
|
||||
var/maximum_bounty = 25
|
||||
var/list/bounties_reaped = list()
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_prehit(obj/item/projectile/kinetic/K, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
var/list/existing_marks = L.has_status_effect_list(STATUS_EFFECT_SYPHONMARK)
|
||||
@@ -445,7 +445,7 @@
|
||||
qdel(SM)
|
||||
L.apply_status_effect(STATUS_EFFECT_SYPHONMARK, src)
|
||||
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/bounty/projectile_strike(obj/item/projectile/kinetic/K, turf/target_turf, atom/target, obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
if(isliving(target))
|
||||
var/mob/living/L = target
|
||||
if(bounties_reaped[L.type])
|
||||
@@ -484,12 +484,12 @@
|
||||
cost = 20
|
||||
denied_type = /obj/item/borg/upgrade/modkit/trigger_guard
|
||||
|
||||
/obj/item/borg/upgrade/modkit/trigger_guard/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
/obj/item/borg/upgrade/modkit/trigger_guard/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
KA.trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
|
||||
/obj/item/borg/upgrade/modkit/trigger_guard/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/trigger_guard/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
KA.trigger_guard = TRIGGER_GUARD_NORMAL
|
||||
..()
|
||||
|
||||
@@ -504,13 +504,13 @@
|
||||
var/chassis_icon = "kineticgun_u"
|
||||
var/chassis_name = "super-kinetic accelerator"
|
||||
|
||||
/obj/item/borg/upgrade/modkit/chassis_mod/install(obj/item/weapon/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
/obj/item/borg/upgrade/modkit/chassis_mod/install(obj/item/gun/energy/kinetic_accelerator/KA, mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
KA.icon_state = chassis_icon
|
||||
KA.name = chassis_name
|
||||
|
||||
/obj/item/borg/upgrade/modkit/chassis_mod/uninstall(obj/item/weapon/gun/energy/kinetic_accelerator/KA)
|
||||
/obj/item/borg/upgrade/modkit/chassis_mod/uninstall(obj/item/gun/energy/kinetic_accelerator/KA)
|
||||
KA.icon_state = initial(KA.icon_state)
|
||||
KA.name = initial(KA.name)
|
||||
..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/laser
|
||||
/obj/item/gun/energy/laser
|
||||
name = "laser gun"
|
||||
desc = "A basic energy-based laser gun that fires concentrated beams of light which pass through glass and thin metal."
|
||||
icon_state = "laser"
|
||||
@@ -10,7 +10,7 @@
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/practice
|
||||
/obj/item/gun/energy/laser/practice
|
||||
name = "practice laser gun"
|
||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||
origin_tech = "combat=2;magnets=2"
|
||||
@@ -18,20 +18,20 @@
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/retro
|
||||
/obj/item/gun/energy/laser/retro
|
||||
name ="retro laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's private security or military forces. Nevertheless, it is still quite deadly and easy to maintain, making it a favorite amongst pirates and other outlaws."
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/retro/old
|
||||
/obj/item/gun/energy/laser/retro/old
|
||||
name ="laser gun"
|
||||
icon_state = "retro"
|
||||
desc = "First generation lasergun, developed by Nanotrasen. Suffers from ammo issues but its unique ability to recharge its ammo without the need of a magazine helps compensate. You really hope someone has developed a better lasergun while you were in cyro."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun/old)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain
|
||||
/obj/item/gun/energy/laser/captain
|
||||
name = "antique laser gun"
|
||||
icon_state = "caplaser"
|
||||
item_state = "caplaser"
|
||||
@@ -42,7 +42,7 @@
|
||||
selfcharge = 1
|
||||
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | ACID_PROOF
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/captain/scattershot
|
||||
/obj/item/gun/energy/laser/captain/scattershot
|
||||
name = "scatter shot laser rifle"
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
@@ -50,21 +50,21 @@
|
||||
origin_tech = "combat=5;materials=4;powerstorage=4"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg
|
||||
/obj/item/gun/energy/laser/cyborg
|
||||
can_charge = 0
|
||||
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
|
||||
origin_tech = null
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg/emp_act()
|
||||
/obj/item/gun/energy/laser/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/scatter
|
||||
/obj/item/gun/energy/laser/scatter
|
||||
name = "scatter laser gun"
|
||||
desc = "A laser gun equipped with a refraction kit that spreads bolts."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/scatter/shotty
|
||||
/obj/item/gun/energy/laser/scatter/shotty
|
||||
name = "energy shotgun"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
icon_state = "cshotgun"
|
||||
@@ -76,14 +76,14 @@
|
||||
|
||||
///Laser Cannon
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon
|
||||
/obj/item/gun/energy/lasercannon
|
||||
name = "accelerator laser cannon"
|
||||
desc = "An advanced laser cannon that does more damage the farther away the target is."
|
||||
icon_state = "lasercannon"
|
||||
item_state = "laser"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BACK
|
||||
origin_tech = "combat=4;magnets=4;powerstorage=3"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
|
||||
@@ -106,7 +106,7 @@
|
||||
damage += 7
|
||||
transform *= 1 + ((damage/7) * 0.2)//20% larger per tile
|
||||
|
||||
/obj/item/weapon/gun/energy/xray
|
||||
/obj/item/gun/energy/xray
|
||||
name = "x-ray laser gun"
|
||||
desc = "A high-power laser gun capable of expelling concentrated x-ray blasts that pass through multiple soft targets and heavier materials"
|
||||
icon_state = "xray"
|
||||
@@ -118,7 +118,7 @@
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/bluetag
|
||||
/obj/item/gun/energy/laser/bluetag
|
||||
name = "laser tag gun"
|
||||
icon_state = "bluetag"
|
||||
desc = "A retro laser gun modified to fire harmless blue beams of light. Sound effects included!"
|
||||
@@ -130,7 +130,7 @@
|
||||
ammo_x_offset = 2
|
||||
selfcharge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/redtag
|
||||
/obj/item/gun/energy/laser/redtag
|
||||
name = "laser tag gun"
|
||||
icon_state = "redtag"
|
||||
desc = "A retro laser gun modified to fire harmless beams red of light. Sound effects included!"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/megabuster
|
||||
/obj/item/gun/energy/megabuster
|
||||
name = "Mega-buster"
|
||||
desc = "An arm-mounted buster toy!"
|
||||
icon_state = "megabuster"
|
||||
@@ -9,12 +9,12 @@
|
||||
needs_permit = 0
|
||||
selfcharge = 1
|
||||
icon = 'icons/obj/guns/VGguns.dmi'
|
||||
/obj/item/weapon/gun/energy/megabuster/proto
|
||||
/obj/item/gun/energy/megabuster/proto
|
||||
name = "Proto-buster"
|
||||
icon_state = "protobuster"
|
||||
item_state = "protobuster"
|
||||
|
||||
/obj/item/weapon/gun/energy/mmlbuster
|
||||
/obj/item/gun/energy/mmlbuster
|
||||
name = "Buster Cannon"
|
||||
desc = "An antique arm-mounted buster cannon."
|
||||
icon = 'icons/obj/guns/VGguns.dmi'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/plasma //Not intended to be used, use its children instead.
|
||||
/obj/item/gun/energy/plasma //Not intended to be used, use its children instead.
|
||||
name = "plasma gun"
|
||||
desc = "A high-power plasma gun. You shouldn't ever see this."
|
||||
icon_state = "xray"
|
||||
@@ -8,7 +8,7 @@
|
||||
shaded_charge = 1
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/plasma/rifle
|
||||
/obj/item/gun/energy/plasma/rifle
|
||||
name = "plasma cannon"
|
||||
desc = "A state of the art cannon utilizing plasma in a uranium-235 lined core to output hi-power, radiating bolts of energy."
|
||||
icon_state = "alienrifle"
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/plasma/light
|
||||
/obj/item/gun/energy/plasma/light
|
||||
name = "plasma rifle"
|
||||
desc = "A state of the art rifle utilizing plasma in a uranium-235 lined core to output radiating bolts of energy."
|
||||
icon_state = "lightalienrifle"
|
||||
@@ -30,7 +30,7 @@
|
||||
ammo_x_offset = 2
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/plasma/MP40k
|
||||
/obj/item/gun/energy/plasma/MP40k
|
||||
name = "Plasma MP40k"
|
||||
desc = "A plasma MP40k. Ich liebe den geruch von plasma am morgen."
|
||||
icon_state = "PlasMP"
|
||||
@@ -41,7 +41,7 @@
|
||||
|
||||
//Laser rifles, technically lazer, but w/e
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/rifle
|
||||
/obj/item/gun/energy/laser/rifle
|
||||
name = "laser rifle"
|
||||
desc = "A laser rifle issued to high ranking members of a certain shadow corporation."
|
||||
icon_state = "xcomlasergun"
|
||||
@@ -50,7 +50,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/lasergun)
|
||||
ammo_x_offset = 4
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/LaserAK
|
||||
/obj/item/gun/energy/laser/LaserAK
|
||||
name = "Laser AK470"
|
||||
desc = "A laser AK. Death solves all problems -- No man, no problem."
|
||||
icon_state = "LaserAK"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/pulse
|
||||
/obj/item/gun/energy/pulse
|
||||
name = "pulse rifle"
|
||||
desc = "A heavy-duty, multifaceted energy rifle with three modes. Preferred by front-line combat personnel."
|
||||
icon_state = "pulse"
|
||||
@@ -6,18 +6,18 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
modifystate = TRUE
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse"
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse"
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/emp_act(severity)
|
||||
/obj/item/gun/energy/pulse/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize
|
||||
/obj/item/gun/energy/pulse/prize
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize/Initialize()
|
||||
/obj/item/gun/energy/pulse/prize/Initialize()
|
||||
. = ..()
|
||||
GLOB.poi_list += src
|
||||
var/msg = "A pulse rifle prize has been created at [ADMIN_COORDJMP(src)]"
|
||||
@@ -27,52 +27,52 @@
|
||||
|
||||
notify_ghosts("Someone won a pulse rifle as a prize!", source = src, action = NOTIFY_ORBIT)
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/prize/Destroy()
|
||||
/obj/item/gun/energy/pulse/prize/Destroy()
|
||||
GLOB.poi_list -= src
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/loyalpin
|
||||
/obj/item/gun/energy/pulse/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/carbine
|
||||
/obj/item/gun/energy/pulse/carbine
|
||||
name = "pulse carbine"
|
||||
desc = "A compact variant of the pulse rifle with less firepower but easier storage."
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
slot_flags = SLOT_BELT
|
||||
icon_state = "pulse_carbine"
|
||||
item_state = null
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/carbine"
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse/carbine"
|
||||
can_flashlight = 1
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 12
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/carbine/loyalpin
|
||||
/obj/item/gun/energy/pulse/carbine/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol
|
||||
/obj/item/gun/energy/pulse/pistol
|
||||
name = "pulse pistol"
|
||||
desc = "A pulse rifle in an easily concealed handgun package with low capacity."
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
slot_flags = SLOT_BELT
|
||||
icon_state = "pulse_pistol"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/pulse/pistol"
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse/pistol"
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/loyalpin
|
||||
/obj/item/gun/energy/pulse/pistol/loyalpin
|
||||
pin = /obj/item/device/firing_pin/implant/mindshield
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/destroyer
|
||||
/obj/item/gun/energy/pulse/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty energy rifle built for pure destruction."
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
|
||||
cell_type = "/obj/item/stock_parts/cell/infinite"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/destroyer/attack_self(mob/living/user)
|
||||
/obj/item/gun/energy/pulse/destroyer/attack_self(mob/living/user)
|
||||
to_chat(user, "<span class='danger'>[src.name] has three settings, and they are all DESTROY.</span>")
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/m1911
|
||||
/obj/item/gun/energy/pulse/pistol/m1911
|
||||
name = "\improper M1911-P"
|
||||
desc = "A compact pulse core in a classic handgun frame for Nanotrasen officers. It's not the size of the gun, it's the size of the hole it puts through people."
|
||||
icon_state = "m1911"
|
||||
item_state = "gun"
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/infinite"
|
||||
cell_type = "/obj/item/stock_parts/cell/infinite"
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/projectiles/guns/energy/pulse.dm b/code/modules/projectiles/guns/energy/pulse.dm (rejected hunks)
|
||||
@@ -6,7 +6,7 @@
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
force = 10
|
||||
modifystate = TRUE
|
||||
- flags = CONDUCT
|
||||
+ flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||
cell_type = "/obj/item/stock_parts/cell/pulse"
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/ionrifle
|
||||
/obj/item/gun/energy/ionrifle
|
||||
name = "ion rifle"
|
||||
desc = "A man-portable anti-armor weapon designed to disable mechanical threats at range."
|
||||
icon_state = "ionrifle"
|
||||
@@ -6,17 +6,17 @@
|
||||
origin_tech = "combat=4;magnets=4"
|
||||
can_flashlight = 1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
slot_flags = SLOT_BACK
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/ion)
|
||||
ammo_x_offset = 3
|
||||
flight_x_offset = 17
|
||||
flight_y_offset = 9
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
|
||||
/obj/item/gun/energy/ionrifle/emp_act(severity)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/carbine
|
||||
/obj/item/gun/energy/ionrifle/carbine
|
||||
name = "ion carbine"
|
||||
desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient."
|
||||
icon_state = "ioncarbine"
|
||||
@@ -27,7 +27,7 @@
|
||||
flight_x_offset = 18
|
||||
flight_y_offset = 11
|
||||
|
||||
/obj/item/weapon/gun/energy/decloner
|
||||
/obj/item/gun/energy/decloner
|
||||
name = "biological demolecularisor"
|
||||
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
|
||||
icon_state = "decloner"
|
||||
@@ -36,13 +36,13 @@
|
||||
pin = null
|
||||
ammo_x_offset = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/decloner/update_icon()
|
||||
/obj/item/gun/energy/decloner/update_icon()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
if(cell.charge > shot.e_cost)
|
||||
add_overlay("decloner_spin")
|
||||
|
||||
/obj/item/weapon/gun/energy/floragun
|
||||
/obj/item/gun/energy/floragun
|
||||
name = "floral somatoray"
|
||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||
icon_state = "flora"
|
||||
@@ -53,18 +53,18 @@
|
||||
ammo_x_offset = 1
|
||||
selfcharge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/meteorgun
|
||||
/obj/item/gun/energy/meteorgun
|
||||
name = "meteor gun"
|
||||
desc = "For the love of god, make sure you're aiming this the right way!"
|
||||
icon_state = "meteor_gun"
|
||||
item_state = "c20r"
|
||||
w_class = WEIGHT_CLASS_BULKY
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/meteor)
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/potato"
|
||||
cell_type = "/obj/item/stock_parts/cell/potato"
|
||||
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
||||
selfcharge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/meteorgun/pen
|
||||
/obj/item/gun/energy/meteorgun/pen
|
||||
name = "meteor pen"
|
||||
desc = "The pen is mightier than the sword."
|
||||
icon = 'icons/obj/bureaucracy.dmi'
|
||||
@@ -74,7 +74,7 @@
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
|
||||
/obj/item/weapon/gun/energy/mindflayer
|
||||
/obj/item/gun/energy/mindflayer
|
||||
name = "\improper Mind Flayer"
|
||||
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
||||
icon_state = "xray"
|
||||
@@ -82,7 +82,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow
|
||||
name = "mini energy crossbow"
|
||||
desc = "A weapon favored by syndicate stealth specialists."
|
||||
icon_state = "crossbow"
|
||||
@@ -101,14 +101,14 @@
|
||||
max_mod_capacity = 0
|
||||
empty_state = null
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/halloween
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/halloween
|
||||
name = "candy corn crossbow"
|
||||
desc = "A weapon favored by Syndicate trick-or-treaters."
|
||||
icon_state = "crossbow_halloween"
|
||||
item_state = "crossbow"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/halloween)
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/large
|
||||
name = "energy crossbow"
|
||||
desc = "A reverse engineered weapon using syndicate technology."
|
||||
icon_state = "crossbowlarge"
|
||||
@@ -119,15 +119,15 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
|
||||
pin = null
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter
|
||||
/obj/item/gun/energy/plasmacutter
|
||||
name = "plasma cutter"
|
||||
desc = "A mining tool capable of expelling concentrated plasma bursts. You could use it to cut limbs off xenos! Or, you know, mine stuff."
|
||||
icon_state = "plasmacutter"
|
||||
item_state = "plasmacutter"
|
||||
origin_tech = "combat=1;materials=3;magnets=2;plasmatech=3;engineering=1"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma)
|
||||
flags = CONDUCT
|
||||
container_type = OPENCONTAINER
|
||||
flags_1 = CONDUCT_1
|
||||
container_type = OPENCONTAINER_1
|
||||
attack_verb = list("attacked", "slashed", "cut", "sliced")
|
||||
force = 12
|
||||
sharpness = IS_SHARP
|
||||
@@ -135,19 +135,19 @@
|
||||
heat = 3800
|
||||
toolspeed = 0.7 //plasmacutters can be used as welders for a few things, and are faster than standard welders
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
..()
|
||||
if(cell)
|
||||
to_chat(user, "<span class='notice'>[src] is [round(cell.percent())]% charged.</span>")
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/attackby(obj/item/A, mob/user)
|
||||
/obj/item/gun/energy/plasmacutter/attackby(obj/item/A, mob/user)
|
||||
if(istype(A, /obj/item/stack/sheet/mineral/plasma))
|
||||
var/obj/item/stack/sheet/S = A
|
||||
S.use(1)
|
||||
cell.give(1000)
|
||||
recharge_newshot(1)
|
||||
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
|
||||
else if(istype(A, /obj/item/weapon/ore/plasma))
|
||||
else if(istype(A, /obj/item/ore/plasma))
|
||||
qdel(A)
|
||||
cell.give(500)
|
||||
recharge_newshot(1)
|
||||
@@ -155,17 +155,17 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/update_icon()
|
||||
/obj/item/gun/energy/plasmacutter/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/adv
|
||||
/obj/item/gun/energy/plasmacutter/adv
|
||||
name = "advanced plasma cutter"
|
||||
icon_state = "adv_plasmacutter"
|
||||
origin_tech = "combat=3;materials=4;magnets=3;plasmatech=4;engineering=2"
|
||||
force = 15
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector
|
||||
/obj/item/gun/energy/wormhole_projector
|
||||
name = "bluespace wormhole projector"
|
||||
desc = "A projector that emits high density quantum-coupled bluespace beams."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/wormhole, /obj/item/ammo_casing/energy/wormhole/orange)
|
||||
@@ -175,32 +175,32 @@
|
||||
var/obj/effect/portal/p_blue
|
||||
var/obj/effect/portal/p_orange
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/update_icon()
|
||||
/obj/item/gun/energy/wormhole_projector/update_icon()
|
||||
icon_state = "[initial(icon_state)][select]"
|
||||
item_state = icon_state
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/process_chamber()
|
||||
/obj/item/gun/energy/wormhole_projector/process_chamber()
|
||||
..()
|
||||
select_fire()
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P)
|
||||
/obj/item/gun/energy/wormhole_projector/proc/on_portal_destroy(obj/effect/portal/P)
|
||||
if(P == p_blue)
|
||||
p_blue = null
|
||||
else if(P == p_orange)
|
||||
p_orange = null
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/has_blue_portal()
|
||||
/obj/item/gun/energy/wormhole_projector/proc/has_blue_portal()
|
||||
if(istype(p_blue) && !QDELETED(p_blue))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/has_orange_portal()
|
||||
/obj/item/gun/energy/wormhole_projector/proc/has_orange_portal()
|
||||
if(istype(p_orange) && !QDELETED(p_orange))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/crosslink()
|
||||
/obj/item/gun/energy/wormhole_projector/proc/crosslink()
|
||||
if(!has_blue_portal() && !has_orange_portal())
|
||||
return
|
||||
if(!has_blue_portal() && has_orange_portal())
|
||||
@@ -212,7 +212,7 @@
|
||||
p_orange.link_portal(p_blue)
|
||||
p_blue.link_portal(p_orange)
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W, turf/target)
|
||||
/obj/item/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W, turf/target)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(target, src, 300, null, FALSE, null)
|
||||
if(istype(W, /obj/item/projectile/beam/wormhole/orange))
|
||||
qdel(p_orange)
|
||||
@@ -225,38 +225,38 @@
|
||||
|
||||
/* 3d printer 'pseudo guns' for borgs */
|
||||
|
||||
/obj/item/weapon/gun/energy/printer
|
||||
/obj/item/gun/energy/printer
|
||||
name = "cyborg lmg"
|
||||
desc = "A machinegun that fires 3d-printed flechettes slowly regenerated using a cyborg's internal power source."
|
||||
icon_state = "l6closed0"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/secborg"
|
||||
cell_type = "/obj/item/stock_parts/cell/secborg"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/c3dbullet)
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/printer/update_icon()
|
||||
/obj/item/gun/energy/printer/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/printer/emp_act()
|
||||
/obj/item/gun/energy/printer/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature
|
||||
/obj/item/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon_state = "freezegun"
|
||||
desc = "A gun that changes temperatures."
|
||||
origin_tech = "combat=4;materials=4;powerstorage=3;magnets=2"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
|
||||
cell_type = "/obj/item/weapon/stock_parts/cell/high"
|
||||
cell_type = "/obj/item/stock_parts/cell/high"
|
||||
pin = null
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/security
|
||||
/obj/item/gun/energy/temperature/security
|
||||
name = "security temperature gun"
|
||||
desc = "A weapon that can only be used to its full potential by the truly robust."
|
||||
origin_tech = "combat=2;materials=2;powerstorage=1;magnets=1"
|
||||
pin = /obj/item/device/firing_pin
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/instakill
|
||||
/obj/item/gun/energy/laser/instakill
|
||||
name = "instakill rifle"
|
||||
icon_state = "instagib"
|
||||
item_state = "instagib"
|
||||
@@ -265,22 +265,22 @@
|
||||
force = 60
|
||||
origin_tech = "combat=7;magnets=6"
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/instakill/red
|
||||
/obj/item/gun/energy/laser/instakill/red
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a red design."
|
||||
icon_state = "instagibred"
|
||||
item_state = "instagibred"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill/red)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/instakill/blue
|
||||
/obj/item/gun/energy/laser/instakill/blue
|
||||
desc = "A specialized ASMD laser-rifle, capable of flat-out disintegrating most targets in a single hit. This one has a blue design."
|
||||
icon_state = "instagibblue"
|
||||
item_state = "instagibblue"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/instakill/blue)
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
|
||||
/obj/item/gun/energy/laser/instakill/emp_act() //implying you could stop the instagib
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/gravity_gun
|
||||
/obj/item/gun/energy/gravity_gun
|
||||
name = "one-point bluespace-gravitational manipulator"
|
||||
desc = "An experimental, multi-mode device that fires bolts of Zero-Point Energy, causing local distortions in gravity."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/gravityrepulse, /obj/item/ammo_casing/energy/gravityattract, /obj/item/ammo_casing/energy/gravitychaos)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/taser
|
||||
/obj/item/gun/energy/taser
|
||||
name = "taser gun"
|
||||
desc = "A low-capacity, energy-based stun gun used by security teams to subdue targets at range."
|
||||
icon_state = "taser"
|
||||
@@ -7,7 +7,7 @@
|
||||
origin_tech = "combat=3"
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/tesla_revolver
|
||||
/obj/item/gun/energy/tesla_revolver
|
||||
name = "tesla gun"
|
||||
desc = "An experimental gun based on an experimental engine, it's about as likely to kill its operator as it is the target."
|
||||
icon_state = "tesla"
|
||||
@@ -18,7 +18,7 @@
|
||||
pin = null
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/advtaser
|
||||
/obj/item/gun/energy/e_gun/advtaser
|
||||
name = "hybrid taser"
|
||||
desc = "A dual-mode taser designed to fire both short-range high-power electrodes and long-range disabler beams."
|
||||
icon_state = "advtaser"
|
||||
@@ -26,14 +26,14 @@
|
||||
origin_tech = "combat=4"
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/advtaser/cyborg
|
||||
/obj/item/gun/energy/e_gun/advtaser/cyborg
|
||||
name = "cyborg taser"
|
||||
desc = "An integrated hybrid taser that draws directly from a cyborg's power cell. The weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_flashlight = 0
|
||||
can_charge = 0
|
||||
use_cyborg_cell = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler
|
||||
/obj/item/gun/energy/disabler
|
||||
name = "disabler"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse."
|
||||
icon_state = "disabler"
|
||||
@@ -42,7 +42,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg
|
||||
/obj/item/gun/energy/disabler/cyborg
|
||||
name = "cyborg disabler"
|
||||
desc = "An integrated disabler that draws from a cyborg's power cell. This weapon contains a limiter to prevent the cyborg's power cell from overheating."
|
||||
can_charge = 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/grenadelauncher
|
||||
/obj/item/gun/grenadelauncher
|
||||
name = "grenade launcher"
|
||||
desc = "a terrible, terrible thing. it's really awful!"
|
||||
icon = 'icons/obj/guns/projectile.dmi'
|
||||
@@ -12,13 +12,13 @@
|
||||
var/max_grenades = 3
|
||||
materials = list(MAT_METAL=2000)
|
||||
|
||||
/obj/item/weapon/gun/grenadelauncher/examine(mob/user)
|
||||
/obj/item/gun/grenadelauncher/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "[grenades.len] / [max_grenades] grenades loaded.")
|
||||
|
||||
/obj/item/weapon/gun/grenadelauncher/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gun/grenadelauncher/attackby(obj/item/I, mob/user, params)
|
||||
|
||||
if((istype(I, /obj/item/weapon/grenade)))
|
||||
if((istype(I, /obj/item/grenade)))
|
||||
if(grenades.len < max_grenades)
|
||||
if(!user.transferItemToLoc(I, src))
|
||||
return
|
||||
@@ -28,7 +28,7 @@
|
||||
else
|
||||
to_chat(usr, "<span class='danger'>The grenade launcher cannot hold more grenades.</span>")
|
||||
|
||||
/obj/item/weapon/gun/grenadelauncher/afterattack(obj/target, mob/user , flag)
|
||||
/obj/item/gun/grenadelauncher/afterattack(obj/target, mob/user , flag)
|
||||
if(target == user)
|
||||
return
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
else
|
||||
to_chat(user, "<span class='danger'>The grenade launcher is empty.</span>")
|
||||
|
||||
/obj/item/weapon/gun/grenadelauncher/proc/fire_grenade(atom/target, mob/user)
|
||||
/obj/item/gun/grenadelauncher/proc/fire_grenade(atom/target, mob/user)
|
||||
user.visible_message("<span class='danger'>[user] fired a grenade!</span>", \
|
||||
"<span class='danger'>You fire the grenade launcher!</span>")
|
||||
var/obj/item/weapon/grenade/F = grenades[1] //Now with less copypasta!
|
||||
var/obj/item/grenade/F = grenades[1] //Now with less copypasta!
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2, user)
|
||||
@@ -49,4 +49,4 @@
|
||||
F.active = 1
|
||||
F.icon_state = initial(F.icon_state) + "_active"
|
||||
playsound(user.loc, 'sound/weapons/armbomb.ogg', 75, 1, -3)
|
||||
addtimer(CALLBACK(F, /obj/item/weapon/grenade.proc/prime), 15)
|
||||
addtimer(CALLBACK(F, /obj/item/grenade.proc/prime), 15)
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
/obj/item/weapon/gun/magic
|
||||
/obj/item/gun/magic
|
||||
name = "staff of nothing"
|
||||
desc = "This staff is boring to watch because even though it came first you've seen everything it can do in other staves for years."
|
||||
icon = 'icons/obj/guns/magic.dmi'
|
||||
icon_state = "staffofnothing"
|
||||
item_state = "staff"
|
||||
fire_sound = 'sound/weapons/emitter.ogg'
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_HUGE
|
||||
var/max_charges = 6
|
||||
var/charges = 0
|
||||
@@ -22,7 +22,7 @@
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' //not really a gun and some toys use these inhands
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
|
||||
/obj/item/weapon/gun/magic/afterattack(atom/target, mob/living/user, flag)
|
||||
/obj/item/gun/magic/afterattack(atom/target, mob/living/user, flag)
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
if(istype(A, /area/wizard_station))
|
||||
@@ -32,19 +32,19 @@
|
||||
no_den_usage = 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/can_shoot()
|
||||
/obj/item/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
/obj/item/weapon/gun/magic/recharge_newshot()
|
||||
/obj/item/gun/magic/recharge_newshot()
|
||||
if (charges && chambered && !chambered.BB)
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/weapon/gun/magic/process_chamber()
|
||||
/obj/item/gun/magic/process_chamber()
|
||||
if(chambered && !chambered.BB) //if BB is null, i.e the shot has been fired...
|
||||
charges--//... drain a charge
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/weapon/gun/magic/Initialize()
|
||||
/obj/item/gun/magic/Initialize()
|
||||
. = ..()
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
@@ -52,13 +52,13 @@
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/Destroy()
|
||||
/obj/item/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/process()
|
||||
/obj/item/gun/magic/process()
|
||||
charge_tick++
|
||||
if(charge_tick < recharge_rate || charges >= max_charges)
|
||||
return 0
|
||||
@@ -68,18 +68,18 @@
|
||||
recharge_newshot()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/magic/update_icon()
|
||||
/obj/item/gun/magic/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
/obj/item/gun/magic/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
to_chat(user, "<span class='warning'>The [name] whizzles quietly.<span>")
|
||||
|
||||
/obj/item/weapon/gun/magic/suicide_act(mob/user)
|
||||
/obj/item/gun/magic/suicide_act(mob/user)
|
||||
user.visible_message("<span class='suicide'>[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!</span>")
|
||||
playsound(loc, fire_sound, 50, 1, -1)
|
||||
return (FIRELOSS)
|
||||
|
||||
/obj/item/weapon/gun/magic/vv_edit_var(var_name, var_value)
|
||||
/obj/item/gun/magic/vv_edit_var(var_name, var_value)
|
||||
. = ..()
|
||||
switch (var_name)
|
||||
if ("charges")
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/obj/item/weapon/gun/magic/staff
|
||||
/obj/item/gun/magic/staff
|
||||
slot_flags = SLOT_BACK
|
||||
lefthand_file = 'icons/mob/inhands/weapons/staves_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/weapons/staves_righthand.dmi'
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/change
|
||||
/obj/item/gun/magic/staff/change
|
||||
name = "staff of change"
|
||||
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
||||
fire_sound = 'sound/magic/staff_change.ogg'
|
||||
@@ -11,7 +11,7 @@
|
||||
icon_state = "staffofchange"
|
||||
item_state = "staffofchange"
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/animate
|
||||
/obj/item/gun/magic/staff/animate
|
||||
name = "staff of animation"
|
||||
desc = "An artefact that spits bolts of life-force which causes objects which are hit by it to animate and come to life! This magic doesn't affect machines."
|
||||
fire_sound = 'sound/magic/staff_animation.ogg'
|
||||
@@ -19,7 +19,7 @@
|
||||
icon_state = "staffofanimation"
|
||||
item_state = "staffofanimation"
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/healing
|
||||
/obj/item/gun/magic/staff/healing
|
||||
name = "staff of healing"
|
||||
desc = "An artefact that spits bolts of restoring magic which can remove ailments of all kinds and even raise the dead."
|
||||
fire_sound = 'sound/magic/staff_healing.ogg'
|
||||
@@ -27,10 +27,10 @@
|
||||
icon_state = "staffofhealing"
|
||||
item_state = "staffofhealing"
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/healing/handle_suicide() //Stops people trying to commit suicide to heal themselves
|
||||
/obj/item/gun/magic/staff/healing/handle_suicide() //Stops people trying to commit suicide to heal themselves
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/chaos
|
||||
/obj/item/gun/magic/staff/chaos
|
||||
name = "staff of chaos"
|
||||
desc = "An artefact that spits bolts of chaotic magic that can potentially do anything."
|
||||
fire_sound = 'sound/magic/staff_chaos.ogg'
|
||||
@@ -44,11 +44,11 @@
|
||||
/obj/item/projectile/magic/death, /obj/item/projectile/magic/teleport, /obj/item/projectile/magic/door, /obj/item/projectile/magic/aoe/fireball,
|
||||
/obj/item/projectile/magic/spellblade, /obj/item/projectile/magic/arcane_barrage)
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/chaos/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0)
|
||||
/obj/item/gun/magic/staff/chaos/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override, bonus_spread = 0)
|
||||
chambered.projectile_type = pick(allowed_projectile_types)
|
||||
. = ..(target, user, message, params, zone_override, bonus_spread)
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/door
|
||||
/obj/item/gun/magic/staff/door
|
||||
name = "staff of door creation"
|
||||
desc = "An artefact that spits bolts of transformative magic that can create doors in walls."
|
||||
fire_sound = 'sound/magic/staff_door.ogg'
|
||||
@@ -59,7 +59,7 @@
|
||||
recharge_rate = 2
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/honk
|
||||
/obj/item/gun/magic/staff/honk
|
||||
name = "staff of the honkmother"
|
||||
desc = "Honk"
|
||||
fire_sound = 'sound/items/airhorn.ogg'
|
||||
@@ -69,7 +69,7 @@
|
||||
max_charges = 4
|
||||
recharge_rate = 8
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/spellblade
|
||||
/obj/item/gun/magic/staff/spellblade
|
||||
name = "spellblade"
|
||||
desc = "A deadly combination of laziness and boodlust, this blade allows the user to dismember their enemies without all the hard work of actually swinging the sword."
|
||||
fire_sound = 'sound/magic/fireball.ogg'
|
||||
@@ -85,7 +85,7 @@
|
||||
sharpness = IS_SHARP
|
||||
max_charges = 4
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
/obj/item/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", final_block_chance = 0, damage = 0, attack_type = MELEE_ATTACK)
|
||||
if(attack_type == PROJECTILE_ATTACK)
|
||||
final_block_chance = 0
|
||||
return ..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/magic/wand
|
||||
/obj/item/gun/magic/wand
|
||||
name = "wand of nothing"
|
||||
desc = "It's not just a stick, it's a MAGIC stick!"
|
||||
ammo_type = /obj/item/ammo_casing/magic
|
||||
@@ -9,7 +9,7 @@
|
||||
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
|
||||
var/variable_charges = 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/Initialize()
|
||||
/obj/item/gun/magic/wand/Initialize()
|
||||
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
|
||||
if(prob(33))
|
||||
max_charges = Ceiling(max_charges / 3)
|
||||
@@ -17,19 +17,19 @@
|
||||
max_charges = Ceiling(max_charges / 2)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/examine(mob/user)
|
||||
/obj/item/gun/magic/wand/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Has [charges] charge\s remaining.")
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/update_icon()
|
||||
/obj/item/gun/magic/wand/update_icon()
|
||||
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
/obj/item/gun/magic/wand/attack(atom/target, mob/living/user)
|
||||
if(target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/afterattack(atom/target, mob/living/user)
|
||||
/obj/item/gun/magic/wand/afterattack(atom/target, mob/living/user)
|
||||
if(!charges)
|
||||
shoot_with_empty_chamber(user)
|
||||
return
|
||||
@@ -47,7 +47,7 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/proc/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/proc/zap_self(mob/living/user)
|
||||
user.visible_message("<span class='danger'>[user] zaps [user.p_them()]self with [src].</span>")
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.log_message("zapped [user.p_them()]self with a <b>[src]</b>", INDIVIDUAL_ATTACK_LOG)
|
||||
@@ -57,7 +57,7 @@
|
||||
//WAND OF DEATH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/death
|
||||
/obj/item/gun/magic/wand/death
|
||||
name = "wand of death"
|
||||
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
|
||||
fire_sound = 'sound/magic/wandodeath.ogg'
|
||||
@@ -65,7 +65,7 @@
|
||||
icon_state = "deathwand"
|
||||
max_charges = 3 //3, 2, 2, 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/death/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/death/zap_self(mob/living/user)
|
||||
..()
|
||||
to_chat(user, "<span class='warning'>You irradiate yourself with pure energy! \
|
||||
[pick("Do not pass go. Do not collect 200 zorkmids.","You feel more confident in your spell casting skills.","You Die...","Do you want your possessions identified?")]\
|
||||
@@ -78,7 +78,7 @@
|
||||
//WAND OF HEALING
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/resurrection
|
||||
/obj/item/gun/magic/wand/resurrection
|
||||
name = "wand of healing"
|
||||
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
|
||||
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||
@@ -86,7 +86,7 @@
|
||||
icon_state = "revivewand"
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/resurrection/zap_self(mob/living/user)
|
||||
user.revive(full_heal = 1)
|
||||
if(iscarbon(user))
|
||||
var/mob/living/carbon/C = user
|
||||
@@ -100,7 +100,7 @@
|
||||
//WAND OF POLYMORPH
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/polymorph
|
||||
/obj/item/gun/magic/wand/polymorph
|
||||
name = "wand of polymorph"
|
||||
desc = "This wand is attuned to chaos and will radically alter the victim's form."
|
||||
ammo_type = /obj/item/ammo_casing/magic/change
|
||||
@@ -108,7 +108,7 @@
|
||||
fire_sound = 'sound/magic/staff_change.ogg'
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/polymorph/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/polymorph/zap_self(mob/living/user)
|
||||
..() //because the user mob ceases to exists by the time wabbajack fully resolves
|
||||
wabbajack(user)
|
||||
charges--
|
||||
@@ -117,7 +117,7 @@
|
||||
//WAND OF TELEPORTATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/teleport
|
||||
/obj/item/gun/magic/wand/teleport
|
||||
name = "wand of teleportation"
|
||||
desc = "This wand will wrench targets through space and time to move them somewhere else."
|
||||
ammo_type = /obj/item/ammo_casing/magic/teleport
|
||||
@@ -126,7 +126,7 @@
|
||||
max_charges = 10 //10, 5, 5, 4
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
if(do_teleport(user, user, 10))
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(3, user.loc)
|
||||
@@ -138,7 +138,7 @@
|
||||
//WAND OF DOOR CREATION
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/door
|
||||
/obj/item/gun/magic/wand/door
|
||||
name = "wand of door creation"
|
||||
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
|
||||
ammo_type = /obj/item/ammo_casing/magic/door
|
||||
@@ -147,7 +147,7 @@
|
||||
max_charges = 20 //20, 10, 10, 7
|
||||
no_den_usage = 1
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/door/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/door/zap_self(mob/living/user)
|
||||
to_chat(user, "<span class='notice'>You feel vaguely more open with your feelings.</span>")
|
||||
charges--
|
||||
..()
|
||||
@@ -156,7 +156,7 @@
|
||||
//WAND OF FIREBALL
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/fireball
|
||||
/obj/item/gun/magic/wand/fireball
|
||||
name = "wand of fireball"
|
||||
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
|
||||
fire_sound = 'sound/magic/fireball.ogg'
|
||||
@@ -164,7 +164,7 @@
|
||||
icon_state = "firewand"
|
||||
max_charges = 8 //8, 4, 4, 3
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/fireball/zap_self(mob/living/user)
|
||||
..()
|
||||
explosion(user.loc, -1, 0, 2, 3, 0, flame_range = 2)
|
||||
charges--
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/medbeam
|
||||
/obj/item/gun/medbeam
|
||||
name = "Medical Beamgun"
|
||||
desc = "Don't cross the streams!"
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
@@ -16,24 +16,24 @@
|
||||
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
/obj/item/weapon/gun/medbeam/Initialize()
|
||||
/obj/item/gun/medbeam/Initialize()
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/weapon/gun/medbeam/Destroy(mob/user)
|
||||
/obj/item/gun/medbeam/Destroy(mob/user)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
LoseTarget()
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/medbeam/dropped(mob/user)
|
||||
/obj/item/gun/medbeam/dropped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/weapon/gun/medbeam/equipped(mob/user)
|
||||
/obj/item/gun/medbeam/equipped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/LoseTarget()
|
||||
/obj/item/gun/medbeam/proc/LoseTarget()
|
||||
if(active)
|
||||
qdel(current_beam)
|
||||
current_beam = null
|
||||
@@ -41,7 +41,7 @@
|
||||
on_beam_release(current_target)
|
||||
current_target = null
|
||||
|
||||
/obj/item/weapon/gun/medbeam/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
/obj/item/gun/medbeam/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
if(isliving(user))
|
||||
add_fingerprint(user)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
|
||||
SSblackbox.add_details("gun_fired","[src.type]")
|
||||
|
||||
/obj/item/weapon/gun/medbeam/process()
|
||||
/obj/item/gun/medbeam/process()
|
||||
|
||||
var/source = loc
|
||||
if(!mounted && !isliving(source))
|
||||
@@ -82,7 +82,7 @@
|
||||
if(current_target)
|
||||
on_beam_tick(current_target)
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/los_check(atom/movable/user, mob/target)
|
||||
/obj/item/gun/medbeam/proc/los_check(atom/movable/user, mob/target)
|
||||
var/turf/user_turf = user.loc
|
||||
if(mounted)
|
||||
user_turf = get_turf(user)
|
||||
@@ -108,26 +108,26 @@
|
||||
qdel(dummy)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/on_beam_hit(var/mob/living/target)
|
||||
/obj/item/gun/medbeam/proc/on_beam_hit(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/on_beam_tick(var/mob/living/target)
|
||||
/obj/item/gun/medbeam/proc/on_beam_tick(var/mob/living/target)
|
||||
if(target.health != target.maxHealth)
|
||||
new /obj/effect/temp_visual/heal(get_turf(target), "#80F5FF")
|
||||
target.adjustBruteLoss(-4)
|
||||
target.adjustFireLoss(-4)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/on_beam_release(var/mob/living/target)
|
||||
/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target)
|
||||
return
|
||||
|
||||
/obj/effect/ebeam/medical
|
||||
name = "medical beam"
|
||||
|
||||
//////////////////////////////Mech Version///////////////////////////////
|
||||
/obj/item/weapon/gun/medbeam/mech
|
||||
/obj/item/gun/medbeam/mech
|
||||
mounted = 1
|
||||
|
||||
/obj/item/weapon/gun/medbeam/mech/Initialize()
|
||||
/obj/item/gun/medbeam/mech/Initialize()
|
||||
. = ..()
|
||||
STOP_PROCESSING(SSobj, src) //Mech mediguns do not process until installed, and are controlled by the holder obj
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/blastcannon
|
||||
/obj/item/gun/blastcannon
|
||||
name = "pipe gun"
|
||||
desc = "A pipe welded onto a gun stock, with a mechanical trigger. The pipe has an opening near the top, and there seems to be a spring loaded wheel in the hole."
|
||||
icon_state = "empty_blastcannon"
|
||||
@@ -15,12 +15,12 @@
|
||||
var/datum/gas_mixture/air1
|
||||
var/datum/gas_mixture/air2
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/New()
|
||||
/obj/item/gun/blastcannon/New()
|
||||
if(!pin)
|
||||
pin = new
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/Destroy()
|
||||
/obj/item/gun/blastcannon/Destroy()
|
||||
if(bomb)
|
||||
qdel(bomb)
|
||||
bomb = null
|
||||
@@ -28,7 +28,7 @@
|
||||
air2 = null
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/attack_self(mob/user)
|
||||
/obj/item/gun/blastcannon/attack_self(mob/user)
|
||||
if(bomb)
|
||||
bomb.forceMove(user.loc)
|
||||
user.put_in_hands(bomb)
|
||||
@@ -37,7 +37,7 @@
|
||||
update_icon()
|
||||
. = ..(user)
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/update_icon()
|
||||
/obj/item/gun/blastcannon/update_icon()
|
||||
if(bomb)
|
||||
icon_state = icon_state_loaded
|
||||
name = "blast cannon"
|
||||
@@ -48,7 +48,7 @@
|
||||
desc = initial(desc)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/attackby(obj/O, mob/user)
|
||||
/obj/item/gun/blastcannon/attackby(obj/O, mob/user)
|
||||
if(istype(O, /obj/item/device/transfer_valve))
|
||||
var/obj/item/device/transfer_valve/T = O
|
||||
if(!T.tank_one || !T.tank_two)
|
||||
@@ -64,7 +64,7 @@
|
||||
return TRUE
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/proc/calculate_bomb()
|
||||
/obj/item/gun/blastcannon/proc/calculate_bomb()
|
||||
if(!istype(bomb)||!istype(bomb.tank_one)||!istype(bomb.tank_two))
|
||||
return 0
|
||||
air1 = bomb.tank_one.air_contents
|
||||
@@ -81,7 +81,7 @@
|
||||
return 0
|
||||
return (pressure/TANK_FRAGMENT_SCALE)
|
||||
|
||||
/obj/item/weapon/gun/blastcannon/afterattack(atom/target, mob/user, flag, params)
|
||||
/obj/item/gun/blastcannon/afterattack(atom/target, mob/user, flag, params)
|
||||
if((!bomb) || (target == user) || (target.loc == user) || (!target) || (target.loc == user.loc) || (target.loc in range(user, 2)) || (target in range(user, 2)))
|
||||
return ..()
|
||||
var/power = calculate_bomb()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/e_gun/advtaser/mounted
|
||||
/obj/item/gun/energy/e_gun/advtaser/mounted
|
||||
name = "mounted taser"
|
||||
desc = "An arm mounted dual-mode weapon that fires electrodes and disabler shots."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
@@ -9,10 +9,10 @@
|
||||
can_flashlight = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead
|
||||
|
||||
/obj/item/weapon/gun/energy/e_gun/advtaser/mounted/dropped()//if somebody manages to drop this somehow...
|
||||
/obj/item/gun/energy/e_gun/advtaser/mounted/dropped()//if somebody manages to drop this somehow...
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/mounted
|
||||
/obj/item/gun/energy/laser/mounted
|
||||
name = "mounted laser"
|
||||
desc = "An arm mounted cannon that fires lethal lasers."
|
||||
icon = 'icons/obj/items_cyborg.dmi'
|
||||
@@ -22,5 +22,5 @@
|
||||
selfcharge = 1
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/mounted/dropped()
|
||||
/obj/item/gun/energy/laser/mounted/dropped()
|
||||
..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/syringe
|
||||
/obj/item/gun/syringe
|
||||
name = "syringe gun"
|
||||
desc = "A spring loaded rifle designed to fit syringes, used to incapacitate unruly patients from a distance."
|
||||
icon_state = "syringegun"
|
||||
@@ -14,32 +14,32 @@
|
||||
var/list/syringes = list()
|
||||
var/max_syringes = 1
|
||||
|
||||
/obj/item/weapon/gun/syringe/Initialize()
|
||||
/obj/item/gun/syringe/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun(src)
|
||||
|
||||
/obj/item/weapon/gun/syringe/recharge_newshot()
|
||||
/obj/item/gun/syringe/recharge_newshot()
|
||||
if(!syringes.len)
|
||||
return
|
||||
chambered.newshot()
|
||||
|
||||
/obj/item/weapon/gun/syringe/can_shoot()
|
||||
/obj/item/gun/syringe/can_shoot()
|
||||
return syringes.len
|
||||
|
||||
/obj/item/weapon/gun/syringe/process_chamber()
|
||||
/obj/item/gun/syringe/process_chamber()
|
||||
if(chambered && !chambered.BB) //we just fired
|
||||
recharge_newshot()
|
||||
|
||||
/obj/item/weapon/gun/syringe/examine(mob/user)
|
||||
/obj/item/gun/syringe/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Can hold [max_syringes] syringe\s. Has [syringes.len] syringe\s remaining.")
|
||||
|
||||
/obj/item/weapon/gun/syringe/attack_self(mob/living/user)
|
||||
/obj/item/gun/syringe/attack_self(mob/living/user)
|
||||
if(!syringes.len)
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = syringes[syringes.len]
|
||||
var/obj/item/reagent_containers/syringe/S = syringes[syringes.len]
|
||||
|
||||
if(!S) return 0
|
||||
S.loc = user.loc
|
||||
@@ -49,8 +49,8 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
|
||||
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.transferItemToLoc(A, src))
|
||||
return FALSE
|
||||
@@ -62,13 +62,13 @@
|
||||
to_chat(user, "<span class='warning'>[src] cannot hold more syringes!</span>")
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/syringe/rapidsyringe
|
||||
/obj/item/gun/syringe/rapidsyringe
|
||||
name = "rapid syringe gun"
|
||||
desc = "A modification of the syringe gun design, using a rotating cylinder to store up to six syringes."
|
||||
icon_state = "rapidsyringegun"
|
||||
max_syringes = 6
|
||||
|
||||
/obj/item/weapon/gun/syringe/syndicate
|
||||
/obj/item/gun/syringe/syndicate
|
||||
name = "dart pistol"
|
||||
desc = "A small spring-loaded sidearm that functions identically to a syringe gun."
|
||||
icon_state = "syringe_pistol"
|
||||
@@ -79,18 +79,18 @@
|
||||
suppressed = 1 //Softer fire sound
|
||||
can_unsuppress = 0 //Permanently silenced
|
||||
|
||||
/obj/item/weapon/gun/syringe/dna
|
||||
/obj/item/gun/syringe/dna
|
||||
name = "modified syringe gun"
|
||||
desc = "A syringe gun that has been modified to fit DNA injectors instead of normal syringes."
|
||||
origin_tech = "combat=2;syndicate=2;biotech=3"
|
||||
|
||||
/obj/item/weapon/gun/syringe/dna/Initialize()
|
||||
/obj/item/gun/syringe/dna/Initialize()
|
||||
. = ..()
|
||||
chambered = new /obj/item/ammo_casing/dnainjector(src)
|
||||
|
||||
/obj/item/weapon/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/weapon/dnainjector))
|
||||
var/obj/item/weapon/dnainjector/D = A
|
||||
/obj/item/gun/syringe/dna/attackby(obj/item/A, mob/user, params, show_msg = TRUE)
|
||||
if(istype(A, /obj/item/dnainjector))
|
||||
var/obj/item/dnainjector/D = A
|
||||
if(D.used)
|
||||
to_chat(user, "<span class='warning'>This injector is used up!</span>")
|
||||
return
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
icon_state = "firing_pin"
|
||||
item_state = "pen"
|
||||
origin_tech = "materials=2;combat=4"
|
||||
flags = CONDUCT
|
||||
flags_1 = CONDUCT_1
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
attack_verb = list("poked")
|
||||
var/emagged = FALSE
|
||||
@@ -13,18 +13,18 @@
|
||||
var/selfdestruct = 0 // Explode when user check is failed.
|
||||
var/force_replace = 0 // Can forcefully replace other pins.
|
||||
var/pin_removeable = 0 // Can be replaced by any pin.
|
||||
var/obj/item/weapon/gun/gun
|
||||
var/obj/item/gun/gun
|
||||
|
||||
|
||||
/obj/item/device/firing_pin/New(newloc)
|
||||
..()
|
||||
if(istype(newloc, /obj/item/weapon/gun))
|
||||
if(istype(newloc, /obj/item/gun))
|
||||
gun = newloc
|
||||
|
||||
/obj/item/device/firing_pin/afterattack(atom/target, mob/user, proximity_flag)
|
||||
if(proximity_flag)
|
||||
if(istype(target, /obj/item/weapon/gun))
|
||||
var/obj/item/weapon/gun/G = target
|
||||
if(istype(target, /obj/item/gun))
|
||||
var/obj/item/gun/G = target
|
||||
if(G.pin && (force_replace || G.pin.pin_removeable))
|
||||
G.pin.loc = get_turf(G)
|
||||
G.pin.gun_remove(user)
|
||||
@@ -44,7 +44,7 @@
|
||||
emagged = TRUE
|
||||
to_chat(user, "<span class='notice'>You override the authentication mechanism.</span>")
|
||||
|
||||
/obj/item/device/firing_pin/proc/gun_insert(mob/living/user, obj/item/weapon/gun/G)
|
||||
/obj/item/device/firing_pin/proc/gun_insert(mob/living/user, obj/item/gun/G)
|
||||
gun = G
|
||||
forceMove(gun)
|
||||
gun.pin = src
|
||||
@@ -93,11 +93,11 @@
|
||||
name = "implant-keyed firing pin"
|
||||
desc = "This is a security firing pin which only authorizes users who are implanted with a certain device."
|
||||
fail_message = "<span class='warning'>IMPLANT CHECK FAILED.</span>"
|
||||
var/obj/item/weapon/implant/req_implant = null
|
||||
var/obj/item/implant/req_implant = null
|
||||
|
||||
/obj/item/device/firing_pin/implant/pin_auth(mob/living/user)
|
||||
if(istype(user))
|
||||
for(var/obj/item/weapon/implant/I in user.implants)
|
||||
for(var/obj/item/implant/I in user.implants)
|
||||
if(req_implant && I.type == req_implant)
|
||||
return 1
|
||||
return 0
|
||||
@@ -106,12 +106,12 @@
|
||||
name = "mindshield firing pin"
|
||||
desc = "This Security firing pin authorizes the weapon for only mindshield-implanted users."
|
||||
icon_state = "firing_pin_loyalty"
|
||||
req_implant = /obj/item/weapon/implant/mindshield
|
||||
req_implant = /obj/item/implant/mindshield
|
||||
|
||||
/obj/item/device/firing_pin/implant/pindicate
|
||||
name = "syndicate firing pin"
|
||||
icon_state = "firing_pin_pindi"
|
||||
req_implant = /obj/item/weapon/implant/weapons_auth
|
||||
req_implant = /obj/item/implant/weapons_auth
|
||||
|
||||
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/device/firing_pin/clown/ultra/gun_insert(mob/living/user, obj/item/weapon/gun/G)
|
||||
/obj/item/device/firing_pin/clown/ultra/gun_insert(mob/living/user, obj/item/gun/G)
|
||||
..()
|
||||
G.clumsy_check = 0
|
||||
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
icon_state = "bullet"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
flags = ABSTRACT
|
||||
flags_1 = ABSTRACT_1
|
||||
pass_flags = PASSTABLE
|
||||
mouse_opacity = 0
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
hitsound = 'sound/weapons/pierce.ogg'
|
||||
var/hitsound_wall = ""
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
permutated.Add(A)
|
||||
return FALSE
|
||||
else
|
||||
if(A && A.density && !ismob(A) && !(A.flags & ON_BORDER)) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs on that tile.
|
||||
if(A && A.density && !ismob(A) && !(A.flags_1 & ON_BORDER_1)) //if we hit a dense non-border obj or dense turf then we also hit one of the mobs on that tile.
|
||||
var/list/mobs_list = list()
|
||||
for(var/mob/living/L in target_turf)
|
||||
mobs_list += L
|
||||
@@ -188,7 +188,7 @@
|
||||
return FALSE
|
||||
|
||||
/obj/item/projectile/proc/check_ricochet_flag(atom/A)
|
||||
if(A.flags & CHECK_RICOCHET)
|
||||
if(A.flags_1 & CHECK_RICOCHET_1)
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
diff a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm (rejected hunks)
|
||||
@@ -4,7 +4,7 @@
|
||||
icon_state = "bullet"
|
||||
density = FALSE
|
||||
anchored = TRUE
|
||||
- flags = ABSTRACT
|
||||
+ flags_1 = ABSTRACT_1
|
||||
pass_flags = PASSTABLE
|
||||
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
||||
hitsound = 'sound/weapons/pierce.ogg'
|
||||
@@ -239,7 +239,7 @@
|
||||
/obj/item/projectile/bullet/dnainjector
|
||||
name = "\improper DNA injector"
|
||||
icon_state = "syringeproj"
|
||||
var/obj/item/weapon/dnainjector/injector
|
||||
var/obj/item/dnainjector/injector
|
||||
damage = 5
|
||||
hitsound_wall = "shatter"
|
||||
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
|
||||
/obj/item/projectile/energy/trap/on_hit(atom/target, blocked = FALSE)
|
||||
if(!ismob(target) || blocked >= 100) //Fully blocked by mob or collided with dense object - drop a trap
|
||||
new/obj/item/weapon/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
new/obj/item/restraints/legcuffs/beartrap/energy(get_turf(loc))
|
||||
else if(iscarbon(target))
|
||||
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy(get_turf(target))
|
||||
B.Crossed(target)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/on_range()
|
||||
new /obj/item/weapon/restraints/legcuffs/beartrap/energy(loc)
|
||||
new /obj/item/restraints/legcuffs/beartrap/energy(loc)
|
||||
..()
|
||||
|
||||
/obj/item/projectile/energy/trap/cyborg
|
||||
@@ -120,7 +120,7 @@
|
||||
do_sparks(1, TRUE, src)
|
||||
qdel(src)
|
||||
if(iscarbon(target))
|
||||
var/obj/item/weapon/restraints/legcuffs/beartrap/B = new /obj/item/weapon/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
var/obj/item/restraints/legcuffs/beartrap/B = new /obj/item/restraints/legcuffs/beartrap/energy/cyborg(get_turf(target))
|
||||
B.Crossed(target)
|
||||
QDEL_IN(src, 10)
|
||||
..()
|
||||
|
||||
@@ -261,7 +261,7 @@
|
||||
if(!new_mob)
|
||||
return
|
||||
new_mob.grant_language(/datum/language/common)
|
||||
SET_SECONDARY_FLAG(new_mob, OMNITONGUE)
|
||||
new_mob.flags_2 |= OMNITONGUE_2
|
||||
new_mob.logging = M.logging
|
||||
|
||||
// Some forms can still wear some items
|
||||
@@ -315,7 +315,7 @@
|
||||
return
|
||||
else
|
||||
var/obj/O = src
|
||||
if(istype(O, /obj/item/weapon/gun))
|
||||
if(istype(O, /obj/item/gun))
|
||||
new /mob/living/simple_animal/hostile/mimic/copy/ranged(loc, src, owner)
|
||||
else
|
||||
new /mob/living/simple_animal/hostile/mimic/copy(loc, src, owner)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
|
||||
range = 10
|
||||
var/modified = 0
|
||||
var/obj/item/weapon/pen/pen = null
|
||||
var/obj/item/pen/pen = null
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
|
||||
if(dropped)
|
||||
|
||||
@@ -161,7 +161,7 @@
|
||||
icon_state = "spark"
|
||||
hitsound = "sparks"
|
||||
damage = 3
|
||||
var/obj/item/weapon/gun/energy/wormhole_projector/gun
|
||||
var/obj/item/gun/energy/wormhole_projector/gun
|
||||
color = "#33CCFF"
|
||||
|
||||
/obj/item/projectile/beam/wormhole/orange
|
||||
@@ -172,7 +172,7 @@
|
||||
if(casing)
|
||||
gun = casing.gun
|
||||
|
||||
/obj/item/ammo_casing/energy/wormhole/New(var/obj/item/weapon/gun/energy/wormhole_projector/wh)
|
||||
/obj/item/ammo_casing/energy/wormhole/New(var/obj/item/gun/energy/wormhole_projector/wh)
|
||||
gun = wh
|
||||
|
||||
/obj/item/projectile/beam/wormhole/on_hit(atom/target)
|
||||
|
||||
Reference in New Issue
Block a user