Makes powercells produced by the protolathe start uncharged.

This commit is contained in:
mwerezak
2015-07-11 23:51:39 -04:00
committed by HarpyEagle
parent 8341620be4
commit 83df0fa8f8
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -195,7 +195,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency)
if(D.build_path)
var/obj/new_item = new D.build_path(src)
var/obj/new_item = D.Fabricate(src)
new_item.loc = loc
if(mat_efficiency != 1) // No matter out of nowhere
if(new_item.matter && new_item.matter.len > 0)
+10
View File
@@ -55,6 +55,11 @@ other types of metals and chemistry for reagents).
desc = "Allows for the construction of \a [item_name]."
return
//Returns a new instance of the item for this design
//This is to allow additional initialization to be performed, including possibly additional contructor arguments.
/datum/design/proc/Fabricate(var/newloc)
return new build_path(newloc)
/datum/design/item
build_type = PROTOLATHE
@@ -212,6 +217,11 @@ other types of metals and chemistry for reagents).
var/obj/item/weapon/cell/C = build_path
desc = "Allows the construction of power cells that can hold [initial(C.maxcharge)] units of energy."
/datum/design/item/powercell/Fabricate()
var/obj/item/weapon/cell/C = ..()
C.charge = 0 //shouldn't produce power out of thin air.
return C
/datum/design/item/powercell/basic
name = "basic"
build_type = PROTOLATHE | MECHFAB
+1 -1
View File
@@ -196,7 +196,7 @@
reagents.remove_reagent(C, D.chemicals[C] * mat_efficiency)
if(D.build_path)
var/obj/new_item = new D.build_path(src)
var/obj/new_item = D.Fabricate(src)
new_item.loc = loc
if(mat_efficiency != 1) // No matter out of nowhere
if(new_item.matter && new_item.matter.len > 0)