Implement production vertical slice foundation
This commit is contained in:
1 parent
9d4a89f355
commit
a18e82eb44
104 files changed
+10595
-268
No files matched your search
@@ -0,0 +1,18 @@
|
||||
class_name ToolPowerDemand
|
||||
extends RefCounted
|
||||
|
||||
var tool_id: StringName
|
||||
var effective_power_kw: float
|
||||
|
||||
|
||||
func _init(p_tool_id: StringName, p_effective_power_kw: float) -> void:
|
||||
tool_id = p_tool_id
|
||||
effective_power_kw = p_effective_power_kw
|
||||
|
||||
|
||||
func validation_error() -> String:
|
||||
if tool_id.is_empty():
|
||||
return "tool_id is empty"
|
||||
if not is_finite(effective_power_kw) or effective_power_kw < 0.0:
|
||||
return "tool power must be finite and non-negative"
|
||||
return ""
|
||||
Reference in new issue
Block a user