Skip to content
This repository has been archived by the owner on Sep 12, 2021. It is now read-only.

Commit

Permalink
Bluespace Mining Machine (#59)
Browse files Browse the repository at this point in the history
* Bluespace Miners

Just remember to uncomment Copper later.

* Update code/modules/research/techweb/all_nodes.dm

Co-Authored-By: Mark Suckerberg <[email protected]>

* fuck travis

Co-authored-by: Mark Suckerberg <[email protected]>
  • Loading branch information
SynnGraffkin and MarkSuckerberg authored Feb 19, 2020
1 parent c398639 commit 842c189
Show file tree
Hide file tree
Showing 5 changed files with 70 additions and 0 deletions.
11 changes: 11 additions & 0 deletions code/game/objects/items/circuitboards/machine_circuitboards.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1123,6 +1123,17 @@

//Supply

/obj/item/circuitboard/machine/bluespace_miner
name = "Bluespace Miner (Machine Board)"
build_path = /obj/machinery/mineral/bluespace_miner
req_components = list(
/obj/item/stock_parts/matter_bin = 3,
/obj/item/stock_parts/micro_laser = 1,
/obj/item/stock_parts/manipulator = 3,
/obj/item/stock_parts/scanning_module = 1,
/obj/item/stack/ore/bluespace_crystal = 3)
needs_anchored = FALSE

/obj/item/circuitboard/machine/mining_equipment_vendor
name = "Mining Equipment Vendor (Machine Board)"
icon_state = "supply"
Expand Down
41 changes: 41 additions & 0 deletions code/modules/mining/machine_bluespaceminer.dm
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
/obj/machinery/mineral/bluespace_miner
name = "bluespace mining machine"
desc = "A machine that uses the magic of Bluespace to slowly generate materials and add them to a linked ore silo."
icon = 'icons/obj/machines/mining_machines.dmi'
icon_state = "stacker"
density = TRUE
circuit = /obj/item/circuitboard/machine/bluespace_miner
layer = BELOW_OBJ_LAYER
var/list/ore_rates = list(/datum/material/iron = 0.6, /datum/material/glass = 0.6, /*/datum/material/copper = 0.4,*/ /datum/material/plasma = 0.2, /datum/material/silver = 0.2, /datum/material/gold = 0.1, /datum/material/titanium = 0.1, /datum/material/uranium = 0.1, /datum/material/diamond = 0.1)
var/datum/component/remote_materials/materials

/obj/machinery/mineral/bluespace_miner/Initialize(mapload)
. = ..()
materials = AddComponent(/datum/component/remote_materials, "bsm", mapload)

/obj/machinery/mineral/bluespace_miner/Destroy()
materials = null
return ..()

/obj/machinery/mineral/bluespace_miner/multitool_act(mob/living/user, obj/item/multitool/M)
if(istype(M))
if(!M.buffer || !istype(M.buffer, /obj/machinery/ore_silo))
to_chat(user, "<span class='warning'>You need to multitool the ore silo first.</span>")
return FALSE

/obj/machinery/mineral/bluespace_miner/examine(mob/user)
. = ..()
if(!materials?.silo)
. += "<span class='notice'>No ore silo connected. Use a multi-tool to link an ore silo to this machine.</span>"
else if(materials?.on_hold())
. += "<span class='warning'>Ore silo access is on hold, please contact the quartermaster.</span>"

/obj/machinery/mineral/bluespace_miner/process()
if(!materials?.silo || materials?.on_hold())
return
var/datum/component/material_container/mat_container = materials.mat_container
if(!mat_container || panel_open || !powered())
return
var/datum/material/ore = pick(ore_rates)
mat_container.insert_amount_mat((ore_rates[ore] * 1000), ore)

8 changes: 8 additions & 0 deletions code/modules/research/designs/machine_designs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,14 @@
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING

/datum/design/board/bluespace_miner
name = "Machine Design (Bluespace Miner)"
desc = "The circuit board for a Bluespace Miner."
id = "bluespace_miner"
build_path = /obj/item/circuitboard/machine/bluespace_miner
category = list ("Misc. Machinery")
departmental_flags = DEPARTMENTAL_FLAG_SCIENCE | DEPARTMENTAL_FLAG_CARGO | DEPARTMENTAL_FLAG_ENGINEERING

/datum/design/board/mining_equipment_vendor
name = "Machine Design (Mining Rewards Vendor Board)"
desc = "The circuit board for a Mining Rewards Vendor."
Expand Down
9 changes: 9 additions & 0 deletions code/modules/research/techweb/all_nodes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,15 @@
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000

/datum/techweb_node/bluespace_mining
id = "bluespace_mining"
display_name = "Bluespace Mining Technology"
description = "Harness the power of bluespace to make materials out of nothing. Slowly."
prereq_ids = list("practical_bluespace", "adv_mining")
design_ids = list("bluespace_miner")
research_costs = list(TECHWEB_POINT_TYPE_GENERIC = 2500)
export_price = 5000

/datum/techweb_node/janitor
id = "janitor"
display_name = "Advanced Sanitation Technology"
Expand Down
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -2012,6 +2012,7 @@
#include "code\modules\mining\aux_base_camera.dm"
#include "code\modules\mining\fulton.dm"
#include "code\modules\mining\machine_processing.dm"
#include "code\modules\mining\machine_bluespaceminer.dm"
#include "code\modules\mining\machine_redemption.dm"
#include "code\modules\mining\machine_silo.dm"
#include "code\modules\mining\machine_stacking.dm"
Expand Down

0 comments on commit 842c189

Please sign in to comment.