mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Changes to SMES
- Transition to using kilowatts and kilowatt hours - Adds an input load bar with value - SMES charge rate and coil capacities slightly adjusted for using kilowatt units
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
|
||||
|
||||
@@ -1,11 +1,14 @@
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
Stored Capacity:
|
||||
Stored Charge:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.displayBar(data.storedCapacity, 0, 100, data.charging ? 'good' : 'average')}}
|
||||
<div class="statusValue">
|
||||
{{:helper.round(data.storedCapacity)}}%
|
||||
</div><br>
|
||||
<div class="statusValue">
|
||||
{{:data.storedCapacityAbs}} kWh / {{:data.storedCapacityMax}} kWh
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +41,19 @@
|
||||
{{:helper.link('MIN', null, {'input' : 'min'}, (data.chargeLevel > 0) ? null : 'disabled')}}
|
||||
{{:helper.link('SET', null, {'input' : 'set'}, null)}}
|
||||
{{:helper.link('MAX', null, {'input' : 'max'}, (data.chargeLevel < data.chargeMax) ? null : 'disabled')}}
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.chargeLevel}} W </div>
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.chargeLevel}} kW </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="item">
|
||||
<div class="itemLabel">
|
||||
Input Load:
|
||||
</div>
|
||||
<div class="itemContent">
|
||||
{{:helper.displayBar(data.chargeLoad, 0, data.chargeMax, (data.chargeLoad < data.chargeLevel) ? 'good' : 'average')}}
|
||||
<div class="statusValue">
|
||||
{{:data.chargeLoad}} kW
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -71,7 +86,7 @@
|
||||
{{:helper.link('MIN', null, {'output' : 'min'}, (data.outputLevel > 0) ? null : 'disabled')}}
|
||||
{{:helper.link('SET', null, {'output' : 'set'}, null)}}
|
||||
{{:helper.link('MAX', null, {'output' : 'max'}, (data.outputLevel < data.outputMax) ? null : 'disabled')}}
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.outputLevel}} W </div>
|
||||
<div style="float: left; width: 100px; text-align: center;"> {{:data.outputLevel}} kW </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,7 +98,7 @@
|
||||
<div class="itemContent">
|
||||
{{:helper.displayBar(data.outputLoad, 0, data.outputMax, (data.outputLoad < data.outputLevel) ? 'good' : 'average')}}
|
||||
<div class="statusValue">
|
||||
{{:data.outputLoad}} W
|
||||
{{:data.outputLoad}} kW
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user