mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-31 07:57:47 +01:00
Removes All Weapons
This commit is contained in:
@@ -55,7 +55,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You fail to collect anything!</span>")
|
||||
else
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(BB)
|
||||
if(initial(BB.name) == "bullet")
|
||||
var/tmp_label = ""
|
||||
|
||||
@@ -334,11 +334,11 @@
|
||||
/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.damage_type = BRUTE
|
||||
update_icon()
|
||||
else if((istype(A, /obj/item/weapon/pen)) && modified && !FD.pen)
|
||||
else if((istype(A, /obj/item/pen)) && modified && !FD.pen)
|
||||
if(!user.unEquip(A))
|
||||
return
|
||||
A.loc = FD
|
||||
|
||||
@@ -148,10 +148,10 @@
|
||||
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/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/ammo_casing/energy/wormhole/orange
|
||||
|
||||
@@ -1,4 +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'
|
||||
@@ -61,32 +61,32 @@
|
||||
var/zoom_amt = 3 //Distance in TURFs to move the user's screen forward (the "zoom" effect)
|
||||
var/datum/action/toggle_scope_zoom/azoom
|
||||
|
||||
/obj/item/weapon/gun/New()
|
||||
/obj/item/gun/New()
|
||||
..()
|
||||
if(gun_light)
|
||||
verbs += /obj/item/weapon/gun/proc/toggle_gunlight
|
||||
verbs += /obj/item/gun/proc/toggle_gunlight
|
||||
build_zooming()
|
||||
|
||||
/obj/item/weapon/gun/examine(mob/user)
|
||||
/obj/item/gun/examine(mob/user)
|
||||
..()
|
||||
if(unique_reskin && !current_skin)
|
||||
to_chat(user, "<span class='notice'>Alt-click it to reskin it.</span>")
|
||||
if(unique_rename)
|
||||
to_chat(user, "<span class='notice'>Use a pen on it to rename it.</span>")
|
||||
|
||||
/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)
|
||||
|
||||
@@ -107,11 +107,11 @@
|
||||
if(user.drop_item())
|
||||
user.visible_message("<span class='danger'>[src] flies out of [user]'s hands!</span>", "<span class='userdanger'>[src] kicks out of your grip!</span>")
|
||||
|
||||
/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
|
||||
@@ -153,7 +153,7 @@
|
||||
|
||||
process_fire(target,user,1,params)
|
||||
|
||||
/obj/item/weapon/gun/proc/can_trigger_gun(var/mob/living/user)
|
||||
/obj/item/gun/proc/can_trigger_gun(var/mob/living/user)
|
||||
if(!user.can_use_guns(src))
|
||||
return 0
|
||||
if(restricted_species && restricted_species.len && !(user.get_species() in restricted_species))
|
||||
@@ -161,10 +161,10 @@
|
||||
return 0
|
||||
return 1
|
||||
|
||||
obj/item/weapon/gun/proc/newshot()
|
||||
obj/item/gun/proc/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)
|
||||
/obj/item/gun/proc/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(semicd)
|
||||
@@ -231,13 +231,13 @@ obj/item/weapon/gun/proc/newshot()
|
||||
user.update_inv_r_hand()
|
||||
feedback_add_details("gun_fired","[type]")
|
||||
|
||||
/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
|
||||
..()
|
||||
else
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gun/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/device/flashlight/seclite))
|
||||
var/obj/item/device/flashlight/seclite/S = I
|
||||
if(can_flashlight)
|
||||
@@ -255,7 +255,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
if(loc == user)
|
||||
A.Grant(user)
|
||||
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
if(istype(I, /obj/item/screwdriver))
|
||||
if(gun_light && can_flashlight)
|
||||
for(var/obj/item/device/flashlight/seclite/S in src)
|
||||
to_chat(user, "<span class='notice'>You unscrew the seclite from [src].</span>")
|
||||
@@ -268,11 +268,11 @@ obj/item/weapon/gun/proc/newshot()
|
||||
qdel(TGL)
|
||||
|
||||
if(unique_rename)
|
||||
if(istype(I, /obj/item/weapon/pen))
|
||||
if(istype(I, /obj/item/pen))
|
||||
rename_gun(user)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/proc/toggle_gunlight()
|
||||
/obj/item/gun/proc/toggle_gunlight()
|
||||
set name = "Toggle Gun Light"
|
||||
set category = "Object"
|
||||
set desc = "Click to toggle your weapon's attached flashlight."
|
||||
@@ -289,7 +289,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_gun_light(user)
|
||||
|
||||
/obj/item/weapon/gun/proc/update_gun_light(mob/user = null)
|
||||
/obj/item/gun/proc/update_gun_light(mob/user = null)
|
||||
if(gun_light)
|
||||
if(gun_light.on)
|
||||
set_light(gun_light.brightness_on)
|
||||
@@ -303,18 +303,18 @@ obj/item/weapon/gun/proc/newshot()
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/weapon/gun/pickup(mob/user)
|
||||
/obj/item/gun/pickup(mob/user)
|
||||
..()
|
||||
if(azoom)
|
||||
azoom.Grant(user)
|
||||
|
||||
/obj/item/weapon/gun/dropped(mob/user)
|
||||
/obj/item/gun/dropped(mob/user)
|
||||
..()
|
||||
zoom(user,FALSE)
|
||||
if(azoom)
|
||||
azoom.Remove(user)
|
||||
|
||||
/obj/item/weapon/gun/AltClick(mob/user)
|
||||
/obj/item/gun/AltClick(mob/user)
|
||||
..()
|
||||
if(user.incapacitated())
|
||||
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
|
||||
@@ -322,7 +322,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
if(unique_reskin && !current_skin && loc == user)
|
||||
reskin_gun(user)
|
||||
|
||||
/obj/item/weapon/gun/proc/reskin_gun(mob/M)
|
||||
/obj/item/gun/proc/reskin_gun(mob/M)
|
||||
var/choice = input(M,"Warning, you can only reskin your weapon once!","Reskin Gun") in options
|
||||
|
||||
if(src && choice && !current_skin && !M.incapacitated() && in_range(M,src))
|
||||
@@ -332,14 +332,14 @@ obj/item/weapon/gun/proc/newshot()
|
||||
to_chat(M, "Your gun is now skinned as [choice]. Say hello to your new friend.")
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/proc/rename_gun(mob/M)
|
||||
/obj/item/gun/proc/rename_gun(mob/M)
|
||||
var/input = stripped_input(M,"What do you want to name the gun?", ,"", MAX_NAME_LEN)
|
||||
if(src && input && !M.stat && in_range(M,src) && !M.restrained() && M.canmove)
|
||||
name = input
|
||||
to_chat(M, "You name the gun [input]. Say hello to your new friend.")
|
||||
return
|
||||
|
||||
/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
|
||||
|
||||
@@ -373,7 +373,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
|
||||
process_fire(target, user, 1, params)
|
||||
|
||||
/obj/item/weapon/gun/proc/isHandgun()
|
||||
/obj/item/gun/proc/isHandgun()
|
||||
return 1
|
||||
|
||||
/////////////
|
||||
@@ -384,7 +384,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
name = "Toggle Scope"
|
||||
check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING
|
||||
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)
|
||||
@@ -398,7 +398,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
gun.zoom(L, FALSE)
|
||||
..()
|
||||
|
||||
/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
|
||||
|
||||
@@ -431,7 +431,7 @@ obj/item/weapon/gun/proc/newshot()
|
||||
|
||||
|
||||
//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/projectile/automatic/spikethrower
|
||||
/obj/item/gun/projectile/automatic/spikethrower
|
||||
name = "\improper Vox spike thrower"
|
||||
desc = "A vicious alien projectile weapon. Parts of it quiver gelatinously, as though the thing is insectile and alive."
|
||||
icon_state = "spikethrower"
|
||||
@@ -13,18 +13,18 @@
|
||||
var/charge_delay = 15
|
||||
restricted_species = list("Vox", "Vox Armalis")
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/spikethrower/New()
|
||||
/obj/item/gun/projectile/automatic/spikethrower/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/spikethrower/Destroy()
|
||||
/obj/item/gun/projectile/automatic/spikethrower/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/spikethrower/update_icon()
|
||||
/obj/item/gun/projectile/automatic/spikethrower/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/spikethrower/process()
|
||||
/obj/item/gun/projectile/automatic/spikethrower/process()
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay || !magazine)
|
||||
return
|
||||
@@ -33,10 +33,10 @@
|
||||
magazine.give_round(S)
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/spikethrower/attack_self()
|
||||
/obj/item/gun/projectile/automatic/spikethrower/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/spikethrower/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/automatic/spikethrower/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
/obj/item/ammo_box/magazine/internal/spikethrower
|
||||
@@ -70,7 +70,7 @@
|
||||
..()
|
||||
|
||||
//This gun only functions for armalis. The on-sprite is too huge to render properly on other sprites.
|
||||
/obj/item/weapon/gun/energy/noisecannon
|
||||
/obj/item/gun/energy/noisecannon
|
||||
name = "alien heavy cannon"
|
||||
desc = "It's some kind of enormous alien weapon, as long as a man is tall."
|
||||
icon_state = "noisecannon"
|
||||
@@ -78,10 +78,10 @@
|
||||
recoil = 1
|
||||
force = 10
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/sonic)
|
||||
cell_type = /obj/item/weapon/stock_parts/cell/super
|
||||
cell_type = /obj/item/stock_parts/cell/super
|
||||
restricted_species = list("Vox Armalis")
|
||||
|
||||
/obj/item/weapon/gun/energy/noisecannon/update_icon()
|
||||
/obj/item/gun/energy/noisecannon/update_icon()
|
||||
return
|
||||
|
||||
//Casing
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/dart_cartridge
|
||||
/obj/item/dart_cartridge
|
||||
name = "dart cartridge"
|
||||
desc = "A rack of hollow darts."
|
||||
icon = 'icons/obj/ammo.dmi'
|
||||
@@ -10,7 +10,7 @@
|
||||
origin_tech = "materials=2"
|
||||
var/darts = 5
|
||||
|
||||
/obj/item/weapon/dart_cartridge/update_icon()
|
||||
/obj/item/dart_cartridge/update_icon()
|
||||
if(!darts)
|
||||
icon_state = "darts-0"
|
||||
else if(darts > 5)
|
||||
@@ -19,20 +19,20 @@
|
||||
icon_state = "darts-[darts]"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/dartgun
|
||||
/obj/item/gun/dartgun
|
||||
name = "dart gun"
|
||||
desc = "A small gas-powered dartgun, capable of delivering chemical cocktails swiftly across short distances."
|
||||
icon_state = "dartgun-empty"
|
||||
|
||||
var/list/beakers = list() //All containers inside the gun.
|
||||
var/list/mixing = list() //Containers being used for mixing.
|
||||
var/obj/item/weapon/dart_cartridge/cartridge = null //Container of darts.
|
||||
var/obj/item/dart_cartridge/cartridge = null //Container of darts.
|
||||
var/max_beakers = 3
|
||||
var/dart_reagent_amount = 15
|
||||
var/container_type = /obj/item/weapon/reagent_containers/glass/beaker
|
||||
var/container_type = /obj/item/reagent_containers/glass/beaker
|
||||
var/list/starting_chems = null
|
||||
|
||||
/obj/item/weapon/gun/dartgun/update_icon()
|
||||
/obj/item/gun/dartgun/update_icon()
|
||||
if(!cartridge)
|
||||
icon_state = "dartgun-e"
|
||||
return 1
|
||||
@@ -45,29 +45,29 @@
|
||||
icon_state = "dartgun-[cartridge.darts]"
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/dartgun/New()
|
||||
/obj/item/gun/dartgun/New()
|
||||
..()
|
||||
if(starting_chems)
|
||||
for(var/chem in starting_chems)
|
||||
var/obj/B = new container_type(src)
|
||||
B.reagents.add_reagent(chem, 50)
|
||||
beakers += B
|
||||
cartridge = new /obj/item/weapon/dart_cartridge(src)
|
||||
cartridge = new /obj/item/dart_cartridge(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/examine(mob/user)
|
||||
/obj/item/gun/dartgun/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
if(beakers.len)
|
||||
to_chat(user, "<span class='notice>[src] contains:</span>")
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
|
||||
for(var/obj/item/reagent_containers/glass/beaker/B in beakers)
|
||||
if(B.reagents && B.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
to_chat(user, "<span class='notice>[R.volume] units of [R.name]</span>")
|
||||
|
||||
/obj/item/weapon/gun/dartgun/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/weapon/dart_cartridge))
|
||||
/obj/item/gun/dartgun/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if(istype(I, /obj/item/dart_cartridge))
|
||||
|
||||
var/obj/item/weapon/dart_cartridge/D = I
|
||||
var/obj/item/dart_cartridge/D = I
|
||||
|
||||
if(!D.darts)
|
||||
to_chat(user, "<span class='warning'>[D] is empty.</span>")
|
||||
@@ -86,14 +86,14 @@
|
||||
to_chat(user, "<span class='notice'>You slot [D] into [src].</span>")
|
||||
update_icon()
|
||||
return
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass))
|
||||
if(istype(I, /obj/item/reagent_containers/glass))
|
||||
if(!istype(I, container_type))
|
||||
to_chat(user, "<span class='warning'>[I] doesn't seem to fit into [src].</span>")
|
||||
return
|
||||
if(beakers.len >= max_beakers)
|
||||
to_chat(user, "<span class='warning'>[src] already has [max_beakers] beakers in it - another one isn't going to fit!</span>")
|
||||
return
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = I
|
||||
var/obj/item/reagent_containers/glass/beaker/B = I
|
||||
if(!user.drop_item())
|
||||
to_chat(user, "<span class='warning'>\The [B] is stuck to you!</span>")
|
||||
return
|
||||
@@ -102,46 +102,46 @@
|
||||
to_chat(user, "<span class='notice>You slot [B] into [src].</span>")
|
||||
src.updateUsrDialog()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/can_shoot()
|
||||
/obj/item/gun/dartgun/can_shoot()
|
||||
if(!cartridge)
|
||||
return 0
|
||||
else
|
||||
return cartridge.darts
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/has_selected_beaker_reagents()
|
||||
/obj/item/gun/dartgun/proc/has_selected_beaker_reagents()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/remove_cartridge()
|
||||
/obj/item/gun/dartgun/proc/remove_cartridge()
|
||||
if(cartridge)
|
||||
to_chat(usr, "<span class='notice'>You pop the cartridge out of [src].</span>")
|
||||
var/obj/item/weapon/dart_cartridge/C = cartridge
|
||||
var/obj/item/dart_cartridge/C = cartridge
|
||||
C.forceMove(get_turf(src))
|
||||
C.update_icon()
|
||||
cartridge = null
|
||||
src.update_icon()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/get_mixed_syringe()
|
||||
/obj/item/gun/dartgun/proc/get_mixed_syringe()
|
||||
if(!cartridge)
|
||||
return 0
|
||||
if(!cartridge.darts)
|
||||
return 0
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/dart = new(src)
|
||||
var/obj/item/reagent_containers/syringe/dart = new(src)
|
||||
|
||||
if(mixing.len)
|
||||
var/mix_amount = dart_reagent_amount/mixing.len
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in mixing)
|
||||
for(var/obj/item/reagent_containers/glass/beaker/B in mixing)
|
||||
B.reagents.trans_to(dart,mix_amount)
|
||||
|
||||
return dart
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/fire_dart(atom/target, mob/user)
|
||||
/obj/item/gun/dartgun/proc/fire_dart(atom/target, mob/user)
|
||||
if(locate (/obj/structure/table, src.loc))
|
||||
return
|
||||
else
|
||||
var/turf/trg = get_turf(target)
|
||||
var/obj/effect/syringe_gun_dummy/D = new/obj/effect/syringe_gun_dummy(get_turf(src))
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = get_mixed_syringe()
|
||||
var/obj/item/reagent_containers/syringe/S = get_mixed_syringe()
|
||||
if(!S)
|
||||
to_chat(user, "<span class='warning'>There are no darts in [src]!</span>")
|
||||
return
|
||||
@@ -203,18 +203,18 @@
|
||||
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/dartgun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
/obj/item/gun/dartgun/afterattack(atom/target, mob/living/user, flag, params)
|
||||
if(!isturf(target.loc) || target == user)
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/dartgun/attack_self(mob/user)
|
||||
/obj/item/gun/dartgun/attack_self(mob/user)
|
||||
user.set_machine(src)
|
||||
var/dat = "<b>[src] mixing control:</b><br><br>"
|
||||
|
||||
if(beakers.len)
|
||||
var/i = 1
|
||||
for(var/obj/item/weapon/reagent_containers/glass/beaker/B in beakers)
|
||||
for(var/obj/item/reagent_containers/glass/beaker/B in beakers)
|
||||
dat += "Beaker [i] contains: "
|
||||
if(B.reagents && B.reagents.reagent_list.len)
|
||||
for(var/datum/reagent/R in B.reagents.reagent_list)
|
||||
@@ -240,7 +240,7 @@
|
||||
user << browse(dat, "window=dartgun")
|
||||
onclose(user, "dartgun", src)
|
||||
|
||||
/obj/item/weapon/gun/dartgun/proc/check_beaker_mixing(var/obj/item/B)
|
||||
/obj/item/gun/dartgun/proc/check_beaker_mixing(var/obj/item/B)
|
||||
if(!mixing || !beakers)
|
||||
return 0
|
||||
for(var/obj/item/M in mixing)
|
||||
@@ -248,7 +248,7 @@
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/dartgun/Topic(href, href_list)
|
||||
/obj/item/gun/dartgun/Topic(href, href_list)
|
||||
src.add_fingerprint(usr)
|
||||
if(href_list["stop_mix"])
|
||||
var/index = text2num(href_list["stop_mix"])
|
||||
@@ -265,7 +265,7 @@
|
||||
var/index = text2num(href_list["eject"])
|
||||
if(index <= beakers.len)
|
||||
if(beakers[index])
|
||||
var/obj/item/weapon/reagent_containers/glass/beaker/B = beakers[index]
|
||||
var/obj/item/reagent_containers/glass/beaker/B = beakers[index]
|
||||
to_chat(usr, "<span class='notice'>You remove [B] from [src].</span>")
|
||||
mixing -= B
|
||||
beakers -= B
|
||||
@@ -275,7 +275,7 @@
|
||||
src.updateUsrDialog()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/dartgun/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
/obj/item/gun/dartgun/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
if(cartridge)
|
||||
spawn(0)
|
||||
fire_dart(target,user)
|
||||
@@ -283,14 +283,14 @@
|
||||
to_chat(usr, "<span class='warning'>[src] is empty.</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/gun/dartgun/vox
|
||||
/obj/item/gun/dartgun/vox
|
||||
name = "alien dart gun"
|
||||
desc = "A small gas-powered dartgun, fitted for nonhuman hands."
|
||||
|
||||
/obj/item/weapon/gun/dartgun/vox/medical
|
||||
/obj/item/gun/dartgun/vox/medical
|
||||
starting_chems = list("silver_sulfadiazine","styptic_powder","charcoal")
|
||||
|
||||
/obj/item/weapon/gun/dartgun/vox/raider
|
||||
/obj/item/gun/dartgun/vox/raider
|
||||
starting_chems = list("space_drugs","ether","haloperidol")
|
||||
|
||||
/obj/effect/syringe_gun_dummy //moved this shitty thing here
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/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'
|
||||
fire_sound_text = "laser blast"
|
||||
|
||||
var/obj/item/weapon/stock_parts/cell/power_supply //What type of power cell this uses
|
||||
var/cell_type = /obj/item/weapon/stock_parts/cell
|
||||
var/obj/item/stock_parts/cell/power_supply //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,11 +19,11 @@
|
||||
var/charge_tick = 0
|
||||
var/charge_delay = 4
|
||||
|
||||
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||
/obj/item/gun/energy/emp_act(severity)
|
||||
power_supply.use(round(power_supply.charge / severity))
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/New()
|
||||
/obj/item/gun/energy/New()
|
||||
..()
|
||||
if(cell_type)
|
||||
power_supply = new cell_type(src)
|
||||
@@ -35,7 +35,7 @@
|
||||
processing_objects.Add(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]
|
||||
@@ -45,12 +45,12 @@
|
||||
fire_sound = shot.fire_sound
|
||||
fire_delay = shot.delay
|
||||
|
||||
/obj/item/weapon/gun/energy/Destroy()
|
||||
/obj/item/gun/energy/Destroy()
|
||||
if(selfcharge)
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/process()
|
||||
/obj/item/gun/energy/process()
|
||||
if(selfcharge) //Every [recharge_time] ticks, recharge a shot for the cyborg
|
||||
charge_tick++
|
||||
if(charge_tick < charge_delay)
|
||||
@@ -60,13 +60,13 @@
|
||||
return // check if we actually need to recharge
|
||||
var/obj/item/ammo_casing/energy/E = ammo_type[select]
|
||||
if(use_external_power)
|
||||
var/obj/item/weapon/stock_parts/cell/external = get_external_power_supply()
|
||||
var/obj/item/stock_parts/cell/external = get_external_power_supply()
|
||||
if(!external || !external.use(E.e_cost)) //Take power from the borg...
|
||||
return //Note, uses /10 because of shitty mods to the cell system
|
||||
power_supply.give(100) //... to recharge the shot
|
||||
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()
|
||||
@@ -75,15 +75,15 @@
|
||||
H.update_inv_l_hand()
|
||||
H.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/gun/energy/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
|
||||
/obj/item/gun/energy/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
|
||||
newshot() //prepare a new shot
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/can_shoot()
|
||||
/obj/item/gun/energy/can_shoot()
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
return power_supply.charge >= shot.e_cost
|
||||
|
||||
/obj/item/weapon/gun/energy/newshot()
|
||||
/obj/item/gun/energy/newshot()
|
||||
if(!ammo_type || !power_supply)
|
||||
return
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
@@ -92,14 +92,14 @@
|
||||
chambered.newshot()
|
||||
return
|
||||
|
||||
/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
|
||||
power_supply.use(shot.e_cost)//... drain the power_supply cell
|
||||
chambered = null //either way, released the prepared shot
|
||||
return
|
||||
|
||||
/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
|
||||
@@ -111,7 +111,7 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
/obj/item/gun/energy/update_icon()
|
||||
overlays.Cut()
|
||||
var/ratio = Ceiling((power_supply.charge / power_supply.maxcharge) * charge_sections)
|
||||
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||
@@ -141,10 +141,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(can_shoot())
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of the [name] in \his mouth. It looks like \he's trying to commit suicide.</span>")
|
||||
sleep(25)
|
||||
@@ -163,7 +163,7 @@
|
||||
playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1)
|
||||
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)
|
||||
@@ -172,7 +172,7 @@
|
||||
processing_objects.Remove(src)
|
||||
. = ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/robocharge()
|
||||
/obj/item/gun/energy/proc/robocharge()
|
||||
if(isrobot(loc))
|
||||
var/mob/living/silicon/robot/R = loc
|
||||
if(R && R.cell)
|
||||
@@ -180,13 +180,13 @@
|
||||
if(R.cell.use(shot.e_cost)) //Take power from the borg...
|
||||
power_supply.give(shot.e_cost) //... to recharge the shot
|
||||
|
||||
/obj/item/weapon/gun/energy/proc/get_external_power_supply()
|
||||
/obj/item/gun/energy/proc/get_external_power_supply()
|
||||
if(istype(loc, /obj/item/rig_module))
|
||||
var/obj/item/rig_module/module = loc
|
||||
if(module.holder && module.holder.wearer)
|
||||
var/mob/living/carbon/human/H = module.holder.wearer
|
||||
if(istype(H) && H.back)
|
||||
var/obj/item/weapon/rig/suit = H.back
|
||||
var/obj/item/rig/suit = H.back
|
||||
if(istype(suit))
|
||||
return suit.cell
|
||||
return null
|
||||
|
||||
@@ -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. Capable of holding up to six slots worth of mod kits."
|
||||
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"
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
var/empty_state = "kineticgun_empty"
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/examine(mob/user)
|
||||
/obj/item/gun/energy/kinetic_accelerator/examine(mob/user)
|
||||
if(..(user, 1))
|
||||
if(max_mod_capacity)
|
||||
to_chat(user, "<b>[get_remaining_mod_capacity()]%</b> mod capacity remaining.")
|
||||
@@ -30,8 +30,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)
|
||||
@@ -45,43 +45,43 @@
|
||||
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)
|
||||
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/New()
|
||||
/obj/item/gun/energy/kinetic_accelerator/New()
|
||||
. = ..()
|
||||
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
|
||||
@@ -89,22 +89,22 @@
|
||||
spawn(2)
|
||||
empty_if_not_held()
|
||||
|
||||
/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()
|
||||
power_supply.use(500)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/proc/attempt_reload()
|
||||
/obj/item/gun/energy/kinetic_accelerator/proc/attempt_reload()
|
||||
if(overheat)
|
||||
return
|
||||
overheat = TRUE
|
||||
|
||||
var/carried = 0
|
||||
if(!unique_frequency)
|
||||
for(var/obj/item/weapon/gun/energy/kinetic_accelerator/K in \
|
||||
for(var/obj/item/gun/energy/kinetic_accelerator/K in \
|
||||
loc.GetAllContents())
|
||||
|
||||
carried++
|
||||
@@ -116,10 +116,10 @@
|
||||
spawn(overheat_time * carried)
|
||||
reload()
|
||||
|
||||
/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()
|
||||
power_supply.give(500)
|
||||
if(!suppressed)
|
||||
playsound(loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
|
||||
@@ -128,7 +128,7 @@
|
||||
update_icon()
|
||||
overheat = FALSE
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/update_icon()
|
||||
/obj/item/gun/energy/kinetic_accelerator/update_icon()
|
||||
overlays.Cut()
|
||||
if(empty_state && !can_shoot())
|
||||
overlays += empty_state
|
||||
@@ -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)
|
||||
|
||||
var/turf/proj_turf = get_turf(BB)
|
||||
@@ -229,7 +229,7 @@
|
||||
icon_state = "modkit"
|
||||
origin_tech = "programming=2;materials=2;magnets=4"
|
||||
require_module = 1
|
||||
module_type = /obj/item/weapon/robot_module/miner
|
||||
module_type = /obj/item/robot_module/miner
|
||||
usesound = 'sound/items/Screwdriver.ogg'
|
||||
var/denied_type = null
|
||||
var/maximum_of_type = 1
|
||||
@@ -241,7 +241,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
|
||||
..()
|
||||
@@ -250,10 +250,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
|
||||
@@ -277,7 +277,7 @@
|
||||
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
|
||||
|
||||
@@ -311,12 +311,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
|
||||
..()
|
||||
|
||||
@@ -372,12 +372,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
|
||||
..()
|
||||
|
||||
@@ -392,13 +392,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,13 +18,13 @@
|
||||
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/captain
|
||||
/obj/item/gun/energy/laser/captain
|
||||
name = "antique laser gun"
|
||||
icon_state = "caplaser"
|
||||
item_state = "caplaser"
|
||||
@@ -34,7 +34,7 @@
|
||||
ammo_x_offset = 3
|
||||
selfcharge = 1
|
||||
|
||||
/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"
|
||||
@@ -43,27 +43,27 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter, /obj/item/ammo_casing/energy/laser)
|
||||
shaded_charge = 0
|
||||
|
||||
/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?"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/cyborg)
|
||||
origin_tech = null
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/cyborg/newshot()
|
||||
/obj/item/gun/energy/laser/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/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)
|
||||
|
||||
///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"
|
||||
@@ -76,7 +76,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/accelerator)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/isHandgun()
|
||||
/obj/item/gun/energy/lasercannon/isHandgun()
|
||||
return 0
|
||||
|
||||
/obj/item/ammo_casing/energy/laser/accelerator
|
||||
@@ -94,29 +94,29 @@
|
||||
..()
|
||||
damage = min(damage+7, 100)
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/mounted
|
||||
/obj/item/gun/energy/lasercannon/mounted
|
||||
name = "mounted laser cannon"
|
||||
selfcharge = 1
|
||||
use_external_power = 1
|
||||
charge_delay = 10
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/cyborg
|
||||
/obj/item/gun/energy/lasercannon/cyborg
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/cyborg/newshot()
|
||||
/obj/item/gun/energy/lasercannon/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/obj/item/weapon/gun/energy/lasercannon/cyborg/emp_act()
|
||||
/obj/item/gun/energy/lasercannon/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/xray
|
||||
/obj/item/gun/energy/xray
|
||||
name = "xray laser gun"
|
||||
desc = "A high-power laser gun capable of expelling concentrated xray blasts."
|
||||
icon_state = "xray"
|
||||
origin_tech = "combat=6;materials=4;magnets=4;syndicate=1"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||
|
||||
/obj/item/weapon/gun/energy/immolator
|
||||
/obj/item/gun/energy/immolator
|
||||
name = "Immolator laser gun"
|
||||
desc = "A modified laser gun, shooting highly concetrated beams with higher intensity that ignites the target, for the cost of draining more power per shot"
|
||||
icon_state = "immolator"
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
////////Laser Tag////////////////////
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/bluetag
|
||||
/obj/item/gun/energy/laser/bluetag
|
||||
name = "laser tag gun"
|
||||
icon_state = "bluetag"
|
||||
desc = "Standard issue weapon of the Imperial Guard"
|
||||
@@ -138,7 +138,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 = "Standard issue weapon of the Imperial Guard"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/gun
|
||||
/obj/item/gun/energy/gun
|
||||
name = "energy gun"
|
||||
desc = "A basic energy-based gun with two settings: kill and disable."
|
||||
icon_state = "energy"
|
||||
@@ -11,22 +11,22 @@
|
||||
flight_x_offset = 15
|
||||
flight_y_offset = 10
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/cyborg
|
||||
/obj/item/gun/energy/gun/cyborg
|
||||
desc = "An energy-based laser gun that draws power from the cyborg's internal energy cell directly. So this is what freedom looks like?"
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/cyborg/newshot()
|
||||
/obj/item/gun/energy/gun/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/cyborg/emp_act()
|
||||
/obj/item/gun/energy/gun/cyborg/emp_act()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/mounted
|
||||
/obj/item/gun/energy/gun/mounted
|
||||
name = "mounted energy gun"
|
||||
selfcharge = 1
|
||||
use_external_power = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/mini
|
||||
/obj/item/gun/energy/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"
|
||||
@@ -35,18 +35,18 @@
|
||||
charge_sections = 3
|
||||
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/mini/New()
|
||||
/obj/item/gun/energy/gun/mini/New()
|
||||
gun_light = new /obj/item/device/flashlight/seclite(src)
|
||||
..()
|
||||
power_supply.maxcharge = 600
|
||||
power_supply.charge = 600
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/mini/update_icon()
|
||||
/obj/item/gun/energy/gun/mini/update_icon()
|
||||
..()
|
||||
if(gun_light && gun_light.on)
|
||||
overlays += "mini-light"
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/hos
|
||||
/obj/item/gun/energy/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"
|
||||
@@ -55,7 +55,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode/hos, /obj/item/ammo_casing/energy/laser/hos, /obj/item/ammo_casing/energy/disabler)
|
||||
ammo_x_offset = 4
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/blueshield
|
||||
/obj/item/gun/energy/gun/blueshield
|
||||
name = "advanced stun revolver"
|
||||
desc = "An advanced stun revolver with the capacity to shoot both electrodes and lasers."
|
||||
icon_state = "bsgun"
|
||||
@@ -65,7 +65,7 @@
|
||||
ammo_x_offset = 1
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/turret
|
||||
/obj/item/gun/energy/gun/turret
|
||||
name = "hybrid turret gun"
|
||||
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
|
||||
icon_state = "turretlaser"
|
||||
@@ -78,7 +78,7 @@
|
||||
trigger_guard = TRIGGER_GUARD_NONE
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/nuclear
|
||||
/obj/item/gun/energy/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"
|
||||
|
||||
@@ -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"
|
||||
@@ -8,70 +8,70 @@
|
||||
flags = CONDUCT
|
||||
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/isHandgun()
|
||||
/obj/item/gun/energy/pulse/isHandgun()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/cyborg
|
||||
/obj/item/gun/energy/pulse/cyborg
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/cyborg/newshot()
|
||||
/obj/item/gun/energy/pulse/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/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 = "pulse"
|
||||
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/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
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/isHandgun()
|
||||
/obj/item/gun/energy/pulse/pistol/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/destroyer
|
||||
/obj/item/gun/energy/pulse/destroyer
|
||||
name = "pulse destroyer"
|
||||
desc = "A heavy-duty, pulse-based energy weapon."
|
||||
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'>[name] has three settings, and they are all DESTROY.</span>")
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/destroyer/annihilator
|
||||
/obj/item/gun/energy/pulse/destroyer/annihilator
|
||||
name = "pulse ANNIHILATOR"
|
||||
desc = "For when the situation calls for a little more than a pulse destroyer."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/laser/scatter/pulse)
|
||||
|
||||
/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
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/pistol/m1911/isHandgun()
|
||||
/obj/item/gun/energy/pulse/pistol/m1911/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/energy/pulse/turret
|
||||
/obj/item/gun/energy/pulse/turret
|
||||
name = "pulse turret gun"
|
||||
desc = "A heavy, turret-mounted pulse energy cannon."
|
||||
icon_state = "turretlaser"
|
||||
|
||||
@@ -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"
|
||||
icon_state = "ionrifle"
|
||||
@@ -13,13 +13,13 @@
|
||||
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/isHandgun()
|
||||
/obj/item/gun/energy/ionrifle/isHandgun()
|
||||
return 0
|
||||
|
||||
/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"
|
||||
@@ -29,7 +29,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"
|
||||
@@ -38,13 +38,13 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/declone)
|
||||
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(power_supply.charge > shot.e_cost)
|
||||
overlays += "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"
|
||||
@@ -56,7 +56,7 @@
|
||||
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 = 'icons/obj/guns/projectile.dmi'
|
||||
@@ -64,11 +64,11 @@
|
||||
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'
|
||||
@@ -78,7 +78,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"
|
||||
@@ -86,7 +86,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"
|
||||
@@ -105,11 +105,11 @@
|
||||
max_mod_capacity = 0
|
||||
empty_state = null
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/ninja
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/ninja
|
||||
name = "energy dart thrower"
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/dart)
|
||||
|
||||
/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,20 +119,20 @@
|
||||
suppressed = 0
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/bolt/large)
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/crossbow/large/cyborg
|
||||
/obj/item/gun/energy/kinetic_accelerator/crossbow/large/cyborg
|
||||
desc = "One and done!"
|
||||
icon_state = "crossbowlarge"
|
||||
origin_tech = null
|
||||
materials = list()
|
||||
|
||||
/obj/item/weapon/gun/energy/kinetic_accelerator/suicide_act(mob/user)
|
||||
/obj/item/gun/energy/kinetic_accelerator/suicide_act(mob/user)
|
||||
if(!suppressed)
|
||||
playsound(loc, 'sound/weapons/kenetic_reload.ogg', 60, 1)
|
||||
user.visible_message("<span class='suicide'>[user] cocks the [name] and pretends to blow \his brains out! It looks like \he's trying to commit suicide!</b></span>")
|
||||
shoot_live_shot()
|
||||
return (OXYLOSS)
|
||||
|
||||
/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 of xenos! Or, you know, mine stuff."
|
||||
icon_state = "plasmacutter"
|
||||
@@ -149,28 +149,28 @@
|
||||
sharp = 1
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/plasmacutter/examine(mob/user)
|
||||
/obj/item/gun/energy/plasmacutter/examine(mob/user)
|
||||
..()
|
||||
if(power_supply)
|
||||
to_chat(user, "<span class='notice'>[src] is [round(power_supply.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)
|
||||
power_supply.give(1000)
|
||||
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)
|
||||
power_supply.give(500)
|
||||
to_chat(user, "<span class='notice'>You insert [A] in [src], recharging it.</span>")
|
||||
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"
|
||||
modifystate = "adv_plasmacutter"
|
||||
@@ -178,7 +178,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/plasma/adv)
|
||||
force = 15
|
||||
|
||||
/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)
|
||||
@@ -189,16 +189,16 @@
|
||||
var/obj/effect/portal/orange
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/update_icon()
|
||||
/obj/item/gun/energy/wormhole_projector/update_icon()
|
||||
icon_state = "wormhole_projector[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/portal_destroyed(obj/effect/portal/P)
|
||||
/obj/item/gun/energy/wormhole_projector/proc/portal_destroyed(obj/effect/portal/P)
|
||||
if(P.icon_state == "portal")
|
||||
blue = null
|
||||
if(orange)
|
||||
@@ -208,7 +208,7 @@
|
||||
if(blue)
|
||||
blue.target = null
|
||||
|
||||
/obj/item/weapon/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W)
|
||||
/obj/item/gun/energy/wormhole_projector/proc/create_portal(obj/item/projectile/beam/wormhole/W)
|
||||
var/obj/effect/portal/P = new /obj/effect/portal(get_turf(W), null, src)
|
||||
P.precision = 0
|
||||
P.failchance = 0
|
||||
@@ -226,26 +226,26 @@
|
||||
|
||||
/* 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 flachettes 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
|
||||
|
||||
/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/printer/newshot()
|
||||
/obj/item/gun/energy/printer/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/obj/item/weapon/gun/energy/laser/instakill
|
||||
/obj/item/gun/energy/laser/instakill
|
||||
name = "instakill rifle"
|
||||
icon_state = "instagib"
|
||||
item_state = "instagib"
|
||||
@@ -254,22 +254,22 @@
|
||||
force = 60
|
||||
origin_tech = "combat=7;magnets=6"
|
||||
|
||||
/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/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/clown
|
||||
/obj/item/gun/energy/clown
|
||||
name = "HONK Rifle"
|
||||
desc = "Clown Planet's finest."
|
||||
icon_state = "disabler"
|
||||
@@ -278,7 +278,7 @@
|
||||
selfcharge = 1
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/toxgun
|
||||
/obj/item/gun/energy/toxgun
|
||||
name = "plasma pistol"
|
||||
desc = "A specialized firearm designed to fire lethal bolts of toxins."
|
||||
icon_state = "toxgun"
|
||||
@@ -289,7 +289,7 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/toxplasma)
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/sniperrifle
|
||||
/obj/item/gun/energy/sniperrifle
|
||||
name = "L.W.A.P. Sniper Rifle"
|
||||
desc = "A rifle constructed of lightweight materials, fitted with a SMART aiming-system scope."
|
||||
icon_state = "esniper"
|
||||
@@ -301,7 +301,7 @@
|
||||
zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you.
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature
|
||||
/obj/item/gun/energy/temperature
|
||||
name = "temperature gun"
|
||||
icon = 'icons/obj/guns/gun_temperature.dmi'
|
||||
icon_state = "tempgun_4"
|
||||
@@ -323,32 +323,32 @@
|
||||
var/emagged = 0 //ups the temperature cap from 500 to 1000, targets hit by beams over 500 Kelvin will burst into flames
|
||||
var/dat = ""
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/New()
|
||||
/obj/item/gun/energy/temperature/New()
|
||||
..()
|
||||
update_icon()
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Destroy()
|
||||
/obj/item/gun/energy/temperature/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/newshot()
|
||||
/obj/item/gun/energy/temperature/newshot()
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/attack_self(mob/living/user as mob)
|
||||
/obj/item/gun/energy/temperature/attack_self(mob/living/user as mob)
|
||||
user.set_machine(src)
|
||||
update_dat()
|
||||
user << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x120")
|
||||
onclose(user, "tempgun")
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/weapon/card/emag) && !emagged)
|
||||
/obj/item/gun/energy/temperature/attackby(obj/item/W as obj, mob/user as mob)
|
||||
if(istype(W, /obj/item/card/emag) && !emagged)
|
||||
emagged = 1
|
||||
to_chat(user, "<span class='caution'>You double the gun's temperature cap! Targets hit by searing beams will burst into flames!</span>")
|
||||
desc = "A gun that changes the body temperature of its targets. Its temperature cap has been hacked."
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/Topic(href, href_list)
|
||||
/obj/item/gun/energy/temperature/Topic(href, href_list)
|
||||
if(..())
|
||||
return
|
||||
usr.set_machine(src)
|
||||
@@ -365,7 +365,7 @@
|
||||
add_fingerprint(usr)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/process()
|
||||
/obj/item/gun/energy/temperature/process()
|
||||
..()
|
||||
var/obj/item/ammo_casing/energy/temp/T = ammo_type[select]
|
||||
T.temp = temperature
|
||||
@@ -410,7 +410,7 @@
|
||||
M << browse("<TITLE>Temperature Gun Configuration</TITLE><HR>[dat]", "window=tempgun;size=510x102")
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_dat()
|
||||
/obj/item/gun/energy/temperature/proc/update_dat()
|
||||
dat = ""
|
||||
dat += "Current output temperature: "
|
||||
if(temperature > 500)
|
||||
@@ -435,7 +435,7 @@
|
||||
dat += "Power cost: "
|
||||
dat += "<FONT color=[powercostcolor]><B>[powercost]</B></FONT>"
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_temperature()
|
||||
/obj/item/gun/energy/temperature/proc/update_temperature()
|
||||
switch(temperature)
|
||||
if(501 to INFINITY)
|
||||
item_state = "tempgun_8"
|
||||
@@ -457,20 +457,20 @@
|
||||
item_state = "tempgun_0"
|
||||
icon_state = item_state
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/update_icon()
|
||||
/obj/item/gun/energy/temperature/update_icon()
|
||||
overlays = 0
|
||||
update_temperature()
|
||||
update_user()
|
||||
update_charge()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_user()
|
||||
/obj/item/gun/energy/temperature/proc/update_user()
|
||||
if(istype(loc,/mob/living/carbon))
|
||||
var/mob/living/carbon/M = loc
|
||||
M.update_inv_back()
|
||||
M.update_inv_l_hand()
|
||||
M.update_inv_r_hand()
|
||||
|
||||
/obj/item/weapon/gun/energy/temperature/proc/update_charge()
|
||||
/obj/item/gun/energy/temperature/proc/update_charge()
|
||||
var/charge = power_supply.charge
|
||||
switch(charge)
|
||||
if(900 to INFINITY) overlays += "900"
|
||||
@@ -484,7 +484,7 @@
|
||||
if(100 to 202) overlays += "100"
|
||||
if(-INFINITY to 100) overlays += "0"
|
||||
|
||||
/obj/item/weapon/gun/energy/mimicgun
|
||||
/obj/item/gun/energy/mimicgun
|
||||
name = "mimic gun"
|
||||
desc = "A self-defense weapon that exhausts organic targets, weakening them until they collapse. Why does this one have teeth?"
|
||||
icon_state = "disabler"
|
||||
@@ -492,9 +492,9 @@
|
||||
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
||||
selfcharge = 1
|
||||
ammo_x_offset = 3
|
||||
var/mimic_type = /obj/item/weapon/gun/projectile/automatic/pistol //Setting this to the mimicgun type does exactly what you think it will.
|
||||
var/mimic_type = /obj/item/gun/projectile/automatic/pistol //Setting this to the mimicgun type does exactly what you think it will.
|
||||
|
||||
/obj/item/weapon/gun/energy/mimicgun/newshot()
|
||||
/obj/item/gun/energy/mimicgun/newshot()
|
||||
var/obj/item/ammo_casing/energy/mimic/M = ammo_type[select]
|
||||
M.mimic_type = mimic_type
|
||||
..()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/taser
|
||||
/obj/item/gun/energy/taser
|
||||
name = "taser gun"
|
||||
desc = "A small, low capacity gun used for non-lethal takedowns."
|
||||
icon_state = "taser"
|
||||
@@ -7,12 +7,12 @@
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
|
||||
ammo_x_offset = 3
|
||||
|
||||
/obj/item/weapon/gun/energy/taser/mounted
|
||||
/obj/item/gun/energy/taser/mounted
|
||||
name = "mounted taser gun"
|
||||
selfcharge = 1
|
||||
use_external_power = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/shock_revolver
|
||||
/obj/item/gun/energy/shock_revolver
|
||||
name = "tesla revolver"
|
||||
desc = "A high-tech revolver that fires internal, reusable shock cartridges in a revolving cylinder. The cartridges can be recharged using conventional rechargers."
|
||||
icon_state = "stunrevolver"
|
||||
@@ -22,7 +22,7 @@
|
||||
can_flashlight = 0
|
||||
shaded_charge = 1
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/advtaser
|
||||
/obj/item/gun/energy/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"
|
||||
@@ -30,17 +30,17 @@
|
||||
origin_tech = "combat=4"
|
||||
ammo_x_offset = 2
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/advtaser/cyborg
|
||||
/obj/item/gun/energy/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
|
||||
|
||||
/obj/item/weapon/gun/energy/gun/advtaser/cyborg/newshot()
|
||||
/obj/item/gun/energy/gun/advtaser/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
/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"
|
||||
@@ -49,12 +49,12 @@
|
||||
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."
|
||||
ammo_type = list(/obj/item/ammo_casing/energy/disabler/cyborg)
|
||||
can_charge = 0
|
||||
|
||||
/obj/item/weapon/gun/energy/disabler/cyborg/newshot()
|
||||
/obj/item/gun/energy/disabler/cyborg/newshot()
|
||||
..()
|
||||
robocharge()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Telegun for Tator RDs
|
||||
|
||||
/obj/item/weapon/gun/energy/telegun
|
||||
/obj/item/gun/energy/telegun
|
||||
name = "Teleporter Gun"
|
||||
desc = "An extremely high-tech bluespace energy gun capable of teleporting targets to far off locations."
|
||||
icon_state = "telegun"
|
||||
@@ -10,11 +10,11 @@
|
||||
shaded_charge = 1
|
||||
var/teleport_target = null
|
||||
|
||||
/obj/item/weapon/gun/energy/telegun/Destroy()
|
||||
/obj/item/gun/energy/telegun/Destroy()
|
||||
teleport_target = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/energy/telegun/attack_self(mob/living/user as mob)
|
||||
/obj/item/gun/energy/telegun/attack_self(mob/living/user as mob)
|
||||
var/list/L = list()
|
||||
var/list/areaindex = list()
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
var/desc = input("Please select a location to lock in.", "Telegun Target Interface") in L
|
||||
teleport_target = L[desc]
|
||||
|
||||
/obj/item/weapon/gun/energy/telegun/newshot()
|
||||
/obj/item/gun/energy/telegun/newshot()
|
||||
var/obj/item/ammo_casing/energy/teleport/T = ammo_type[select]
|
||||
T.teleport_target = teleport_target
|
||||
..()
|
||||
|
||||
@@ -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'
|
||||
@@ -13,12 +13,12 @@
|
||||
|
||||
materials = list(MAT_METAL=2000)
|
||||
|
||||
/obj/item/weapon/gun/grenadelauncher/examine(mob/user)
|
||||
/obj/item/gun/grenadelauncher/examine(mob/user)
|
||||
if(..(user, 2))
|
||||
to_chat(user, "<span class='notice'>[grenades.len] / [max_grenades] grenades.</span>")
|
||||
|
||||
/obj/item/weapon/gun/grenadelauncher/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if((istype(I, /obj/item/weapon/grenade)))
|
||||
/obj/item/gun/grenadelauncher/attackby(obj/item/I as obj, mob/user as mob, params)
|
||||
if((istype(I, /obj/item/grenade)))
|
||||
if(grenades.len < max_grenades)
|
||||
if(!user.unEquip(I))
|
||||
return
|
||||
@@ -29,7 +29,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>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
|
||||
|
||||
@@ -38,10 +38,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/chem_grenade/F = grenades[1] //Now with less copypasta!
|
||||
var/obj/item/grenade/chem_grenade/F = grenades[1] //Now with less copypasta!
|
||||
grenades -= F
|
||||
F.loc = user.loc
|
||||
F.throw_at(target, 30, 2, user)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/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'
|
||||
@@ -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)
|
||||
newshot()
|
||||
if(no_den_usage)
|
||||
var/area/A = get_area(user)
|
||||
@@ -33,20 +33,20 @@
|
||||
no_den_usage = 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/magic/can_shoot()
|
||||
/obj/item/gun/magic/can_shoot()
|
||||
return charges
|
||||
|
||||
/obj/item/weapon/gun/magic/newshot(params)
|
||||
/obj/item/gun/magic/newshot(params)
|
||||
if(charges && chambered)
|
||||
chambered.newshot(params)
|
||||
return
|
||||
|
||||
/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
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/magic/New()
|
||||
/obj/item/gun/magic/New()
|
||||
..()
|
||||
charges = max_charges
|
||||
chambered = new ammo_type(src)
|
||||
@@ -54,13 +54,13 @@
|
||||
processing_objects.Add(src)
|
||||
|
||||
|
||||
/obj/item/weapon/gun/magic/Destroy()
|
||||
/obj/item/gun/magic/Destroy()
|
||||
if(can_charge)
|
||||
processing_objects.Remove(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,14 +68,14 @@
|
||||
charges++
|
||||
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>")
|
||||
return
|
||||
|
||||
/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 the [name] above \his head, releasing a magical blast! It looks like \he's trying to commit suicide.</span>")
|
||||
playsound(loc, fire_sound, 50, 1, -1)
|
||||
return FIRELOSS
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/obj/item/weapon/gun/magic/staff
|
||||
/obj/item/gun/magic/staff
|
||||
slot_flags = SLOT_BACK
|
||||
ammo_type = /obj/item/ammo_casing/magic
|
||||
|
||||
/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"
|
||||
ammo_type = /obj/item/ammo_casing/magic/change
|
||||
@@ -10,7 +10,7 @@
|
||||
item_state = "staffofchange"
|
||||
fire_sound = 'sound/magic/Staff_Change.ogg'
|
||||
|
||||
/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."
|
||||
ammo_type = /obj/item/ammo_casing/magic/animate
|
||||
@@ -18,7 +18,7 @@
|
||||
item_state = "staffofanimation"
|
||||
fire_sound = 'sound/magic/Staff_animation.ogg'
|
||||
|
||||
/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."
|
||||
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||
@@ -26,10 +26,10 @@
|
||||
item_state = "staffofhealing"
|
||||
fire_sound = 'sound/magic/Staff_Healing.ogg'
|
||||
|
||||
/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."
|
||||
ammo_type = /obj/item/ammo_casing/magic/chaos
|
||||
@@ -40,7 +40,7 @@
|
||||
no_den_usage = 1
|
||||
fire_sound = 'sound/magic/Staff_Chaos.ogg'
|
||||
|
||||
/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."
|
||||
ammo_type = /obj/item/ammo_casing/magic/door
|
||||
@@ -51,7 +51,7 @@
|
||||
no_den_usage = 1
|
||||
fire_sound = 'sound/magic/Staff_Door.ogg'
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/honk
|
||||
/obj/item/gun/magic/staff/honk
|
||||
name = "staff of the honkmother"
|
||||
desc = "Honk"
|
||||
ammo_type = /obj/item/ammo_casing/magic/honk
|
||||
@@ -61,7 +61,7 @@
|
||||
recharge_rate = 8
|
||||
fire_sound = 'sound/items/airhorn.ogg'
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/focus
|
||||
/obj/item/gun/magic/staff/focus
|
||||
name = "mental focus"
|
||||
desc = "An artefact that channels the will of the user into destructive bolts of force. If you aren't careful with it, you might poke someone's brain out."
|
||||
icon = 'icons/obj/wizard.dmi'
|
||||
@@ -69,7 +69,7 @@
|
||||
item_state = "focus"
|
||||
ammo_type = list(/obj/item/ammo_casing/forcebolt)
|
||||
|
||||
/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'
|
||||
@@ -83,7 +83,7 @@
|
||||
sharp = 1
|
||||
max_charges = 4
|
||||
|
||||
/obj/item/weapon/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
/obj/item/gun/magic/staff/spellblade/hit_reaction(mob/living/carbon/human/owner, attack_text, final_block_chance, damage, attack_type)
|
||||
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/New()
|
||||
/obj/item/gun/magic/wand/New()
|
||||
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,20 +17,20 @@
|
||||
max_charges = Ceiling(max_charges / 2)
|
||||
..()
|
||||
|
||||
/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 \himself with [src].</span>")
|
||||
playsound(user, fire_sound, 50, 1)
|
||||
user.create_attack_log("<b>[user]/[user.ckey]</b> zapped \himself with a <b>[src]</b>")
|
||||
@@ -56,7 +56,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'
|
||||
@@ -64,7 +64,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)
|
||||
var/message ="<span class='warning'>You irradiate yourself with pure energy! "
|
||||
message += pick("Do not pass go. Do not collect 200 zorkmids.</span>","You feel more confident in your spell casting skills.</span>","You Die...</span>","Do you want your possessions identified?</span>")
|
||||
to_chat(user, message)
|
||||
@@ -76,7 +76,7 @@
|
||||
//WAND OF HEALING
|
||||
/////////////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/resurrection
|
||||
/obj/item/gun/magic/wand/resurrection
|
||||
name = "wand of resurrection"
|
||||
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
|
||||
@@ -84,7 +84,7 @@
|
||||
icon_state = "revivewand"
|
||||
max_charges = 3 //3, 2, 2, 1
|
||||
|
||||
/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()
|
||||
to_chat(user, "<span class='notice'>You feel great!</span>")
|
||||
charges--
|
||||
@@ -94,7 +94,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
|
||||
@@ -102,7 +102,7 @@
|
||||
icon_state = "polywand"
|
||||
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--
|
||||
@@ -111,7 +111,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
|
||||
@@ -120,7 +120,7 @@
|
||||
no_den_usage = 1
|
||||
fire_sound = 'sound/magic/Wand_Teleport.ogg'
|
||||
|
||||
/obj/item/weapon/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
/obj/item/gun/magic/wand/teleport/zap_self(mob/living/user)
|
||||
do_teleport(user, user, 10)
|
||||
var/datum/effect_system/smoke_spread/smoke = new
|
||||
smoke.set_up(10, 0, user.loc)
|
||||
@@ -132,7 +132,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
|
||||
@@ -140,7 +140,7 @@
|
||||
icon_state = "doorwand"
|
||||
max_charges = 20 //20, 10, 10, 7
|
||||
|
||||
/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--
|
||||
..()
|
||||
@@ -149,7 +149,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'
|
||||
@@ -157,7 +157,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 = "Delivers medical nanites in a focused beam."
|
||||
icon = 'icons/obj/chronos.dmi'
|
||||
@@ -15,26 +15,26 @@
|
||||
|
||||
weapon_weight = WEAPON_MEDIUM
|
||||
|
||||
/obj/item/weapon/gun/medbeam/New()
|
||||
/obj/item/gun/medbeam/New()
|
||||
..()
|
||||
processing_objects.Add(src)
|
||||
|
||||
/obj/item/weapon/gun/medbeam/Destroy()
|
||||
/obj/item/gun/medbeam/Destroy()
|
||||
processing_objects.Remove(src)
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/medbeam/dropped(mob/user)
|
||||
/obj/item/gun/medbeam/dropped(mob/user)
|
||||
..()
|
||||
LoseTarget()
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/LoseTarget()
|
||||
/obj/item/gun/medbeam/proc/LoseTarget()
|
||||
if(active)
|
||||
qdel(current_beam)
|
||||
active = 0
|
||||
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)
|
||||
add_fingerprint(user)
|
||||
|
||||
if(current_target)
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
feedback_add_details("gun_fired","[type]")
|
||||
|
||||
/obj/item/weapon/gun/medbeam/process()
|
||||
/obj/item/gun/medbeam/process()
|
||||
var/mob/living/carbon/human/H = loc
|
||||
if(!istype(H))
|
||||
LoseTarget()
|
||||
@@ -73,7 +73,7 @@
|
||||
if(current_target)
|
||||
on_beam_tick(current_target)
|
||||
|
||||
/obj/item/weapon/gun/medbeam/proc/los_check(mob/user,mob/target)
|
||||
/obj/item/gun/medbeam/proc/los_check(mob/user,mob/target)
|
||||
var/turf/user_turf = user.loc
|
||||
if(!istype(user_turf))
|
||||
return 0
|
||||
@@ -95,10 +95,10 @@
|
||||
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)
|
||||
target.adjustBruteLoss(-4)
|
||||
target.adjustFireLoss(-4)
|
||||
if(ishuman(target))
|
||||
@@ -109,7 +109,7 @@
|
||||
E.perma_injury = 0
|
||||
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
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/energy/gun/advtaser/mounted
|
||||
/obj/item/gun/energy/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,7 +9,7 @@
|
||||
can_flashlight = 0
|
||||
trigger_guard = TRIGGER_GUARD_ALLOW_ALL // Has no trigger at all, uses neural signals instead
|
||||
|
||||
/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'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/projectile
|
||||
/obj/item/gun/projectile
|
||||
desc = "Now comes in flavors like GUN. Uses 10mm ammo, for some reason"
|
||||
name = "projectile gun"
|
||||
icon_state = "pistol"
|
||||
@@ -9,7 +9,7 @@
|
||||
var/mag_type = /obj/item/ammo_box/magazine/m10mm //Removes the need for max_ammo and caliber info
|
||||
var/obj/item/ammo_box/magazine/magazine
|
||||
|
||||
/obj/item/weapon/gun/projectile/New()
|
||||
/obj/item/gun/projectile/New()
|
||||
..()
|
||||
if(!magazine)
|
||||
magazine = new mag_type(src)
|
||||
@@ -17,14 +17,14 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/update_icon()
|
||||
/obj/item/gun/projectile/update_icon()
|
||||
..()
|
||||
if(current_skin)
|
||||
icon_state = "[current_skin][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
|
||||
else
|
||||
icon_state = "[initial(icon_state)][suppressed ? "-suppressed" : ""][sawn_state ? "-sawn" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/process_chamber(eject_casing = 1, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/process_chamber(eject_casing = 1, empty_chamber = 1)
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
if(isnull(AC) || !istype(AC))
|
||||
chamber_round()
|
||||
@@ -38,7 +38,7 @@
|
||||
chamber_round()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/proc/chamber_round()
|
||||
/obj/item/gun/projectile/proc/chamber_round()
|
||||
if(chambered || !magazine)
|
||||
return
|
||||
else if(magazine.ammo_count())
|
||||
@@ -46,12 +46,12 @@
|
||||
chambered.loc = src
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/can_shoot()
|
||||
/obj/item/gun/projectile/can_shoot()
|
||||
if(!magazine || !magazine.ammo_count(0))
|
||||
return 0
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
/obj/item/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box/magazine))
|
||||
var/obj/item/ammo_box/magazine/AM = A
|
||||
@@ -66,8 +66,8 @@
|
||||
return 1
|
||||
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.unEquip(A))
|
||||
@@ -89,10 +89,10 @@
|
||||
return
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/attack_hand(mob/user)
|
||||
/obj/item/gun/projectile/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.l_hand != src && user.r_hand != src)
|
||||
..()
|
||||
return
|
||||
@@ -105,7 +105,7 @@
|
||||
return
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/attack_self(mob/living/user as mob)
|
||||
/obj/item/gun/projectile/attack_self(mob/living/user as mob)
|
||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||
if(magazine)
|
||||
magazine.loc = get_turf(loc)
|
||||
@@ -123,11 +123,11 @@
|
||||
update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/examine(mob/user)
|
||||
/obj/item/gun/projectile/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "Has [get_ammo()] round\s remaining.")
|
||||
|
||||
/obj/item/weapon/gun/projectile/proc/get_ammo(countchambered = 1)
|
||||
/obj/item/gun/projectile/proc/get_ammo(countchambered = 1)
|
||||
var/boolets = 0 //mature var names for mature people
|
||||
if(chambered && countchambered)
|
||||
boolets++
|
||||
@@ -135,7 +135,7 @@
|
||||
boolets += magazine.ammo_count()
|
||||
return boolets
|
||||
|
||||
/obj/item/weapon/gun/projectile/suicide_act(mob/user)
|
||||
/obj/item/gun/projectile/suicide_act(mob/user)
|
||||
if(chambered && chambered.BB && !chambered.BB.nodamage)
|
||||
user.visible_message("<span class='suicide'>[user] is putting the barrel of the [name] in \his mouth. It looks like \he's trying to commit suicide.</span>")
|
||||
sleep(25)
|
||||
@@ -151,7 +151,7 @@
|
||||
playsound(loc, 'sound/weapons/empty.ogg', 50, 1, -1)
|
||||
return (OXYLOSS)
|
||||
|
||||
/obj/item/weapon/gun/projectile/proc/sawoff(mob/user)
|
||||
/obj/item/gun/projectile/proc/sawoff(mob/user)
|
||||
if(sawn_state == SAWN_OFF)
|
||||
to_chat(user, "<span class='warning'>\The [src] is already shortened!</span>")
|
||||
return
|
||||
@@ -178,14 +178,14 @@
|
||||
return 1
|
||||
|
||||
// Sawing guns related proc
|
||||
/obj/item/weapon/gun/projectile/proc/blow_up(mob/user)
|
||||
/obj/item/gun/projectile/proc/blow_up(mob/user)
|
||||
. = 0
|
||||
for(var/obj/item/ammo_casing/AC in magazine.stored_ammo)
|
||||
if(AC.BB)
|
||||
process_fire(user, user,0)
|
||||
. = 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'
|
||||
@@ -195,7 +195,7 @@
|
||||
var/oldsound = null
|
||||
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/projectile/automatic
|
||||
/obj/item/gun/projectile/automatic
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
var/alarmed = 0
|
||||
var/select = 1
|
||||
@@ -7,10 +7,10 @@
|
||||
fire_delay = 2
|
||||
actions_types = list(/datum/action/item_action/toggle_firemode)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/isHandgun()
|
||||
/obj/item/gun/projectile/automatic/isHandgun()
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/update_icon()
|
||||
/obj/item/gun/projectile/automatic/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(!select)
|
||||
@@ -19,7 +19,7 @@
|
||||
overlays += "[initial(icon_state)]burst"
|
||||
icon_state = "[initial(icon_state)][magazine ? "-[magazine.max_ammo]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
/obj/item/gun/projectile/automatic/attackby(var/obj/item/A as obj, mob/user as mob, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -41,10 +41,10 @@
|
||||
update_icon()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/ui_action_click()
|
||||
/obj/item/gun/projectile/automatic/ui_action_click()
|
||||
burst_select()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/proc/burst_select()
|
||||
/obj/item/gun/projectile/automatic/proc/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
select = !select
|
||||
if(!select)
|
||||
@@ -62,23 +62,23 @@
|
||||
var/datum/action/A = X
|
||||
A.UpdateButtonIcon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/can_shoot()
|
||||
/obj/item/gun/projectile/automatic/can_shoot()
|
||||
return get_ammo()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/proc/empty_alarm()
|
||||
/obj/item/gun/projectile/automatic/proc/empty_alarm()
|
||||
if(!chambered && !get_ammo() && !alarmed)
|
||||
playsound(loc, 'sound/weapons/smg_empty_alarm.ogg', 40, 1)
|
||||
update_icon()
|
||||
alarmed = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/proto
|
||||
/obj/item/gun/projectile/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
|
||||
origin_tech = "combat=4;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r
|
||||
/obj/item/gun/projectile/automatic/c20r
|
||||
name = "\improper C-20r SMG"
|
||||
desc = "A two-round burst .45 SMG, designated 'C-20r'. Has a 'Scarborough Arms - Per falcis, per pravitas' buttstamp."
|
||||
icon_state = "c20r"
|
||||
@@ -89,19 +89,19 @@
|
||||
fire_delay = 2
|
||||
burst_size = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/New()
|
||||
/obj/item/gun/projectile/automatic/c20r/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||
/obj/item/gun/projectile/automatic/c20r/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||
..()
|
||||
empty_alarm()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/update_icon()
|
||||
/obj/item/gun/projectile/automatic/c20r/update_icon()
|
||||
..()
|
||||
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/wt550
|
||||
/obj/item/gun/projectile/automatic/wt550
|
||||
name = "security auto rifle"
|
||||
desc = "An outdated personal defense weapon utilized by law enforcement. The WT-550 Automatic Rifle fires 4.6x30mm rounds."
|
||||
icon_state = "wt550"
|
||||
@@ -112,11 +112,11 @@
|
||||
burst_size = 1
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/wt550/update_icon()
|
||||
/obj/item/gun/projectile/automatic/wt550/update_icon()
|
||||
..()
|
||||
icon_state = "wt550[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/mini_uzi
|
||||
/obj/item/gun/projectile/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"
|
||||
@@ -124,7 +124,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/uzim9mm
|
||||
burst_size = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90
|
||||
/obj/item/gun/projectile/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"
|
||||
@@ -133,23 +133,23 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m556
|
||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||
can_suppress = 0
|
||||
var/obj/item/weapon/gun/projectile/revolver/grenadelauncher/underbarrel
|
||||
var/obj/item/gun/projectile/revolver/grenadelauncher/underbarrel
|
||||
burst_size = 3
|
||||
fire_delay = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/New()
|
||||
/obj/item/gun/projectile/automatic/m90/New()
|
||||
..()
|
||||
underbarrel = new /obj/item/weapon/gun/projectile/revolver/grenadelauncher(src)
|
||||
underbarrel = new /obj/item/gun/projectile/revolver/grenadelauncher(src)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
/obj/item/gun/projectile/automatic/m90/afterattack(var/atom/target, var/mob/living/user, flag, params)
|
||||
if(select == 2)
|
||||
underbarrel.afterattack(target, user, flag, params)
|
||||
else
|
||||
..()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/attackby(var/obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/automatic/m90/attackby(var/obj/item/A, mob/user, params)
|
||||
if(istype(A, /obj/item/ammo_casing))
|
||||
if(istype(A, underbarrel.magazine.ammo_type))
|
||||
underbarrel.attack_self()
|
||||
@@ -157,7 +157,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/update_icon()
|
||||
/obj/item/gun/projectile/automatic/m90/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
switch(select)
|
||||
@@ -175,7 +175,7 @@
|
||||
item_state = "m90-0"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/m90/burst_select()
|
||||
/obj/item/gun/projectile/automatic/m90/burst_select()
|
||||
var/mob/living/carbon/human/user = usr
|
||||
switch(select)
|
||||
if(0)
|
||||
@@ -194,7 +194,7 @@
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/tommygun
|
||||
/obj/item/gun/projectile/automatic/tommygun
|
||||
name = "\improper Thompson SMG"
|
||||
desc = "A genuine 'Chicago Typewriter'."
|
||||
icon_state = "tommygun"
|
||||
@@ -208,7 +208,7 @@
|
||||
burst_size = 4
|
||||
fire_delay = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/ar
|
||||
/obj/item/gun/projectile/automatic/ar
|
||||
name = "ARG"
|
||||
desc = "A robust assault rile used by Nanotrasen fighting forces."
|
||||
icon_state = "arg"
|
||||
@@ -222,7 +222,7 @@
|
||||
fire_delay = 1
|
||||
|
||||
// Bulldog shotgun //
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog
|
||||
/obj/item/gun/projectile/automatic/shotgun/bulldog
|
||||
name = "\improper 'Bulldog' Shotgun"
|
||||
desc = "A compact, mag-fed semi-automatic shotgun for combat in narrow corridors, nicknamed 'Bulldog' by boarding parties. Compatible only with specialized 8-round drum magazines."
|
||||
icon_state = "bulldog"
|
||||
@@ -236,26 +236,26 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/New()
|
||||
/obj/item/gun/projectile/automatic/shotgun/bulldog/New()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
|
||||
/obj/item/gun/projectile/automatic/shotgun/bulldog/proc/update_magazine()
|
||||
if(magazine)
|
||||
overlays.Cut()
|
||||
overlays += "[magazine.icon_state]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/update_icon()
|
||||
/obj/item/gun/projectile/automatic/shotgun/bulldog/update_icon()
|
||||
overlays.Cut()
|
||||
update_magazine()
|
||||
icon_state = "bulldog[chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||
/obj/item/gun/projectile/automatic/shotgun/bulldog/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||
..()
|
||||
empty_alarm()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/lasercarbine
|
||||
/obj/item/gun/projectile/automatic/lasercarbine
|
||||
name = "\improper IK-60 Laser Carbine"
|
||||
desc = "An experimental carbine. Uses encased laser projectors as ammunition."//we need to uncouple the toroidal resistance dejammers
|
||||
icon_state = "lasercarbine"
|
||||
@@ -267,6 +267,6 @@
|
||||
can_suppress = 0
|
||||
burst_size = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/lasercarbine/update_icon()
|
||||
/obj/item/gun/projectile/automatic/lasercarbine/update_icon()
|
||||
..()
|
||||
icon_state = "lasercarbine[magazine ? "-[Ceiling(get_ammo(0)/5)*5]" : ""]"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/projectile/bow
|
||||
/obj/item/gun/projectile/bow
|
||||
name = "bow"
|
||||
desc = "A sturdy bow made out of wood and reinforced with iron."
|
||||
icon_state = "bow_unloaded"
|
||||
@@ -11,7 +11,7 @@
|
||||
var/ready_to_fire = 0
|
||||
var/slowdown_when_ready = 2
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/update_icon()
|
||||
/obj/item/gun/projectile/bow/update_icon()
|
||||
if(magazine.ammo_count() && !ready_to_fire)
|
||||
icon_state = "bow_loaded"
|
||||
else if(ready_to_fire)
|
||||
@@ -21,13 +21,13 @@
|
||||
icon_state = initial(icon_state)
|
||||
slowdown = initial(slowdown)
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/dropped(mob/user)
|
||||
/obj/item/gun/projectile/bow/dropped(mob/user)
|
||||
if(magazine && magazine.ammo_count())
|
||||
magazine.empty_magazine()
|
||||
ready_to_fire = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/attack_self(mob/living/user)
|
||||
/obj/item/gun/projectile/bow/attack_self(mob/living/user)
|
||||
if(!ready_to_fire && magazine.ammo_count())
|
||||
ready_to_fire = TRUE
|
||||
playsound(user, draw_sound, 100, 1)
|
||||
@@ -36,22 +36,22 @@
|
||||
ready_to_fire = FALSE
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/bow/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 ready \the [A] into \the [src].</span>")
|
||||
update_icon()
|
||||
chamber_round()
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/can_shoot()
|
||||
/obj/item/gun/projectile/bow/can_shoot()
|
||||
. = ..()
|
||||
if(!ready_to_fire)
|
||||
return FALSE
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
/obj/item/gun/projectile/bow/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/bow/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/bow/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
. = ..()
|
||||
ready_to_fire = FALSE
|
||||
update_icon()
|
||||
@@ -81,7 +81,7 @@
|
||||
caliber = "arrow"
|
||||
|
||||
//quiver
|
||||
/obj/item/weapon/storage/backpack/quiver
|
||||
/obj/item/storage/backpack/quiver
|
||||
name = "quiver"
|
||||
desc = "A quiver for holding arrows."
|
||||
icon_state = "quiver"
|
||||
@@ -91,7 +91,7 @@
|
||||
/obj/item/ammo_casing/caseless/arrow
|
||||
)
|
||||
|
||||
/obj/item/weapon/storage/backpack/quiver/full/New()
|
||||
/obj/item/storage/backpack/quiver/full/New()
|
||||
..()
|
||||
for(var/i in 1 to storage_slots)
|
||||
new /obj/item/ammo_casing/caseless/arrow(src)
|
||||
|
||||
@@ -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/projectile/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/projectile/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"
|
||||
@@ -10,27 +10,27 @@
|
||||
fire_sound = 'sound/weapons/grenadelaunch.ogg'
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/attackby(var/obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/revolver/grenadelauncher/attackby(var/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/projectile/revolver/grenadelauncher/multi
|
||||
/obj/item/gun/projectile/revolver/grenadelauncher/multi
|
||||
desc = "A revolving 6-shot grenade launcher."
|
||||
name = "multi grenade launcher"
|
||||
icon_state = "bulldog"
|
||||
item_state = "bulldog"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/grenadelauncher/multi
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg
|
||||
/obj/item/gun/projectile/revolver/grenadelauncher/multi/cyborg
|
||||
desc = "A 6-shot grenade launcher."
|
||||
icon = 'icons/mecha/mecha_equipment.dmi'
|
||||
icon_state = "mecha_grenadelnchr"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/grenadelauncher/multi/cyborg/attack_self()
|
||||
/obj/item/gun/projectile/revolver/grenadelauncher/multi/cyborg/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol
|
||||
/obj/item/gun/projectile/automatic/gyropistol
|
||||
name = "gyrojet pistol"
|
||||
desc = "A prototype pistol designed to fire self propelled rockets."
|
||||
icon_state = "gyropistol"
|
||||
@@ -41,18 +41,18 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/isHandgun()
|
||||
/obj/item/gun/projectile/automatic/gyropistol/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/automatic/gyropistol/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/update_icon()
|
||||
/obj/item/gun/projectile/automatic/gyropistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][magazine ? "loaded" : ""]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/speargun
|
||||
/obj/item/gun/projectile/automatic/speargun
|
||||
name = "kinetic speargun"
|
||||
desc = "A weapon favored by carp hunters. Fires specialized spears using kinetic energy."
|
||||
icon_state = "speargun"
|
||||
@@ -68,16 +68,16 @@
|
||||
select = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/speargun/update_icon()
|
||||
/obj/item/gun/projectile/automatic/speargun/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/speargun/attack_self()
|
||||
/obj/item/gun/projectile/automatic/speargun/attack_self()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/speargun/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/automatic/speargun/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/speargun/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/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>")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol
|
||||
/obj/item/gun/projectile/automatic/pistol
|
||||
name = "stechkin pistol"
|
||||
desc = "A small, easily concealable 10mm handgun. Has a threaded barrel for suppressors."
|
||||
icon_state = "pistol"
|
||||
@@ -10,15 +10,15 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/isHandgun()
|
||||
/obj/item/gun/projectile/automatic/pistol/isHandgun()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/update_icon()
|
||||
/obj/item/gun/projectile/automatic/pistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"][suppressed ? "-suppressed" : ""]"
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/m1911
|
||||
/obj/item/gun/projectile/automatic/pistol/m1911
|
||||
name = "\improper M1911"
|
||||
desc = "A classic .45 handgun with a small magazine capacity."
|
||||
icon_state = "m1911"
|
||||
@@ -26,13 +26,13 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m45
|
||||
can_suppress = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/empty //empty stetchshit for maint spawns
|
||||
/obj/item/gun/projectile/automatic/pistol/empty //empty stetchshit for maint spawns
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/empty/New()
|
||||
/obj/item/gun/projectile/automatic/pistol/empty/New()
|
||||
magazine = new /obj/item/ammo_box/magazine/m10mm/empty(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/enforcer
|
||||
/obj/item/gun/projectile/automatic/pistol/enforcer
|
||||
name = "Enforcer .45"
|
||||
desc = "A pistol of modern design."
|
||||
icon_state = "enforcer_grey"
|
||||
@@ -42,7 +42,7 @@
|
||||
unique_reskin = TRUE
|
||||
can_flashlight = TRUE
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/enforcer/update_icon()
|
||||
/obj/item/gun/projectile/automatic/pistol/enforcer/update_icon()
|
||||
..()
|
||||
if(current_skin)
|
||||
icon_state = "[current_skin][chambered ? "" : "-e"]"
|
||||
@@ -57,10 +57,10 @@
|
||||
iconF = "Enforcer_light-on"
|
||||
overlays += image(icon = icon, icon_state = iconF, pixel_x = 0)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/enforcer/ui_action_click()
|
||||
/obj/item/gun/projectile/automatic/pistol/enforcer/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/enforcer/New()
|
||||
/obj/item/gun/projectile/automatic/pistol/enforcer/New()
|
||||
..()
|
||||
options["Grey slide"] = "enforcer_grey"
|
||||
options["Red slide"] = "enforcer_red"
|
||||
@@ -72,7 +72,7 @@
|
||||
options["Red Handle"] = "enforcer_redgrip"
|
||||
options["Cancel"] = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle
|
||||
/obj/item/gun/projectile/automatic/pistol/deagle
|
||||
name = "desert eagle"
|
||||
desc = "A robust .50 AE handgun."
|
||||
icon_state = "deagle"
|
||||
@@ -80,21 +80,21 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/m50
|
||||
can_suppress = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/update_icon()
|
||||
/obj/item/gun/projectile/automatic/pistol/deagle/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][magazine ? "" : "-e"]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/pistol/deagle/gold
|
||||
/obj/item/gun/projectile/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/projectile/automatic/pistol/deagle/camo
|
||||
/obj/item/gun/projectile/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/projectile/automatic/pistol/APS
|
||||
/obj/item/gun/projectile/automatic/pistol/APS
|
||||
name = "stechkin APS pistol"
|
||||
desc = "The original russian version of a widely used Syndicate sidearm. Uses 9mm ammo."
|
||||
icon_state = "aps"
|
||||
|
||||
@@ -1,30 +1,30 @@
|
||||
/obj/item/weapon/gun/projectile/revolver
|
||||
/obj/item/gun/projectile/revolver
|
||||
name = "\improper .357 revolver"
|
||||
desc = "A suspicious revolver. Uses .357 ammo."
|
||||
icon_state = "revolver"
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
|
||||
origin_tech = "combat=3;materials=2"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/New()
|
||||
/obj/item/gun/projectile/revolver/New()
|
||||
..()
|
||||
if(!istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder))
|
||||
verbs -= /obj/item/weapon/gun/projectile/revolver/verb/spin
|
||||
verbs -= /obj/item/gun/projectile/revolver/verb/spin
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/chamber_round(var/spin = 1)
|
||||
/obj/item/gun/projectile/revolver/chamber_round(var/spin = 1)
|
||||
if(spin)
|
||||
chambered = magazine.get_round(1)
|
||||
else
|
||||
chambered = magazine.stored_ammo[1]
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
/obj/item/gun/projectile/revolver/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||
..()
|
||||
chamber_round(1)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/process_chamber()
|
||||
/obj/item/gun/projectile/revolver/process_chamber()
|
||||
return ..(0, 1)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/revolver/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -35,7 +35,7 @@
|
||||
update_icon()
|
||||
chamber_round(0)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/attack_self(mob/living/user)
|
||||
/obj/item/gun/projectile/revolver/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
chambered = null
|
||||
while(get_ammo() > 0)
|
||||
@@ -51,7 +51,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>[src] is empty!</span>")
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/verb/spin()
|
||||
/obj/item/gun/projectile/revolver/verb/spin()
|
||||
set name = "Spin Chamber"
|
||||
set category = "Object"
|
||||
set desc = "Click to spin your revolver's chamber."
|
||||
@@ -68,12 +68,12 @@
|
||||
playsound(loc, 'sound/weapons/revolver_spin.ogg', 50, 1)
|
||||
usr.visible_message("[usr] spins [src]'s chamber.", "<span class='notice'>You spin [src]'s chamber.</span>")
|
||||
else
|
||||
verbs -= /obj/item/weapon/gun/projectile/revolver/verb/spin
|
||||
verbs -= /obj/item/gun/projectile/revolver/verb/spin
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/can_shoot()
|
||||
/obj/item/gun/projectile/revolver/can_shoot()
|
||||
return get_ammo(0,0)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/get_ammo(countchambered = 0, countempties = 1)
|
||||
/obj/item/gun/projectile/revolver/get_ammo(countchambered = 0, countempties = 1)
|
||||
var/boolets = 0 //mature var names for mature people
|
||||
if(chambered && countchambered)
|
||||
boolets++
|
||||
@@ -81,11 +81,11 @@
|
||||
boolets += magazine.ammo_count(countempties)
|
||||
return boolets
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/examine(mob/user)
|
||||
/obj/item/gun/projectile/revolver/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "[get_ammo(0,0)] of those are live rounds.")
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/detective
|
||||
/obj/item/gun/projectile/revolver/detective
|
||||
desc = "A cheap Martian knock-off of a classic law enforcement firearm. Uses .38-special rounds."
|
||||
name = "\improper .38 Mars Special"
|
||||
icon_state = "detective"
|
||||
@@ -93,7 +93,7 @@
|
||||
unique_rename = 1
|
||||
unique_reskin = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/detective/New()
|
||||
/obj/item/gun/projectile/revolver/detective/New()
|
||||
..()
|
||||
options["The Original"] = "detective"
|
||||
options["Leopard Spots"] = "detective_leopard"
|
||||
@@ -102,7 +102,7 @@
|
||||
options["The Peacemaker"] = "detective_peacemaker"
|
||||
options["Cancel"] = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/detective/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override = "")
|
||||
/obj/item/gun/projectile/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)
|
||||
@@ -112,9 +112,9 @@
|
||||
return 0
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/detective/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/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())
|
||||
@@ -142,19 +142,19 @@
|
||||
desc = initial(desc)
|
||||
to_chat(user, "<span class='notice'>You remove the modifications on [src]. Now it will fire .38 rounds.</span>")
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/mateba
|
||||
/obj/item/gun/projectile/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." //>10mm hole >.357
|
||||
icon_state = "mateba"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/golden
|
||||
/obj/item/gun/projectile/revolver/golden
|
||||
name = "\improper Golden revolver"
|
||||
desc = "This ain't no game, ain't never been no show, And I'll gladly gun down the oldest lady you know. Uses .357 ammo."
|
||||
icon_state = "goldrevolver"
|
||||
fire_sound = 'sound/weapons/resonator_blast.ogg'
|
||||
recoil = 8
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/nagant
|
||||
/obj/item/gun/projectile/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"
|
||||
@@ -165,7 +165,7 @@
|
||||
// A gun to play Russian Roulette!
|
||||
// You can spin the chamber to randomize the position of the bullet.
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian
|
||||
/obj/item/gun/projectile/revolver/russian
|
||||
name = "\improper Russian Revolver"
|
||||
desc = "A Russian-made revolver for drinking games. Uses .357 ammo, and has a mechanism that spins the chamber before each trigger pull."
|
||||
origin_tech = "combat=2;materials=2"
|
||||
@@ -173,19 +173,19 @@
|
||||
var/spun = 0
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/New()
|
||||
/obj/item/gun/projectile/revolver/russian/New()
|
||||
..()
|
||||
Spin()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/proc/Spin()
|
||||
/obj/item/gun/projectile/revolver/russian/proc/Spin()
|
||||
chambered = null
|
||||
var/random = rand(1, magazine.max_ammo)
|
||||
if(random <= get_ammo(0,0))
|
||||
chamber_round()
|
||||
spun = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/revolver/russian/attackby(obj/item/A, mob/user, params)
|
||||
var/num_loaded = ..()
|
||||
if(num_loaded)
|
||||
user.visible_message("[user] loads a single bullet into the revolver and spins the chamber.", "<span class='notice'>You load a single bullet into the chamber and spin it.</span>")
|
||||
@@ -197,7 +197,7 @@
|
||||
A.update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/attack_self(mob/user)
|
||||
/obj/item/gun/projectile/revolver/russian/attack_self(mob/user)
|
||||
if(!spun && can_shoot())
|
||||
user.visible_message("[user] spins the chamber of the revolver.", "<span class='notice'>You spin the revolver's chamber.</span>")
|
||||
Spin()
|
||||
@@ -215,7 +215,7 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
|
||||
/obj/item/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
|
||||
if(flag)
|
||||
if(!(target in user.contents) && ismob(target))
|
||||
if(user.a_intent == INTENT_HARM) // Flogging action
|
||||
@@ -250,11 +250,11 @@
|
||||
user.visible_message("<span class='danger'>*click*</span>")
|
||||
playsound(user, 'sound/weapons/empty.ogg', 100, 1)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head")
|
||||
/obj/item/gun/projectile/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 \his head!</span>", "<span class='userdanger'>You fire [src] at your head!</span>", "<span class='italics'>You hear a gunshot!</span>")
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/capgun
|
||||
/obj/item/gun/projectile/revolver/capgun
|
||||
name = "cap gun"
|
||||
desc = "Looks almost like the real thing! Ages 8 and up."
|
||||
origin_tech = null
|
||||
@@ -264,7 +264,7 @@
|
||||
// DOUBLE BARRELED SHOTGUN //
|
||||
/////////////////////////////
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel
|
||||
/obj/item/gun/projectile/revolver/doublebarrel
|
||||
name = "double-barreled shotgun"
|
||||
desc = "A true classic."
|
||||
icon_state = "dshotgun"
|
||||
@@ -278,7 +278,7 @@
|
||||
unique_rename = 1
|
||||
unique_reskin = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/New()
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/New()
|
||||
..()
|
||||
options["Default"] = "dshotgun"
|
||||
options["Dark Red Finish"] = "dshotgun-d"
|
||||
@@ -288,18 +288,18 @@
|
||||
options["Rosewood"] = "dshotgun-p"
|
||||
options["Cancel"] = null
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/ammo_box) || istype(A, /obj/item/ammo_casing))
|
||||
chamber_round()
|
||||
if(istype(A, /obj/item/weapon/melee/energy))
|
||||
var/obj/item/weapon/melee/energy/W = A
|
||||
if(istype(A, /obj/item/melee/energy))
|
||||
var/obj/item/melee/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
if(istype(A, /obj/item/weapon/circular_saw) || istype(A, /obj/item/weapon/gun/energy/plasmacutter))
|
||||
if(istype(A, /obj/item/circular_saw) || istype(A, /obj/item/gun/energy/plasmacutter))
|
||||
sawoff(user)
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/attack_self(mob/living/user)
|
||||
var/num_unloaded = 0
|
||||
while(get_ammo() > 0)
|
||||
var/obj/item/ammo_casing/CB
|
||||
@@ -313,12 +313,12 @@
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] is empty.</span>")
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/isHandgun() //contrary to popular opinion, double barrels are not, shockingly, handguns
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/isHandgun() //contrary to popular opinion, double barrels are not, shockingly, handguns
|
||||
return 0
|
||||
|
||||
// IMPROVISED SHOTGUN //
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised
|
||||
name = "improvised shotgun"
|
||||
desc = "Essentially a tube that aims shotgun shells."
|
||||
icon_state = "ishotgun"
|
||||
@@ -332,7 +332,7 @@
|
||||
unique_reskin = 0
|
||||
var/slung = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/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
|
||||
@@ -346,13 +346,13 @@
|
||||
to_chat(user, "<span class='warning'>You need at least ten lengths of cable if you want to make a sling.</span>")
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/update_icon()
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/update_icon()
|
||||
..()
|
||||
if(slung && (slot_flags & SLOT_BELT) )
|
||||
slung = 0
|
||||
icon_state = "ishotgun-sawn"
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/sawoff(mob/user)
|
||||
/obj/item/gun/projectile/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)
|
||||
@@ -361,10 +361,10 @@
|
||||
|
||||
//caneshotgun
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane
|
||||
name = "cane"
|
||||
desc = "A cane used by a true gentleman. Or a clown."
|
||||
icon = 'icons/obj/weapons.dmi'
|
||||
icon = 'icons/obj/items.dmi'
|
||||
lefthand_file = 'icons/mob/inhands/items_lefthand.dmi'
|
||||
righthand_file = 'icons/mob/inhands/items_righthand.dmi'
|
||||
icon_state = "cane"
|
||||
@@ -382,18 +382,18 @@
|
||||
suppressed = 1
|
||||
needs_permit = 0 //its just a cane beepsky.....
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/is_crutch()
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/is_crutch()
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/update_icon()
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/attackby(obj/item/A, mob/user, params)
|
||||
..()
|
||||
if(istype(A, /obj/item/stack/cable_coil))
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/improvised/cane/examine(mob/user) // HAD TO REPEAT EXAMINE CODE BECAUSE GUN CODE DOESNT STEALTH
|
||||
/obj/item/gun/projectile/revolver/doublebarrel/improvised/cane/examine(mob/user) // HAD TO REPEAT EXAMINE CODE BECAUSE GUN CODE DOESNT STEALTH
|
||||
var/f_name = "\a [src]."
|
||||
if(blood_DNA && !istype(src, /obj/effect/decal))
|
||||
if(gender == PLURAL)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw
|
||||
/obj/item/gun/projectile/automatic/l6_saw
|
||||
name = "\improper L6 SAW"
|
||||
desc = "A heavily modified 5.56 light machine gun, designated 'L6 SAW'. Has 'Aussec Armoury - 2531' engraved on the receiver below the designation."
|
||||
icon_state = "l6closed100"
|
||||
@@ -14,23 +14,23 @@
|
||||
burst_size = 3
|
||||
fire_delay = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_self(mob/user)
|
||||
/obj/item/gun/projectile/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>")
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon()
|
||||
/obj/item/gun/projectile/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/projectile/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/projectile/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='notice'>[src]'s cover is open! Close it before firing!</span>")
|
||||
else
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attack_hand(mob/user)
|
||||
/obj/item/gun/projectile/automatic/l6_saw/attack_hand(mob/user)
|
||||
if(loc != user)
|
||||
..()
|
||||
return //let them pick it up
|
||||
@@ -46,7 +46,7 @@
|
||||
to_chat(user, "<span class='notice'>You remove the magazine from [src].</span>")
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/automatic/l6_saw/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/projectile/shotgun
|
||||
/obj/item/gun/projectile/shotgun
|
||||
name = "shotgun"
|
||||
desc = "A traditional shotgun with wood furniture and a four-shell capacity underneath."
|
||||
icon_state = "shotgun"
|
||||
@@ -11,7 +11,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot
|
||||
var/recentpump = 0 // to prevent spammage
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/shotgun/attackby(obj/item/A, mob/user, params)
|
||||
. = ..()
|
||||
if(.)
|
||||
return
|
||||
@@ -22,18 +22,18 @@
|
||||
update_icon()
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/process_chamber()
|
||||
/obj/item/gun/projectile/shotgun/process_chamber()
|
||||
return ..(0, 0)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/chamber_round()
|
||||
/obj/item/gun/projectile/shotgun/chamber_round()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/can_shoot()
|
||||
/obj/item/gun/projectile/shotgun/can_shoot()
|
||||
if(!chambered)
|
||||
return 0
|
||||
return (chambered.BB ? 1 : 0)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/attack_self(mob/living/user)
|
||||
/obj/item/gun/projectile/shotgun/attack_self(mob/living/user)
|
||||
if(recentpump)
|
||||
return
|
||||
pump(user)
|
||||
@@ -43,51 +43,51 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/proc/pump(mob/M)
|
||||
/obj/item/gun/projectile/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/projectile/shotgun/proc/pump_unload(mob/M)
|
||||
/obj/item/gun/projectile/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/projectile/shotgun/proc/pump_reload(mob/M)
|
||||
/obj/item/gun/projectile/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/projectile/shotgun/examine(mob/user)
|
||||
/obj/item/gun/projectile/shotgun/examine(mob/user)
|
||||
..()
|
||||
if(chambered)
|
||||
to_chat(user, "A [chambered.BB ? "live" : "spent"] one is in the chamber.")
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/isHandgun() //You cannot, in fact, holster a shotgun.
|
||||
/obj/item/gun/projectile/shotgun/isHandgun() //You cannot, in fact, holster a shotgun.
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/lethal
|
||||
/obj/item/gun/projectile/shotgun/lethal
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/shot/lethal
|
||||
|
||||
// RIOT SHOTGUN //
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/riot //for spawn in the armory
|
||||
/obj/item/gun/projectile/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/projectile/shotgun/riot/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/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/energy))
|
||||
var/obj/item/weapon/melee/energy/W = A
|
||||
if(istype(A, /obj/item/melee/energy))
|
||||
var/obj/item/melee/energy/W = A
|
||||
if(W.active)
|
||||
sawoff(user)
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
// BOLT ACTION RIFLE //
|
||||
///////////////////////
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction
|
||||
/obj/item/gun/projectile/shotgun/boltaction
|
||||
name = "\improper Mosin Nagant"
|
||||
desc = "This piece of junk looks like something that could have been used 700 years ago."
|
||||
icon_state = "moistnugget"
|
||||
@@ -104,7 +104,7 @@
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction
|
||||
var/bolt_open = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/pump(mob/M)
|
||||
/obj/item/gun/projectile/shotgun/boltaction/pump(mob/M)
|
||||
playsound(M, 'sound/weapons/shotgunpump.ogg', 60, 1)
|
||||
if(bolt_open)
|
||||
pump_reload(M)
|
||||
@@ -114,41 +114,41 @@
|
||||
update_icon() //I.E. fix the desc
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/blow_up(mob/user)
|
||||
/obj/item/gun/projectile/shotgun/blow_up(mob/user)
|
||||
. = 0
|
||||
if(chambered && chambered.BB)
|
||||
process_fire(user, user,0)
|
||||
. = 1
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/attackby(obj/item/A, mob/user, params)
|
||||
/obj/item/gun/projectile/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/projectile/shotgun/boltaction/examine(mob/user)
|
||||
/obj/item/gun/projectile/shotgun/boltaction/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "The bolt is [bolt_open ? "open" : "closed"].")
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/enchanted
|
||||
/obj/item/gun/projectile/shotgun/boltaction/enchanted
|
||||
name = "enchanted bolt action rifle"
|
||||
desc = "Careful not to lose your head."
|
||||
var/guns_left = 30
|
||||
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/enchanted/New()
|
||||
/obj/item/gun/projectile/shotgun/boltaction/enchanted/New()
|
||||
..()
|
||||
bolt_open = 1
|
||||
pump()
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/enchanted/dropped()
|
||||
/obj/item/gun/projectile/shotgun/boltaction/enchanted/dropped()
|
||||
..()
|
||||
guns_left = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/boltaction/enchanted/shoot_live_shot(mob/living/user as mob|obj, pointblank = 0, mob/pbtarget = null, message = 1)
|
||||
/obj/item/gun/projectile/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/projectile/shotgun/boltaction/enchanted/GUN = new
|
||||
var/obj/item/gun/projectile/shotgun/boltaction/enchanted/GUN = new
|
||||
GUN.guns_left = guns_left - 1
|
||||
user.drop_item()
|
||||
user.swap_hand()
|
||||
@@ -161,13 +161,13 @@
|
||||
|
||||
// Automatic Shotguns//
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic
|
||||
/obj/item/gun/projectile/shotgun/automatic
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/shoot_live_shot(mob/living/user as mob|obj)
|
||||
/obj/item/gun/projectile/shotgun/automatic/shoot_live_shot(mob/living/user as mob|obj)
|
||||
..()
|
||||
pump(user)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/combat
|
||||
/obj/item/gun/projectile/shotgun/automatic/combat
|
||||
name = "combat shotgun"
|
||||
desc = "A semi automatic shotgun with tactical furniture and a six-shell capacity underneath."
|
||||
icon_state = "cshotgun"
|
||||
@@ -177,7 +177,7 @@
|
||||
|
||||
//Dual Feed Shotgun
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube
|
||||
/obj/item/gun/projectile/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"
|
||||
@@ -187,18 +187,18 @@
|
||||
var/toggled = 0
|
||||
var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube/New()
|
||||
/obj/item/gun/projectile/shotgun/automatic/dual_tube/New()
|
||||
..()
|
||||
if(!alternate_magazine)
|
||||
alternate_magazine = new mag_type(src)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube/attack_self(mob/living/user)
|
||||
/obj/item/gun/projectile/shotgun/automatic/dual_tube/attack_self(mob/living/user)
|
||||
if(!chambered && magazine.contents.len)
|
||||
pump()
|
||||
else
|
||||
toggle_tube(user)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube/proc/toggle_tube(mob/living/user)
|
||||
/obj/item/gun/projectile/shotgun/automatic/dual_tube/proc/toggle_tube(mob/living/user)
|
||||
var/current_mag = magazine
|
||||
var/alt_mag = alternate_magazine
|
||||
magazine = alt_mag
|
||||
@@ -209,7 +209,7 @@
|
||||
else
|
||||
to_chat(user, "You switch to tube A.")
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/automatic/dual_tube/AltClick(mob/living/user)
|
||||
/obj/item/gun/projectile/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/projectile/automatic/sniper_rifle
|
||||
/obj/item/gun/projectile/automatic/sniper_rifle
|
||||
name = "sniper rifle"
|
||||
desc = "the kind of gun that will leave you crying for mummy before you even realise your leg's missing"
|
||||
icon_state = "sniper"
|
||||
@@ -17,13 +17,13 @@
|
||||
slot_flags = SLOT_BACK
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/sniper_rifle/update_icon()
|
||||
/obj/item/gun/projectile/automatic/sniper_rifle/update_icon()
|
||||
if(magazine)
|
||||
icon_state = "sniper-mag"
|
||||
else
|
||||
icon_state = "sniper"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/sniper_rifle/syndicate
|
||||
/obj/item/gun/projectile/automatic/sniper_rifle/syndicate
|
||||
name = "syndicate sniper rifle"
|
||||
desc = "Syndicate flavoured sniper rifle, it packs quite a punch, a punch to your face"
|
||||
origin_tech = "combat=7;syndicate=6"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/projectile/automatic/toy
|
||||
/obj/item/gun/projectile/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'
|
||||
@@ -13,10 +13,10 @@
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/automatic/toy/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol
|
||||
/obj/item/gun/projectile/automatic/toy/pistol
|
||||
name = "foam force pistol"
|
||||
desc = "A small, easily concealable toy handgun. Ages 8 and up."
|
||||
icon_state = "pistol"
|
||||
@@ -28,27 +28,27 @@
|
||||
fire_delay = 0
|
||||
actions_types = list()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol/update_icon()
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/update_icon()
|
||||
..()
|
||||
icon_state = "[initial(icon_state)][chambered ? "" : "-e"]"
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol/riot
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/riot
|
||||
name = "foam force riot pistol"
|
||||
desc = "RIOT! Ages 8 and up."
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/pistol/riot
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol/riot/New()
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/riot/New()
|
||||
magazine = new /obj/item/ammo_box/magazine/toy/pistol/riot(src)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol/enforcer
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/enforcer
|
||||
name = "Enforcer trainer"
|
||||
desc = "A foam version of the Enforcer meant to be used for training new caddets who can't be trusted with rubber bullets."
|
||||
icon_state = "enforcer"
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/enforcer
|
||||
can_flashlight = TRUE
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol/enforcer/update_icon()
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/enforcer/update_icon()
|
||||
..()
|
||||
overlays.Cut()
|
||||
if(gun_light)
|
||||
@@ -57,10 +57,10 @@
|
||||
iconF = "Enforcer_light-on"
|
||||
overlays += image(icon = 'icons/obj/guns/projectile.dmi', icon_state = iconF, pixel_x = 0)
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/toy/pistol/enforcer/ui_action_click()
|
||||
/obj/item/gun/projectile/automatic/toy/pistol/enforcer/ui_action_click()
|
||||
toggle_gunlight()
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/toy
|
||||
/obj/item/gun/projectile/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'
|
||||
@@ -71,12 +71,12 @@
|
||||
clumsy_check = 0
|
||||
needs_permit = 0
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/toy/process_chamber()
|
||||
/obj/item/gun/projectile/shotgun/toy/process_chamber()
|
||||
..()
|
||||
if(chambered && !chambered.BB)
|
||||
qdel(chambered)
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/toy/crossbow
|
||||
/obj/item/gun/projectile/shotgun/toy/crossbow
|
||||
name = "foam force crossbow"
|
||||
desc = "A weapon favored by many overactive children. Ages 8 and up."
|
||||
icon_state = "crossbow"
|
||||
@@ -86,7 +86,7 @@
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = WEIGHT_CLASS_SMALL
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/toy
|
||||
/obj/item/gun/projectile/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'
|
||||
@@ -94,10 +94,10 @@
|
||||
needs_permit = 0
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/smgm45
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/c20r/toy/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/automatic/c20r/toy/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/toy
|
||||
/obj/item/gun/projectile/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'
|
||||
@@ -105,10 +105,10 @@
|
||||
needs_permit = 0
|
||||
mag_type = /obj/item/ammo_box/magazine/toy/m762
|
||||
|
||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/toy/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
/obj/item/gun/projectile/automatic/l6_saw/toy/process_chamber(eject_casing = 0, empty_chamber = 1)
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/projectile/shotgun/toy/tommygun
|
||||
/obj/item/gun/projectile/shotgun/toy/tommygun
|
||||
name = "tommy gun"
|
||||
desc = "Looks almost like the real thing! Great for practicing Drive-bys. Ages 8 and up."
|
||||
icon = 'icons/obj/guns/toy.dmi'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/rocketlauncher
|
||||
/obj/item/gun/rocketlauncher
|
||||
var/projectile
|
||||
name = "rocket launcher"
|
||||
desc = "Say hello to my little friend"
|
||||
@@ -15,19 +15,19 @@
|
||||
var/max_rockets = 1
|
||||
var/list/rockets = new/list()
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/examine(mob/user)
|
||||
/obj/item/gun/rocketlauncher/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>[rockets.len] / [max_rockets] rockets.</span>")
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/Destroy()
|
||||
/obj/item/gun/rocketlauncher/Destroy()
|
||||
QDEL_LIST(rockets)
|
||||
rockets = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/update_icon()
|
||||
/obj/item/gun/rocketlauncher/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gun/rocketlauncher/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, /obj/item/ammo_casing/rocket))
|
||||
if(rockets.len < max_rockets)
|
||||
user.drop_item()
|
||||
@@ -38,10 +38,10 @@
|
||||
else
|
||||
to_chat(usr, "<span class='notice'>[src] cannot hold more rockets.</span>")
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/can_shoot()
|
||||
/obj/item/gun/rocketlauncher/can_shoot()
|
||||
return rockets.len
|
||||
|
||||
/obj/item/weapon/gun/rocketlauncher/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override = "")
|
||||
/obj/item/gun/rocketlauncher/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override = "")
|
||||
if(rockets.len)
|
||||
var/obj/item/ammo_casing/rocket/I = rockets[1]
|
||||
var/obj/item/missile/M = new /obj/item/missile(user.loc)
|
||||
|
||||
@@ -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,15 +14,15 @@
|
||||
var/list/syringes = list()
|
||||
var/max_syringes = 1
|
||||
|
||||
/obj/item/weapon/gun/syringe/New()
|
||||
/obj/item/gun/syringe/New()
|
||||
..()
|
||||
chambered = new /obj/item/ammo_casing/syringegun(src)
|
||||
|
||||
/obj/item/weapon/gun/syringe/newshot()
|
||||
/obj/item/gun/syringe/newshot()
|
||||
if(!syringes.len)
|
||||
return
|
||||
|
||||
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
|
||||
var/obj/item/reagent_containers/syringe/S = syringes[1]
|
||||
|
||||
if(!S)
|
||||
return
|
||||
@@ -36,25 +36,25 @@
|
||||
qdel(S)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/syringe/process_chamber()
|
||||
/obj/item/gun/syringe/process_chamber()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/syringe/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
|
||||
/obj/item/gun/syringe/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
|
||||
if(target == loc)
|
||||
return
|
||||
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 as mob)
|
||||
/obj/item/gun/syringe/attack_self(mob/living/user as mob)
|
||||
if(!syringes.len)
|
||||
to_chat(user, "<span class='notice'>[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
|
||||
@@ -65,8 +65,8 @@
|
||||
|
||||
return 1
|
||||
|
||||
/obj/item/weapon/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = 1)
|
||||
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
|
||||
/obj/item/gun/syringe/attackby(obj/item/A, mob/user, params, show_msg = 1)
|
||||
if(istype(A, /obj/item/reagent_containers/syringe))
|
||||
if(syringes.len < max_syringes)
|
||||
if(!user.unEquip(A))
|
||||
return
|
||||
@@ -78,13 +78,13 @@
|
||||
to_chat(user, "<span class='notice'>[src] cannot hold more syringes.</span>")
|
||||
return 0
|
||||
|
||||
/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"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/throw
|
||||
/obj/item/gun/throw
|
||||
name = "abstract item thrower"
|
||||
desc = "This shouldn't be here, yell at a coder."
|
||||
fire_sound = 'sound/weapons/punchmiss.ogg'
|
||||
@@ -12,39 +12,39 @@
|
||||
var/projectile_speed = 1
|
||||
var/projectile_range = 1
|
||||
|
||||
/obj/item/weapon/gun/throw/proc/notify_ammo_count(mob/user)
|
||||
/obj/item/gun/throw/proc/notify_ammo_count(mob/user)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/throw/proc/get_throwrange()
|
||||
/obj/item/gun/throw/proc/get_throwrange()
|
||||
return projectile_range
|
||||
|
||||
/obj/item/weapon/gun/throw/proc/get_throwspeed()
|
||||
/obj/item/gun/throw/proc/get_throwspeed()
|
||||
return projectile_speed
|
||||
|
||||
/obj/item/weapon/gun/throw/proc/modify_projectile(obj/item/I, on_chamber = 0)
|
||||
/obj/item/gun/throw/proc/modify_projectile(obj/item/I, on_chamber = 0)
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/throw/proc/get_ammocount(include_loaded = 1)
|
||||
/obj/item/gun/throw/proc/get_ammocount(include_loaded = 1)
|
||||
var/count = loaded_projectiles.len
|
||||
if(include_loaded && to_launch)
|
||||
count++
|
||||
return count
|
||||
|
||||
/obj/item/weapon/gun/throw/examine(mob/user)
|
||||
/obj/item/gun/throw/examine(mob/user)
|
||||
..()
|
||||
to_chat(user, "<span class='notice'>It is [to_launch ? "loaded with \a [to_launch]" : "not loaded"].</span>")
|
||||
notify_ammo_count(user)
|
||||
|
||||
/obj/item/weapon/gun/throw/Destroy()
|
||||
/obj/item/gun/throw/Destroy()
|
||||
QDEL_NULL(to_launch)
|
||||
QDEL_LIST(loaded_projectiles)
|
||||
loaded_projectiles = null
|
||||
return ..()
|
||||
|
||||
/obj/item/weapon/gun/throw/update_icon()
|
||||
/obj/item/gun/throw/update_icon()
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/throw/attackby(obj/item/I, mob/user, params)
|
||||
/obj/item/gun/throw/attackby(obj/item/I, mob/user, params)
|
||||
if(istype(I, valid_projectile_type) && !(I.flags & NODROP))
|
||||
if(get_ammocount() < max_capacity)
|
||||
user.drop_item()
|
||||
@@ -59,18 +59,18 @@
|
||||
else
|
||||
to_chat(user, "<span class='warning'>You cannot load [I] into [src]!</span>")
|
||||
|
||||
/obj/item/weapon/gun/throw/process_chamber()
|
||||
/obj/item/gun/throw/process_chamber()
|
||||
if(!to_launch && loaded_projectiles.len)
|
||||
to_launch = loaded_projectiles[1]
|
||||
loaded_projectiles -= to_launch
|
||||
return
|
||||
|
||||
/obj/item/weapon/gun/throw/can_shoot()
|
||||
/obj/item/gun/throw/can_shoot()
|
||||
if(to_launch)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
/obj/item/weapon/gun/throw/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
/obj/item/gun/throw/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
add_fingerprint(user)
|
||||
if(semicd)
|
||||
return
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define XBOW_TENSION_80 "80%"
|
||||
#define XBOW_TENSION_FULL "100%"
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow
|
||||
/obj/item/gun/throw/crossbow
|
||||
name = "powered crossbow"
|
||||
desc = "A modern twist on an old classic. Pick up that can."
|
||||
icon_state = "crossbow"
|
||||
@@ -12,21 +12,21 @@
|
||||
fire_sound_text = "a solid thunk"
|
||||
fire_delay = 25
|
||||
|
||||
valid_projectile_type = /obj/item/weapon/arrow
|
||||
valid_projectile_type = /obj/item/arrow
|
||||
|
||||
var/tension = 0
|
||||
var/drawtension = 5
|
||||
var/maxtension = 5
|
||||
var/speed_multiplier = 5
|
||||
var/range_multiplier = 3
|
||||
var/obj/item/weapon/stock_parts/cell/cell = null // Used for firing superheated rods.
|
||||
var/obj/item/stock_parts/cell/cell = null // Used for firing superheated rods.
|
||||
var/list/possible_tensions = list(XBOW_TENSION_20, XBOW_TENSION_40, XBOW_TENSION_60, XBOW_TENSION_80, XBOW_TENSION_FULL)
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/emp_act(severity)
|
||||
/obj/item/gun/throw/crossbow/emp_act(severity)
|
||||
if(cell && severity)
|
||||
emp_act(severity)
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/update_icon()
|
||||
/obj/item/gun/throw/crossbow/update_icon()
|
||||
if(!tension)
|
||||
if(!to_launch)
|
||||
icon_state = "[initial(icon_state)]"
|
||||
@@ -35,39 +35,39 @@
|
||||
else
|
||||
icon_state = "[initial(icon_state)]-drawn"
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/examine(mob/user)
|
||||
/obj/item/gun/throw/crossbow/examine(mob/user)
|
||||
..()
|
||||
if(cell)
|
||||
to_chat(user, "<span class='notice'>\A [cell] is mounted onto [src]. Battery cell charge: [cell.charge]/[cell.maxcharge]")
|
||||
else
|
||||
to_chat(user, "<span class='notice'>It has an empty mount for a battery cell.</span>")
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/modify_projectile(obj/item/I, on_chamber = 0)
|
||||
if(cell && on_chamber && istype(I, /obj/item/weapon/arrow/rod))
|
||||
var/obj/item/weapon/arrow/rod/R = I
|
||||
/obj/item/gun/throw/crossbow/modify_projectile(obj/item/I, on_chamber = 0)
|
||||
if(cell && on_chamber && istype(I, /obj/item/arrow/rod))
|
||||
var/obj/item/arrow/rod/R = I
|
||||
visible_message("<span class='danger'>[R] plinks and crackles as it begins to glow red-hot.</span>")
|
||||
R.throwforce = 15
|
||||
R.superheated = 1
|
||||
cell.use(500)
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/get_throwspeed()
|
||||
/obj/item/gun/throw/crossbow/get_throwspeed()
|
||||
return tension * speed_multiplier
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/get_throwrange()
|
||||
/obj/item/gun/throw/crossbow/get_throwrange()
|
||||
return tension * range_multiplier
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/process_chamber()
|
||||
/obj/item/gun/throw/crossbow/process_chamber()
|
||||
..()
|
||||
if(to_launch)
|
||||
modify_projectile(to_launch, 1)
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/attack_self(mob/living/user)
|
||||
/obj/item/gun/throw/crossbow/attack_self(mob/living/user)
|
||||
if(tension)
|
||||
if(to_launch)
|
||||
user.visible_message("<span class='notice'>[user] relaxes the tension on [src]'s string and removes [to_launch].</span>","<span class='notice'>You relax the tension on [src]'s string and remove [to_launch].</span>")
|
||||
to_launch.forceMove(get_turf(src))
|
||||
var/obj/item/weapon/arrow/A = to_launch
|
||||
var/obj/item/arrow/A = to_launch
|
||||
to_launch = null
|
||||
A.removed()
|
||||
process_chamber()
|
||||
@@ -78,7 +78,7 @@
|
||||
else
|
||||
draw(user)
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/proc/draw(mob/living/user)
|
||||
/obj/item/gun/throw/crossbow/proc/draw(mob/living/user)
|
||||
if(user.incapacitated())
|
||||
return
|
||||
if(!to_launch)
|
||||
@@ -91,8 +91,8 @@
|
||||
user.visible_message("[usr] draws back the string of [src]!","[src] clunks as you draw the string to its maximum tension!!")
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/weapon/stock_parts/cell))
|
||||
/obj/item/gun/throw/crossbow/attackby(obj/item/W as obj, mob/user as mob, params)
|
||||
if(istype(W, /obj/item/stock_parts/cell))
|
||||
if(!cell)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
@@ -101,7 +101,7 @@
|
||||
process_chamber()
|
||||
else
|
||||
to_chat(user, "<span class='notice'>[src] already has a cell installed.</span>")
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(istype(W, /obj/item/screwdriver))
|
||||
if(cell)
|
||||
cell.loc = get_turf(src)
|
||||
to_chat(user, "<span class='notice'>You jimmy [cell] out of [src] with [W].</span>")
|
||||
@@ -111,7 +111,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/verb/set_tension()
|
||||
/obj/item/gun/throw/crossbow/verb/set_tension()
|
||||
set name = "Adjust Tension"
|
||||
set category = "Object"
|
||||
set src in range(0)
|
||||
@@ -135,19 +135,19 @@
|
||||
if(XBOW_TENSION_FULL)
|
||||
drawtension = maxtension
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
/obj/item/gun/throw/crossbow/process_fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, message = 1, params, zone_override)
|
||||
..()
|
||||
tension = 0
|
||||
update_icon()
|
||||
/obj/item/weapon/gun/throw/crossbow/french
|
||||
/obj/item/gun/throw/crossbow/french
|
||||
name = "french powered crossbow"
|
||||
icon_state = "fcrossbow"
|
||||
valid_projectile_type = /obj/item/weapon/reagent_containers/food/snacks/baguette
|
||||
valid_projectile_type = /obj/item/reagent_containers/food/snacks/baguette
|
||||
|
||||
/obj/item/weapon/gun/throw/crossbow/french/modify_projectile(obj/item/I, on_chamber = 0)
|
||||
/obj/item/gun/throw/crossbow/french/modify_projectile(obj/item/I, on_chamber = 0)
|
||||
return
|
||||
|
||||
/obj/item/weapon/arrow
|
||||
/obj/item/arrow
|
||||
name = "bolt"
|
||||
desc = "It's got a tip for you - get the point?"
|
||||
icon_state = "bolt"
|
||||
@@ -156,17 +156,17 @@
|
||||
w_class = WEIGHT_CLASS_NORMAL
|
||||
sharp = 1
|
||||
|
||||
/obj/item/weapon/arrow/proc/removed() //Helper for metal rods falling apart.
|
||||
/obj/item/arrow/proc/removed() //Helper for metal rods falling apart.
|
||||
return
|
||||
|
||||
/obj/item/weapon/arrow/rod
|
||||
/obj/item/arrow/rod
|
||||
name = "makeshift bolt"
|
||||
desc = "A sharpened metal rod that can be fired out of a crossbow."
|
||||
icon_state = "metal-rod"
|
||||
throwforce = 8
|
||||
var/superheated = 0
|
||||
|
||||
/obj/item/weapon/arrow/rod/removed()
|
||||
/obj/item/arrow/rod/removed()
|
||||
if(superheated) // The rod has been superheated - we don't want it to be useable when removed from the bow.
|
||||
visible_message("[src] shatters into a scattering of overstressed metal shards as it leaves the crossbow.")
|
||||
qdel(src)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/obj/item/weapon/gun/throw/piecannon
|
||||
/obj/item/gun/throw/piecannon
|
||||
name = "pie cannon"
|
||||
desc = "A projectile weapon that fires pies."
|
||||
icon_state = "piecannon"
|
||||
@@ -8,29 +8,29 @@
|
||||
force = 5
|
||||
|
||||
clumsy_check = 0
|
||||
valid_projectile_type = /obj/item/weapon/reagent_containers/food/snacks/pie
|
||||
valid_projectile_type = /obj/item/reagent_containers/food/snacks/pie
|
||||
max_capacity = 5
|
||||
projectile_speed = 2
|
||||
projectile_range = 30
|
||||
|
||||
|
||||
/obj/item/weapon/gun/throw/piecannon/New()
|
||||
/obj/item/gun/throw/piecannon/New()
|
||||
..()
|
||||
for(var/i in 1 to max_capacity)
|
||||
var/obj/item/weapon/reagent_containers/food/snacks/pie/P = new /obj/item/weapon/reagent_containers/food/snacks/pie(src)
|
||||
var/obj/item/reagent_containers/food/snacks/pie/P = new /obj/item/reagent_containers/food/snacks/pie(src)
|
||||
loaded_projectiles += P
|
||||
process_chamber()
|
||||
|
||||
/obj/item/weapon/gun/throw/piecannon/notify_ammo_count(mob/user)
|
||||
/obj/item/gun/throw/piecannon/notify_ammo_count(mob/user)
|
||||
to_chat(user, "<span class='notice'>[src] has [get_ammocount()] of [max_capacity] pies left.")
|
||||
|
||||
/obj/item/weapon/gun/throw/piecannon/update_icon()
|
||||
/obj/item/gun/throw/piecannon/update_icon()
|
||||
if(to_launch)
|
||||
icon_state = "piecannon1"
|
||||
else
|
||||
icon_state = "piecannon0"
|
||||
item_state = icon_state
|
||||
|
||||
/obj/item/weapon/gun/throw/piecannon/process_chamber()
|
||||
/obj/item/gun/throw/piecannon/process_chamber()
|
||||
..()
|
||||
update_icon()
|
||||
|
||||
@@ -281,7 +281,7 @@ proc/wabbajack(mob/living/M)
|
||||
qdel(src)
|
||||
else
|
||||
var/obj/O = change
|
||||
if(istype(O, /obj/item/weapon/gun))
|
||||
if(istype(O, /obj/item/gun))
|
||||
new /mob/living/simple_animal/hostile/mimic/copy/ranged(O.loc, O, firer)
|
||||
else
|
||||
new /mob/living/simple_animal/hostile/mimic/copy(O.loc, O, firer)
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
icon_state = "foamdart"
|
||||
ammo_type = /obj/item/ammo_casing/caseless/foam_dart
|
||||
range = 10
|
||||
var/obj/item/weapon/pen/pen = null
|
||||
var/obj/item/pen/pen = null
|
||||
log_override = TRUE//it won't log even when there's a pen inside, but since the damage will be so low, I don't think there's any point in making it any more complex
|
||||
|
||||
/obj/item/projectile/bullet/reusable/foam_dart/handle_drop()
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
icon_state = "spark"
|
||||
hitsound = "sparks"
|
||||
damage = 0
|
||||
var/obj/item/weapon/gun/energy/wormhole_projector/gun
|
||||
var/obj/item/gun/energy/wormhole_projector/gun
|
||||
color = "#33CCFF"
|
||||
nodamage = TRUE
|
||||
|
||||
@@ -332,7 +332,7 @@
|
||||
nodamage = 1
|
||||
damage_type = BURN
|
||||
flag = "melee"
|
||||
var/obj/item/weapon/gun/stored_gun
|
||||
var/obj/item/gun/stored_gun
|
||||
|
||||
/obj/item/projectile/mimic/New(loc, mimic_type)
|
||||
..(loc)
|
||||
@@ -346,7 +346,7 @@
|
||||
/obj/item/projectile/mimic/on_hit(atom/target)
|
||||
..()
|
||||
var/turf/T = get_turf(src)
|
||||
var/obj/item/weapon/gun/G = stored_gun
|
||||
var/obj/item/gun/G = stored_gun
|
||||
stored_gun = null
|
||||
G.forceMove(T)
|
||||
var/mob/living/simple_animal/hostile/mimic/copy/ranged/R = new /mob/living/simple_animal/hostile/mimic/copy/ranged(T, G, firer)
|
||||
|
||||
Reference in New Issue
Block a user