mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 18:02:57 +00:00
Fix battery cell icons
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
icon_state = "cell_mini"
|
||||
w_class = WEIGHT_CLASS_TINY
|
||||
maxcharge = 750
|
||||
has_charge_overlay = FALSE
|
||||
|
||||
/obj/item/stock_parts/cell/computer/advanced
|
||||
name = "advanced battery"
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
var/ratingdesc = TRUE
|
||||
///If it's a grown that acts as a battery, add a wire overlay to it.
|
||||
var/grown_battery = FALSE
|
||||
/// If true, add the o1 and o2 overlays based on charge level.
|
||||
var/has_charge_overlay = TRUE
|
||||
rad_flags = RAD_NO_CONTAMINATE // Prevent the same cheese as with the stock parts
|
||||
|
||||
/obj/item/stock_parts/cell/get_cell()
|
||||
@@ -64,7 +66,7 @@
|
||||
if(grown_battery)
|
||||
. += image('icons/obj/power.dmi', "grown_wires")
|
||||
return
|
||||
if(charge < 0.01)
|
||||
if(!has_charge_overlay || charge < 0.01)
|
||||
return
|
||||
else if(charge/maxcharge >=0.995)
|
||||
. += "cell-o2"
|
||||
|
||||
Reference in New Issue
Block a user