up to upstream-merge-27868
This commit is contained in:
@@ -19,13 +19,16 @@
|
||||
var/ratingdesc = TRUE
|
||||
var/grown_battery = FALSE // If it's a grown that acts as a battery, add a wire overlay to it.
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/get_cell()
|
||||
return src
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/New()
|
||||
..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
charge = maxcharge
|
||||
if(ratingdesc)
|
||||
desc += " This one has a power rating of [maxcharge], and you should not swallow it."
|
||||
updateicon()
|
||||
update_icon()
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
@@ -46,16 +49,16 @@
|
||||
else
|
||||
return PROCESS_KILL
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/updateicon()
|
||||
/obj/item/weapon/stock_parts/cell/update_icon()
|
||||
cut_overlays()
|
||||
if(grown_battery)
|
||||
add_overlay("grown_wires")
|
||||
add_overlay("grown_wires")
|
||||
if(charge < 0.01)
|
||||
return
|
||||
else if(charge/maxcharge >=0.995)
|
||||
add_overlay("cell-o2")
|
||||
add_overlay("cell-o2")
|
||||
else
|
||||
add_overlay("cell-o1")
|
||||
add_overlay("cell-o1")
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/percent() // return % charge of cell
|
||||
return 100*charge/maxcharge
|
||||
@@ -69,7 +72,7 @@
|
||||
return 0
|
||||
charge = (charge - amount)
|
||||
if(!istype(loc, /obj/machinery/power/apc))
|
||||
SSblackbox.add_details("cell_used","[src.type]")
|
||||
SSblackbox.add_details("cell_used","[src.type]")
|
||||
return 1
|
||||
|
||||
// recharge the cell
|
||||
@@ -123,7 +126,7 @@
|
||||
corrupt()
|
||||
return
|
||||
//explosion(T, 0, 1, 2, 2)
|
||||
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
|
||||
qdel(src)
|
||||
|
||||
/obj/item/weapon/stock_parts/cell/proc/corrupt()
|
||||
|
||||
Reference in New Issue
Block a user