mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 22:51:57 +00:00
Add new public game modifiers 🙂 (#3500)
## Description: Adds 5 new public game modifiers to the Special game mode modifier pool: - **Ports Disabled** - disables port construction, focus on factories - **Nukes Disabled** - disables atom bombs, hydrogen bombs, MIRVs, missile silos and SAM launchers - **SAMs Disabled** - disables SAM launchers (thats funny, you cant protect against nukes, have to space out your stuff) (mutually exclusive with nukes disabled) - **1M Starting Gold** - gives all players 1M starting gold (was requested by people, new chill tier alongside existing 5M and 25M) - **4min Peace Time** - grants 4 minutes of PVP spawn immunity All `PublicGameModifiers` boolean fields are now optional - inactive modifiers are omitted from game JSON instead of being serialized as `false` (stop bloating the JSON size) I think we have enough modifiers now :) Good variety ## Please complete the following: - [X] I have added screenshots for all UI updates - [X] I process any text displayed to the user through translateText() and I've added it to the en.json file - [X] I have added relevant tests to the test directory - [X] I confirm I have thoroughly tested these changes and take full responsibility for any bugs introduced ## Please put your Discord username so you can be contacted if a bug or regression is found: FloPinguin
This commit is contained in:
+9
-5
@@ -225,13 +225,17 @@ export const GameConfigSchema = z.object({
|
||||
gameMapSize: z.enum(GameMapSize),
|
||||
publicGameModifiers: z
|
||||
.object({
|
||||
isCompact: z.boolean(),
|
||||
isRandomSpawn: z.boolean(),
|
||||
isCrowded: z.boolean(),
|
||||
isHardNations: z.boolean(),
|
||||
isCompact: z.boolean().optional(),
|
||||
isRandomSpawn: z.boolean().optional(),
|
||||
isCrowded: z.boolean().optional(),
|
||||
isHardNations: z.boolean().optional(),
|
||||
startingGold: z.number().int().min(0).optional(),
|
||||
goldMultiplier: z.number().min(0.1).max(1000).optional(),
|
||||
isAlliancesDisabled: z.boolean(),
|
||||
isAlliancesDisabled: z.boolean().optional(),
|
||||
isPortsDisabled: z.boolean().optional(),
|
||||
isNukesDisabled: z.boolean().optional(),
|
||||
isSAMsDisabled: z.boolean().optional(),
|
||||
isPeaceTime: z.boolean().optional(),
|
||||
})
|
||||
.optional(),
|
||||
nations: z
|
||||
|
||||
@@ -248,13 +248,17 @@ export enum GameMapSize {
|
||||
}
|
||||
|
||||
export interface PublicGameModifiers {
|
||||
isCompact: boolean;
|
||||
isRandomSpawn: boolean;
|
||||
isCrowded: boolean;
|
||||
isHardNations: boolean;
|
||||
isCompact?: boolean;
|
||||
isRandomSpawn?: boolean;
|
||||
isCrowded?: boolean;
|
||||
isHardNations?: boolean;
|
||||
startingGold?: number;
|
||||
goldMultiplier?: number;
|
||||
isAlliancesDisabled: boolean;
|
||||
isAlliancesDisabled?: boolean;
|
||||
isPortsDisabled?: boolean;
|
||||
isNukesDisabled?: boolean;
|
||||
isSAMsDisabled?: boolean;
|
||||
isPeaceTime?: boolean;
|
||||
}
|
||||
|
||||
export interface UnitInfo {
|
||||
|
||||
Reference in New Issue
Block a user