mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-12 11:13:16 +00:00
Merge pull request #1470 from Hubblenaut/smes
Changes to SMES Interface
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// the SMES
|
||||
// stores power
|
||||
|
||||
#define SMESRATE 0.05
|
||||
#define SMESRATE 0.03333 //translates Watt into Kilowattminutes with respect to machinery schedule_interval ~(2s*1W*1min/60s)
|
||||
#define SMESMAXCHARGELEVEL 250000
|
||||
#define SMESMAXOUTPUT 250000
|
||||
|
||||
@@ -301,14 +301,17 @@
|
||||
var/data[0]
|
||||
data["nameTag"] = name_tag
|
||||
data["storedCapacity"] = round(100.0*charge/capacity, 0.1)
|
||||
data["charging"] = inputting
|
||||
data["storedCapacityAbs"] = round(charge/(1000*60), 0.1)
|
||||
data["storedCapacityMax"] = round(capacity/(1000*60))
|
||||
data["charging"] = round(inputting/1000, 0.1)
|
||||
data["chargeMode"] = input_attempt
|
||||
data["chargeLevel"] = input_level
|
||||
data["chargeMax"] = input_level_max
|
||||
data["chargeLevel"] = round(input_level/1000, 0.1)
|
||||
data["chargeMax"] = round(input_level_max/1000)
|
||||
data["chargeLoad"] = round(terminal.powernet.avail/1000, 0.1)
|
||||
data["outputOnline"] = output_attempt
|
||||
data["outputLevel"] = output_level
|
||||
data["outputMax"] = output_level_max
|
||||
data["outputLoad"] = round(output_used)
|
||||
data["outputLevel"] = round(output_level/1000, 0.1)
|
||||
data["outputMax"] = round(output_level_max/1000)
|
||||
data["outputLoad"] = round(output_used/1000, 0.1)
|
||||
|
||||
if(outputting)
|
||||
data["outputting"] = 2 // smes is outputting
|
||||
@@ -351,7 +354,7 @@
|
||||
if("max")
|
||||
input_level = input_level_max
|
||||
if("set")
|
||||
input_level = input(usr, "Enter new input level (0-[input_level_max])", "SMES Input Power Control", input_level) as num
|
||||
input_level = (input(usr, "Enter new input level (0-[input_level_max/1000] kW)", "SMES Input Power Control", input_level/1000) as num) * 1000
|
||||
input_level = max(0, min(input_level_max, input_level)) // clamp to range
|
||||
|
||||
else if( href_list["output"] )
|
||||
@@ -361,7 +364,7 @@
|
||||
if("max")
|
||||
output_level = output_level_max
|
||||
if("set")
|
||||
output_level = input(usr, "Enter new output level (0-[output_level_max])", "SMES Output Power Control", output_level) as num
|
||||
output_level = (input(usr, "Enter new output level (0-[output_level_max/1000] kW)", "SMES Output Power Control", output_level/1000) as num) * 1000
|
||||
output_level = max(0, min(output_level_max, output_level)) // clamp to range
|
||||
|
||||
investigate_log("input/output; <font color='[input_level>output_level?"green":"red"][input_level]/[output_level]</font> | Output-mode: [output_attempt?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [input_attempt?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
|
||||
|
||||
@@ -12,29 +12,29 @@
|
||||
icon = 'icons/obj/stock_parts.dmi'
|
||||
icon_state = "smes_coil" // Just few icons patched together. If someone wants to make better icon, feel free to do so!
|
||||
w_class = 4.0 // It's LARGE (backpack size)
|
||||
var/ChargeCapacity = 5000000
|
||||
var/IOCapacity = 250000
|
||||
var/ChargeCapacity = 6000000 // 100 kWh
|
||||
var/IOCapacity = 250000 // 250 kW
|
||||
|
||||
// 20% Charge Capacity, 60% I/O Capacity. Used for substation/outpost SMESs.
|
||||
/obj/item/weapon/smes_coil/weak
|
||||
name = "basic superconductive magnetic coil"
|
||||
desc = "Cheaper model of standard superconductive magnetic coil. It's capacity and I/O rating are considerably lower."
|
||||
ChargeCapacity = 1000000
|
||||
IOCapacity = 150000
|
||||
ChargeCapacity = 1200000 // 20 kWh
|
||||
IOCapacity = 150000 // 150 kW
|
||||
|
||||
// 1000% Charge Capacity, 20% I/O Capacity
|
||||
/obj/item/weapon/smes_coil/super_capacity
|
||||
name = "superconductive capacitance coil"
|
||||
desc = "Specialised version of standard superconductive magnetic coil. This one has significantly stronger containment field, allowing for significantly larger power storage. It's IO rating is much lower, however."
|
||||
ChargeCapacity = 50000000
|
||||
IOCapacity = 50000
|
||||
ChargeCapacity = 60000000 // 1000 kWh
|
||||
IOCapacity = 50000 // 50 kW
|
||||
|
||||
// 10% Charge Capacity, 400% I/O Capacity. Technically turns SMES into large super capacitor.Ideal for shields.
|
||||
/obj/item/weapon/smes_coil/super_io
|
||||
name = "superconductive transmission coil"
|
||||
desc = "Specialised version of standard superconductive magnetic coil. While this one won't store almost any power, it rapidly transfers power, making it useful in systems which require large throughput."
|
||||
ChargeCapacity = 500000
|
||||
IOCapacity = 1000000
|
||||
ChargeCapacity = 600000 // 10 kWh
|
||||
IOCapacity = 1000000 // 1000 kW
|
||||
|
||||
|
||||
// SMES SUBTYPES - THESE ARE MAPPED IN AND CONTAIN DIFFERENT TYPES OF COILS
|
||||
|
||||
Reference in New Issue
Block a user