more fixes

This commit is contained in:
Fox-McCloud
2017-01-23 00:53:44 -05:00
parent 104bfab759
commit dc0710135e
20 changed files with 181 additions and 91 deletions
+27 -4
View File
@@ -18,6 +18,17 @@
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
var/chargerate = 1000 //how much power is given every tick in a recharger
var/self_recharge = 0 //does it self recharge, over time, or not?
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/New()
..()
processing_objects.Add(src)
charge = maxcharge
updateicon()
/obj/item/weapon/stock_parts/cell/Destroy()
processing_objects.Remove(src)
return ..()
/obj/item/weapon/stock_parts/cell/suicide_act(mob/user)
to_chat(viewers(user), "<span class='suicide'>[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.</span>")
@@ -29,6 +40,17 @@
else
return PROCESS_KILL
/obj/item/weapon/stock_parts/cell/proc/updateicon()
overlays.Cut()
if(grown_battery)
overlays += image('icons/obj/power.dmi', "grown_wires")
if(charge < 0.01)
return
else if(charge/maxcharge >=0.995)
overlays += image('icons/obj/power.dmi', "cell-o2")
else
overlays += image('icons/obj/power.dmi', "cell-o1")
/obj/item/weapon/stock_parts/cell/crap
name = "\improper Nanotrasen brand rechargable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
@@ -119,14 +141,15 @@
/obj/item/weapon/stock_parts/cell/potato
name = "potato battery"
desc = "A rechargable starch based power cell."
origin_tech = "powerstorage=1"
icon = 'icons/obj/power.dmi' //'icons/obj/harvest.dmi'
icon_state = "potato_cell" //"potato_battery"
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "potato"
origin_tech = "powerstorage=1;biotech=1"
charge = 100
maxcharge = 3000
rating = 1
materials = list()
rating = 1
minor_fault = 1
grown_battery = TRUE //it has the overlays for wires
/obj/item/weapon/stock_parts/cell/high/slime
name = "charged slime core"