mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 14:37:27 +01:00
Adds check_charge(), checked_use()
This commit is contained in:
@@ -88,8 +88,11 @@
|
||||
name = "infinite-capacity power cell!"
|
||||
icon_state = "icell"
|
||||
origin_tech = null
|
||||
maxcharge = 30000
|
||||
maxcharge = 30000 //determines how badly mobs get shocked
|
||||
matter = list("metal" = 700, "glass" = 80)
|
||||
|
||||
check_charge()
|
||||
return 1
|
||||
use()
|
||||
return 1
|
||||
|
||||
|
||||
@@ -35,13 +35,13 @@
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
|
||||
if(bcell)
|
||||
if(bcell.charge >= chrgdeductamt)
|
||||
bcell.use(chrgdeductamt)
|
||||
if(bcell.checked_use(chrgdeductamt))
|
||||
return 1
|
||||
else
|
||||
status = 0
|
||||
update_icon()
|
||||
return 0
|
||||
return null
|
||||
|
||||
/obj/item/weapon/melee/baton/update_icon()
|
||||
if(status)
|
||||
|
||||
Reference in New Issue
Block a user