here we go again (#2456)

This commit is contained in:
LetterJay
2017-08-24 19:24:25 -07:00
committed by kevinz000
parent c7ed043fd5
commit 188193eb61
1107 changed files with 25420 additions and 25417 deletions
+50 -50
View File
@@ -1,4 +1,4 @@
/obj/item/weapon/stock_parts/cell
/obj/item/stock_parts/cell
name = "power cell"
desc = "A rechargeable electrochemical power cell."
icon = 'icons/obj/power.dmi'
@@ -21,10 +21,10 @@
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()
/obj/item/stock_parts/cell/get_cell()
return src
/obj/item/weapon/stock_parts/cell/New()
/obj/item/stock_parts/cell/New()
..()
START_PROCESSING(SSobj, src)
charge = maxcharge
@@ -32,11 +32,11 @@
desc += " This one has a power rating of [maxcharge], and you should not swallow it."
update_icon()
/obj/item/weapon/stock_parts/cell/Destroy()
/obj/item/stock_parts/cell/Destroy()
STOP_PROCESSING(SSobj, src)
return ..()
/obj/item/weapon/stock_parts/cell/vv_edit_var(var_name, var_value)
/obj/item/stock_parts/cell/vv_edit_var(var_name, var_value)
switch(var_name)
if("self_recharge")
if(var_value)
@@ -45,13 +45,13 @@
STOP_PROCESSING(SSobj, src)
. = ..()
/obj/item/weapon/stock_parts/cell/process()
/obj/item/stock_parts/cell/process()
if(self_recharge)
give(chargerate * 0.25)
else
return PROCESS_KILL
/obj/item/weapon/stock_parts/cell/update_icon()
/obj/item/stock_parts/cell/update_icon()
cut_overlays()
if(grown_battery)
add_overlay("grown_wires")
@@ -62,11 +62,11 @@
else
add_overlay("cell-o1")
/obj/item/weapon/stock_parts/cell/proc/percent() // return % charge of cell
/obj/item/stock_parts/cell/proc/percent() // return % charge of cell
return 100*charge/maxcharge
// use power from a cell
/obj/item/weapon/stock_parts/cell/proc/use(amount)
/obj/item/stock_parts/cell/proc/use(amount)
if(rigged && amount > 0)
explode()
return 0
@@ -78,7 +78,7 @@
return 1
// recharge the cell
/obj/item/weapon/stock_parts/cell/proc/give(amount)
/obj/item/stock_parts/cell/proc/give(amount)
if(rigged && amount > 0)
explode()
return 0
@@ -88,28 +88,28 @@
charge += power_used
return power_used
/obj/item/weapon/stock_parts/cell/examine(mob/user)
/obj/item/stock_parts/cell/examine(mob/user)
..()
if(rigged)
to_chat(user, "<span class='danger'>This power cell seems to be faulty!</span>")
else
to_chat(user, "The charge meter reads [round(src.percent() )]%.")
/obj/item/weapon/stock_parts/cell/suicide_act(mob/user)
/obj/item/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>")
return (FIRELOSS)
/obj/item/weapon/stock_parts/cell/attackby(obj/item/W, mob/user, params)
/obj/item/stock_parts/cell/attackby(obj/item/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/reagent_containers/syringe))
var/obj/item/weapon/reagent_containers/syringe/S = W
if(istype(W, /obj/item/reagent_containers/syringe))
var/obj/item/reagent_containers/syringe/S = W
to_chat(user, "<span class='notice'>You inject the solution into the power cell.</span>")
if(S.reagents.has_reagent("plasma", 5))
rigged = 1
S.reagents.clear_reagents()
/obj/item/weapon/stock_parts/cell/proc/explode()
/obj/item/stock_parts/cell/proc/explode()
var/turf/T = get_turf(src.loc)
/*
* 1000-cell explosion(T, -1, 0, 1, 1)
@@ -131,19 +131,19 @@
explosion(T, devastation_range, heavy_impact_range, light_impact_range, flash_range)
qdel(src)
/obj/item/weapon/stock_parts/cell/proc/corrupt()
/obj/item/stock_parts/cell/proc/corrupt()
charge /= 2
maxcharge = max(maxcharge/2, chargerate)
if (prob(10))
rigged = 1 //broken batterys are dangerous
/obj/item/weapon/stock_parts/cell/emp_act(severity)
/obj/item/stock_parts/cell/emp_act(severity)
charge -= 1000 / severity
if (charge < 0)
charge = 0
..()
/obj/item/weapon/stock_parts/cell/ex_act(severity, target)
/obj/item/stock_parts/cell/ex_act(severity, target)
..()
if(!QDELETED(src))
switch(severity)
@@ -155,53 +155,53 @@
corrupt()
/obj/item/weapon/stock_parts/cell/blob_act(obj/structure/blob/B)
/obj/item/stock_parts/cell/blob_act(obj/structure/blob/B)
ex_act(EXPLODE_DEVASTATE)
/obj/item/weapon/stock_parts/cell/proc/get_electrocute_damage()
/obj/item/stock_parts/cell/proc/get_electrocute_damage()
if(charge >= 1000)
return Clamp(round(charge/10000), 10, 90) + rand(-5,5)
else
return 0
/* Cell variants*/
/obj/item/weapon/stock_parts/cell/crap
/obj/item/stock_parts/cell/crap
name = "\improper Nanotrasen brand rechargeable AA battery"
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
maxcharge = 500
materials = list(MAT_GLASS=40)
rating = 2
/obj/item/weapon/stock_parts/cell/crap/empty/New()
/obj/item/stock_parts/cell/crap/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/secborg
/obj/item/stock_parts/cell/secborg
name = "security borg rechargeable D battery"
origin_tech = null
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
materials = list(MAT_GLASS=40)
rating = 2.5
/obj/item/weapon/stock_parts/cell/secborg/empty/New()
/obj/item/stock_parts/cell/secborg/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/pulse //200 pulse shots
/obj/item/stock_parts/cell/pulse //200 pulse shots
name = "pulse rifle power cell"
maxcharge = 40000
rating = 3
chargerate = 1500
/obj/item/weapon/stock_parts/cell/pulse/carbine //25 pulse shots
/obj/item/stock_parts/cell/pulse/carbine //25 pulse shots
name = "pulse carbine power cell"
maxcharge = 5000
/obj/item/weapon/stock_parts/cell/pulse/pistol //10 pulse shots
/obj/item/stock_parts/cell/pulse/pistol //10 pulse shots
name = "pulse pistol power cell"
maxcharge = 2000
/obj/item/weapon/stock_parts/cell/high
/obj/item/stock_parts/cell/high
name = "high-capacity power cell"
origin_tech = "powerstorage=2"
icon_state = "hcell"
@@ -210,18 +210,18 @@
rating = 3
chargerate = 1500
/obj/item/weapon/stock_parts/cell/high/plus
/obj/item/stock_parts/cell/high/plus
name = "high-capacity power cell+"
desc = "Where did these come from?"
icon_state = "h+cell"
maxcharge = 15000
chargerate = 2250
/obj/item/weapon/stock_parts/cell/high/empty/New()
/obj/item/stock_parts/cell/high/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/super
/obj/item/stock_parts/cell/super
name = "super-capacity power cell"
origin_tech = "powerstorage=3;materials=3"
icon_state = "scell"
@@ -230,11 +230,11 @@
rating = 4
chargerate = 2000
/obj/item/weapon/stock_parts/cell/super/empty/New()
/obj/item/stock_parts/cell/super/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/hyper
/obj/item/stock_parts/cell/hyper
name = "hyper-capacity power cell"
origin_tech = "powerstorage=4;engineering=4;materials=4"
icon_state = "hpcell"
@@ -243,11 +243,11 @@
rating = 5
chargerate = 3000
/obj/item/weapon/stock_parts/cell/hyper/empty/New()
/obj/item/stock_parts/cell/hyper/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/bluespace
/obj/item/stock_parts/cell/bluespace
name = "bluespace power cell"
desc = "A rechargeable transdimensional power cell."
origin_tech = "powerstorage=5;bluespace=4;materials=4;engineering=4"
@@ -257,11 +257,11 @@
rating = 6
chargerate = 4000
/obj/item/weapon/stock_parts/cell/bluespace/empty/New()
/obj/item/stock_parts/cell/bluespace/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/infinite
/obj/item/stock_parts/cell/infinite
name = "infinite-capacity power cell!"
icon_state = "icell"
origin_tech = "powerstorage=7"
@@ -270,10 +270,10 @@
rating = 6
chargerate = 30000
/obj/item/weapon/stock_parts/cell/infinite/use()
/obj/item/stock_parts/cell/infinite/use()
return 1
/obj/item/weapon/stock_parts/cell/infinite/abductor
/obj/item/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'
@@ -283,11 +283,11 @@
rating = 12
ratingdesc = FALSE
/obj/item/weapon/stock_parts/cell/infinite/abductor/update_icon()
/obj/item/stock_parts/cell/infinite/abductor/update_icon()
return
/obj/item/weapon/stock_parts/cell/potato
/obj/item/stock_parts/cell/potato
name = "potato battery"
desc = "A rechargeable starch based power cell."
icon = 'icons/obj/hydroponics/harvest.dmi'
@@ -299,7 +299,7 @@
rating = 1
grown_battery = TRUE //it has the overlays for wires
/obj/item/weapon/stock_parts/cell/high/slime
/obj/item/stock_parts/cell/high/slime
name = "charged slime core"
desc = "A yellow slime core infused with plasma, it crackles with power."
origin_tech = "powerstorage=5;biotech=4"
@@ -308,31 +308,31 @@
materials = list()
self_recharge = 1 // Infused slime cores self-recharge, over time
/obj/item/weapon/stock_parts/cell/emproof
/obj/item/stock_parts/cell/emproof
name = "\improper EMP-proof cell"
desc = "An EMP-proof cell."
maxcharge = 500
rating = 2
/obj/item/weapon/stock_parts/cell/emproof/empty/New()
/obj/item/stock_parts/cell/emproof/empty/New()
..()
charge = 0
/obj/item/weapon/stock_parts/cell/emproof/emp_act(severity)
/obj/item/stock_parts/cell/emproof/emp_act(severity)
return
/obj/item/weapon/stock_parts/cell/emproof/corrupt()
/obj/item/stock_parts/cell/emproof/corrupt()
return
/obj/item/weapon/stock_parts/cell/beam_rifle
/obj/item/stock_parts/cell/beam_rifle
name = "beam rifle capacitor"
desc = "A high powered capacitor that can provide huge amounts of energy in an instant"
maxcharge = 50000
chargerate = 5000 //Extremely energy intensive
rating = 4
/obj/item/weapon/stock_parts/cell/beam_rifle/corrupt()
/obj/item/stock_parts/cell/beam_rifle/corrupt()
return
/obj/item/weapon/stock_parts/cell/beam_rifle/emp_act(severity)
/obj/item/stock_parts/cell/beam_rifle/emp_act(severity)
charge = Clamp((charge-(10000/severity)),0,maxcharge)