mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Merge pull request #10113 from mwerezak/wheredoesthepowercomefrom
Makes newly fabricated power cells start uncharged
This commit is contained in:
@@ -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, src)
|
||||
new_item.loc = loc
|
||||
if(mat_efficiency != 1) // No matter out of nowhere
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
|
||||
@@ -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, var/fabricator)
|
||||
return new build_path(newloc)
|
||||
|
||||
/datum/design/item
|
||||
build_type = PROTOLATHE
|
||||
|
||||
@@ -195,9 +200,9 @@ other types of metals and chemistry for reagents).
|
||||
/datum/design/item/stock_part/RPED
|
||||
name = "Rapid Part Exchange Device"
|
||||
desc = "Special mechanical module made to store, sort, and apply standard machine parts."
|
||||
id = "rped"
|
||||
id = "rped"
|
||||
req_tech = list(TECH_ENGINEERING = 3, TECH_MATERIAL = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 5000)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 15000, "glass" = 5000)
|
||||
build_path = /obj/item/weapon/storage/part_replacer
|
||||
sort_string = "CBAAA"
|
||||
|
||||
@@ -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
|
||||
@@ -277,9 +287,9 @@ other types of metals and chemistry for reagents).
|
||||
/datum/design/item/mesons
|
||||
name = "Optical meson scanners design"
|
||||
desc = "Using the meson-scanning technology those glasses allow you to see through walls, floor or anything else."
|
||||
id = "mesons"
|
||||
id = "mesons"
|
||||
req_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||
build_path = /obj/item/clothing/glasses/meson
|
||||
sort_string = "GAAAC"
|
||||
|
||||
@@ -288,23 +298,23 @@ other types of metals and chemistry for reagents).
|
||||
name = "Mining equipment design ([item_name])"
|
||||
|
||||
/datum/design/item/weapon/mining/jackhammer
|
||||
id = "jackhammer"
|
||||
id = "jackhammer"
|
||||
req_tech = list(TECH_MATERIAL = 3, TECH_POWER = 2, TECH_ENGINEERING = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 500, "silver" = 500)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 500, "silver" = 500)
|
||||
build_path = /obj/item/weapon/pickaxe/jackhammer
|
||||
sort_string = "KAAAA"
|
||||
|
||||
/datum/design/item/weapon/mining/drill
|
||||
id = "drill"
|
||||
id = "drill"
|
||||
req_tech = list(TECH_MATERIAL = 2, TECH_POWER = 3, TECH_ENGINEERING = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 6000, "glass" = 1000) //expensive, but no need for miners.
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 6000, "glass" = 1000) //expensive, but no need for miners.
|
||||
build_path = /obj/item/weapon/pickaxe/drill
|
||||
sort_string = "KAAAB"
|
||||
|
||||
/datum/design/item/weapon/mining/plasmacutter
|
||||
id = "plasmacutter"
|
||||
id = "plasmacutter"
|
||||
req_tech = list(TECH_MATERIAL = 4, TECH_PHORON = 3, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1500, "glass" = 500, "gold" = 500, "phoron" = 500)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 1500, "glass" = 500, "gold" = 500, "phoron" = 500)
|
||||
build_path = /obj/item/weapon/pickaxe/plasmacutter
|
||||
sort_string = "KAAAC"
|
||||
|
||||
@@ -316,9 +326,9 @@ other types of metals and chemistry for reagents).
|
||||
sort_string = "KAAAD"
|
||||
|
||||
/datum/design/item/weapon/mining/drill_diamond
|
||||
id = "drill_diamond"
|
||||
id = "drill_diamond"
|
||||
req_tech = list(TECH_MATERIAL = 6, TECH_POWER = 4, TECH_ENGINEERING = 4)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000, "diamond" = 2000)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 3000, "glass" = 1000, "diamond" = 2000)
|
||||
build_path = /obj/item/weapon/pickaxe/diamonddrill
|
||||
sort_string = "KAAAE"
|
||||
///////////////////////////////////
|
||||
@@ -337,9 +347,9 @@ other types of metals and chemistry for reagents).
|
||||
|
||||
/datum/design/item/medical/robot_scanner
|
||||
desc = "A hand-held scanner able to diagnose robotic injuries."
|
||||
id = "robot_scanner"
|
||||
id = "robot_scanner"
|
||||
req_tech = list(TECH_MAGNET = 3, TECH_BIO = 2, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 500, "glass" = 200)
|
||||
build_path = /obj/item/device/robotanalyzer
|
||||
sort_string = "MACFA"
|
||||
|
||||
@@ -394,9 +404,9 @@ other types of metals and chemistry for reagents).
|
||||
|
||||
/datum/design/item/medical/nanopaste
|
||||
desc = "A tube of paste containing swarms of repair nanites. Very effective in repairing robotic machinery."
|
||||
id = "nanopaste"
|
||||
id = "nanopaste"
|
||||
req_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 7000, "glass" = 7000)
|
||||
build_path = /obj/item/stack/nanopaste
|
||||
sort_string = "MBAAA"
|
||||
|
||||
@@ -528,16 +538,16 @@ other types of metals and chemistry for reagents).
|
||||
|
||||
/datum/design/item/weapon/chemsprayer
|
||||
desc = "An advanced chem spraying device."
|
||||
id = "chemsprayer"
|
||||
id = "chemsprayer"
|
||||
req_tech = list(TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000)
|
||||
build_path = /obj/item/weapon/reagent_containers/spray/chemsprayer
|
||||
sort_string = "TABAA"
|
||||
|
||||
/datum/design/item/weapon/rapidsyringe
|
||||
id = "rapidsyringe"
|
||||
id = "rapidsyringe"
|
||||
req_tech = list(TECH_COMBAT = 3, TECH_MATERIAL = 3, TECH_ENGINEERING = 3, TECH_BIO = 2)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 5000, "glass" = 1000)
|
||||
build_path = /obj/item/weapon/gun/launcher/syringe/rapid
|
||||
sort_string = "TABAB"
|
||||
|
||||
@@ -640,10 +650,10 @@ other types of metals and chemistry for reagents).
|
||||
|
||||
/datum/design/item/posibrain
|
||||
name = "Positronic brain"
|
||||
id = "posibrain"
|
||||
id = "posibrain"
|
||||
req_tech = list(TECH_ENGINEERING = 4, TECH_MATERIAL = 6, TECH_BLUESPACE = 2, TECH_DATA = 4)
|
||||
build_type = PROTOLATHE | MECHFAB
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 500, "phoron" = 500, "diamond" = 100)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 2000, "glass" = 1000, "silver" = 1000, "gold" = 500, "phoron" = 500, "diamond" = 100)
|
||||
build_path = /obj/item/device/mmi/digital/posibrain
|
||||
category = "Misc"
|
||||
sort_string = "VACAB"
|
||||
@@ -1354,16 +1364,16 @@ CIRCUITS BELOW
|
||||
/datum/design/item/pda
|
||||
name = "PDA design"
|
||||
desc = "Cheaper than whiny non-digital assistants."
|
||||
id = "pda"
|
||||
id = "pda"
|
||||
req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||
build_path = /obj/item/device/pda
|
||||
sort_string = "VAAAA"
|
||||
|
||||
// Cartridges
|
||||
/datum/design/item/pda_cartridge
|
||||
/datum/design/item/pda_cartridge
|
||||
req_tech = list(TECH_ENGINEERING = 2, TECH_POWER = 3)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 50, "glass" = 50)
|
||||
|
||||
/datum/design/item/pda_cartridge/AssembleDesignName()
|
||||
..()
|
||||
@@ -1443,7 +1453,7 @@ CIRCUITS BELOW
|
||||
id = "cart_captain"
|
||||
build_path = /obj/item/weapon/cartridge/captain
|
||||
sort_string = "VBAAO"
|
||||
|
||||
|
||||
/* Uncomment if someone makes these buildable
|
||||
/datum/design/circuit/general_alert
|
||||
name = "general alert console"
|
||||
|
||||
@@ -6,6 +6,13 @@
|
||||
/datum/design/item/mechfab/robot
|
||||
category = "Robot"
|
||||
|
||||
//if the fabricator is a mech fab pass the manufacturer info over to the robot part constructor
|
||||
/datum/design/item/mechfab/robot/Fabricate(var/newloc, var/fabricator)
|
||||
if(istype(fabricator, /obj/machinery/mecha_part_fabricator))
|
||||
var/obj/machinery/mecha_part_fabricator/mechfab = fabricator
|
||||
return new build_path(newloc, mechfab.manufacturer)
|
||||
return ..()
|
||||
|
||||
/datum/design/item/mechfab/robot/exoskeleton
|
||||
name = "Robot exoskeleton"
|
||||
id = "robot_exoskeleton"
|
||||
|
||||
@@ -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, src)
|
||||
new_item.loc = loc
|
||||
if(mat_efficiency != 1) // No matter out of nowhere
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
|
||||
Reference in New Issue
Block a user