fix: preserve deterministic decisions across saves
This commit is contained in:
@@ -138,7 +138,19 @@ static func from_dictionary(record_data: Dictionary) -> KnownEventStateRecord:
|
||||
or hop_count != 0
|
||||
):
|
||||
return null
|
||||
return KnownEventStateRecord.new(normalized)
|
||||
return create(
|
||||
knower_id,
|
||||
event_id,
|
||||
acquisition_method,
|
||||
source_npc_id,
|
||||
acquired_tick,
|
||||
source_acquisition_method,
|
||||
hop_count,
|
||||
confidence,
|
||||
salience,
|
||||
source_actor_id,
|
||||
bool(normalized["pinned"])
|
||||
)
|
||||
|
||||
|
||||
func get_knower_id() -> int:
|
||||
|
||||
@@ -89,6 +89,11 @@ static func from_dictionary(record_data: Dictionary) -> RelationshipStateRecord:
|
||||
return null
|
||||
if cause_event_id < NO_CAUSE_EVENT:
|
||||
return null
|
||||
normalized[String(dimension)] = value
|
||||
normalized[_cause_key(dimension)] = cause_event_id
|
||||
normalized["schema_version"] = SCHEMA_VERSION
|
||||
normalized["observer_id"] = observer_id
|
||||
normalized["subject_id"] = subject_id
|
||||
return RelationshipStateRecord.new(normalized)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user