mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-02 15:38:22 +00:00
Improve ingame moderation for admins (#3678)
## Description: Players with the `admin` flare can now kick players from any game (including public lobbies), not just the lobby creator in private lobbies. ## 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: w.o.n
This commit is contained in:
@@ -57,6 +57,7 @@ export interface LobbyConfig {
|
||||
cosmetics: PlayerCosmeticRefs;
|
||||
playerName: string;
|
||||
playerClanTag: string | null;
|
||||
playerRole: string | null;
|
||||
gameID: GameID;
|
||||
turnstileToken: string | null;
|
||||
// GameStartInfo only exists when playing a singleplayer game.
|
||||
@@ -259,7 +260,12 @@ async function createClientGame(
|
||||
const canvas = createCanvas();
|
||||
const soundManager = new SoundManager(eventBus, userSettings);
|
||||
try {
|
||||
const gameRenderer = createRenderer(canvas, gameView, eventBus);
|
||||
const gameRenderer = createRenderer(
|
||||
canvas,
|
||||
gameView,
|
||||
eventBus,
|
||||
lobbyConfig.playerRole,
|
||||
);
|
||||
|
||||
console.log(
|
||||
`creating private game got difficulty: ${lobbyConfig.gameStartInfo.config.difficulty}`,
|
||||
|
||||
Reference in New Issue
Block a user