[MIRROR] [READY] RND TECHWEBS + DEPARTMENTAL LATHES (#4014)

* [READY] RND TECHWEBS + DEPARTMENTAL LATHES

* resetting all the maps because we can worry about them later.

* Regexing

* I'm fucked

* Fixes

* .

* maps

* bleh

* ree

* fixes
This commit is contained in:
CitadelStationBot
2017-12-11 16:36:38 -08:00
committed by kevinz000
parent b5600cb91c
commit cc0b768c72
332 changed files with 4962 additions and 4331 deletions
+16 -16
View File
@@ -15,13 +15,13 @@
var/efficiency = 0
var/productivity = 0
var/max_items = 40
var/datum/research/files
var/datum/techweb/stored_research
var/list/show_categories = list("Food", "Botany Chemicals", "Leather and Cloth")
var/list/timesFiveCategories = list("Food", "Botany Chemicals")
/obj/machinery/biogenerator/Initialize()
. = ..()
files = new /datum/research/biogenerator(src)
stored_research = new /datum/techweb/specialized/autounlocking/biogenerator
create_reagents(1000)
/obj/machinery/biogenerator/Destroy()
@@ -124,7 +124,7 @@
to_chat(user, "<span class='info'>You empty the plant bag into the biogenerator, filling it to its capacity.</span>")
else
to_chat(user, "<span class='info'>You fill the biogenerator to its capacity.</span>")
return 1 //no afterattack
return TRUE //no afterattack
else if(istype(O, /obj/item/reagent_containers/food/snacks/grown))
var/i = 0
@@ -135,7 +135,7 @@
else
if(user.transferItemToLoc(O, src))
to_chat(user, "<span class='info'>You put [O.name] in [src.name]</span>")
return 1 //no afterattack
return TRUE //no afterattack
else if (istype(O, /obj/item/disk/design_disk))
user.visible_message("[user] begins to load \the [O] in \the [src]...",
"You begin to load a design from \the [O]...",
@@ -145,9 +145,9 @@
if(do_after(user, 10, target = src))
for(var/B in D.blueprints)
if(B)
files.AddDesign2Known(B)
stored_research.add_design(B)
processing = FALSE
return 1
return TRUE
else
to_chat(user, "<span class='warning'>You cannot put this in [src.name]!</span>")
@@ -176,8 +176,8 @@
var/categories = show_categories.Copy()
for(var/V in categories)
categories[V] = list()
for(var/V in files.known_designs)
var/datum/design/D = files.known_designs[V]
for(var/V in stored_research.researched_designs)
var/datum/design/D = stored_research.researched_designs[V]
for(var/C in categories)
if(C in D.category)
categories[C] += D
@@ -237,16 +237,16 @@
/obj/machinery/biogenerator/proc/check_cost(list/materials, multiplier = 1, remove_points = 1)
if(materials.len != 1 || materials[1] != MAT_BIOMASS)
return 0
return FALSE
if (materials[MAT_BIOMASS]*multiplier/efficiency > points)
menustat = "nopoints"
return 0
return FALSE
else
if(remove_points)
points -= materials[MAT_BIOMASS]*multiplier/efficiency
update_icon()
updateUsrDialog()
return 1
return TRUE
/obj/machinery/biogenerator/proc/check_container_volume(list/reagents, multiplier = 1)
var/sum_reagents = 0
@@ -256,19 +256,19 @@
if(beaker.reagents.total_volume + sum_reagents > beaker.reagents.maximum_volume)
menustat = "nobeakerspace"
return 0
return FALSE
return 1
return TRUE
/obj/machinery/biogenerator/proc/create_product(datum/design/D, amount)
if(!beaker || !loc)
return 0
return FALSE
if(ispath(D.build_path, /obj/item/stack))
if(!check_container_volume(D.make_reagents, amount))
return 0
return FALSE
if(!check_cost(D.materials, amount))
return 0
return FALSE
var/obj/item/stack/product = new D.build_path(loc)
product.amount = amount