Revert "12/21 modernizations from TG live"

This commit is contained in:
LetterJay
2016-12-22 22:35:44 -06:00
committed by GitHub
parent cf59ac1c3d
commit ae40d4134e
2215 changed files with 86928 additions and 707332 deletions
+15 -34
View File
@@ -1,6 +1,7 @@
/obj/item/weapon/stock_parts/cell
name = "power cell"
desc = "A rechargable electrochemical power cell."
var/ratingdesc
icon = 'icons/obj/power.dmi'
icon_state = "cell"
item_state = "cell"
@@ -9,36 +10,33 @@
throwforce = 5
throw_speed = 2
throw_range = 5
w_class = WEIGHT_CLASS_SMALL
w_class = 2
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 1000
materials = list(MAT_METAL=700, MAT_GLASS=50)
var/rigged = 0 // true if rigged to explode
var/chargerate = 100 //how much power is given every tick in a recharger
var/self_recharge = 0 //does it self recharge, over time, or not?
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/New()
..()
START_PROCESSING(SSobj, src)
charge = maxcharge
if(ratingdesc)
desc += " This one has a power rating of [maxcharge], and you should not swallow it."
ratingdesc = " This one has a power rating of [maxcharge], and you should not swallow it."
desc = desc + ratingdesc
updateicon()
/obj/item/weapon/stock_parts/cell/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/stock_parts/cell/vv_edit_var(var_name, var_value)
switch(var_name)
if("self_recharge")
if(var_value)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/weapon/stock_parts/cell/on_varedit(modified_var)
if(modified_var == "self_recharge")
if(self_recharge)
START_PROCESSING(SSobj, src)
else
STOP_PROCESSING(SSobj, src)
..()
/obj/item/weapon/stock_parts/cell/process()
if(self_recharge)
@@ -48,8 +46,6 @@
/obj/item/weapon/stock_parts/cell/proc/updateicon()
cut_overlays()
if(grown_battery)
add_overlay(image('icons/obj/power.dmi', "grown_wires"))
if(charge < 0.01)
return
else if(charge/maxcharge >=0.995)
@@ -91,7 +87,7 @@
user << "The charge meter reads [round(src.percent() )]%."
/obj/item/weapon/stock_parts/cell/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] is licking the electrodes of [src]! It looks like [user.p_theyre()] trying to commit suicide!</span>")
user.visible_message("<span class='suicide'>[user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide.</span>")
return (FIRELOSS)
/obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user, params)
@@ -150,7 +146,7 @@
corrupt()
/obj/item/weapon/stock_parts/cell/blob_act(obj/structure/blob/B)
/obj/item/weapon/stock_parts/cell/blob_act(obj/effect/blob/B)
ex_act(1)
/obj/item/weapon/stock_parts/cell/proc/get_electrocute_damage()
@@ -268,31 +264,16 @@
/obj/item/weapon/stock_parts/cell/infinite/use()
return 1
/obj/item/weapon/stock_parts/cell/infinite/abductor
name = "void core"
desc = "An alien power cell that produces energy seemingly out of nowhere."
icon = 'icons/obj/abductor.dmi'
icon_state = "cell"
origin_tech = "abductor=5;powerstorage=8;engineering=6"
maxcharge = 50000
rating = 12
ratingdesc = FALSE
/obj/item/weapon/stock_parts/cell/infinite/abductor/update_icon()
return
/obj/item/weapon/stock_parts/cell/potato
name = "potato battery"
desc = "A rechargable starch based power cell."
icon = 'icons/obj/hydroponics/harvest.dmi'
icon_state = "potato"
icon = 'icons/obj/power.dmi' //'icons/obj/hydroponics/harvest.dmi'
icon_state = "potato_cell" //"potato_battery"
origin_tech = "powerstorage=1;biotech=1"
charge = 100
maxcharge = 300
materials = list()
rating = 1
grown_battery = TRUE //it has the overlays for wires
/obj/item/weapon/stock_parts/cell/high/slime
name = "charged slime core"