mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-15 20:52:41 +00:00
Frame Fixes
This commit is contained in:
@@ -22,7 +22,7 @@ using metal and glass, it uses glass and reagents (usually sulphuric acid).
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 2500
|
||||
|
||||
/obj/machinery/r_n_d/circuit_imprinter/map/New()
|
||||
/obj/machinery/r_n_d/circuit_imprinter/New()
|
||||
..()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
|
||||
@@ -16,7 +16,7 @@ Note: Must be placed within 3 tiles of the R&D Console
|
||||
idle_power_usage = 30
|
||||
active_power_usage = 2500
|
||||
|
||||
/obj/machinery/r_n_d/destructive_analyzer/map/New()
|
||||
/obj/machinery/r_n_d/destructive_analyzer/New()
|
||||
..()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
materials = list(DEFAULT_WALL_MATERIAL = 0, "glass" = 0, "gold" = 0, "silver" = 0, "phoron" = 0, "uranium" = 0, "diamond" = 0)
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/map/New()
|
||||
/obj/machinery/r_n_d/protolathe/New()
|
||||
..()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
@@ -76,15 +76,8 @@
|
||||
speed = T / 2
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/dismantle()
|
||||
for(var/obj/I in component_parts)
|
||||
if(istype(I, /obj/item/weapon/reagent_containers/glass/beaker))
|
||||
reagents.trans_to_obj(I, reagents.total_volume)
|
||||
for(var/f in materials)
|
||||
if(materials[f] >= SHEET_MATERIAL_AMOUNT)
|
||||
var/path = getMaterialType(f)
|
||||
if(path)
|
||||
var/obj/item/stack/S = new f(loc)
|
||||
S.amount = round(materials[f] / SHEET_MATERIAL_AMOUNT)
|
||||
eject_materials(f, -1)
|
||||
..()
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/update_icon()
|
||||
@@ -203,3 +196,36 @@
|
||||
if(new_item.matter && new_item.matter.len > 0)
|
||||
for(var/i in new_item.matter)
|
||||
new_item.matter[i] = new_item.matter[i] * mat_efficiency
|
||||
|
||||
/obj/machinery/r_n_d/protolathe/proc/eject_materials(var/material, var/amount) // 0 amount = 0 means ejecting a full stack; -1 means eject everything
|
||||
var/recursive = amount == -1 ? 1 : 0
|
||||
material = lowertext(material)
|
||||
var/mattype
|
||||
switch(material)
|
||||
if(DEFAULT_WALL_MATERIAL)
|
||||
mattype = /obj/item/stack/material/steel
|
||||
if("glass")
|
||||
mattype = /obj/item/stack/material/glass
|
||||
if("gold")
|
||||
mattype = /obj/item/stack/material/gold
|
||||
if("silver")
|
||||
mattype = /obj/item/stack/material/silver
|
||||
if("diamond")
|
||||
mattype = /obj/item/stack/material/diamond
|
||||
if("phoron")
|
||||
mattype = /obj/item/stack/material/phoron
|
||||
if("uranium")
|
||||
mattype = /obj/item/stack/material/uranium
|
||||
else
|
||||
return
|
||||
var/obj/item/stack/material/S = new mattype(loc)
|
||||
if(amount <= 0)
|
||||
amount = S.max_amount
|
||||
var/ejected = min(round(materials[material] / S.perunit), amount)
|
||||
S.amount = min(ejected, amount)
|
||||
if(S.amount <= 0)
|
||||
qdel(S)
|
||||
return
|
||||
materials[material] -= ejected * S.perunit
|
||||
if(recursive && materials[material] >= S.perunit)
|
||||
eject_materials(material, -1)
|
||||
@@ -17,16 +17,13 @@
|
||||
|
||||
/obj/machinery/r_n_d/server/New()
|
||||
..()
|
||||
initialize();
|
||||
|
||||
/obj/machinery/r_n_d/server/map/New()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
..()
|
||||
initialize();
|
||||
|
||||
/obj/machinery/r_n_d/server/Destroy()
|
||||
griefProtection()
|
||||
@@ -127,15 +124,6 @@
|
||||
name = "Central R&D Database"
|
||||
server_id = -1
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom/map/New()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
..()
|
||||
|
||||
/obj/machinery/r_n_d/server/centcom/initialize()
|
||||
..()
|
||||
var/list/no_id_servers = list()
|
||||
@@ -319,26 +307,8 @@
|
||||
id_with_download_string = "1;2"
|
||||
server_id = 2
|
||||
|
||||
/obj/machinery/r_n_d/server/robotics/map/New()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
..()
|
||||
|
||||
/obj/machinery/r_n_d/server/core
|
||||
name = "Core R&D Server"
|
||||
id_with_upload_string = "1"
|
||||
id_with_download_string = "1"
|
||||
server_id = 1
|
||||
|
||||
/obj/machinery/r_n_d/server/core/map/New()
|
||||
circuit = new circuit()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/stock_parts/scanning_module(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
component_parts += new /obj/item/stack/cable_coil(src)
|
||||
RefreshParts()
|
||||
..()
|
||||
server_id = 1
|
||||
Reference in New Issue
Block a user