Fixes the circuit printer and protolathe's material cost check as well. Updates this local to match Master.

This commit is contained in:
Mechoid
2017-10-16 13:07:41 -07:00
5 changed files with 39 additions and 6 deletions

View File

@@ -158,6 +158,7 @@
#define O_MOUTH "mouth"
#define O_EYES "eyes"
#define O_HEART "heart"
#define O_CELL "cell"
#define O_LUNGS "lungs"
#define O_BRAIN "brain"
#define O_LIVER "liver"

View File

@@ -2,7 +2,7 @@
name = "microbattery"
desc = "A small, powerful cell for use in fully prosthetic bodies."
icon_state = "scell"
organ_tag = "cell"
organ_tag = O_CELL
parent_organ = BP_TORSO
vital = 1
@@ -21,7 +21,7 @@
// Used for an MMI or posibrain being installed into a human.
/obj/item/organ/internal/mmi_holder
name = "brain interface"
organ_tag = "brain"
organ_tag = O_BRAIN
parent_organ = BP_HEAD
vital = 1
var/brain_type = /obj/item/device/mmi

View File

@@ -170,10 +170,10 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
/obj/machinery/r_n_d/circuit_imprinter/proc/canBuild(var/datum/design/D)
for(var/M in D.materials)
if(materials[M] < D.materials[M])
if(materials[M] < (D.materials[M] * mat_efficiency))
return 0
for(var/C in D.chemicals)
if(!reagents.has_reagent(C, D.chemicals[C]))
if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency))
return 0
return 1

View File

@@ -156,6 +156,38 @@
materials = list(DEFAULT_WALL_MATERIAL = 5625, "glass" = 5625)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
/datum/design/item/prosfab/pros/heart
name = "Prosthetic heart"
id = "pros_heart"
build_path = /obj/item/organ/internal/heart
time = 15
materials = list(DEFAULT_WALL_MATERIAL = 5625, "glass" = 1000)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
/datum/design/item/prosfab/pros/lungs
name = "Prosthetic lungs"
id = "pros_lung"
build_path = /obj/item/organ/internal/lungs
time = 15
materials = list(DEFAULT_WALL_MATERIAL = 5625, "glass" = 1000)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
/datum/design/item/prosfab/pros/liver
name = "Prosthetic liver"
id = "pros_liver"
build_path = /obj/item/organ/internal/liver
time = 15
materials = list(DEFAULT_WALL_MATERIAL = 5625, "glass" = 1000)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
/datum/design/item/prosfab/pros/kidneys
name = "Prosthetic liver"
id = "pros_kidney"
build_path = /obj/item/organ/internal/kidneys
time = 15
materials = list(DEFAULT_WALL_MATERIAL = 5625, "glass" = 1000)
// req_tech = list(TECH_ENGINEERING = 2, TECH_MATERIAL = 2)
//////////////////// Cyborg Parts ////////////////////
/datum/design/item/prosfab/cyborg
category = "Cyborg Parts"

View File

@@ -164,10 +164,10 @@
/obj/machinery/r_n_d/protolathe/proc/canBuild(var/datum/design/D)
for(var/M in D.materials)
if(materials[M] < D.materials[M])
if(materials[M] < (D.materials[M] * mat_efficiency))
return 0
for(var/C in D.chemicals)
if(!reagents.has_reagent(C, D.chemicals[C]))
if(!reagents.has_reagent(C, D.chemicals[C] * mat_efficiency))
return 0
return 1