Task #23: remove the zone banner and the message feed

The user asked to drop the pop-up status lines, including replies to the
player's own actions.

- farm.tscn (edited as text): the ZoneBanner and Hud/ToastFeed nodes, their
  ext_resources, and FarmSim's toasts export are gone. zone_banner.gd and
  toast_feed.gd (with their .uid files) are deleted.
- FarmSim: no toast wiring, no arrival_message, no outside-the-fence or
  sunrise lines. Main: no lobby-failure or microphone lines; _set_hud only
  hides Hud. CampaignDebug: F2 no longer toasts (the F1 readout shows the
  scenario).
- CoopSession: the host no longer sends "toast" or "arrived" events, and
  the partner no longer handles them. The joined/left/version lines are gone
  (the partner's main menu still says why a session ended). A refused
  build request still sends the error sound. PROTOCOL stays 5: the other
  messages and records are unchanged, and _apply_event ignores unknown
  kinds, so mixed builds still work together.
- BuildMode.message is removed (no test listens to it). Interactions.message
  and UpgradePanel.message stay because tests listen to them.
- test_farm_layout: the banner checks are removed.
- RULES.md, README.md, COOP.md, and LAYOUT.md no longer describe the banner
  or toasts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Forrest 2026-10-06 16:02:37 -04:00
parent 6a9575dfe4
commit 1e91ccf594
18 changed files with 37 additions and 286 deletions

View file

@ -39,7 +39,6 @@ const NIGHT_PLANS: Array[String] = [
@export var zones: FarmZones
@export var player: PlayerCharacter
@export var camera: Camera3D
@export var toasts: ToastFeed
@export var alerts: AlertManager
@export var hud: ScarecrowHud
@export var end_panel: EndPanel
@ -322,24 +321,6 @@ func _ready() -> void:
campaign.phase_changed.connect(_on_phase_changed)
campaign.night_ending.connect(_on_night_ending)
if toasts != null:
toasts.loot = loot
loot.loot_event.connect(toasts.on_loot_event)
interactions.message.connect(toasts.push)
if upgrade_panel != null:
upgrade_panel.message.connect(toasts.push)
if shed_panel != null:
shed_panel.message.connect(toasts.push)
build.message.connect(toasts.push)
waves.arrived.connect(func(h: int, at: Vector2) -> void:
toasts.push(arrival_message(enemies.type[enemies.resolve_handle(h)], zones.side_of(at)), Color(1.0, 0.75, 0.55)))
structures.destroyed.connect(func(_id: int, type: String, _at: Vector3) -> void:
toasts.push("Breach! A %s was broken" % StructureSystem.NAMES[type].to_lower(), Color(1.0, 0.35, 0.3)))
animals.pen_changed.connect(func(open: bool) -> void:
if open and campaign.state.phase != CampaignController.Phase.MORNING:
toasts.push("The pen is open: at night the animals in it will get out and roam loose", Color(1.0, 0.55, 0.35)))
scarecrow.patch_denied.connect(func(missing: Dictionary) -> void:
toasts.push("Not enough straw to patch up: need %s more" % ResourceStore.describe(missing), Color(1.0, 0.8, 0.5)))
if alerts != null:
alerts.setup(self)
load_msec = Time.get_ticks_msec() - t0
@ -751,30 +732,10 @@ func _breaker_goals() -> PackedInt32Array:
return out
## "A crow flew in from the east", "A fence breaker came in from the south-west" (side:
## FarmZones.side_of the arrival point).
static func arrival_message(type: int, side: String) -> String:
var from := " from the %s" % side if side != "" else ""
match type:
EnemySystem.TYPE_CROW:
return "A crow flew in" + from
EnemySystem.TYPE_BREAKER:
return "An alien robot came in" + from
EnemySystem.TYPE_UFO:
return "A UFO swept in" + from
return "An alien slipped in" + from
func _on_phase_changed(phase: CampaignController.Phase, _previous: CampaignController.Phase) -> void:
match phase:
CampaignController.Phase.DUSK, CampaignController.Phase.NIGHT:
if toasts != null and scarecrow.alive and not zones.is_inside_fence(player.global_position):
toasts.push("You're outside the fence: get back in before nightfall!" if phase == CampaignController.Phase.DUSK
else "Night has fallen and you're outside the fence!", Color(1.0, 0.55, 0.35))
CampaignController.Phase.DAWN:
behavior.retreat_all(enemies)
if enemies.alive_count() > 0 and toasts != null:
toasts.push("Sunrise! The aliens are running for it", Color(1.0, 0.85, 0.6))
CampaignController.Phase.MORNING:
if partner == null and not replica:
campaign.state.coop = false # a co-op save continued alone: solo rules