Ports guns to Initialize

This commit is contained in:
CitadelStationBot
2017-05-26 19:06:39 -05:00
parent 25059558cb
commit b089a14c53
18 changed files with 62 additions and 65 deletions
@@ -46,8 +46,8 @@
//Syndicate sub-machine guns.
/obj/item/weapon/gun/ballistic/automatic/c20r/sc_c20r
/obj/item/weapon/gun/ballistic/automatic/c20r/sc_c20r/New()
..()
/obj/item/weapon/gun/ballistic/automatic/c20r/sc_c20r/Initialize()
. = ..()
for(var/ammo in magazine.stored_ammo)
if(prob(95)) //95% chance
magazine.stored_ammo -= ammo
@@ -55,8 +55,8 @@
//Barman's shotgun
/obj/item/weapon/gun/ballistic/shotgun/sc_pump
/obj/item/weapon/gun/ballistic/shotgun/sc_pump/New()
..()
/obj/item/weapon/gun/ballistic/shotgun/sc_pump/Initialize()
. = ..()
for(var/ammo in magazine.stored_ammo)
if(prob(95)) //95% chance
magazine.stored_ammo -= ammo
+2 -2
View File
@@ -420,8 +420,8 @@
var/badmin_mode = FALSE
var/static/list/blacklisted_vars = list("locs", "loc", "contents", "x", "y", "z")
/obj/item/weapon/gun/energy/laser/chameleon/New()
..()
/obj/item/weapon/gun/energy/laser/chameleon/Initialize()
. = ..()
chameleon_action = new(src)
chameleon_action.chameleon_type = /obj/item/weapon/gun
chameleon_action.chameleon_name = "Gun"
+2 -2
View File
@@ -60,8 +60,8 @@
var/datum/action/toggle_scope_zoom/azoom
/obj/item/weapon/gun/New()
..()
/obj/item/weapon/gun/Initialize()
. = ..()
if(pin)
pin = new pin(src)
if(gun_light)
+2 -2
View File
@@ -9,8 +9,8 @@
var/obj/item/ammo_box/magazine/magazine
var/casing_ejector = 1 //whether the gun ejects the chambered casing
/obj/item/weapon/gun/ballistic/New()
..()
/obj/item/weapon/gun/ballistic/Initialize()
. = ..()
if(!spawnwithmagazine)
update_icon()
return
@@ -99,10 +99,9 @@
/obj/item/weapon/gun/ballistic/automatic/c20r/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/c20r/New()
..()
/obj/item/weapon/gun/ballistic/automatic/c20r/Initialize()
. = ..()
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/c20r/afterattack()
..()
@@ -150,20 +149,18 @@
fire_delay = 2
pin = /obj/item/device/firing_pin/implant/pindicate
/obj/item/weapon/gun/ballistic/automatic/m90/New()
..()
/obj/item/weapon/gun/ballistic/automatic/m90/Initialize()
. = ..()
underbarrel = new /obj/item/weapon/gun/ballistic/revolver/grenadelauncher(src)
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted/New()
..()
/obj/item/weapon/gun/ballistic/automatic/m90/unrestricted/Initialize()
. = ..()
underbarrel = new /obj/item/weapon/gun/ballistic/revolver/grenadelauncher/unrestricted(src)
update_icon()
return
/obj/item/weapon/gun/ballistic/automatic/m90/afterattack(atom/target, mob/living/user, flag, params)
if(select == 2)
@@ -259,8 +256,8 @@
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/unrestricted
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/New()
..()
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/Initialize()
. = ..()
update_icon()
/obj/item/weapon/gun/ballistic/automatic/shotgun/bulldog/update_icon()
@@ -9,16 +9,16 @@
item_state = "backpack"
slot_flags = SLOT_BACK
w_class = WEIGHT_CLASS_HUGE
var/obj/item/weapon/gun/ballistic/minigun/gun = null
var/obj/item/weapon/gun/ballistic/minigun/gun
var/armed = 0 //whether the gun is attached, 0 is attached, 1 is the gun is wielded.
var/overheat = 0
var/overheat_max = 40
var/heat_diffusion = 1
/obj/item/weapon/minigunpack/New()
/obj/item/weapon/minigunpack/Initialize()
. = ..()
gun = new(src)
START_PROCESSING(SSobj, src)
..()
/obj/item/weapon/minigunpack/Destroy()
STOP_PROCESSING(SSobj, src)
@@ -110,15 +110,15 @@
casing_ejector = 0
var/obj/item/weapon/minigunpack/ammo_pack
/obj/item/weapon/gun/ballistic/minigun/New()
/obj/item/weapon/gun/ballistic/minigun/Initialize()
SET_SECONDARY_FLAG(src, SLOWS_WHILE_IN_HAND)
if(!ammo_pack)
if(istype(loc,/obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
ammo_pack = loc
..()
else
qdel(src)//No pack, no gun
if(istype(loc, /obj/item/weapon/minigunpack)) //We should spawn inside a ammo pack so let's use that one.
ammo_pack = loc
else
return INITIALIZE_HINT_QDEL //No pack, no gun
return ..()
/obj/item/weapon/gun/ballistic/minigun/attack_self(mob/living/user)
return
@@ -6,8 +6,8 @@
origin_tech = "combat=3;materials=2"
casing_ejector = 0
/obj/item/weapon/gun/ballistic/revolver/New()
..()
/obj/item/weapon/gun/ballistic/revolver/Initialize()
. = ..()
if(!istype(magazine, /obj/item/ammo_box/magazine/internal/cylinder))
verbs -= /obj/item/weapon/gun/ballistic/revolver/verb/spin
@@ -95,8 +95,8 @@
unique_rename = 1
unique_reskin = 1
/obj/item/weapon/gun/ballistic/revolver/detective/New()
..()
/obj/item/weapon/gun/ballistic/revolver/detective/Initialize()
. = ..()
options["Default"] = "detective"
options["Leopard Spots"] = "detective_leopard"
options["Black Panther"] = "detective_panther"
@@ -177,8 +177,8 @@
mag_type = /obj/item/ammo_box/magazine/internal/cylinder/rus357
var/spun = FALSE
/obj/item/weapon/gun/ballistic/revolver/russian/New()
..()
/obj/item/weapon/gun/ballistic/revolver/russian/Initialize()
. = ..()
do_spin()
spun = TRUE
update_icon()
@@ -271,8 +271,8 @@
unique_rename = 1
unique_reskin = 1
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/New()
..()
/obj/item/weapon/gun/ballistic/revolver/doublebarrel/Initialize()
. = ..()
options["Default"] = "dshotgun"
options["Dark Red Finish"] = "dshotgun-d"
options["Ash"] = "dshotgun-f"
@@ -147,8 +147,8 @@
mag_type = /obj/item/ammo_box/magazine/internal/boltaction/enchanted/arcane_barrage
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/New()
..()
/obj/item/weapon/gun/ballistic/shotgun/boltaction/enchanted/Initialize()
. = ..()
bolt_open = 1
pump()
gun_type = type
@@ -213,8 +213,8 @@
var/toggled = 0
var/obj/item/ammo_box/magazine/internal/shot/alternate_magazine
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/New()
..()
/obj/item/weapon/gun/ballistic/shotgun/automatic/dual_tube/Initialize()
. = ..()
if (!alternate_magazine)
alternate_magazine = new mag_type(src)
@@ -35,9 +35,9 @@
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot
mag_type = /obj/item/ammo_box/magazine/toy/pistol/riot
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot/New()
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/riot/Initialize()
magazine = new /obj/item/ammo_box/magazine/toy/pistol/riot(src)
..()
return ..()
/obj/item/weapon/gun/ballistic/automatic/toy/pistol/unrestricted
pin = /obj/item/device/firing_pin
+2 -2
View File
@@ -25,8 +25,8 @@
update_icon()
/obj/item/weapon/gun/energy/New()
..()
/obj/item/weapon/gun/energy/Initialize()
. = ..()
if(cell_type)
power_supply = new cell_type(src)
else
@@ -22,9 +22,9 @@
charge_sections = 3
can_flashlight = 0 // Can't attach or detach the flashlight, and override it's icon update
/obj/item/weapon/gun/energy/e_gun/mini/New()
/obj/item/weapon/gun/energy/e_gun/mini/Initialize()
gun_light = new /obj/item/device/flashlight/seclite(src)
..()
return ..()
/obj/item/weapon/gun/energy/e_gun/mini/update_icon()
..()
@@ -68,7 +68,7 @@
unique_frequency = TRUE
max_mod_capacity = 80
/obj/item/weapon/gun/energy/kinetic_accelerator/New()
/obj/item/weapon/gun/energy/kinetic_accelerator/Initialize()
. = ..()
if(!holds_charge)
empty()
@@ -17,9 +17,9 @@
/obj/item/weapon/gun/energy/pulse/prize
pin = /obj/item/device/firing_pin
/obj/item/weapon/gun/energy/pulse/prize/New()
/obj/item/weapon/gun/energy/pulse/prize/Initialize()
. = ..()
GLOB.poi_list |= src
GLOB.poi_list += src
var/msg = "A pulse rifle prize has been created at [ADMIN_COORDJMP(src)]"
message_admins(msg)
+2 -2
View File
@@ -44,8 +44,8 @@
charges--//... drain a charge
recharge_newshot()
/obj/item/weapon/gun/magic/New()
..()
/obj/item/weapon/gun/magic/Initialize()
. = ..()
charges = max_charges
chambered = new ammo_type(src)
if(can_charge)
+2 -2
View File
@@ -9,13 +9,13 @@
max_charges = 100 //100, 50, 50, 34 (max charge distribution by 25%ths)
var/variable_charges = 1
/obj/item/weapon/gun/magic/wand/New()
/obj/item/weapon/gun/magic/wand/Initialize()
if(prob(75) && variable_charges) //25% chance of listed max charges, 50% chance of 1/2 max charges, 25% chance of 1/3 max charges
if(prob(33))
max_charges = Ceiling(max_charges / 3)
else
max_charges = Ceiling(max_charges / 2)
..()
return ..()
/obj/item/weapon/gun/magic/wand/examine(mob/user)
..()
+4 -4
View File
@@ -16,8 +16,8 @@
weapon_weight = WEAPON_MEDIUM
/obj/item/weapon/gun/medbeam/New()
..()
/obj/item/weapon/gun/medbeam/Initialize()
. = ..()
START_PROCESSING(SSobj, src)
/obj/item/weapon/gun/medbeam/Destroy(mob/user)
@@ -128,6 +128,6 @@
/obj/item/weapon/gun/medbeam/mech
mounted = 1
/obj/item/weapon/gun/medbeam/mech/New()
..()
/obj/item/weapon/gun/medbeam/mech/Initialize()
. = ..()
STOP_PROCESSING(SSobj, src) //Mech mediguns do not process until installed, and are controlled by the holder obj
+2 -2
View File
@@ -14,8 +14,8 @@
var/list/syringes = list()
var/max_syringes = 1
/obj/item/weapon/gun/syringe/New()
..()
/obj/item/weapon/gun/syringe/Initialize()
. = ..()
chambered = new /obj/item/ammo_casing/syringegun(src)
/obj/item/weapon/gun/syringe/recharge_newshot()