1
0
Fork 0

chore(call-for-fire-versus): replace emplace/bracket wording

- Intro, metadata, placement card, error strings, and lobby phase label now
  use place/target/structure instead of emplace/bracket
- Leave the "How to emplace" help block unchanged for now
- Refresh the registry blurb and add a data migration to update the seeded
  minigames description
This commit is contained in:
Jason Fraley 2026-10-11 23:25:49 -04:00
parent 6bcf229268
commit c3d3c8c574
7 changed files with 40068 additions and 15 deletions

View file

@ -11,7 +11,7 @@ import { CallForFireVersusArena } from "@/components/frontend/minigames/call-for
export const metadata: Metadata = {
title: "Call for Fire: Versus (Polaris Task Force)",
description:
"Head-to-head artillery duel: emplace your fire bases, then bracket the enemy's before they bracket yours.",
"Head-to-head artillery duel: place your fire bases, then target the enemy's before they target yours.",
};
interface VersusPageProps {
@ -68,8 +68,8 @@ export default async function CallForFireVersusPage({ searchParams }: VersusPage
<h1 className="text-lg font-semibold">Call for Fire: Versus</h1>
</div>
<p className="text-sm text-muted-foreground">
Emplace your fire bases, then bracket the enemy&apos;s before they bracket yours. First
to reduce every emplacement wins.
Place your fire bases, then target the enemy&apos;s before they target yours. First
to reduce every structure wins.
</p>
</div>

View file

@ -15,7 +15,7 @@ import {
const PHASE_LABELS: Record<VersusMatchSummary["phase"], string> = {
waiting: "Waiting for an opponent",
placing: "Emplacement",
placing: "Placing structures",
battle: "In progress",
complete: "Finished",
};

View file

@ -282,7 +282,7 @@ function PlacementPhase({
const confirm = useCallback(async () => {
if (!allPlaced) {
setError("Place every emplacement before confirming.");
setError("Place every structure before confirming.");
return;
}
setBusy(true);
@ -291,7 +291,7 @@ function PlacementPhase({
const result = await placeVersusFleet(match.matchId, payload);
setBusy(false);
if (result.success && result.data) onMatch(result.data);
else setError(result.error ?? "Could not confirm your emplacements.");
else setError(result.error ?? "Could not confirm your structures.");
}, [allPlaced, match.matchId, onMatch, placements]);
const selectedIsSquare = selectedDefinition.shape === "square";
@ -314,17 +314,17 @@ function PlacementPhase({
<div>
<CardTitle className="flex items-center gap-2 text-sm">
<Target className="size-4 text-amber-500" />
Emplace your fire bases
Place your fire bases
{match.you.ready && (
<span className="rounded-sm bg-emerald-600/20 px-2 py-0.5 text-xs font-medium text-emerald-300">
Emplacements confirmed
Structures confirmed
</span>
)}
</CardTitle>
<p className="text-sm text-muted-foreground">
{waiting
? "Place your emplacements while you wait, then share the match link with your opponent."
: "Place each emplacement on your board. Your opponent cannot see it."}
? "Place your structures while you wait, then share the match link with your opponent."
: "Place each structure on your board. Your opponent cannot see it."}
</p>
</div>
<div className="flex items-center gap-2">
@ -340,7 +340,7 @@ function PlacementPhase({
<Shuffle /> Auto-deploy
</Button>
<Button size="sm" onClick={confirm} disabled={busy || !allPlaced}>
Confirm emplacements
Confirm structures
</Button>
</div>
</div>
@ -614,7 +614,7 @@ function BattlePhase({
<div className="grid gap-4 lg:grid-cols-2">
<BoardPanel
title="Your fire bases"
subtitle="Incoming rounds are marked. Emplacements turn red when reduced."
subtitle="Incoming rounds are marked. Structures turn red when reduced."
>
{Array.from({ length: BOARD }, (_, y) => (
<ReadOnlyRow key={y} y={y}>
@ -862,7 +862,7 @@ function ShotLog({ shots }: { shots: VersusShotView[] }) {
{shot.outcome === "miss"
? "miss"
: shot.outcome === "destroyed"
? "emplacement destroyed"
? "structure destroyed"
: "hit"}
</li>
))}
@ -966,7 +966,7 @@ function ResultPanel({
</p>
<div className="flex flex-wrap gap-4 text-sm text-muted-foreground">
<span>
Emplacements destroyed:{" "}
Structures destroyed:{" "}
<span className="font-semibold text-foreground">{you.fobsDestroyed}</span>
</span>
<span>

View file

@ -154,7 +154,7 @@ export const BUILTIN_MINIGAMES: BuiltinMinigame[] = [
key: "callForFireVersus",
label: "Call for Fire: Versus",
description:
"Head-to-head artillery duel. Emplace your fire bases, then bracket the enemy's before they bracket yours.",
"Head-to-head artillery duel. Place your fire bases, then target the enemy's before they target yours.",
route: "/minigames/call-for-fire-versus",
icon: "Swords",
category: "multiplayer",

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,22 @@
import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres'
/**
* Refresh the Call for Fire: Versus registry description to match the updated
* front-end copy (emplace -> place, emplacement -> structure, bracket -> target).
*
* The row was seeded by 20261012_015000; this updates the stored blurb so the
* sidebar and minigame card read the same as the page itself.
*/
export async function up({ db }: MigrateUpArgs): Promise<void> {
await db.execute(sql`
UPDATE "minigames"
SET "description" = 'Head-to-head artillery duel. Place your fire bases, then target the enemy''s before they target yours.'
WHERE "key" = 'callForFireVersus';`)
}
export async function down({ db }: MigrateDownArgs): Promise<void> {
await db.execute(sql`
UPDATE "minigames"
SET "description" = 'Head-to-head artillery duel. Emplace your fire bases, then bracket the enemy''s before they bracket yours.'
WHERE "key" = 'callForFireVersus';`)
}

View file

@ -126,6 +126,7 @@ import * as migration_20261011_221111_add_call_for_fire_minigame from './2026101
import * as migration_20261011_221250_add_minigame_estimated_release_date from './20261011_221250_add_minigame_estimated_release_date';
import * as migration_20261012_014741_add_call_for_fire_versus from './20261012_014741_add_call_for_fire_versus';
import * as migration_20261012_015000_seed_call_for_fire_versus_registry from './20261012_015000_seed_call_for_fire_versus_registry';
import * as migration_20261012_030000_update_call_for_fire_versus_wording from './20261012_030000_update_call_for_fire_versus_wording';
export const migrations = [
{
@ -768,4 +769,9 @@ export const migrations = [
down: migration_20261012_015000_seed_call_for_fire_versus_registry.down,
name: '20261012_015000_seed_call_for_fire_versus_registry'
},
{
up: migration_20261012_030000_update_call_for_fire_versus_wording.up,
down: migration_20261012_030000_update_call_for_fire_versus_wording.down,
name: '20261012_030000_update_call_for_fire_versus_wording'
},
];