mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-26 01:52:15 +00:00
Improves energy gun charge icon handling, adds ion rifle in-hand sprite.
This commit is contained in:
@@ -76,7 +76,13 @@
|
||||
/obj/item/weapon/gun/energy/update_icon()
|
||||
if(charge_meter)
|
||||
var/ratio = power_supply.charge / power_supply.maxcharge
|
||||
ratio = round(ratio, 0.25) * 100
|
||||
|
||||
//make sure that rounding down will not give us the empty state even if we have charge for a shot left.
|
||||
if(power_supply.charge < charge_cost)
|
||||
ratio = 0
|
||||
else
|
||||
ratio = max(round(ratio, 0.25) * 100, 25)
|
||||
|
||||
if(modifystate)
|
||||
icon_state = "[modifystate][ratio]"
|
||||
else
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
name = "ion rifle"
|
||||
desc = "A man portable anti-armor weapon designed to disable mechanical threats"
|
||||
icon_state = "ionrifle"
|
||||
item_state = "laser"
|
||||
item_state = "ionrifle"
|
||||
fire_sound = 'sound/weapons/Laser.ogg'
|
||||
origin_tech = "combat=2;magnets=4"
|
||||
w_class = 4.0
|
||||
w_class = 4
|
||||
force = 10
|
||||
flags = CONDUCT
|
||||
slot_flags = SLOT_BACK
|
||||
@@ -17,6 +17,13 @@
|
||||
return //so it doesn't EMP itself, I guess
|
||||
..()
|
||||
|
||||
/obj/item/weapon/gun/energy/ionrifle/update_icon()
|
||||
..()
|
||||
if(power_supply.charge < charge_cost)
|
||||
item_state = "ionrifle-empty"
|
||||
else
|
||||
item_state = initial(item_state)
|
||||
|
||||
/obj/item/weapon/gun/energy/decloner
|
||||
name = "biological demolecularisor"
|
||||
desc = "A gun that discharges high amounts of controlled radiation to slowly break a target into component elements."
|
||||
|
||||
Reference in New Issue
Block a user