mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-30 16:47:13 +01:00
Merge pull request #2197 from sirbayer/srsbsns-deadlyboolets
Gun Revamp 2: Gun Harder: Director's Cut
This commit is contained in:
@@ -32,7 +32,6 @@ var/global/list/autolathe_recipes = list( \
|
|||||||
new /obj/item/weapon/hemostat(),\
|
new /obj/item/weapon/hemostat(),\
|
||||||
new /obj/item/weapon/reagent_containers/glass/beaker(), \
|
new /obj/item/weapon/reagent_containers/glass/beaker(), \
|
||||||
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
|
new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
|
||||||
new /obj/item/ammo_casing/shotgun/blank(), \
|
|
||||||
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
new /obj/item/ammo_casing/shotgun/beanbag(), \
|
||||||
new /obj/item/ammo_box/c38(), \
|
new /obj/item/ammo_box/c38(), \
|
||||||
new /obj/item/device/taperecorder/empty(), \
|
new /obj/item/device/taperecorder/empty(), \
|
||||||
@@ -57,6 +56,7 @@ var/global/list/autolathe_recipes_hidden = list( \
|
|||||||
new /obj/item/weapon/handcuffs(), \
|
new /obj/item/weapon/handcuffs(), \
|
||||||
new /obj/item/ammo_box/a357(), \
|
new /obj/item/ammo_box/a357(), \
|
||||||
new /obj/item/ammo_casing/shotgun(), \
|
new /obj/item/ammo_casing/shotgun(), \
|
||||||
|
new /obj/item/ammo_casing/shotgun/buckshot(), \
|
||||||
new /obj/item/ammo_casing/shotgun/dart(), \
|
new /obj/item/ammo_casing/shotgun/dart(), \
|
||||||
/* new /obj/item/weapon/shield/riot(), */ \
|
/* new /obj/item/weapon/shield/riot(), */ \
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -67,7 +67,8 @@
|
|||||||
sound = 1
|
sound = 1
|
||||||
else
|
else
|
||||||
var/obj/item/weapon/gun/energy/E=new installation //All energy-based weapons are applicable
|
var/obj/item/weapon/gun/energy/E=new installation //All energy-based weapons are applicable
|
||||||
projectile = E.projectile_type
|
var/obj/item/ammo_casing/shottype = E.ammo_type[1]
|
||||||
|
projectile = shottype.projectile_type
|
||||||
eprojectile = projectile
|
eprojectile = projectile
|
||||||
|
|
||||||
switch(E.type)
|
switch(E.type)
|
||||||
|
|||||||
@@ -277,7 +277,9 @@
|
|||||||
O:icon_state = "flash"
|
O:icon_state = "flash"
|
||||||
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
|
if(istype(O,/obj/item/weapon/gun/energy/taser/cyborg))
|
||||||
if(O:power_supply.charge < O:power_supply.maxcharge)
|
if(O:power_supply.charge < O:power_supply.maxcharge)
|
||||||
O:power_supply.give(O:charge_cost * coeff)
|
var/obj/item/weapon/gun/energy/G = O
|
||||||
|
var/obj/item/ammo_casing/energy/S = G.ammo_type[G.select]
|
||||||
|
O:power_supply.give(S.e_cost * coeff)
|
||||||
O:update_icon()
|
O:update_icon()
|
||||||
else
|
else
|
||||||
O:charge_tick = 0
|
O:charge_tick = 0
|
||||||
|
|||||||
@@ -145,7 +145,7 @@
|
|||||||
new /obj/item/weapon/dnainjector/m2h(src)
|
new /obj/item/weapon/dnainjector/m2h(src)
|
||||||
new /obj/item/weapon/dnainjector/m2h(src)
|
new /obj/item/weapon/dnainjector/m2h(src)
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/blanks
|
/*/obj/item/weapon/storage/box/blanks //Blanks removed, go home
|
||||||
name = "box of blank shells"
|
name = "box of blank shells"
|
||||||
desc = "It has a picture of a gun and several warning symbols on the front."
|
desc = "It has a picture of a gun and several warning symbols on the front."
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@
|
|||||||
new /obj/item/ammo_casing/shotgun/blank(src)
|
new /obj/item/ammo_casing/shotgun/blank(src)
|
||||||
new /obj/item/ammo_casing/shotgun/blank(src)
|
new /obj/item/ammo_casing/shotgun/blank(src)
|
||||||
new /obj/item/ammo_casing/shotgun/blank(src)
|
new /obj/item/ammo_casing/shotgun/blank(src)
|
||||||
new /obj/item/ammo_casing/shotgun/blank(src)
|
new /obj/item/ammo_casing/shotgun/blank(src)*/
|
||||||
|
|
||||||
/obj/item/weapon/storage/box/flashbangs
|
/obj/item/weapon/storage/box/flashbangs
|
||||||
name = "box of flashbangs (WARNING)"
|
name = "box of flashbangs (WARNING)"
|
||||||
|
|||||||
@@ -10,6 +10,8 @@
|
|||||||
var/caliber = null //Which kind of guns it can be loaded into
|
var/caliber = null //Which kind of guns it can be loaded into
|
||||||
var/projectile_type = null //The bullet type to create when New() is called
|
var/projectile_type = null //The bullet type to create when New() is called
|
||||||
var/obj/item/projectile/BB = null //The loaded bullet
|
var/obj/item/projectile/BB = null //The loaded bullet
|
||||||
|
var/pellets = 0 //Pellets for spreadshot
|
||||||
|
var/variance = 0 //Variance for inaccuracy fundamental to the casing
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/New()
|
/obj/item/ammo_casing/New()
|
||||||
@@ -26,12 +28,17 @@
|
|||||||
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
icon_state = "[initial(icon_state)][BB ? "-live" : ""]"
|
||||||
desc = "[initial(desc)][BB ? "" : " This one is spent"]"
|
desc = "[initial(desc)][BB ? "" : " This one is spent"]"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/proc/newshot() //For energy weapons and shotgun shells.
|
||||||
|
if (!BB)
|
||||||
|
BB = new projectile_type(src)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//Boxes of ammo
|
//Boxes of ammo
|
||||||
/obj/item/ammo_box
|
/obj/item/ammo_box
|
||||||
name = "ammo box (.357)"
|
name = "ammo box (null_reference_exception)"
|
||||||
desc = "A box of ammo"
|
desc = "A box of ammo."
|
||||||
icon_state = "357"
|
icon_state = "357"
|
||||||
icon = 'icons/obj/ammo.dmi'
|
icon = 'icons/obj/ammo.dmi'
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
@@ -47,6 +54,7 @@
|
|||||||
var/max_ammo = 7
|
var/max_ammo = 7
|
||||||
var/multiple_sprites = 0
|
var/multiple_sprites = 0
|
||||||
var/caliber
|
var/caliber
|
||||||
|
var/multiload = 1
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_box/New()
|
/obj/item/ammo_box/New()
|
||||||
@@ -73,15 +81,16 @@
|
|||||||
return 1
|
return 1
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
/obj/item/ammo_box/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/ammo_box/attackby(var/obj/item/A as obj, mob/user as mob, var/silent = 0)
|
||||||
var/num_loaded = 0
|
var/num_loaded = 0
|
||||||
if(istype(A, /obj/item/ammo_box))
|
if(istype(A, /obj/item/ammo_box))
|
||||||
var/obj/item/ammo_box/AM = A
|
var/obj/item/ammo_box/AM = A
|
||||||
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
||||||
if(give_round(AC))
|
var/did_load = give_round(AC)
|
||||||
|
if(did_load)
|
||||||
AM.stored_ammo -= AC
|
AM.stored_ammo -= AC
|
||||||
num_loaded++
|
num_loaded++
|
||||||
else
|
if(!did_load || !multiload)
|
||||||
break
|
break
|
||||||
if(istype(A, /obj/item/ammo_casing))
|
if(istype(A, /obj/item/ammo_casing))
|
||||||
var/obj/item/ammo_casing/AC = A
|
var/obj/item/ammo_casing/AC = A
|
||||||
@@ -90,9 +99,12 @@
|
|||||||
AC.loc = src
|
AC.loc = src
|
||||||
num_loaded++
|
num_loaded++
|
||||||
if(num_loaded)
|
if(num_loaded)
|
||||||
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
|
if (!silent)
|
||||||
|
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
|
||||||
A.update_icon()
|
A.update_icon()
|
||||||
update_icon()
|
update_icon()
|
||||||
|
return num_loaded
|
||||||
|
return 0
|
||||||
|
|
||||||
/obj/item/ammo_box/update_icon()
|
/obj/item/ammo_box/update_icon()
|
||||||
switch(multiple_sprites)
|
switch(multiple_sprites)
|
||||||
@@ -100,7 +112,7 @@
|
|||||||
icon_state = "[initial(icon_state)]-[stored_ammo.len]"
|
icon_state = "[initial(icon_state)]-[stored_ammo.len]"
|
||||||
if(2)
|
if(2)
|
||||||
icon_state = "[initial(icon_state)]-[stored_ammo.len ? "[max_ammo]" : "0"]"
|
icon_state = "[initial(icon_state)]-[stored_ammo.len ? "[max_ammo]" : "0"]"
|
||||||
desc = "There are [stored_ammo.len] shell\s left!"
|
desc = "[initial(desc)] There are [stored_ammo.len] shell\s left!"
|
||||||
|
|
||||||
//Behavior for magazines
|
//Behavior for magazines
|
||||||
/obj/item/ammo_box/magazine/proc/ammo_count()
|
/obj/item/ammo_box/magazine/proc/ammo_count()
|
||||||
|
|||||||
@@ -14,12 +14,6 @@
|
|||||||
projectile_type = /obj/item/projectile/bullet/suffocationbullet
|
projectile_type = /obj/item/projectile/bullet/suffocationbullet
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/a75
|
|
||||||
desc = "A .75 bullet casing."
|
|
||||||
caliber = "75"
|
|
||||||
projectile_type = /obj/item/projectile/bullet/gyro
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/a666
|
/obj/item/ammo_casing/a666
|
||||||
desc = "A .666 bullet casing."
|
desc = "A .666 bullet casing."
|
||||||
caliber = "357"
|
caliber = "357"
|
||||||
@@ -57,20 +51,21 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun
|
/obj/item/ammo_casing/shotgun
|
||||||
name = "shotgun shell"
|
name = "shotgun slug"
|
||||||
desc = "A 12 gauge shell."
|
desc = "A 12 gauge slug."
|
||||||
icon_state = "gshell"
|
icon_state = "blshell"
|
||||||
caliber = "shotgun"
|
caliber = "shotgun"
|
||||||
projectile_type = /obj/item/projectile/bullet
|
projectile_type = /obj/item/projectile/bullet
|
||||||
m_amt = 12500
|
m_amt = 12500
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun/blank
|
/obj/item/ammo_casing/shotgun/buckshot
|
||||||
name = "shotgun shell"
|
name = "shotgun shell"
|
||||||
desc = "A blank shell."
|
desc = "A 12 gauge shell."
|
||||||
icon_state = "blshell"
|
icon_state = "gshell"
|
||||||
projectile_type = null
|
projectile_type = /obj/item/projectile/bullet/pellet
|
||||||
m_amt = 250
|
pellets = 5
|
||||||
|
variance = 0.8
|
||||||
|
|
||||||
|
|
||||||
/obj/item/ammo_casing/shotgun/beanbag
|
/obj/item/ammo_casing/shotgun/beanbag
|
||||||
@@ -106,6 +101,24 @@
|
|||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/ammo_casing/a762
|
/obj/item/ammo_casing/a762
|
||||||
desc = "A 7.62 bullet casing."
|
desc = "A 7.62mm bullet casing."
|
||||||
caliber = "a762"
|
caliber = "a762"
|
||||||
projectile_type = /obj/item/projectile/bullet
|
projectile_type = /obj/item/projectile/bullet
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/caseless
|
||||||
|
desc = "A caseless bullet casing."
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/caseless/fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, params, var/distro, var/quiet)
|
||||||
|
if (..())
|
||||||
|
loc = null
|
||||||
|
return 1
|
||||||
|
else
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/caseless/a75
|
||||||
|
desc = "A .75 bullet casing."
|
||||||
|
caliber = "75"
|
||||||
|
projectile_type = /obj/item/projectile/bullet/gyro
|
||||||
|
|||||||
@@ -0,0 +1,106 @@
|
|||||||
|
/obj/item/ammo_casing/energy
|
||||||
|
name = "energy weapon lens"
|
||||||
|
desc = "The part of the gun that makes the laser go pew"
|
||||||
|
caliber = "energy"
|
||||||
|
projectile_type = /obj/item/projectile/energy
|
||||||
|
var/e_cost = 100 //The amount of energy a cell needs to expend to create this shot.
|
||||||
|
var/select_name = "energy"
|
||||||
|
var/mod_name = null
|
||||||
|
var/fire_sound = 'sound/weapons/Laser.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser
|
||||||
|
projectile_type = /obj/item/projectile/beam
|
||||||
|
select_name = "kill"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser/practice
|
||||||
|
projectile_type = /obj/item/projectile/practice
|
||||||
|
select_name = "practice"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser/scatter
|
||||||
|
projectile_type = /obj/item/projectile/beam/scatter
|
||||||
|
pellets = 5
|
||||||
|
variance = 0.8
|
||||||
|
select_name = "scatter"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser/heavy
|
||||||
|
projectile_type = /obj/item/projectile/beam/heavylaser
|
||||||
|
select_name = "anti-vehicle"
|
||||||
|
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser/pulse
|
||||||
|
projectile_type = /obj/item/projectile/beam/pulse
|
||||||
|
e_cost = 200
|
||||||
|
select_name = "DESTROY"
|
||||||
|
fire_sound = 'sound/weapons/pulse.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser/bluetag
|
||||||
|
projectile_type = /obj/item/projectile/bluetag
|
||||||
|
select_name = "bluetag"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/laser/redtag
|
||||||
|
projectile_type = /obj/item/projectile/redtag
|
||||||
|
select_name = "redtag"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/bolt
|
||||||
|
projectile_type = /obj/item/projectile/energy/bolt
|
||||||
|
select_name = "bolt"
|
||||||
|
fire_sound = 'sound/weapons/Genhit.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/bolt/large
|
||||||
|
projectile_type = /obj/item/projectile/energy/bolt/large
|
||||||
|
select_name = "heavy bolt"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/xray
|
||||||
|
projectile_type = /obj/item/projectile/beam/xray
|
||||||
|
e_cost = 50
|
||||||
|
fire_sound = 'sound/weapons/laser3.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/electrode
|
||||||
|
projectile_type = /obj/item/projectile/energy/electrode
|
||||||
|
select_name = "stun"
|
||||||
|
fire_sound = 'sound/weapons/taser.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/electrode/gun
|
||||||
|
fire_sound = 'sound/weapons/gunshot.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/ion
|
||||||
|
projectile_type = /obj/item/projectile/ion
|
||||||
|
select_name = "ion"
|
||||||
|
fire_sound = 'sound/weapons/Laser.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/declone
|
||||||
|
projectile_type = /obj/item/projectile/energy/declone
|
||||||
|
select_name = "declone"
|
||||||
|
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/mindflayer
|
||||||
|
projectile_type = /obj/item/projectile/beam/mindflayer
|
||||||
|
select_name = "MINDFUCK"
|
||||||
|
fire_sound = 'sound/weapons/Laser.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/flora
|
||||||
|
fire_sound = 'sound/effects/stealthoff.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/flora/yield
|
||||||
|
projectile_type = /obj/item/projectile/energy/florayield
|
||||||
|
select_name = "increase yield"
|
||||||
|
mod_name = "yield"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/flora/mut
|
||||||
|
projectile_type = /obj/item/projectile/energy/floramut
|
||||||
|
select_name = "induce mutations"
|
||||||
|
mod_name = "mut"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/temp
|
||||||
|
projectile_type = /obj/item/projectile/temp
|
||||||
|
select_name = "freeze"
|
||||||
|
e_cost = 250
|
||||||
|
fire_sound = 'sound/weapons/pulse3.ogg'
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/temp/hot
|
||||||
|
projectile_type = /obj/item/projectile/temp/hot
|
||||||
|
select_name = "bake"
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/energy/meteor
|
||||||
|
projectile_type = /obj/item/projectile/meteor
|
||||||
|
select_name = "goddamn meteor"
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
boolets++
|
boolets++
|
||||||
return boolets
|
return boolets
|
||||||
else
|
else
|
||||||
return stored_ammo.len
|
return ..()
|
||||||
|
|
||||||
/obj/item/ammo_box/magazine/internal/cylinder/rus357
|
/obj/item/ammo_box/magazine/internal/cylinder/rus357
|
||||||
name = "russian revolver cylinder"
|
name = "russian revolver cylinder"
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
ammo_type = /obj/item/ammo_casing/a357
|
ammo_type = /obj/item/ammo_casing/a357
|
||||||
caliber = "357"
|
caliber = "357"
|
||||||
max_ammo = 6
|
max_ammo = 6
|
||||||
|
multiload = 0
|
||||||
|
|
||||||
/obj/item/ammo_box/magazine/internal/cylinder/rus357/New()
|
/obj/item/ammo_box/magazine/internal/cylinder/rus357/New()
|
||||||
stored_ammo += new ammo_type(src)
|
stored_ammo += new ammo_type(src)
|
||||||
@@ -40,13 +41,15 @@
|
|||||||
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
|
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
|
||||||
caliber = "shotgun"
|
caliber = "shotgun"
|
||||||
max_ammo = 4
|
max_ammo = 4
|
||||||
|
multiload = 0
|
||||||
|
|
||||||
/obj/item/ammo_box/magazine/internal/shotcom
|
/obj/item/ammo_box/magazine/internal/shotcom
|
||||||
name = "combat shotgun internal magazine"
|
name = "combat shotgun internal magazine"
|
||||||
desc = "Oh god, this shouldn't be here"
|
desc = "Oh god, this shouldn't be here"
|
||||||
ammo_type = /obj/item/ammo_casing/shotgun
|
ammo_type = /obj/item/ammo_casing/shotgun/buckshot
|
||||||
caliber = "shotgun"
|
caliber = "shotgun"
|
||||||
max_ammo = 8
|
max_ammo = 8
|
||||||
|
multiload = 0
|
||||||
|
|
||||||
/obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
/obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
||||||
name = "double-barrel shotgun internal magazine"
|
name = "double-barrel shotgun internal magazine"
|
||||||
@@ -54,6 +57,7 @@
|
|||||||
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
|
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
|
||||||
caliber = "shotgun"
|
caliber = "shotgun"
|
||||||
max_ammo = 2
|
max_ammo = 2
|
||||||
|
multiload = 0
|
||||||
|
|
||||||
///////////EXTERNAL MAGAZINES////////////////
|
///////////EXTERNAL MAGAZINES////////////////
|
||||||
/obj/item/ammo_box/magazine/m9mm
|
/obj/item/ammo_box/magazine/m9mm
|
||||||
@@ -131,7 +135,7 @@
|
|||||||
/obj/item/ammo_box/magazine/m75
|
/obj/item/ammo_box/magazine/m75
|
||||||
name = "magazine (.75)"
|
name = "magazine (.75)"
|
||||||
icon_state = "75"
|
icon_state = "75"
|
||||||
ammo_type = /obj/item/ammo_casing/a75
|
ammo_type = /obj/item/ammo_casing/caseless/a75
|
||||||
caliber = "75"
|
caliber = "75"
|
||||||
multiple_sprites = 2
|
multiple_sprites = 2
|
||||||
max_ammo = 8
|
max_ammo = 8
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
/obj/item/ammo_casing/magic
|
||||||
|
name = "magic casing"
|
||||||
|
desc = "I didn't even know magic needed ammo..."
|
||||||
|
projectile_type = /obj/item/projectile/magic
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/change
|
||||||
|
projectile_type = /obj/item/projectile/magic/change
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/animate
|
||||||
|
projectile_type = /obj/item/projectile/magic/animate
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/heal
|
||||||
|
projectile_type = /obj/item/projectile/magic/resurrection
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/death
|
||||||
|
projectile_type = /obj/item/projectile/magic/death
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/teleport
|
||||||
|
projectile_type = /obj/item/projectile/magic/teleport
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/door
|
||||||
|
projectile_type = /obj/item/projectile/magic/door
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/magic/fireball
|
||||||
|
projectile_type = /obj/item/projectile/magic/fireball
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/syringegun
|
||||||
|
name = "syringe gun spring"
|
||||||
|
desc = "A high-power spring that throws syringes."
|
||||||
|
projectile_type = null
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/obj/item/ammo_casing/proc/fire(atom/target as mob|obj|turf, mob/living/user as mob|obj, params, var/distro, var/quiet)
|
||||||
|
distro += variance
|
||||||
|
for (var/i = max(1, pellets), i > 0, i--)
|
||||||
|
var/curloc = user.loc
|
||||||
|
var/targloc = get_turf(target)
|
||||||
|
ready_proj(target, user, quiet)
|
||||||
|
if(distro)
|
||||||
|
targloc = spread(targloc, curloc, distro)
|
||||||
|
if(!throw_proj(targloc, user, params))
|
||||||
|
return 0
|
||||||
|
if(i > 1)
|
||||||
|
newshot()
|
||||||
|
user.next_move = world.time + 4
|
||||||
|
update_icon()
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/proc/ready_proj(atom/target as mob|obj|turf, mob/living/user, var/quiet)
|
||||||
|
if (!BB)
|
||||||
|
return
|
||||||
|
BB.original = target
|
||||||
|
BB.firer = user
|
||||||
|
BB.def_zone = user.zone_sel.selecting
|
||||||
|
BB.silenced = quiet
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/proc/throw_proj(var/turf/targloc, mob/living/user as mob|obj, params)
|
||||||
|
var/turf/curloc = user.loc
|
||||||
|
if (!istype(targloc) || !istype(curloc) || !BB)
|
||||||
|
return 0
|
||||||
|
if(targloc == curloc) //Fire the projectile
|
||||||
|
user.bullet_act(BB)
|
||||||
|
del(BB)
|
||||||
|
return 1
|
||||||
|
BB.loc = get_turf(user)
|
||||||
|
BB.starting = get_turf(user)
|
||||||
|
BB.current = curloc
|
||||||
|
BB.yo = targloc.y - curloc.y
|
||||||
|
BB.xo = targloc.x - curloc.x
|
||||||
|
|
||||||
|
if(params)
|
||||||
|
var/list/mouse_control = params2list(params)
|
||||||
|
if(mouse_control["icon-x"])
|
||||||
|
BB.p_x = text2num(mouse_control["icon-x"])
|
||||||
|
if(mouse_control["icon-y"])
|
||||||
|
BB.p_y = text2num(mouse_control["icon-y"])
|
||||||
|
|
||||||
|
if(BB)
|
||||||
|
BB.process()
|
||||||
|
BB = null
|
||||||
|
return 1
|
||||||
|
|
||||||
|
/obj/item/ammo_casing/proc/spread(var/turf/target, var/turf/current, var/distro)
|
||||||
|
var/dx = abs(target.x - current.x)
|
||||||
|
var/dy = abs(target.y - current.y)
|
||||||
|
return locate(target.x + round(gaussian(0, distro) * (dy+2)/8, 1), target.y + round(gaussian(0, distro) * (dx+2)/8, 1), target.z)
|
||||||
|
|
||||||
|
// gaussian(0, distro)
|
||||||
@@ -16,26 +16,32 @@
|
|||||||
attack_verb = list("struck", "hit", "bashed")
|
attack_verb = list("struck", "hit", "bashed")
|
||||||
|
|
||||||
var/fire_sound = "gunshot"
|
var/fire_sound = "gunshot"
|
||||||
var/obj/item/projectile/in_chamber = null
|
|
||||||
var/silenced = 0
|
var/silenced = 0
|
||||||
var/recoil = 0
|
var/recoil = 0
|
||||||
var/clumsy_check = 1
|
var/clumsy_check = 1
|
||||||
|
var/obj/item/ammo_casing/chambered = null
|
||||||
|
|
||||||
proc/process_chambered()
|
proc/process_chamber()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
|
proc/special_check(var/mob/M) //Placeholder for any special checks, like detective's revolver.
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
proc/prepare_shot(var/obj/item/projectile/proj) //Transfer properties from the gun to the bullet
|
|
||||||
proj.shot_from = src
|
|
||||||
proj.silenced = silenced
|
|
||||||
return
|
|
||||||
|
|
||||||
proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
proc/shoot_with_empty_chamber(mob/living/user as mob|obj)
|
||||||
user << "<span class='warning'>*click*</span>"
|
user << "<span class='warning'>*click*</span>"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
proc/shoot_live_shot(mob/living/user as mob|obj)
|
||||||
|
if(recoil)
|
||||||
|
spawn()
|
||||||
|
shake_camera(user, recoil + 1, recoil)
|
||||||
|
|
||||||
|
if(silenced)
|
||||||
|
playsound(user, fire_sound, 10, 1)
|
||||||
|
else
|
||||||
|
playsound(user, fire_sound, 50, 1)
|
||||||
|
user.visible_message("<span class='danger'>[user] fires [src]!</span>", "<span class='danger'>You fire [src]!</span>", "You hear a [istype(src, /obj/item/weapon/gun/energy) ? "laser blast" : "gunshot"]!")
|
||||||
|
|
||||||
emp_act(severity)
|
emp_act(severity)
|
||||||
for(var/obj/O in contents)
|
for(var/obj/O in contents)
|
||||||
O.emp_act(severity)
|
O.emp_act(severity)
|
||||||
@@ -71,63 +77,16 @@
|
|||||||
|
|
||||||
add_fingerprint(user)
|
add_fingerprint(user)
|
||||||
|
|
||||||
var/turf/curloc = user.loc
|
|
||||||
var/turf/targloc = get_turf(target)
|
|
||||||
if (!istype(targloc) || !istype(curloc))
|
|
||||||
return
|
|
||||||
|
|
||||||
if(!special_check(user))
|
if(!special_check(user))
|
||||||
return
|
return
|
||||||
if(!process_chambered())
|
if(chambered)
|
||||||
shoot_with_empty_chamber(user)
|
if(!chambered.fire(target, user, params, , silenced))
|
||||||
|
shoot_with_empty_chamber(user)
|
||||||
if(!in_chamber)
|
else
|
||||||
return
|
shoot_live_shot(user)
|
||||||
|
|
||||||
in_chamber.firer = user
|
|
||||||
in_chamber.def_zone = user.zone_sel.selecting
|
|
||||||
|
|
||||||
|
|
||||||
if(recoil)
|
|
||||||
spawn()
|
|
||||||
shake_camera(user, recoil + 1, recoil)
|
|
||||||
|
|
||||||
if(silenced)
|
|
||||||
playsound(user, fire_sound, 10, 1)
|
|
||||||
else
|
else
|
||||||
playsound(user, fire_sound, 50, 1)
|
shoot_with_empty_chamber(user)
|
||||||
user.visible_message("<span class='danger'>[user] fires [src]!</span>", "<span class='danger'>You fire [src]!</span>", "You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
process_chamber()
|
||||||
|
|
||||||
prepare_shot(in_chamber) //Set the projectile's properties
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(targloc == curloc) //Fire the projectile
|
|
||||||
user.bullet_act(in_chamber)
|
|
||||||
del(in_chamber)
|
|
||||||
update_icon()
|
|
||||||
return
|
|
||||||
in_chamber.original = target
|
|
||||||
in_chamber.loc = get_turf(user)
|
|
||||||
in_chamber.starting = get_turf(user)
|
|
||||||
in_chamber.current = curloc
|
|
||||||
in_chamber.yo = targloc.y - curloc.y
|
|
||||||
in_chamber.xo = targloc.x - curloc.x
|
|
||||||
user.next_move = world.time + 4
|
|
||||||
|
|
||||||
if(params)
|
|
||||||
var/list/mouse_control = params2list(params)
|
|
||||||
if(mouse_control["icon-x"])
|
|
||||||
in_chamber.p_x = text2num(mouse_control["icon-x"])
|
|
||||||
if(mouse_control["icon-y"])
|
|
||||||
in_chamber.p_y = text2num(mouse_control["icon-y"])
|
|
||||||
|
|
||||||
spawn()
|
|
||||||
if(in_chamber)
|
|
||||||
in_chamber.process()
|
|
||||||
sleep(1)
|
|
||||||
in_chamber = null
|
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
if(user.hand)
|
if(user.hand)
|
||||||
|
|||||||
@@ -2,43 +2,74 @@
|
|||||||
icon_state = "energy"
|
icon_state = "energy"
|
||||||
name = "energy gun"
|
name = "energy gun"
|
||||||
desc = "A basic energy-based gun."
|
desc = "A basic energy-based gun."
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
|
||||||
|
|
||||||
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
var/obj/item/weapon/cell/power_supply //What type of power cell this uses
|
||||||
var/charge_cost = 100 //How much energy is needed to fire.
|
var/cell_type = /obj/item/weapon/cell
|
||||||
var/cell_type = "/obj/item/weapon/cell"
|
var/modifystate = 0
|
||||||
var/projectile_type = "/obj/item/projectile/energy"
|
var/list/ammo_type = list(/obj/item/ammo_casing/energy)
|
||||||
var/modifystate
|
var/select = 1 //The state of the select fire switch. Determines from the ammo_type list what kind of shot is fired next.
|
||||||
|
|
||||||
emp_act(severity)
|
|
||||||
power_supply.use(round(power_supply.maxcharge / severity))
|
|
||||||
update_icon()
|
|
||||||
..()
|
|
||||||
|
|
||||||
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
if(cell_type)
|
|
||||||
power_supply = new cell_type(src)
|
|
||||||
else
|
|
||||||
power_supply = new(src)
|
|
||||||
power_supply.give(power_supply.maxcharge)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
process_chambered()
|
|
||||||
if(in_chamber) return 1
|
|
||||||
if(!power_supply) return 0
|
|
||||||
if(!power_supply.use(charge_cost)) return 0
|
|
||||||
if(!projectile_type) return 0
|
|
||||||
in_chamber = new projectile_type(src)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/emp_act(severity)
|
||||||
|
power_supply.use(round(power_supply.maxcharge / severity))
|
||||||
update_icon()
|
update_icon()
|
||||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
..()
|
||||||
ratio = round(ratio, 0.25) * 100
|
|
||||||
if(modifystate)
|
|
||||||
icon_state = "[modifystate][ratio]"
|
/obj/item/weapon/gun/energy/New()
|
||||||
else
|
..()
|
||||||
|
if(cell_type)
|
||||||
|
power_supply = new cell_type(src)
|
||||||
|
else
|
||||||
|
power_supply = new(src)
|
||||||
|
power_supply.give(power_supply.maxcharge)
|
||||||
|
var/obj/item/ammo_casing/energy/shot
|
||||||
|
for (var/i = 1, i <= ammo_type.len, i++)
|
||||||
|
var/shottype = ammo_type[i]
|
||||||
|
shot = new shottype(src)
|
||||||
|
ammo_type[i] = shot
|
||||||
|
shot = ammo_type[select]
|
||||||
|
fire_sound = shot.fire_sound
|
||||||
|
update_icon()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
|
||||||
|
newshot()
|
||||||
|
..()
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/proc/newshot()
|
||||||
|
if (!ammo_type || !power_supply) return
|
||||||
|
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||||
|
if (!power_supply.use(shot.e_cost)) return
|
||||||
|
chambered = shot
|
||||||
|
chambered.newshot()
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/process_chamber()
|
||||||
|
chambered = null
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/proc/select_fire(mob/living/user as mob)
|
||||||
|
select++
|
||||||
|
if (select > ammo_type.len)
|
||||||
|
select = 1
|
||||||
|
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||||
|
fire_sound = shot.fire_sound
|
||||||
|
if (shot.select_name)
|
||||||
|
user << "\red [src] is now set to [shot.select_name]."
|
||||||
|
update_icon()
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/energy/update_icon()
|
||||||
|
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||||
|
ratio = Ceiling(ratio*4) * 25
|
||||||
|
var/obj/item/ammo_casing/energy/shot = ammo_type[select]
|
||||||
|
switch(modifystate)
|
||||||
|
if (0)
|
||||||
icon_state = "[initial(icon_state)][ratio]"
|
icon_state = "[initial(icon_state)][ratio]"
|
||||||
|
if (1)
|
||||||
|
icon_state = "[initial(icon_state)][shot.mod_name][ratio]"
|
||||||
|
if (2)
|
||||||
|
icon_state = "[initial(icon_state)][shot.select_name][ratio]"
|
||||||
|
return
|
||||||
@@ -3,16 +3,16 @@
|
|||||||
desc = "a basic weapon designed kill with concentrated energy bolts"
|
desc = "a basic weapon designed kill with concentrated energy bolts"
|
||||||
icon_state = "laser"
|
icon_state = "laser"
|
||||||
item_state = "laser"
|
item_state = "laser"
|
||||||
fire_sound = 'sound/weapons/Laser.ogg'
|
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
m_amt = 2000
|
m_amt = 2000
|
||||||
origin_tech = "combat=3;magnets=2"
|
origin_tech = "combat=3;magnets=2"
|
||||||
projectile_type = "/obj/item/projectile/beam"
|
ammo_type = list(/obj/item/ammo_casing/energy/laser)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/laser/practice
|
/obj/item/weapon/gun/energy/laser/practice
|
||||||
name = "practice laser gun"
|
name = "practice laser gun"
|
||||||
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
desc = "A modified version of the basic laser gun, this one fires less concentrated energy bolts designed for target practice."
|
||||||
projectile_type = "/obj/item/projectile/practice"
|
ammo_type = list(/obj/item/ammo_casing/energy/laser/practice)
|
||||||
clumsy_check = 0
|
clumsy_check = 0
|
||||||
|
|
||||||
obj/item/weapon/gun/energy/laser/retro
|
obj/item/weapon/gun/energy/laser/retro
|
||||||
@@ -50,36 +50,41 @@ obj/item/weapon/gun/energy/laser/retro
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/laser/cyborg/process_chambered()
|
/obj/item/weapon/gun/energy/laser/cyborg/newshot()
|
||||||
if(in_chamber)
|
|
||||||
return 1
|
|
||||||
if(isrobot(src.loc))
|
if(isrobot(src.loc))
|
||||||
var/mob/living/silicon/robot/R = src.loc
|
var/mob/living/silicon/robot/R = src.loc
|
||||||
if(R && R.cell)
|
if(R && R.cell)
|
||||||
R.cell.use(100)
|
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||||
in_chamber = new/obj/item/projectile/beam(src)
|
if(R.cell.use(shot.e_cost))
|
||||||
return 1
|
chambered = shot
|
||||||
return 0
|
chambered.newshot()
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/weapon/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, /obj/item/ammo_casing/energy/laser/scatter)
|
||||||
|
|
||||||
|
attack_self(mob/living/user as mob)
|
||||||
|
select_fire(user)
|
||||||
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/lasercannon
|
/obj/item/weapon/gun/energy/lasercannon
|
||||||
name = "laser cannon"
|
name = "laser cannon"
|
||||||
desc = "With the L.A.S.E.R. cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
|
desc = "With the L.A.S.E.R. cannon, the lasing medium is enclosed in a tube lined with uranium-235 and subjected to high neutron flux in a nuclear reactor core. This incredible technology may help YOU achieve high excitation rates with small laser volumes!"
|
||||||
icon_state = "lasercannon"
|
icon_state = "lasercannon"
|
||||||
fire_sound = 'sound/weapons/lasercannonfire.ogg'
|
|
||||||
origin_tech = "combat=4;materials=3;powerstorage=3"
|
origin_tech = "combat=4;materials=3;powerstorage=3"
|
||||||
projectile_type = "/obj/item/projectile/beam/heavylaser"
|
ammo_type = list(/obj/item/ammo_casing/energy/laser/heavy)
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/xray
|
/obj/item/weapon/gun/energy/xray
|
||||||
name = "xray laser gun"
|
name = "xray laser gun"
|
||||||
desc = "A high-power laser gun capable of expelling concentrated xray blasts."
|
desc = "A high-power laser gun capable of expelling concentrated xray blasts."
|
||||||
icon_state = "xray"
|
icon_state = "xray"
|
||||||
fire_sound = 'sound/weapons/laser3.ogg'
|
|
||||||
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
|
origin_tech = "combat=5;materials=3;magnets=2;syndicate=2"
|
||||||
projectile_type = "/obj/item/projectile/beam/xray"
|
ammo_type = list(/obj/item/ammo_casing/energy/xray)
|
||||||
charge_cost = 50
|
|
||||||
|
|
||||||
|
|
||||||
////////Laser Tag////////////////////
|
////////Laser Tag////////////////////
|
||||||
@@ -88,7 +93,7 @@ obj/item/weapon/gun/energy/laser/retro
|
|||||||
name = "laser tag gun"
|
name = "laser tag gun"
|
||||||
icon_state = "bluetag"
|
icon_state = "bluetag"
|
||||||
desc = "Standard issue weapon of the Imperial Guard"
|
desc = "Standard issue weapon of the Imperial Guard"
|
||||||
projectile_type = "/obj/item/projectile/bluetag"
|
ammo_type = list(/obj/item/ammo_casing/energy/laser/bluetag)
|
||||||
origin_tech = "combat=1;magnets=2"
|
origin_tech = "combat=1;magnets=2"
|
||||||
clumsy_check = 0
|
clumsy_check = 0
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
@@ -125,7 +130,7 @@ obj/item/weapon/gun/energy/laser/retro
|
|||||||
name = "laser tag gun"
|
name = "laser tag gun"
|
||||||
icon_state = "redtag"
|
icon_state = "redtag"
|
||||||
desc = "Standard issue weapon of the Imperial Guard"
|
desc = "Standard issue weapon of the Imperial Guard"
|
||||||
projectile_type = "/obj/item/projectile/redtag"
|
ammo_type = list(/obj/item/ammo_casing/energy/laser/redtag)
|
||||||
origin_tech = "combat=1;magnets=2"
|
origin_tech = "combat=1;magnets=2"
|
||||||
clumsy_check = 0
|
clumsy_check = 0
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
|
|||||||
@@ -1,38 +1,18 @@
|
|||||||
/obj/item/weapon/gun/energy/gun
|
/obj/item/weapon/gun/energy/gun
|
||||||
name = "energy gun"
|
name = "energy gun"
|
||||||
desc = "A basic energy-based gun with two settings: Stun and kill."
|
desc = "A basic energy-based gun with two settings: Stun and kill."
|
||||||
icon_state = "energystun100"
|
icon_state = "energy"
|
||||||
item_state = null //so the human update icon uses the icon_state instead.
|
item_state = null //so the human update icon uses the icon_state instead.
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
ammo_type = list(/obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||||
|
|
||||||
charge_cost = 100 //How much energy is needed to fire.
|
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
|
||||||
origin_tech = "combat=3;magnets=2"
|
origin_tech = "combat=3;magnets=2"
|
||||||
modifystate = "energystun"
|
modifystate = 2
|
||||||
|
|
||||||
var/mode = 0 //0 = stun, 1 = kill
|
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/living/user as mob)
|
attack_self(mob/living/user as mob)
|
||||||
switch(mode)
|
select_fire(user)
|
||||||
if(0)
|
|
||||||
mode = 1
|
|
||||||
charge_cost = 100
|
|
||||||
fire_sound = 'sound/weapons/Laser.ogg'
|
|
||||||
user << "\red [src.name] is now set to kill."
|
|
||||||
projectile_type = "/obj/item/projectile/beam"
|
|
||||||
modifystate = "energykill"
|
|
||||||
if(1)
|
|
||||||
mode = 0
|
|
||||||
charge_cost = 100
|
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
|
||||||
user << "\red [src.name] is now set to stun."
|
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
|
||||||
modifystate = "energystun"
|
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/gun/nuclear
|
/obj/item/weapon/gun/energy/gun/nuclear
|
||||||
name = "Advanced Energy Gun"
|
name = "Advanced Energy Gun"
|
||||||
desc = "An energy gun with an experimental miniaturized reactor."
|
desc = "An energy gun with an experimental miniaturized reactor."
|
||||||
@@ -40,6 +20,7 @@
|
|||||||
origin_tech = "combat=3;materials=5;powerstorage=3"
|
origin_tech = "combat=3;materials=5;powerstorage=3"
|
||||||
var/lightfail = 0
|
var/lightfail = 0
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
|
modifystate = 0
|
||||||
|
|
||||||
New()
|
New()
|
||||||
..()
|
..()
|
||||||
@@ -92,7 +73,7 @@
|
|||||||
overlays += "nucgun-whee"
|
overlays += "nucgun-whee"
|
||||||
return
|
return
|
||||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||||
ratio = round(ratio, 0.25) * 100
|
ratio = Ceiling(ratio*4) * 25
|
||||||
overlays += "nucgun-[ratio]"
|
overlays += "nucgun-[ratio]"
|
||||||
|
|
||||||
|
|
||||||
@@ -109,9 +90,9 @@
|
|||||||
|
|
||||||
|
|
||||||
update_mode()
|
update_mode()
|
||||||
if (mode == 0)
|
if (select == 1)
|
||||||
overlays += "nucgun-stun"
|
overlays += "nucgun-stun"
|
||||||
else if (mode == 1)
|
else if (select == 2)
|
||||||
overlays += "nucgun-kill"
|
overlays += "nucgun-kill"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,43 +4,21 @@
|
|||||||
icon_state = "pulse"
|
icon_state = "pulse"
|
||||||
item_state = null //so the human update icon uses the icon_state instead.
|
item_state = null //so the human update icon uses the icon_state instead.
|
||||||
force = 10
|
force = 10
|
||||||
fire_sound = 'sound/weapons/pulse.ogg'
|
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse, /obj/item/ammo_casing/energy/electrode, /obj/item/ammo_casing/energy/laser)
|
||||||
charge_cost = 200
|
|
||||||
projectile_type = "/obj/item/projectile/beam/pulse"
|
|
||||||
cell_type = "/obj/item/weapon/cell/super"
|
cell_type = "/obj/item/weapon/cell/super"
|
||||||
var/mode = 2
|
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/living/user as mob)
|
/obj/item/weapon/gun/energy/pulse_rifle/attack_self(mob/living/user as mob)
|
||||||
switch(mode)
|
select_fire(user)
|
||||||
if(2)
|
|
||||||
mode = 0
|
|
||||||
charge_cost = 100
|
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
|
||||||
user << "\red [src.name] is now set to stun."
|
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
|
||||||
if(0)
|
|
||||||
mode = 1
|
|
||||||
charge_cost = 100
|
|
||||||
fire_sound = 'sound/weapons/Laser.ogg'
|
|
||||||
user << "\red [src.name] is now set to kill."
|
|
||||||
projectile_type = "/obj/item/projectile/beam"
|
|
||||||
if(1)
|
|
||||||
mode = 2
|
|
||||||
charge_cost = 200
|
|
||||||
fire_sound = 'sound/weapons/pulse.ogg'
|
|
||||||
user << "\red [src.name] is now set to DESTROY."
|
|
||||||
projectile_type = "/obj/item/projectile/beam/pulse"
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
|
/obj/item/weapon/gun/energy/pulse_rifle/destroyer
|
||||||
name = "pulse destroyer"
|
name = "pulse destroyer"
|
||||||
desc = "A heavy-duty, pulse-based energy weapon."
|
desc = "A heavy-duty, pulse-based energy weapon."
|
||||||
cell_type = "/obj/item/weapon/cell/infinite"
|
cell_type = "/obj/item/weapon/cell/infinite"
|
||||||
|
ammo_type = list(/obj/item/ammo_casing/energy/laser/pulse)
|
||||||
|
|
||||||
attack_self(mob/living/user as mob)
|
/obj/item/weapon/gun/energy/pulse_rifle/destroyer/attack_self(mob/living/user as mob)
|
||||||
user << "\red [src.name] has three settings, and they are all DESTROY."
|
user << "\red [src.name] has three settings, and they are all DESTROY."
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -2,13 +2,11 @@
|
|||||||
name = "ion rifle"
|
name = "ion rifle"
|
||||||
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
|
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
|
||||||
icon_state = "ionrifle"
|
icon_state = "ionrifle"
|
||||||
fire_sound = 'sound/weapons/Laser.ogg'
|
|
||||||
origin_tech = "combat=2;magnets=4"
|
origin_tech = "combat=2;magnets=4"
|
||||||
w_class = 5
|
w_class = 5
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
slot_flags = SLOT_BACK
|
slot_flags = SLOT_BACK
|
||||||
charge_cost = 100
|
ammo_type = list(/obj/item/ammo_casing/energy/ion)
|
||||||
projectile_type = "/obj/item/projectile/ion"
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
|
/obj/item/weapon/gun/energy/ionrifle/emp_act(severity)
|
||||||
if(severity <= 2)
|
if(severity <= 2)
|
||||||
@@ -21,21 +19,17 @@
|
|||||||
name = "biological demolecularisor"
|
name = "biological demolecularisor"
|
||||||
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
|
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
|
||||||
icon_state = "decloner"
|
icon_state = "decloner"
|
||||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
|
||||||
origin_tech = "combat=5;materials=4;powerstorage=3"
|
origin_tech = "combat=5;materials=4;powerstorage=3"
|
||||||
charge_cost = 100
|
ammo_type = list(/obj/item/ammo_casing/energy/declone)
|
||||||
projectile_type = "/obj/item/projectile/energy/declone"
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/floragun
|
/obj/item/weapon/gun/energy/floragun
|
||||||
name = "floral somatoray"
|
name = "floral somatoray"
|
||||||
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
desc = "A tool that discharges controlled radiation which induces mutation in plant cells."
|
||||||
icon_state = "floramut100"
|
icon_state = "flora"
|
||||||
item_state = "obj/item/gun.dmi"
|
item_state = "obj/item/gun.dmi"
|
||||||
fire_sound = 'sound/effects/stealthoff.ogg'
|
ammo_type = list(/obj/item/ammo_casing/energy/flora/yield, /obj/item/ammo_casing/energy/flora/mut)
|
||||||
charge_cost = 100
|
|
||||||
projectile_type = "/obj/item/projectile/energy/floramut"
|
|
||||||
origin_tech = "materials=2;biotech=3;powerstorage=3"
|
origin_tech = "materials=2;biotech=3;powerstorage=3"
|
||||||
modifystate = "floramut"
|
modifystate = 1
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
var/mode = 0 //0 = mutate, 1 = yield boost
|
var/mode = 0 //0 = mutate, 1 = yield boost
|
||||||
|
|
||||||
@@ -59,19 +53,7 @@
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
attack_self(mob/living/user as mob)
|
attack_self(mob/living/user as mob)
|
||||||
switch(mode)
|
select_fire(user)
|
||||||
if(0)
|
|
||||||
mode = 1
|
|
||||||
charge_cost = 100
|
|
||||||
user << "\red The [src.name] is now set to increase yield."
|
|
||||||
projectile_type = "/obj/item/projectile/energy/florayield"
|
|
||||||
modifystate = "florayield"
|
|
||||||
if(1)
|
|
||||||
mode = 0
|
|
||||||
charge_cost = 100
|
|
||||||
user << "\red The [src.name] is now set to induce mutations."
|
|
||||||
projectile_type = "/obj/item/projectile/energy/floramut"
|
|
||||||
modifystate = "floramut"
|
|
||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
@@ -81,8 +63,7 @@
|
|||||||
icon_state = "riotgun"
|
icon_state = "riotgun"
|
||||||
item_state = "c20r"
|
item_state = "c20r"
|
||||||
w_class = 4
|
w_class = 4
|
||||||
projectile_type = "/obj/item/projectile/meteor"
|
ammo_type = list(/obj/item/ammo_casing/energy/meteor)
|
||||||
charge_cost = 100
|
|
||||||
cell_type = "/obj/item/weapon/cell/potato"
|
cell_type = "/obj/item/weapon/cell/potato"
|
||||||
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
clumsy_check = 0 //Admin spawn only, might as well let clowns use it.
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
@@ -121,5 +102,4 @@
|
|||||||
name = "mind flayer"
|
name = "mind flayer"
|
||||||
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
desc = "A prototype weapon recovered from the ruins of Research-Station Epsilon."
|
||||||
icon_state = "xray"
|
icon_state = "xray"
|
||||||
projectile_type = "/obj/item/projectile/beam/mindflayer"
|
ammo_type = list(/obj/item/ammo_casing/energy/mindflayer)
|
||||||
fire_sound = 'sound/weapons/Laser.ogg'
|
|
||||||
|
|||||||
@@ -4,9 +4,7 @@
|
|||||||
desc = "A small, low capacity gun used for non-lethal takedowns."
|
desc = "A small, low capacity gun used for non-lethal takedowns."
|
||||||
icon_state = "taser"
|
icon_state = "taser"
|
||||||
item_state = null //so the human update icon uses the icon_state instead.
|
item_state = null //so the human update icon uses the icon_state instead.
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
ammo_type = list(/obj/item/ammo_casing/energy/electrode)
|
||||||
charge_cost = 100
|
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
|
||||||
cell_type = "/obj/item/weapon/cell/crap"
|
cell_type = "/obj/item/weapon/cell/crap"
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/taser/cyborg
|
/obj/item/weapon/gun/energy/taser/cyborg
|
||||||
@@ -14,8 +12,6 @@
|
|||||||
desc = "A small, low capacity gun used for non-lethal takedowns."
|
desc = "A small, low capacity gun used for non-lethal takedowns."
|
||||||
icon_state = "taser"
|
icon_state = "taser"
|
||||||
fire_sound = 'sound/weapons/Taser.ogg'
|
fire_sound = 'sound/weapons/Taser.ogg'
|
||||||
charge_cost = 100
|
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
|
||||||
cell_type = "/obj/item/weapon/cell/secborg"
|
cell_type = "/obj/item/weapon/cell/secborg"
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
var/recharge_time = 10 //Time it takes for shots to recharge (in ticks)
|
var/recharge_time = 10 //Time it takes for shots to recharge (in ticks)
|
||||||
@@ -38,8 +34,9 @@
|
|||||||
if(isrobot(src.loc))
|
if(isrobot(src.loc))
|
||||||
var/mob/living/silicon/robot/R = src.loc
|
var/mob/living/silicon/robot/R = src.loc
|
||||||
if(R && R.cell)
|
if(R && R.cell)
|
||||||
R.cell.use(charge_cost) //Take power from the borg...
|
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||||
power_supply.give(charge_cost) //... to recharge the shot
|
if(R.cell.use(shot.e_cost)) //Take power from the borg...
|
||||||
|
power_supply.give(shot.e_cost) //... to recharge the shot
|
||||||
|
|
||||||
update_icon()
|
update_icon()
|
||||||
return 1
|
return 1
|
||||||
@@ -49,10 +46,8 @@
|
|||||||
name = "stun revolver"
|
name = "stun revolver"
|
||||||
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
|
desc = "A high-tech revolver that fires stun cartridges. The stun cartridges can be recharged using a conventional energy weapon recharger."
|
||||||
icon_state = "stunrevolver"
|
icon_state = "stunrevolver"
|
||||||
fire_sound = 'sound/weapons/Gunshot.ogg'
|
|
||||||
origin_tech = "combat=3;materials=3;powerstorage=2"
|
origin_tech = "combat=3;materials=3;powerstorage=2"
|
||||||
charge_cost = 125
|
ammo_type = list(/obj/item/ammo_casing/energy/electrode/gun)
|
||||||
projectile_type = "/obj/item/projectile/energy/electrode"
|
|
||||||
cell_type = "/obj/item/weapon/cell"
|
cell_type = "/obj/item/weapon/cell"
|
||||||
|
|
||||||
|
|
||||||
@@ -66,8 +61,7 @@
|
|||||||
m_amt = 2000
|
m_amt = 2000
|
||||||
origin_tech = "combat=2;magnets=2;syndicate=5"
|
origin_tech = "combat=2;magnets=2;syndicate=5"
|
||||||
silenced = 1
|
silenced = 1
|
||||||
fire_sound = 'sound/weapons/Genhit.ogg'
|
ammo_type = list(/obj/item/ammo_casing/energy/bolt)
|
||||||
projectile_type = "/obj/item/projectile/energy/bolt"
|
|
||||||
cell_type = "/obj/item/weapon/cell/crap"
|
cell_type = "/obj/item/weapon/cell/crap"
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
|
|
||||||
@@ -94,16 +88,15 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/crossbow/cyborg/process_chambered()
|
/obj/item/weapon/gun/energy/crossbow/cyborg/newshot()
|
||||||
if(in_chamber)
|
|
||||||
return 1
|
|
||||||
if(isrobot(src.loc))
|
if(isrobot(src.loc))
|
||||||
var/mob/living/silicon/robot/R = src.loc
|
var/mob/living/silicon/robot/R = src.loc
|
||||||
if(R && R.cell)
|
if(R && R.cell)
|
||||||
R.cell.use(100)
|
var/obj/item/ammo_casing/energy/shot = ammo_type[select] //Necessary to find cost of shot
|
||||||
in_chamber = new /obj/item/projectile/energy/bolt(src)
|
if(R.cell.use(shot.e_cost))
|
||||||
return 1
|
chambered = shot
|
||||||
return 0
|
chambered.newshot()
|
||||||
|
return
|
||||||
|
|
||||||
/obj/item/weapon/gun/energy/crossbow/largecrossbow
|
/obj/item/weapon/gun/energy/crossbow/largecrossbow
|
||||||
name = "Energy Crossbow"
|
name = "Energy Crossbow"
|
||||||
@@ -111,6 +104,3 @@
|
|||||||
w_class = 4.0
|
w_class = 4.0
|
||||||
force = 10
|
force = 10
|
||||||
m_amt = 200000
|
m_amt = 200000
|
||||||
projectile_type = "/obj/item/projectile/energy/bolt/large"
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,86 +1,13 @@
|
|||||||
/obj/item/weapon/gun/energy/temperature
|
/obj/item/weapon/gun/energy/temperature
|
||||||
name = "temperature gun"
|
name = "temperature gun"
|
||||||
icon_state = "freezegun"
|
icon_state = "freezegun"
|
||||||
fire_sound = 'sound/weapons/pulse3.ogg'
|
|
||||||
desc = "A gun that changes temperatures."
|
desc = "A gun that changes temperatures."
|
||||||
var/temperature = T20C
|
|
||||||
var/current_temperature = T20C
|
|
||||||
charge_cost = 100
|
|
||||||
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
origin_tech = "combat=3;materials=4;powerstorage=3;magnets=2"
|
||||||
|
ammo_type = list(/obj/item/ammo_casing/energy/temp, /obj/item/ammo_casing/energy/temp/hot)
|
||||||
projectile_type = "/obj/item/projectile/temp"
|
|
||||||
cell_type = "/obj/item/weapon/cell/high"
|
cell_type = "/obj/item/weapon/cell/high"
|
||||||
|
|
||||||
|
|
||||||
New()
|
|
||||||
..()
|
|
||||||
processing_objects.Add(src)
|
|
||||||
|
|
||||||
|
|
||||||
Del()
|
|
||||||
processing_objects.Remove(src)
|
|
||||||
..()
|
|
||||||
|
|
||||||
|
|
||||||
attack_self(mob/living/user as mob)
|
attack_self(mob/living/user as mob)
|
||||||
user.set_machine(src)
|
select_fire(user)
|
||||||
var/temp_text = ""
|
update_icon()
|
||||||
if(temperature > (T0C - 50))
|
|
||||||
temp_text = "<FONT color=black>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
|
||||||
else
|
|
||||||
temp_text = "<FONT color=blue>[temperature] ([round(temperature-T0C)]°C) ([round(temperature*1.8-459.67)]°F)</FONT>"
|
|
||||||
|
|
||||||
var/dat = {"<B>Freeze Gun Configuration: </B><BR>
|
|
||||||
Current output temperature: [temp_text]<BR>
|
|
||||||
Target output temperature: <A href='?src=\ref[src];temp=-100'>-</A> <A href='?src=\ref[src];temp=-10'>-</A> <A href='?src=\ref[src];temp=-1'>-</A> [current_temperature] <A href='?src=\ref[src];temp=1'>+</A> <A href='?src=\ref[src];temp=10'>+</A> <A href='?src=\ref[src];temp=100'>+</A><BR>
|
|
||||||
"}
|
|
||||||
|
|
||||||
|
|
||||||
user << browse(dat, "window=freezegun;size=450x300;can_resize=1;can_close=1;can_minimize=1")
|
|
||||||
onclose(user, "window=freezegun", src)
|
|
||||||
|
|
||||||
prepare_shot(var/obj/item/projectile/temp/proj)
|
|
||||||
proj.temperature = temperature //Set the temperature of the beam
|
|
||||||
if(proj.temperature > 300) //If it's not a freeze beam, don't call it one
|
|
||||||
proj.name = "heat beam"
|
|
||||||
..()
|
|
||||||
|
|
||||||
|
|
||||||
Topic(href, href_list)
|
|
||||||
if (..())
|
|
||||||
return
|
|
||||||
usr.set_machine(src)
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(href_list["temp"])
|
|
||||||
var/amount = text2num(href_list["temp"])
|
|
||||||
if(amount > 0)
|
|
||||||
src.current_temperature = min(500, src.current_temperature+amount)
|
|
||||||
else
|
|
||||||
src.current_temperature = max(0, src.current_temperature+amount)
|
|
||||||
if (istype(src.loc, /mob))
|
|
||||||
attack_self(src.loc)
|
|
||||||
src.add_fingerprint(usr)
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
process()
|
|
||||||
switch(temperature)
|
|
||||||
if(0 to 100) charge_cost = 1000
|
|
||||||
if(100 to 250) charge_cost = 500
|
|
||||||
if(251 to 300) charge_cost = 100
|
|
||||||
if(301 to 400) charge_cost = 500
|
|
||||||
if(401 to 500) charge_cost = 1000
|
|
||||||
|
|
||||||
if(current_temperature != temperature)
|
|
||||||
var/difference = abs(current_temperature - temperature)
|
|
||||||
if(difference >= 10)
|
|
||||||
if(current_temperature < temperature)
|
|
||||||
temperature -= 10
|
|
||||||
else
|
|
||||||
temperature += 10
|
|
||||||
else
|
|
||||||
temperature = current_temperature
|
|
||||||
return
|
return
|
||||||
@@ -7,29 +7,29 @@
|
|||||||
fire_sound = 'sound/weapons/emitter.ogg'
|
fire_sound = 'sound/weapons/emitter.ogg'
|
||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
w_class = 5
|
w_class = 5
|
||||||
var/projectile_type = "/obj/item/projectile/magic"
|
|
||||||
var/max_charges = 6
|
var/max_charges = 6
|
||||||
var/charges = 0
|
var/charges = 0
|
||||||
var/recharge_rate = 4
|
var/recharge_rate = 4
|
||||||
var/charge_tick = 0
|
var/charge_tick = 0
|
||||||
var/can_charge = 1
|
var/can_charge = 1
|
||||||
|
var/ammo_type
|
||||||
origin_tech = null
|
origin_tech = null
|
||||||
clumsy_check = 0
|
clumsy_check = 0
|
||||||
|
|
||||||
/obj/item/weapon/gun/magic/process_chambered()
|
|
||||||
if(in_chamber) return 1
|
|
||||||
if(!charges) return 0
|
|
||||||
if(!projectile_type) return 0
|
|
||||||
in_chamber = new projectile_type(src)
|
|
||||||
return 1
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/magic/afterattack(atom/target as mob, mob/living/user as mob, flag)
|
/obj/item/weapon/gun/magic/afterattack(atom/target as mob, mob/living/user as mob, flag)
|
||||||
|
newshot()
|
||||||
..()
|
..()
|
||||||
if(charges && !in_chamber && !flag) charges--
|
|
||||||
|
/obj/item/weapon/gun/magic/proc/newshot()
|
||||||
|
if (charges && chambered)
|
||||||
|
chambered.newshot()
|
||||||
|
charges--
|
||||||
|
return
|
||||||
|
|
||||||
/obj/item/weapon/gun/magic/New()
|
/obj/item/weapon/gun/magic/New()
|
||||||
..()
|
..()
|
||||||
charges = max_charges
|
charges = max_charges
|
||||||
|
chambered = new ammo_type(src)
|
||||||
if(can_charge) processing_objects.Add(src)
|
if(can_charge) processing_objects.Add(src)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -4,20 +4,20 @@ obj/item/weapon/gun/magic/staff/
|
|||||||
obj/item/weapon/gun/magic/staff/change
|
obj/item/weapon/gun/magic/staff/change
|
||||||
name = "staff of change"
|
name = "staff of change"
|
||||||
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
desc = "An artefact that spits bolts of coruscating energy which cause the target's very form to reshape itself"
|
||||||
projectile_type = "/obj/item/projectile/magic/change"
|
ammo_type = /obj/item/ammo_casing/magic/change
|
||||||
icon_state = "staffofchange"
|
icon_state = "staffofchange"
|
||||||
item_state = "staffofchange"
|
item_state = "staffofchange"
|
||||||
|
|
||||||
obj/item/weapon/gun/magic/staff/animate
|
obj/item/weapon/gun/magic/staff/animate
|
||||||
name = "staff of animation"
|
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."
|
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."
|
||||||
projectile_type = "/obj/item/projectile/magic/animate"
|
ammo_type = /obj/item/ammo_casing/magic/animate
|
||||||
icon_state = "staffofanimation"
|
icon_state = "staffofanimation"
|
||||||
item_state = "staffofanimation"
|
item_state = "staffofanimation"
|
||||||
|
|
||||||
obj/item/weapon/gun/magic/staff/healing
|
obj/item/weapon/gun/magic/staff/healing
|
||||||
name = "staff of 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."
|
desc = "An artefact that spits bolts of restoring magic which can remove ailments of all kinds and even raise the dead."
|
||||||
projectile_type = "/obj/item/projectile/magic/resurrection"
|
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||||
icon_state = "staffofhealing"
|
icon_state = "staffofhealing"
|
||||||
item_state = "staffofhealing"
|
item_state = "staffofhealing"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/
|
/obj/item/weapon/gun/magic/wand/
|
||||||
name = "wand of nothing"
|
name = "wand of nothing"
|
||||||
desc = "It's not just a stick, it's a MAGIC stick!"
|
desc = "It's not just a stick, it's a MAGIC stick!"
|
||||||
projectile_type = "/obj/item/projectile/magic"
|
ammo_type = /obj/item/ammo_casing/magic
|
||||||
icon_state = "nothingwand"
|
icon_state = "nothingwand"
|
||||||
item_state = "wand"
|
item_state = "wand"
|
||||||
w_class = 2
|
w_class = 2
|
||||||
@@ -22,6 +22,9 @@
|
|||||||
usr << "Has [charges] charge\s remaining."
|
usr << "Has [charges] charge\s remaining."
|
||||||
return
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/magic/wand/update_icon()
|
||||||
|
icon_state = "[initial(icon_state)][charges ? "" : "-drained"]"
|
||||||
|
|
||||||
/obj/item/weapon/gun/magic/wand/attack(atom/target as mob, mob/living/user as mob)
|
/obj/item/weapon/gun/magic/wand/attack(atom/target as mob, mob/living/user as mob)
|
||||||
if(target == user)
|
if(target == user)
|
||||||
return
|
return
|
||||||
@@ -29,14 +32,13 @@
|
|||||||
|
|
||||||
/obj/item/weapon/gun/magic/wand/afterattack(atom/target as mob, mob/living/user as mob)
|
/obj/item/weapon/gun/magic/wand/afterattack(atom/target as mob, mob/living/user as mob)
|
||||||
if(!charges)
|
if(!charges)
|
||||||
user << "<span class='warning'>The [name] whizzles quietly.<span>"
|
shoot_with_empty_chamber(user)
|
||||||
return
|
return
|
||||||
if(target == user)
|
if(target == user)
|
||||||
zap_self(user)
|
zap_self(user)
|
||||||
else
|
else
|
||||||
..()
|
..()
|
||||||
if(!charges)
|
update_icon()
|
||||||
icon_state = "[icon_state]-drained"
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/magic/wand/proc/zap_self(mob/living/user as mob)
|
/obj/item/weapon/gun/magic/wand/proc/zap_self(mob/living/user as mob)
|
||||||
@@ -47,7 +49,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/death
|
/obj/item/weapon/gun/magic/wand/death
|
||||||
name = "wand of death"
|
name = "wand of death"
|
||||||
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
|
desc = "This deadly wand overwhelms the victim's body with pure energy, slaying them without fail."
|
||||||
projectile_type = "/obj/item/projectile/magic/death"
|
ammo_type = /obj/item/ammo_casing/magic/death
|
||||||
icon_state = "deathwand"
|
icon_state = "deathwand"
|
||||||
max_charges = 3 //3, 2, 2, 1
|
max_charges = 3 //3, 2, 2, 1
|
||||||
|
|
||||||
@@ -62,7 +64,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/resurrection
|
/obj/item/weapon/gun/magic/wand/resurrection
|
||||||
name = "wand of healing"
|
name = "wand of healing"
|
||||||
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
|
desc = "This wand uses healing magics to heal and revive. They are rarely utilized within the Wizard Federation for some reason."
|
||||||
projectile_type = "/obj/item/projectile/magic/resurrection"
|
ammo_type = /obj/item/ammo_casing/magic/heal
|
||||||
icon_state = "revivewand"
|
icon_state = "revivewand"
|
||||||
max_charges = 10 //10, 5, 5, 4
|
max_charges = 10 //10, 5, 5, 4
|
||||||
|
|
||||||
@@ -75,7 +77,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/polymorph
|
/obj/item/weapon/gun/magic/wand/polymorph
|
||||||
name = "wand of polymorph"
|
name = "wand of polymorph"
|
||||||
desc = "This wand is attuned to chaos and will radically alter the victim's form."
|
desc = "This wand is attuned to chaos and will radically alter the victim's form."
|
||||||
projectile_type = "/obj/item/projectile/magic/change"
|
ammo_type = /obj/item/ammo_casing/magic/change
|
||||||
icon_state = "polywand"
|
icon_state = "polywand"
|
||||||
max_charges = 10 //10, 5, 5, 4
|
max_charges = 10 //10, 5, 5, 4
|
||||||
|
|
||||||
@@ -87,7 +89,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/teleport
|
/obj/item/weapon/gun/magic/wand/teleport
|
||||||
name = "wand of teleportation"
|
name = "wand of teleportation"
|
||||||
desc = "This wand will wrench targets through space and time to move them somewhere else."
|
desc = "This wand will wrench targets through space and time to move them somewhere else."
|
||||||
projectile_type = "/obj/item/projectile/magic/teleport"
|
ammo_type = /obj/item/ammo_casing/magic/teleport
|
||||||
icon_state = "telewand"
|
icon_state = "telewand"
|
||||||
max_charges = 10 //10, 5, 5, 4
|
max_charges = 10 //10, 5, 5, 4
|
||||||
|
|
||||||
@@ -102,7 +104,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/door
|
/obj/item/weapon/gun/magic/wand/door
|
||||||
name = "wand of door creation"
|
name = "wand of door creation"
|
||||||
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
|
desc = "This particular wand can create doors in any wall for the unscrupulous wizard who shuns teleportation magics."
|
||||||
projectile_type = "/obj/item/projectile/magic/door"
|
ammo_type = /obj/item/ammo_casing/magic/door
|
||||||
icon_state = "doorwand"
|
icon_state = "doorwand"
|
||||||
max_charges = 20 //20, 10, 10, 7
|
max_charges = 20 //20, 10, 10, 7
|
||||||
|
|
||||||
@@ -112,7 +114,7 @@
|
|||||||
/obj/item/weapon/gun/magic/wand/fireball
|
/obj/item/weapon/gun/magic/wand/fireball
|
||||||
name = "wand of fireball"
|
name = "wand of fireball"
|
||||||
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
|
desc = "This wand shoots scorching balls of fire that explode into destructive flames."
|
||||||
projectile_type = "/obj/item/projectile/magic/fireball"
|
ammo_type = /obj/item/ammo_casing/magic/fireball
|
||||||
icon_state = "firewand"
|
icon_state = "firewand"
|
||||||
max_charges = 8 //8, 4, 4, 3
|
max_charges = 8 //8, 4, 4, 3
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,8 @@
|
|||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
m_amt = 1000
|
m_amt = 1000
|
||||||
|
|
||||||
var/ammo_type = /obj/item/ammo_casing/c10mm
|
|
||||||
var/mag_type = /obj/item/ammo_box/magazine/m10mm //Removes the need for max_ammo and caliber info
|
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
|
var/obj/item/ammo_box/magazine/magazine
|
||||||
var/obj/item/ammo_casing/chambered = null // The round (not bullet) that is in the chamber.
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/New()
|
/obj/item/weapon/gun/projectile/New()
|
||||||
..()
|
..()
|
||||||
@@ -18,28 +16,19 @@
|
|||||||
update_icon()
|
update_icon()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/process_chambered(var/eject_casing = 1, var/empty_chamber = 1)
|
/obj/item/weapon/gun/projectile/process_chamber(var/eject_casing = 1, var/empty_chamber = 1)
|
||||||
// if(in_chamber)
|
// if(in_chamber)
|
||||||
// return 1
|
// return 1
|
||||||
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
var/obj/item/ammo_casing/AC = chambered //Find chambered round
|
||||||
if(isnull(AC) || !istype(AC))
|
if(isnull(AC) || !istype(AC))
|
||||||
return 0
|
chamber_round()
|
||||||
|
return
|
||||||
if(eject_casing)
|
if(eject_casing)
|
||||||
AC.loc = get_turf(src) //Eject casing onto ground.
|
AC.loc = get_turf(src) //Eject casing onto ground.
|
||||||
if(empty_chamber)
|
if(empty_chamber)
|
||||||
chambered = null
|
chambered = null
|
||||||
chamber_round()
|
chamber_round()
|
||||||
if(AC.BB)
|
return
|
||||||
if(AC.reagents && AC.BB.reagents)
|
|
||||||
var/datum/reagents/casting_reagents = AC.reagents
|
|
||||||
casting_reagents.trans_to(AC.BB, casting_reagents.total_volume) //For chemical darts/bullets
|
|
||||||
casting_reagents.delete()
|
|
||||||
in_chamber = AC.BB //Load projectile into chamber.
|
|
||||||
AC.BB.loc = src //Set projectile loc to gun.
|
|
||||||
AC.BB = null
|
|
||||||
AC.update_icon()
|
|
||||||
return 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/proc/chamber_round()
|
/obj/item/weapon/gun/projectile/proc/chamber_round()
|
||||||
if (chambered || !magazine)
|
if (chambered || !magazine)
|
||||||
@@ -47,6 +36,11 @@
|
|||||||
else if (magazine.ammo_count())
|
else if (magazine.ammo_count())
|
||||||
chambered = magazine.get_round()
|
chambered = magazine.get_round()
|
||||||
chambered.loc = src
|
chambered.loc = src
|
||||||
|
if(chambered.BB)
|
||||||
|
if(chambered.reagents && chambered.BB.reagents)
|
||||||
|
var/datum/reagents/casting_reagents = chambered.reagents
|
||||||
|
casting_reagents.trans_to(chambered.BB, casting_reagents.total_volume) //For chemical darts/bullets
|
||||||
|
casting_reagents.delete()
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/weapon/gun/projectile/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||||
@@ -56,7 +50,7 @@
|
|||||||
user.remove_from_mob(AM)
|
user.remove_from_mob(AM)
|
||||||
magazine = AM
|
magazine = AM
|
||||||
magazine.loc = src
|
magazine.loc = src
|
||||||
user << "<span class='notice'>You load a new magazine into \the [src]!</span>"
|
user << "<span class='notice'>You load a new magazine into \the [src].</span>"
|
||||||
chamber_round()
|
chamber_round()
|
||||||
A.update_icon()
|
A.update_icon()
|
||||||
update_icon()
|
update_icon()
|
||||||
@@ -71,7 +65,7 @@
|
|||||||
user.put_in_hands(magazine)
|
user.put_in_hands(magazine)
|
||||||
magazine.update_icon()
|
magazine.update_icon()
|
||||||
magazine = null
|
magazine = null
|
||||||
user << "<span class='notice'>You pull the magazine out of \the [src]!</span>"
|
user << "<span class='notice'>You pull the magazine out of \the [src].</span>"
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>There's no magazine in \the [src].</span>"
|
user << "<span class='notice'>There's no magazine in \the [src].</span>"
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|||||||
@@ -4,7 +4,6 @@
|
|||||||
icon_state = "saber" //ugly
|
icon_state = "saber" //ugly
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
origin_tech = "combat=4;materials=2"
|
origin_tech = "combat=4;materials=2"
|
||||||
ammo_type = /obj/item/ammo_casing/c9mm
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/msmg9mm
|
mag_type = /obj/item/ammo_box/magazine/msmg9mm
|
||||||
var/alarmed = 0
|
var/alarmed = 0
|
||||||
|
|
||||||
@@ -24,7 +23,6 @@
|
|||||||
icon_state = "mini-uzi"
|
icon_state = "mini-uzi"
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||||
ammo_type = /obj/item/ammo_casing/c45
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/uzim45
|
mag_type = /obj/item/ammo_box/magazine/uzim45
|
||||||
|
|
||||||
|
|
||||||
@@ -36,7 +34,6 @@
|
|||||||
item_state = "c20r"
|
item_state = "c20r"
|
||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
origin_tech = "combat=5;materials=2;syndicate=8"
|
origin_tech = "combat=5;materials=2;syndicate=8"
|
||||||
ammo_type = /obj/item/ammo_casing/a12mm
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/m12mm
|
mag_type = /obj/item/ammo_box/magazine/m12mm
|
||||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||||
|
|
||||||
@@ -58,7 +55,7 @@
|
|||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/c20r/update_icon()
|
/obj/item/weapon/gun/projectile/automatic/c20r/update_icon()
|
||||||
..()
|
..()
|
||||||
icon_state = "c20r[magazine ? "-[round(get_ammo(0),4)]" : ""][chambered ? "" : "-e"]"
|
icon_state = "c20r[magazine ? "-[Ceiling(get_ammo(0)/4)*4]" : ""][chambered ? "" : "-e"]"
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
@@ -71,7 +68,6 @@
|
|||||||
w_class = 5
|
w_class = 5
|
||||||
slot_flags = 0
|
slot_flags = 0
|
||||||
origin_tech = "combat=5;materials=1;syndicate=2"
|
origin_tech = "combat=5;materials=1;syndicate=2"
|
||||||
ammo_type = /obj/item/ammo_casing/a762
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/m762
|
mag_type = /obj/item/ammo_box/magazine/m762
|
||||||
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
fire_sound = 'sound/weapons/Gunshot_smg.ogg'
|
||||||
var/cover_open = 0
|
var/cover_open = 0
|
||||||
@@ -84,7 +80,7 @@
|
|||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon()
|
/obj/item/weapon/gun/projectile/automatic/l6_saw/update_icon()
|
||||||
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? round(magazine.ammo_count() * 2, 25) : "-empty"]"
|
icon_state = "l6[cover_open ? "open" : "closed"][magazine ? Ceiling(get_ammo(0)/12.5)*25 : "-empty"]"
|
||||||
|
|
||||||
|
|
||||||
/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/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
|
||||||
|
|||||||
@@ -5,7 +5,6 @@
|
|||||||
w_class = 3.0
|
w_class = 3.0
|
||||||
silenced = 1
|
silenced = 1
|
||||||
origin_tech = "combat=2;materials=2;syndicate=8"
|
origin_tech = "combat=2;materials=2;syndicate=8"
|
||||||
ammo_type = /obj/item/ammo_casing/c45
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/sm45
|
mag_type = /obj/item/ammo_box/magazine/sm45
|
||||||
fire_sound = 'sound/weapons/Gunshot_silenced.ogg'
|
fire_sound = 'sound/weapons/Gunshot_silenced.ogg'
|
||||||
|
|
||||||
@@ -20,7 +19,6 @@
|
|||||||
desc = "A robust handgun that uses .50 AE ammo"
|
desc = "A robust handgun that uses .50 AE ammo"
|
||||||
icon_state = "deagle"
|
icon_state = "deagle"
|
||||||
force = 14.0
|
force = 14.0
|
||||||
ammo_type = /obj/item/ammo_casing/a50
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/m50
|
mag_type = /obj/item/ammo_box/magazine/m50
|
||||||
|
|
||||||
|
|
||||||
@@ -56,14 +54,10 @@
|
|||||||
icon_state = "gyropistol"
|
icon_state = "gyropistol"
|
||||||
fire_sound = 'sound/effects/Explosion1.ogg'
|
fire_sound = 'sound/effects/Explosion1.ogg'
|
||||||
origin_tech = "combat=3"
|
origin_tech = "combat=3"
|
||||||
ammo_type = /obj/item/ammo_casing/a75
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/m75
|
mag_type = /obj/item/ammo_box/magazine/m75
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/New()
|
/obj/item/weapon/gun/projectile/automatic/gyropistol/process_chamber(var/eject_casing = 0, var/empty_chamber = 1)
|
||||||
..()
|
..()
|
||||||
update_icon()
|
|
||||||
return
|
|
||||||
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/gyropistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
/obj/item/weapon/gun/projectile/automatic/gyropistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
||||||
..()
|
..()
|
||||||
@@ -85,18 +79,8 @@
|
|||||||
w_class = 2
|
w_class = 2
|
||||||
silenced = 0
|
silenced = 0
|
||||||
origin_tech = "combat=2;materials=2;syndicate=2"
|
origin_tech = "combat=2;materials=2;syndicate=2"
|
||||||
ammo_type = /obj/item/ammo_casing/c10mm
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/m10mm
|
mag_type = /obj/item/ammo_box/magazine/m10mm
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/pistol/afterattack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj, flag)
|
|
||||||
..()
|
|
||||||
if(magazine)
|
|
||||||
if(!chambered && !magazine.ammo_count())
|
|
||||||
magazine.update_icon()
|
|
||||||
magazine.loc = get_turf(src.loc)
|
|
||||||
magazine = null
|
|
||||||
return
|
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/automatic/pistol/attack_hand(mob/user as mob)
|
/obj/item/weapon/gun/projectile/automatic/pistol/attack_hand(mob/user as mob)
|
||||||
if(loc == user)
|
if(loc == user)
|
||||||
if(silenced)
|
if(silenced)
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
desc = "A classic revolver. Uses 357 ammo"
|
desc = "A classic revolver. Uses 357 ammo"
|
||||||
name = "revolver"
|
name = "revolver"
|
||||||
icon_state = "revolver"
|
icon_state = "revolver"
|
||||||
ammo_type = /obj/item/ammo_casing/a357
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
|
mag_type = /obj/item/ammo_box/magazine/internal/cylinder
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/chamber_round()
|
/obj/item/weapon/gun/projectile/revolver/chamber_round()
|
||||||
@@ -12,27 +11,13 @@
|
|||||||
chambered = magazine.get_round(1)
|
chambered = magazine.get_round(1)
|
||||||
return
|
return
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/process_chambered()
|
/obj/item/weapon/gun/projectile/revolver/process_chamber()
|
||||||
return ..(0, 1)
|
return ..(0, 1)
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/weapon/gun/projectile/revolver/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||||
var/num_loaded = 0
|
var/num_loaded = magazine.attackby(A, user, 1)
|
||||||
if(istype(A, /obj/item/ammo_box))
|
|
||||||
var/obj/item/ammo_box/AM = A
|
|
||||||
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
|
||||||
if(magazine.give_round(AC))
|
|
||||||
AM.stored_ammo -= AC
|
|
||||||
num_loaded++
|
|
||||||
else
|
|
||||||
break
|
|
||||||
if(istype(A, /obj/item/ammo_casing))
|
|
||||||
var/obj/item/ammo_casing/AC = A
|
|
||||||
if(magazine.give_round(AC))
|
|
||||||
user.drop_item()
|
|
||||||
AC.loc = src
|
|
||||||
num_loaded++
|
|
||||||
if(num_loaded)
|
if(num_loaded)
|
||||||
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
|
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src].</span>"
|
||||||
A.update_icon()
|
A.update_icon()
|
||||||
update_icon()
|
update_icon()
|
||||||
chamber_round()
|
chamber_round()
|
||||||
@@ -47,7 +32,7 @@
|
|||||||
CB.update_icon()
|
CB.update_icon()
|
||||||
num_unloaded++
|
num_unloaded++
|
||||||
if (num_unloaded)
|
if (num_unloaded)
|
||||||
user << "<span class = 'notice'>You unload [num_unloaded] shell\s from [src]!</span>"
|
user << "<span class = 'notice'>You unload [num_unloaded] shell\s from [src].</span>"
|
||||||
else
|
else
|
||||||
user << "<span class='notice'>[src] is empty.</span>"
|
user << "<span class='notice'>[src] is empty.</span>"
|
||||||
|
|
||||||
@@ -68,7 +53,6 @@
|
|||||||
name = "revolver"
|
name = "revolver"
|
||||||
icon_state = "detective"
|
icon_state = "detective"
|
||||||
origin_tech = "combat=2;materials=2"
|
origin_tech = "combat=2;materials=2"
|
||||||
ammo_type = /obj/item/ammo_casing/c38
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rev38
|
||||||
|
|
||||||
|
|
||||||
@@ -76,7 +60,7 @@
|
|||||||
if(magazine.caliber == initial(magazine.caliber))
|
if(magazine.caliber == initial(magazine.caliber))
|
||||||
return 1
|
return 1
|
||||||
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
|
if(prob(70 - (magazine.ammo_count() * 10))) //minimum probability of 10, maximum of 60
|
||||||
M << "<span class='danger'>[src] blows up in your face.</span>"
|
M << "<span class='danger'>[src] blows up in your face!</span>"
|
||||||
M.take_organ_damage(0,20)
|
M.take_organ_damage(0,20)
|
||||||
M.drop_item()
|
M.drop_item()
|
||||||
del(src)
|
del(src)
|
||||||
@@ -177,22 +161,7 @@
|
|||||||
spun = 1
|
spun = 1
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/russian/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/weapon/gun/projectile/revolver/russian/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||||
var/num_loaded = 0
|
var/num_loaded = ..()
|
||||||
if(istype(A, /obj/item/ammo_box))
|
|
||||||
var/obj/item/ammo_box/AM = A
|
|
||||||
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
|
||||||
if(get_ammo() <= 1)
|
|
||||||
if(magazine.give_round(AC))
|
|
||||||
AM.stored_ammo -= AC
|
|
||||||
num_loaded++
|
|
||||||
break
|
|
||||||
if(istype(A, /obj/item/ammo_casing))
|
|
||||||
var/obj/item/ammo_casing/AC = A
|
|
||||||
if(get_ammo() <= 1)
|
|
||||||
magazine.give_round(AC)
|
|
||||||
user.drop_item()
|
|
||||||
AC.loc = src
|
|
||||||
num_loaded++
|
|
||||||
if(num_loaded)
|
if(num_loaded)
|
||||||
user.visible_message("<span class='warning'>[user] loads a single bullet into the revolver and spins the chamber.</span>", "<span class='warning'>You load a single bullet into the chamber and spin it.</span>")
|
user.visible_message("<span class='warning'>[user] loads a single bullet into the revolver and spins the chamber.</span>", "<span class='warning'>You load a single bullet into the chamber and spin it.</span>")
|
||||||
else
|
else
|
||||||
@@ -222,32 +191,35 @@
|
|||||||
user << "<span class='notice'>[src] is empty.</span>"
|
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/weapon/gun/projectile/revolver/russian/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, flag, params)
|
||||||
|
if(!spun && get_ammo(0,0))
|
||||||
|
user.visible_message("<span class='warning'>[user] spins the chamber of the revolver.</span>", "<span class='warning'>You spin the revolver's chamber.</span>")
|
||||||
|
Spin()
|
||||||
..()
|
..()
|
||||||
spun = 0
|
spun = 0
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/russian/attack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj)
|
/obj/item/weapon/gun/projectile/revolver/russian/attack(atom/target as mob|obj|turf|area, mob/living/user as mob|obj)
|
||||||
|
if(!spun && get_ammo(0,0))
|
||||||
if(!chambered)
|
user.visible_message("<span class='warning'>[user] spins the chamber of the revolver.</span>", "<span class='warning'>You spin the revolver's chamber.</span>")
|
||||||
user.visible_message("\red *click*", "\red *click*")
|
Spin()
|
||||||
return
|
return
|
||||||
|
|
||||||
if(isliving(target) && isliving(user))
|
|
||||||
if(target == user)
|
if(target == user)
|
||||||
|
if(!chambered)
|
||||||
|
user.visible_message("\red *click*", "\red *click*")
|
||||||
|
return
|
||||||
|
|
||||||
|
if(isliving(target) && isliving(user))
|
||||||
var/obj/item/organ/limb/affecting = user.zone_sel.selecting
|
var/obj/item/organ/limb/affecting = user.zone_sel.selecting
|
||||||
if(affecting == "head")
|
if(affecting == "head")
|
||||||
var/obj/item/ammo_casing/AC = chambered
|
var/obj/item/ammo_casing/AC = chambered
|
||||||
if(!process_chambered())
|
if(AC.fire(user, user))
|
||||||
|
user.apply_damage(300, BRUTE, affecting)
|
||||||
|
playsound(user, fire_sound, 50, 1)
|
||||||
|
user.visible_message("<span class='danger'>[user.name] fires [src] at \his head!</span>", "<span class='danger'>You fire [src] at your head!</span>", "You hear a [istype(AC.BB, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
||||||
|
return
|
||||||
|
else
|
||||||
user.visible_message("\red *click*", "\red *click*")
|
user.visible_message("\red *click*", "\red *click*")
|
||||||
return
|
return
|
||||||
if(!in_chamber)
|
|
||||||
return
|
|
||||||
var/obj/item/projectile/P = new AC.projectile_type
|
|
||||||
playsound(user, fire_sound, 50, 1)
|
|
||||||
user.visible_message("<span class='danger'>[user.name] fires [src] at \his head!</span>", "<span class='danger'>You fire [src] at your head!</span>", "You hear a [istype(in_chamber, /obj/item/projectile/beam) ? "laser blast" : "gunshot"]!")
|
|
||||||
if(!P.nodamage)
|
|
||||||
user.apply_damage(300, BRUTE, affecting) // You are dead, dead, dead.
|
|
||||||
return
|
|
||||||
|
|
||||||
spun = 0
|
|
||||||
..()
|
..()
|
||||||
|
|
||||||
|
|||||||
@@ -8,33 +8,18 @@
|
|||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
slot_flags = SLOT_BACK
|
slot_flags = SLOT_BACK
|
||||||
origin_tech = "combat=4;materials=2"
|
origin_tech = "combat=4;materials=2"
|
||||||
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/shot
|
mag_type = /obj/item/ammo_box/magazine/internal/shot
|
||||||
var/recentpump = 0 // to prevent spammage
|
var/recentpump = 0 // to prevent spammage
|
||||||
var/pumped = 0
|
var/pumped = 0
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/weapon/gun/projectile/shotgun/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||||
var/num_loaded = 0
|
var/num_loaded = magazine.attackby(A, user, 1)
|
||||||
if(istype(A, /obj/item/ammo_box))
|
|
||||||
var/obj/item/ammo_box/AM = A
|
|
||||||
for(var/obj/item/ammo_casing/AC in AM.stored_ammo)
|
|
||||||
if(magazine.give_round(AC))
|
|
||||||
AM.stored_ammo -= AC
|
|
||||||
num_loaded++
|
|
||||||
else
|
|
||||||
break
|
|
||||||
if(istype(A, /obj/item/ammo_casing))
|
|
||||||
var/obj/item/ammo_casing/AC = A
|
|
||||||
if(magazine.give_round(AC))
|
|
||||||
user.drop_item()
|
|
||||||
AC.loc = src
|
|
||||||
num_loaded++
|
|
||||||
if(num_loaded)
|
if(num_loaded)
|
||||||
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
|
user << "<span class='notice'>You load [num_loaded] shell\s into \the [src]!</span>"
|
||||||
A.update_icon()
|
A.update_icon()
|
||||||
update_icon()
|
update_icon()
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/shotgun/process_chambered()
|
/obj/item/weapon/gun/projectile/shotgun/process_chamber()
|
||||||
return ..(0, 0)
|
return ..(0, 0)
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/shotgun/chamber_round()
|
/obj/item/weapon/gun/projectile/shotgun/chamber_round()
|
||||||
@@ -55,8 +40,6 @@
|
|||||||
if(chambered)//We have a shell in the chamber
|
if(chambered)//We have a shell in the chamber
|
||||||
chambered.loc = get_turf(src)//Eject casing
|
chambered.loc = get_turf(src)//Eject casing
|
||||||
chambered = null
|
chambered = null
|
||||||
if(in_chamber)
|
|
||||||
in_chamber = null
|
|
||||||
if(!magazine.ammo_count()) return 0
|
if(!magazine.ammo_count()) return 0
|
||||||
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
|
var/obj/item/ammo_casing/AC = magazine.get_round() //load next casing.
|
||||||
chambered = AC
|
chambered = AC
|
||||||
@@ -72,7 +55,6 @@
|
|||||||
name = "combat shotgun"
|
name = "combat shotgun"
|
||||||
icon_state = "cshotgun"
|
icon_state = "cshotgun"
|
||||||
origin_tech = "combat=5;materials=2"
|
origin_tech = "combat=5;materials=2"
|
||||||
ammo_type = /obj/item/ammo_casing/shotgun
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/shotcom
|
mag_type = /obj/item/ammo_box/magazine/internal/shotcom
|
||||||
w_class = 5
|
w_class = 5
|
||||||
|
|
||||||
@@ -86,7 +68,6 @@
|
|||||||
flags = CONDUCT
|
flags = CONDUCT
|
||||||
slot_flags = SLOT_BACK
|
slot_flags = SLOT_BACK
|
||||||
origin_tech = "combat=3;materials=1"
|
origin_tech = "combat=3;materials=1"
|
||||||
ammo_type = /obj/item/ammo_casing/shotgun/beanbag
|
|
||||||
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/dualshot
|
||||||
|
|
||||||
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob)
|
/obj/item/weapon/gun/projectile/revolver/doublebarrel/attackby(var/obj/item/A as obj, mob/user as mob)
|
||||||
|
|||||||
@@ -25,7 +25,6 @@
|
|||||||
var/yo = null
|
var/yo = null
|
||||||
var/xo = null
|
var/xo = null
|
||||||
var/current = null
|
var/current = null
|
||||||
var/obj/shot_from = null // the object which shot us
|
|
||||||
var/atom/original = null // the original target clicked
|
var/atom/original = null // the original target clicked
|
||||||
var/turf/starting = null // the projectile's starting turf
|
var/turf/starting = null // the projectile's starting turf
|
||||||
var/list/permutated = list() // we've passed through these atoms, don't try to hit them again
|
var/list/permutated = list() // we've passed through these atoms, don't try to hit them again
|
||||||
|
|||||||
@@ -16,6 +16,11 @@
|
|||||||
flag = "laser"
|
flag = "laser"
|
||||||
eyeblur = 2
|
eyeblur = 2
|
||||||
|
|
||||||
|
/obj/item/projectile/beam/scatter
|
||||||
|
name = "laser pellet"
|
||||||
|
icon_state = "scatterlaser"
|
||||||
|
damage = 5
|
||||||
|
|
||||||
|
|
||||||
/obj/item/projectile/beam/heavylaser
|
/obj/item/projectile/beam/heavylaser
|
||||||
name = "heavy laser"
|
name = "heavy laser"
|
||||||
|
|||||||
@@ -19,6 +19,11 @@
|
|||||||
weaken = 5
|
weaken = 5
|
||||||
|
|
||||||
|
|
||||||
|
/obj/item/projectile/bullet/pellet
|
||||||
|
name = "pellet"
|
||||||
|
damage = 15
|
||||||
|
|
||||||
|
|
||||||
/obj/item/projectile/bullet/midbullet
|
/obj/item/projectile/bullet/midbullet
|
||||||
damage = 20
|
damage = 20
|
||||||
stun = 5
|
stun = 5
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
damage_type = BURN
|
damage_type = BURN
|
||||||
nodamage = 1
|
nodamage = 1
|
||||||
flag = "energy"
|
flag = "energy"
|
||||||
var/temperature = 300
|
var/temperature = 100
|
||||||
|
|
||||||
|
|
||||||
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
|
on_hit(var/atom/target, var/blocked = 0)//These two could likely check temp protection on the mob
|
||||||
@@ -39,6 +39,10 @@
|
|||||||
M.bodytemperature = temperature
|
M.bodytemperature = temperature
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
|
/obj/item/projectile/temp/hot
|
||||||
|
name = "heat beam"
|
||||||
|
temperature = 400
|
||||||
|
|
||||||
/obj/item/projectile/meteor
|
/obj/item/projectile/meteor
|
||||||
name = "meteor"
|
name = "meteor"
|
||||||
icon = 'icons/obj/meteor.dmi'
|
icon = 'icons/obj/meteor.dmi'
|
||||||
|
|||||||
@@ -13,20 +13,31 @@
|
|||||||
var/list/syringes = list()
|
var/list/syringes = list()
|
||||||
var/max_syringes = 1
|
var/max_syringes = 1
|
||||||
|
|
||||||
/obj/item/weapon/gun/syringe/process_chambered()
|
/obj/item/weapon/gun/syringe/New()
|
||||||
if(!syringes.len) return 0
|
..()
|
||||||
|
chambered = new /obj/item/ammo_casing/syringegun(src)
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/syringe/proc/newshot()
|
||||||
|
if(!syringes.len) return
|
||||||
|
|
||||||
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
|
var/obj/item/weapon/reagent_containers/syringe/S = syringes[1]
|
||||||
|
|
||||||
if(!S) return 0
|
if(!S) return
|
||||||
|
|
||||||
in_chamber = new /obj/item/projectile/bullet/dart/syringe(src)
|
chambered.BB = new /obj/item/projectile/bullet/dart/syringe(src)
|
||||||
S.reagents.trans_to(in_chamber, S.reagents.total_volume)
|
S.reagents.trans_to(chambered.BB, S.reagents.total_volume)
|
||||||
in_chamber.name = S.name
|
chambered.BB.name = S.name
|
||||||
syringes.Remove(S)
|
syringes.Remove(S)
|
||||||
|
|
||||||
del(S)
|
del(S)
|
||||||
return 1
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/syringe/process_chamber()
|
||||||
|
return
|
||||||
|
|
||||||
|
/obj/item/weapon/gun/syringe/afterattack(atom/target as mob|obj|turf, mob/living/user as mob|obj, params)
|
||||||
|
newshot()
|
||||||
|
..()
|
||||||
|
|
||||||
/obj/item/weapon/gun/syringe/examine()
|
/obj/item/weapon/gun/syringe/examine()
|
||||||
..()
|
..()
|
||||||
@@ -52,7 +63,7 @@
|
|||||||
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
|
if(istype(A, /obj/item/weapon/reagent_containers/syringe))
|
||||||
if(syringes.len < max_syringes)
|
if(syringes.len < max_syringes)
|
||||||
user.drop_item()
|
user.drop_item()
|
||||||
user << "<span class='notice'>You load [A] into \the [src]!</span>"
|
user << "<span class='notice'>You load [A] into \the [src].</span>"
|
||||||
syringes.Add(A)
|
syringes.Add(A)
|
||||||
A.loc = src
|
A.loc = src
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -64,7 +64,7 @@ obj/item/weapon/gun/energy/laser/retro/sc_retro
|
|||||||
name ="retro laser"
|
name ="retro laser"
|
||||||
icon_state = "retro"
|
icon_state = "retro"
|
||||||
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces."
|
desc = "An older model of the basic lasergun, no longer used by Nanotrasen's security or military forces."
|
||||||
projectile_type = "/obj/item/projectile/practice"
|
// projectile_type = "/obj/item/projectile/practice"
|
||||||
clumsy_check = 0 //No sense in having a harmless gun blow up in the clowns face
|
clumsy_check = 0 //No sense in having a harmless gun blow up in the clowns face
|
||||||
|
|
||||||
//Syndicate silenced pistol. This definition is not necessary, it's just habit.
|
//Syndicate silenced pistol. This definition is not necessary, it's just habit.
|
||||||
|
|||||||
@@ -1079,11 +1079,14 @@
|
|||||||
#include "code\modules\power\singularity\particle_accelerator\particle_emitter.dm"
|
#include "code\modules\power\singularity\particle_accelerator\particle_emitter.dm"
|
||||||
#include "code\modules\power\singularity\particle_accelerator\particle_power.dm"
|
#include "code\modules\power\singularity\particle_accelerator\particle_power.dm"
|
||||||
#include "code\modules\projectiles\ammunition.dm"
|
#include "code\modules\projectiles\ammunition.dm"
|
||||||
|
#include "code\modules\projectiles\firing.dm"
|
||||||
#include "code\modules\projectiles\gun.dm"
|
#include "code\modules\projectiles\gun.dm"
|
||||||
#include "code\modules\projectiles\projectile.dm"
|
#include "code\modules\projectiles\projectile.dm"
|
||||||
#include "code\modules\projectiles\ammunition\boxes.dm"
|
#include "code\modules\projectiles\ammunition\boxes.dm"
|
||||||
#include "code\modules\projectiles\ammunition\bullets.dm"
|
#include "code\modules\projectiles\ammunition\bullets.dm"
|
||||||
|
#include "code\modules\projectiles\ammunition\energy.dm"
|
||||||
#include "code\modules\projectiles\ammunition\magazines.dm"
|
#include "code\modules\projectiles\ammunition\magazines.dm"
|
||||||
|
#include "code\modules\projectiles\ammunition\special.dm"
|
||||||
#include "code\modules\projectiles\guns\energy.dm"
|
#include "code\modules\projectiles\guns\energy.dm"
|
||||||
#include "code\modules\projectiles\guns\magic.dm"
|
#include "code\modules\projectiles\guns\magic.dm"
|
||||||
#include "code\modules\projectiles\guns\projectile.dm"
|
#include "code\modules\projectiles\guns\projectile.dm"
|
||||||
|
|||||||
Reference in New Issue
Block a user