Gun cleanup and rewrite

Rewrites gun.dm. Reorganizes the firing procedure into logical procs and cleans up some unnecessary variables or demotes them to the subtypes that actually care. Energy weapons that create their own projectiles no longer care about in_chamber. Launcher support is much more natural now.

Cleans up duplicated cyborg energy weapon power supply code. Adds support for energy weapons to recharge from external power sources, unifying cyborg and hardsuit mounted weapons. Incorporates the cyborg taser recharging mechanism. Cleans up laser tag gun duplication

Changes path strings to actual paths. Changes relative paths to absolute paths.

Renamed several targeting vars to make their purposes more clear.

Fixed targeting not handling firing correctly for certain subtypes.
This commit is contained in:
mwerezak
2015-02-07 17:00:52 -05:00
parent fac32d07e9
commit 611a42bb33
34 changed files with 697 additions and 1024 deletions

View File

@@ -157,7 +157,7 @@ var/obj/screen/robot_inventory
if (mymob.client.gun_mode) // If in aim mode, correct the sprite
mymob.gun_setting_icon.set_dir(2)
for(var/obj/item/weapon/gun/G in mymob) // If targeting someone, display other buttons
if (G.target)
if (G.aim_targets)
mymob.item_use_icon = new /obj/screen/gun/item(null)
if (mymob.client.target_can_click)
mymob.item_use_icon.set_dir(1)