Convert guns to initialize (#3266)

changes:

Converts guns to initialize.
Converts lift control panels to initialize.
Swaps out a spawn in droppods for addtimer.
Fixes a bug where already-opened pod doors would still attempt to prime if hit.
This commit is contained in:
Lohikar
2017-08-11 14:57:12 -05:00
committed by Erki
parent 1ed2f3c556
commit e7e30d3ab5
12 changed files with 32 additions and 35 deletions

View File

@@ -86,8 +86,8 @@
var/tmp/told_cant_shoot = 0 //So that it doesn't spam them with the fact they cannot hit them.
var/tmp/lock_time = -100
/obj/item/weapon/gun/New()
..()
/obj/item/weapon/gun/Initialize()
. = ..()
for(var/i in 1 to firemodes.len)
firemodes[i] = new /datum/firemode(src, firemodes[i])

View File

@@ -15,8 +15,8 @@
fire_sound_text = "a strange noise"
fire_sound = 'sound/weapons/bladeslice.ogg'
/obj/item/weapon/gun/launcher/spikethrower/New()
..()
/obj/item/weapon/gun/launcher/spikethrower/Initialize()
. = ..()
last_regen = world.time
/obj/item/weapon/gun/launcher/spikethrower/Destroy()

View File

@@ -65,8 +65,8 @@
)
)
/obj/item/weapon/gun/energy/lawgiver/New()
..()
/obj/item/weapon/gun/energy/lawgiver/Initialize()
. = ..()
listening_objects += src
/obj/item/weapon/gun/energy/lawgiver/Destroy()

View File

@@ -21,8 +21,8 @@
var/force_divisor = 400 // Force equates to speed. Speed/5 equates to a damage multiplier for whoever you hit.
// For reference, a fully pressurized oxy tank at 50% gas release firing a health
// analyzer with a force_divisor of 10 hit with a damage multiplier of 3000+.
/obj/item/weapon/gun/launcher/pneumatic/New()
..()
/obj/item/weapon/gun/launcher/pneumatic/Initialize()
. = ..()
item_storage = new(src)
item_storage.name = "hopper"
item_storage.max_w_class = max_w_class
@@ -218,4 +218,4 @@
name = "small pneumatic cannon"
desc = "It looks smaller than your garden variety cannon"
max_w_class = 1
w_class = 3
w_class = 3

View File

@@ -36,8 +36,8 @@
//var/list/icon_keys = list() //keys
//var/list/ammo_states = list() //values
/obj/item/weapon/gun/projectile/New()
..()
/obj/item/weapon/gun/projectile/Initialize()
. = ..()
if(ispath(ammo_type) && (load_method & (SINGLE_CASING|SPEEDLOADER)))
for(var/i in 1 to max_shells)
loaded += new ammo_type(src)

View File

@@ -175,8 +175,8 @@
var/use_launcher = 0
var/obj/item/weapon/gun/launcher/grenade/underslung/launcher
/obj/item/weapon/gun/projectile/automatic/rifle/z8/New()
..()
/obj/item/weapon/gun/projectile/automatic/rifle/z8/Initialize()
. = ..()
launcher = new(src)
/obj/item/weapon/gun/projectile/automatic/rifle/z8/attackby(obj/item/I, mob/user)

View File

@@ -63,14 +63,13 @@
var/container_type = /obj/item/weapon/reagent_containers/glass/beaker
var/list/starting_chems = null
/obj/item/weapon/gun/projectile/dartgun/dartgun/New()
..()
/obj/item/weapon/gun/projectile/dartgun/dartgun/Initialize()
. = ..()
if(starting_chems)
for(var/chem in starting_chems)
var/obj/B = new container_type(src)
B.reagents.add_reagent(chem, 60)
beakers += B
update_icon()
/obj/item/weapon/gun/projectile/dartgun/update_icon()
if(!ammo_magazine)

View File

@@ -263,10 +263,10 @@
/obj/item/ammo_casing/a556 = "5.56mm"
)
/obj/item/weapon/gun/projectile/pirate/New()
/obj/item/weapon/gun/projectile/pirate/Initialize()
ammo_type = pick(ammo_types)
desc += " Uses [ammo_types[ammo_type]] rounds."
var/obj/item/ammo_casing/ammo = ammo_type
caliber = initial(ammo.caliber)
..()
. = ..()