mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Large bureaucracy overhaul. This affects clipboards, hand labelers, paper, paper bins, pens, photocopiers, and stamps. Everything (that I've changed significantly) should be BETTER. NO paths have been changed. All of the above have been added to the paperwork module (pending rename to bureaucracy, which is COOLER). SPRITES for most of the above (except photocopiers) are now in bureaucracy.dmi. Clipboards in particular are MASSIVELY IMPROVED. Hand labelers can now be turned ON AND OFF, to make it simpler to avoid labelling tables. This includes work in progress FOLDERS, which currently do NOTHING. Revision: r3253 Author: petethegoat
53 lines
1.2 KiB
Plaintext
53 lines
1.2 KiB
Plaintext
/obj/item/weapon/gun/energy
|
|
icon_state = "energy"
|
|
name = "energy gun"
|
|
desc = "A basic energy-based gun."
|
|
fire_sound = 'Taser.ogg'
|
|
|
|
var
|
|
obj/item/weapon/cell/power_supply //What type of power cell this uses
|
|
charge_cost = 100 //How much energy is needed to fire.
|
|
cell_type = "/obj/item/weapon/cell"
|
|
projectile_type = "/obj/item/projectile/energy"
|
|
modifystate
|
|
|
|
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
|
|
|
|
|
|
load_into_chamber()
|
|
if(in_chamber)
|
|
if(!istype(in_chamber, projectile_type))
|
|
del(in_chamber)
|
|
in_chamber = new projectile_type(src)
|
|
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
|
|
|
|
|
|
update_icon()
|
|
var/ratio = power_supply.charge / power_supply.maxcharge
|
|
ratio = round(ratio, 0.25) * 100
|
|
if(modifystate)
|
|
icon_state = text("[][]", modifystate, ratio)
|
|
else
|
|
icon_state = text("[][]", initial(icon_state), ratio)
|
|
|
|
|
|
|