Remove ports-disabled modifier from public games (#4464)

## Summary
Removes the `isPortsDisabled` ticket from `SPECIAL_MODIFIER_POOL` in
`src/server/MapPlaylist.ts`, so the "ports disabled" modifier can no
longer be randomly selected for public games.

The reasoning is that many games with disabled ports were filling up
very slowly or not at all (one game I saw had 3 players after 2 minutes)

## Notes
- Private/custom lobbies are unaffected — the modifier itself still
exists (type, schema, client UI), it's just no longer in the public
auto-selection pool.
- The now-unreachable public-game handling for `isPortsDisabled` (the
`FULL_LAND_MAPS` exclusion and the `disabledUnits` branch) is left in
place to keep the change surgical; it simply never triggers for public
games now.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Evan
2026-06-30 14:35:38 -07:00
committed by evanpelle
parent ab95e03e45
commit 571ecde7bb
-16
View File
@@ -71,7 +71,6 @@ type ModifierKey =
| "startingGold25M"
| "goldMultiplier"
| "isAlliancesDisabled"
| "isPortsDisabled"
| "isNukesDisabled"
| "isSAMsDisabled"
| "isPeaceTime"
@@ -89,7 +88,6 @@ const SPECIAL_MODIFIER_POOL: ModifierKey[] = [
...Array<ModifierKey>(3).fill("startingGold25M"),
...Array<ModifierKey>(6).fill("goldMultiplier"),
...Array<ModifierKey>(1).fill("isAlliancesDisabled"),
...Array<ModifierKey>(1).fill("isPortsDisabled"),
...Array<ModifierKey>(1).fill("isNukesDisabled"),
...Array<ModifierKey>(1).fill("isSAMsDisabled"),
...Array<ModifierKey>(1).fill("isPeaceTime"),
@@ -108,7 +106,6 @@ const WATER_NUKES_BOOSTED_MAPS: ReadonlySet<GameMapType> = new Set([
// Maps that are entirely land.
// - Water nukes forced on 75% of the time (overrides WATER_NUKES_BOOSTED_MAPS)
// - The "ports disabled" modifier is only allowed when water nukes is on
const FULL_LAND_MAPS: ReadonlySet<GameMapType> = new Set([
GameMapType.TheBox,
GameMapType.Alps,
@@ -240,11 +237,6 @@ export class MapPlaylist {
excludedModifiers.push("isWaterNukes", "isNukesDisabled");
}
// On full-land maps, ports-disabled is only allowed alongside water nukes
if (FULL_LAND_MAPS.has(map) && !boostWaterNukes) {
excludedModifiers.push("isPortsDisabled");
}
const poolResult = this.getRandomSpecialGameModifiers(
excludedModifiers,
undefined,
@@ -258,7 +250,6 @@ export class MapPlaylist {
goldMultiplier,
isAlliancesDisabled,
isHardNations,
isPortsDisabled,
isNukesDisabled,
isSAMsDisabled,
isPeaceTime,
@@ -286,7 +277,6 @@ export class MapPlaylist {
startingGold === undefined &&
goldMultiplier === undefined &&
!isAlliancesDisabled &&
!isPortsDisabled &&
!isNukesDisabled &&
!isSAMsDisabled &&
!isPeaceTime &&
@@ -303,7 +293,6 @@ export class MapPlaylist {
startingGold,
goldMultiplier,
isAlliancesDisabled,
isPortsDisabled,
isNukesDisabled,
isSAMsDisabled,
isPeaceTime,
@@ -329,9 +318,6 @@ export class MapPlaylist {
// Build disabledUnits from modifiers
const disabledUnits: UnitType[] = [];
if (isPortsDisabled) {
disabledUnits.push(UnitType.Port);
}
if (isNukesDisabled) {
disabledUnits.push(
UnitType.MissileSilo,
@@ -363,7 +349,6 @@ export class MapPlaylist {
startingGold,
goldMultiplier,
isAlliancesDisabled,
isPortsDisabled,
isNukesDisabled,
isSAMsDisabled,
isPeaceTime,
@@ -568,7 +553,6 @@ export class MapPlaylist {
: undefined,
goldMultiplier: selected.has("goldMultiplier") ? 2 : undefined,
isAlliancesDisabled: selected.has("isAlliancesDisabled") || undefined,
isPortsDisabled: selected.has("isPortsDisabled") || undefined,
isNukesDisabled: selected.has("isNukesDisabled") || undefined,
isSAMsDisabled: selected.has("isSAMsDisabled") || undefined,
isPeaceTime: selected.has("isPeaceTime") || undefined,