mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-30 12:03:11 +00:00
Merge pull request #9258 from mwerezak/charge
Updates instances of power cell usage
This commit is contained in:
@@ -167,7 +167,8 @@
|
||||
return
|
||||
if(!R.cell.fully_charged())
|
||||
var/diff = min(R.cell.maxcharge - R.cell.charge, charge_rate) // Capped at charge_rate charge / tick
|
||||
if (cell.use(diff))
|
||||
if (cell.charge >= diff)
|
||||
cell.use(diff)
|
||||
R.cell.give(diff)
|
||||
if(weld_rate && R.getBruteLoss())
|
||||
R.adjustBruteLoss(-1)
|
||||
|
||||
@@ -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,12 +35,13 @@
|
||||
|
||||
/obj/item/weapon/melee/baton/proc/deductcharge(var/chrgdeductamt)
|
||||
if(bcell)
|
||||
if(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