This repository has been archived by the owner on Sep 12, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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
1 parent
c398639
commit 842c189
Showing
5 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters