mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-22 10:48:10 +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:
@@ -186,6 +186,30 @@ export function getActiveModifiers(
|
||||
formattedValue: translateText("common.disabled"),
|
||||
});
|
||||
}
|
||||
if (modifiers.isPortsDisabled) {
|
||||
result.push({
|
||||
labelKey: "public_game_modifier.ports_disabled_label",
|
||||
badgeKey: "public_game_modifier.ports_disabled",
|
||||
});
|
||||
}
|
||||
if (modifiers.isNukesDisabled) {
|
||||
result.push({
|
||||
labelKey: "public_game_modifier.nukes_disabled_label",
|
||||
badgeKey: "public_game_modifier.nukes_disabled",
|
||||
});
|
||||
}
|
||||
if (modifiers.isSAMsDisabled) {
|
||||
result.push({
|
||||
labelKey: "public_game_modifier.sams_disabled_label",
|
||||
badgeKey: "public_game_modifier.sams_disabled",
|
||||
});
|
||||
}
|
||||
if (modifiers.isPeaceTime) {
|
||||
result.push({
|
||||
labelKey: "public_game_modifier.peace_time_label",
|
||||
badgeKey: "public_game_modifier.peace_time",
|
||||
});
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user