Record original-alignment implementation and traceability checkpoint
Capture current source, content data, tests, asset licenses, and original-specification traceability. Original implementation remains incomplete. The accepted matching UI generation passed 154 suites and 12,253 checks, with eight rendered staff-contract screens reviewed. Latest native Windows and full-original acceptance remain outstanding.
This commit is contained in:
@@ -13,6 +13,7 @@ enum Type {
|
||||
TELEPORT_ENTITY_FOR_RECOVERY,
|
||||
SCHEDULE_EVENT,
|
||||
SET_ROUTE_LOCK,
|
||||
CREATE_DEFENSE_RAID,
|
||||
}
|
||||
|
||||
var action_id: StringName = &""
|
||||
@@ -32,7 +33,7 @@ func configure(
|
||||
|
||||
|
||||
func is_valid() -> bool:
|
||||
return not action_id.is_empty() and type >= Type.SET_FLAG and type <= Type.SET_ROUTE_LOCK
|
||||
return not action_id.is_empty() and type >= Type.SET_FLAG and type <= Type.CREATE_DEFENSE_RAID
|
||||
|
||||
|
||||
func create_snapshot() -> Dictionary:
|
||||
@@ -48,6 +49,18 @@ static func from_variant(raw_value: Variant) -> EventAction:
|
||||
return raw_value
|
||||
if not raw_value is Dictionary:
|
||||
return null
|
||||
# Serialized action enums are authoritative. Keep an invalid object in the
|
||||
# action list so EventDefinition/EventChoice reject it instead of silently
|
||||
# dropping it, clamping it to a destructive action, or choosing SET_FLAG.
|
||||
var raw_type: Variant = _value(raw_value, &"type", "SET_FLAG")
|
||||
if raw_type is int:
|
||||
if int(raw_type) < Type.SET_FLAG or int(raw_type) > Type.CREATE_DEFENSE_RAID:
|
||||
return EventAction.new()
|
||||
elif typeof(raw_type) in [TYPE_STRING, TYPE_STRING_NAME]:
|
||||
if Type.keys().find(String(raw_type).to_upper()) < 0:
|
||||
return EventAction.new()
|
||||
else:
|
||||
return EventAction.new()
|
||||
return EventAction.new().configure(
|
||||
StringName(_value(raw_value, &"action_id", &"")),
|
||||
_value(raw_value, &"type", "SET_FLAG"),
|
||||
@@ -57,7 +70,7 @@ static func from_variant(raw_value: Variant) -> EventAction:
|
||||
|
||||
static func _type_from_variant(raw_value: Variant) -> Type:
|
||||
if raw_value is int:
|
||||
return clampi(int(raw_value), Type.SET_FLAG, Type.SET_ROUTE_LOCK) as Type
|
||||
return clampi(int(raw_value), Type.SET_FLAG, Type.CREATE_DEFENSE_RAID) as Type
|
||||
var index := Type.keys().find(String(raw_value).to_upper())
|
||||
return (index if index >= 0 else Type.SET_FLAG) as Type
|
||||
|
||||
|
||||
Reference in New Issue
Block a user