feat: generate world-backed situations and commitments
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
class_name SituationProgressSnapshot
|
||||
extends RefCounted
|
||||
|
||||
var situation_id := -1
|
||||
var alternative_id: StringName
|
||||
var resolved := false
|
||||
var current_value := 0.0
|
||||
var target_value := 0.0
|
||||
var matched_event_id := -1
|
||||
var reason_traces: Array[String] = []
|
||||
|
||||
|
||||
func ratio() -> float:
|
||||
if target_value <= 0.0:
|
||||
return 1.0 if resolved else 0.0
|
||||
return clampf(current_value / target_value, 0.0, 1.0)
|
||||
Reference in New Issue
Block a user