(Porta) turret update, map area update

This commit is contained in:
Markolie
2015-03-01 02:10:32 +01:00
parent bbcc9e63ce
commit b28f791f8f
21 changed files with 2466 additions and 1712 deletions
+7
View File
@@ -36,6 +36,7 @@
var/last_fired = 0
var/obj/item/device/flashlight/F = null
var/can_flashlight = 0
var/heavy_weapon = 0
proc/ready_to_fire()
if(world.time >= last_fired + fire_delay)
@@ -122,6 +123,12 @@
if(!in_chamber)
return
if(heavy_weapon)
if(user.get_inactive_hand())
recoil = 4 //one-handed kick
else
recoil = initial(recoil)
in_chamber.firer = user
in_chamber.def_zone = user.zone_sel.selecting
@@ -130,3 +130,38 @@
update_charge()
update_reactor()
update_mode()
/obj/item/weapon/gun/energy/gun/turret
name = "hybrid turret gun"
desc = "A heavy hybrid energy cannon with two settings: Stun and kill."
icon_state = "turretlaser"
slot_flags = null
w_class = 5
heavy_weapon = 1
can_flashlight = 0
/obj/item/weapon/gun/energy/gun/turret/update_icon()
icon_state = initial(icon_state)
/obj/item/weapon/gun/energy/gun/turret/attack_self(mob/living/user as mob)
switch(mode)
if(0)
mode = 1
charge_cost = 1000
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 = 500
fire_sound = 'sound/weapons/Taser2.ogg'
user << "\red [src.name] is now set to disable."
projectile_type = "/obj/item/projectile/beam/disabler"
modifystate = "energystun"
update_icon()
if(user.l_hand == src)
user.update_inv_l_hand()
else
user.update_inv_r_hand()