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:
@@ -237,6 +237,8 @@ func _complete_batch(batch: Dictionary, minute: int) -> Dictionary:
|
||||
func _production_state(facility: FacilityInstance, plan: Dictionary, batch: Dictionary, minute: int) -> StringName:
|
||||
if not bool(plan[&"enabled"]): return &"DISABLED"
|
||||
if facility.durability <= 0: return &"BROKEN"
|
||||
if not facility.suspension_reason.is_empty(): return &"SUSPENDED"
|
||||
if not facility.related_facility_operating: return &"RELATED_FACILITY_INACTIVE"
|
||||
if not facility.access_available: return &"NO_ACCESS"
|
||||
if not facility.power_available: return &"NO_POWER"
|
||||
if facility.active_staff_ids.size() < maxi(facility.staff_min, 1): return &"NO_STAFF"
|
||||
|
||||
@@ -171,7 +171,7 @@ func is_returning(request_id: StringName) -> bool:
|
||||
func _dispatch(request: LogisticsRequest, minute: int) -> void:
|
||||
var source := _facility_for_inventory(_runtime.facility_service, request.source_inventory_id)
|
||||
var destination := _facility_for_inventory(_runtime.facility_service, request.destination_inventory_id)
|
||||
if source == null or destination == null or not source.operator_open or not destination.operator_open:
|
||||
if source == null or destination == null or not source.allows_logistics() or not destination.allows_logistics():
|
||||
request.state_reason = "FACILITY_UNAVAILABLE"
|
||||
return
|
||||
if not _has_storage_space(destination, request.total_weight):
|
||||
@@ -216,10 +216,10 @@ func _pickup(request: LogisticsRequest, staff: StaffRuntime, task: StaffTask, mi
|
||||
var source := _facility_for_inventory(_runtime.facility_service, request.source_inventory_id)
|
||||
if source == null or not _cell_touches_facility(staff.current_cell, source):
|
||||
return _block_before_pickup(request, "INVALID_PICKUP_ACCESS", minute) and false
|
||||
if not source.operator_open:
|
||||
if not source.allows_logistics():
|
||||
return _block_before_pickup(request, "SOURCE_CLOSED", minute) and false
|
||||
var destination := _facility_for_inventory(_runtime.facility_service, request.destination_inventory_id)
|
||||
if destination == null or not destination.operator_open or not _has_storage_space(destination, request.total_weight):
|
||||
if destination == null or not destination.allows_logistics() or not _has_storage_space(destination, request.total_weight):
|
||||
return _block_before_pickup(request, "DESTINATION_FULL_OR_CLOSED", minute) and false
|
||||
var route := _access_path(staff.current_cell, destination)
|
||||
if not bool(route.get(&"reachable", false)):
|
||||
@@ -251,7 +251,7 @@ func _deliver(request: LogisticsRequest, staff: StaffRuntime, task: StaffTask, m
|
||||
request.state_reason = "INVALID_DELIVERY_ACCESS"
|
||||
return false
|
||||
var quantities := _cargo_quantities(_runtime.inventory_service, _cargo_id(staff.staff_id))
|
||||
if destination == null or not destination.operator_open or not _has_storage_space(destination, SupplyCatalog.inventory_weight(_runtime.inventory_service, _cargo_id(staff.staff_id))):
|
||||
if destination == null or not destination.allows_logistics() or not _has_storage_space(destination, SupplyCatalog.inventory_weight(_runtime.inventory_service, _cargo_id(staff.staff_id))):
|
||||
if not returning:
|
||||
request.state_reason = "DESTINATION_FULL"
|
||||
return false
|
||||
|
||||
@@ -23,7 +23,7 @@ func preview_purchase(runtime: Variant, warehouse_id: StringName, item_id: Strin
|
||||
quote[&"cash_after"] = cash - int(quote[&"total_cost"])
|
||||
if quantity <= 0 or quantity > 10000:
|
||||
quote[&"reason"] = &"INVALID_QUANTITY"
|
||||
elif not facility.operator_open or facility.durability <= 0:
|
||||
elif not facility.allows_logistics():
|
||||
quote[&"reason"] = &"FACILITY_CLOSED"
|
||||
elif int(quote[&"total_cost"]) > cash:
|
||||
quote[&"reason"] = &"INSUFFICIENT_FUNDS"
|
||||
@@ -109,7 +109,7 @@ func get_report(runtime: Variant) -> Dictionary:
|
||||
func ensure_deliveries(runtime: Variant, minute: int) -> void:
|
||||
var facilities := _facilities(runtime)
|
||||
for destination: FacilityInstance in facilities:
|
||||
if not destination.operator_open or destination.durability <= 0:
|
||||
if not destination.allows_logistics():
|
||||
continue
|
||||
var source_type: StringName
|
||||
var item_id: StringName
|
||||
@@ -131,7 +131,7 @@ func ensure_deliveries(runtime: Variant, minute: int) -> void:
|
||||
continue
|
||||
var sources: Array[Dictionary] = []
|
||||
for source: FacilityInstance in facilities:
|
||||
if source.definition_id != source_type or not source.operator_open:
|
||||
if source.definition_id != source_type or not source.allows_logistics():
|
||||
continue
|
||||
if source_type == &"kitchen" and not _has_production_plan(runtime, source.instance_id):
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user