Add explicit stairs and measure elevator congestion with real actors
This commit is contained in:
@@ -82,12 +82,15 @@ func _read_progress() -> Dictionary:
|
||||
if reception == null:
|
||||
return _build_step(&"reception", &"reception", "1/6 受付をつくる", "表の地表階に受付を配置します。完成した受付の上に客室を増築できます。", &"build_reception")
|
||||
if rooms.is_empty():
|
||||
return _build_step(&"room", &"standard_room", "2/6 客室をつくる", "受付が支えになる位置に一般客室を配置します。", &"build_room")
|
||||
return _build_step(&"room", &"standard_room", "2/6 客室をつくる", "受付が支えになる位置に一般客室を配置します。上階へは客用階段で道をつなぎます。", &"build_room")
|
||||
var accessible_room := false
|
||||
for room: FacilityInstance in rooms:
|
||||
accessible_room = accessible_room or room.access_available
|
||||
if not reception.access_available or not accessible_room:
|
||||
return _step(&"access", "3/6 道をつなぐ", "客室の出入口まで客用通路をつなぎます。施設を選択すると、通行不可など営業できない理由を確認できます。", &"build_corridor", "客用通路を選ぶ")
|
||||
accessible_room = accessible_room or _can_reach_facility(room)
|
||||
if not _can_reach_facility(reception) or not accessible_room:
|
||||
var upper_room := false
|
||||
for room: FacilityInstance in rooms:
|
||||
upper_room = upper_room or room.origin.y != 0
|
||||
return _step(&"access", "3/6 道をつなぐ", "上下階は客用階段でつなぎます。上階のマスに置くと、直下の通路へ接続します。同じ階は客用通路を延ばし、客室の左右の出入口まで道をつなぎましょう。", &"build_stairs" if upper_room else &"build_corridor", "客用階段を選ぶ" if upper_room else "客用通路を選ぶ")
|
||||
if not _has_reception_assignment(reception):
|
||||
return _step(&"staff", "4/6 受付係を配属", "従業員から受付係を雇い、雇用済み一覧でこの受付と勤務帯を選び「配属・勤務帯を変更」を押します。", &"staff", "従業員を開く")
|
||||
if first_sale < 0:
|
||||
@@ -95,8 +98,19 @@ func _read_progress() -> Dictionary:
|
||||
return _step(&"close", "6/6 翌朝の決算へ", "最初の宿泊売上が入りました。06:00に営業日が締まり、給与・利益・未払いを帳簿で確認できます。", &"resume" if _clock.paused else &"ledger", "時間を進める" if _clock.paused else "帳簿を見る")
|
||||
|
||||
|
||||
func _can_reach_facility(facility: FacilityInstance) -> bool:
|
||||
if not facility.access_available:
|
||||
return false
|
||||
# Runtime uses the same public entrance and access cells as real guests.
|
||||
# Component-only guide fixtures retain their explicit availability flags.
|
||||
if _runtime.has_method(&"get_facility_access_report"):
|
||||
var report: Dictionary = _runtime.call(&"get_facility_access_report", facility.instance_id)
|
||||
return bool(report.get(&"reachable", false))
|
||||
return true
|
||||
|
||||
|
||||
func _reception_score(facility: FacilityInstance) -> int:
|
||||
return (2 if facility.access_available else 0) + (1 if _has_reception_assignment(facility) else 0)
|
||||
return (2 if _can_reach_facility(facility) else 0) + (1 if _has_reception_assignment(facility) else 0)
|
||||
|
||||
|
||||
func _has_reception_assignment(reception: FacilityInstance) -> bool:
|
||||
|
||||
Reference in New Issue
Block a user