mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-15 23:39:42 +00:00
Cleanup: remove unused code from four files (#3234)
## Description: PR 2/x in effort to break up PR https://github.com/openfrontio/OpenFrontIO/pull/3220. Removes unused code and properties. - **Game.ts** and **DefaultConfig** unitInfo: removed _canBuildTrainStation_ and _expirimental_ properties, as they weren't used anywhere anymore. - **PlayerActionHandler**: remove unused getPlayerActions, the only potential caller MainRadialMenu already just calls myPlayer.actions via GameView directly. - **StructureIconsLayer**: remove unused PlayerActions ## 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: tryout33
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { EventBus } from "../../../core/EventBus";
|
||||
import { PlayerActions } from "../../../core/game/Game";
|
||||
import { TileRef } from "../../../core/game/GameMap";
|
||||
import { PlayerView } from "../../../core/game/GameView";
|
||||
import {
|
||||
@@ -23,13 +22,6 @@ export class PlayerActionHandler {
|
||||
private uiState: UIState,
|
||||
) {}
|
||||
|
||||
async getPlayerActions(
|
||||
player: PlayerView,
|
||||
tile: TileRef,
|
||||
): Promise<PlayerActions> {
|
||||
return await player.actions(tile);
|
||||
}
|
||||
|
||||
handleAttack(player: PlayerView, targetId: string | null) {
|
||||
this.eventBus.emit(
|
||||
new SendAttackIntentEvent(
|
||||
|
||||
@@ -8,7 +8,6 @@ import { wouldNukeBreakAlliance } from "../../../core/execution/Util";
|
||||
import {
|
||||
BuildableUnit,
|
||||
Cell,
|
||||
PlayerActions,
|
||||
PlayerID,
|
||||
UnitType,
|
||||
} from "../../../core/game/Game";
|
||||
@@ -74,7 +73,6 @@ export class StructureIconsLayer implements Layer {
|
||||
private ghostStage: PIXI.Container;
|
||||
private levelsStage: PIXI.Container;
|
||||
private rootStage: PIXI.Container = new PIXI.Container();
|
||||
public playerActions: PlayerActions | null = null;
|
||||
private dotsStage: PIXI.Container;
|
||||
private readonly theme: Theme;
|
||||
private renderer: PIXI.Renderer | null = null;
|
||||
|
||||
Reference in New Issue
Block a user