mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 14:41:35 +00:00
update unit position in UnitGrid when units move
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { GameType, UnitInfo, UnitType } from "../game/Game";
|
||||
import { UnitInfo, UnitType } from "../game/Game";
|
||||
import { UserSettings } from "../game/UserSettings";
|
||||
import { GameConfig } from "../Schemas";
|
||||
import { GameEnv, ServerConfig } from "./Config";
|
||||
@@ -40,10 +40,10 @@ export class DevConfig extends DefaultConfig {
|
||||
super(sc, gc, us);
|
||||
}
|
||||
|
||||
numSpawnPhaseTurns(): number {
|
||||
return this.gameConfig().gameType == GameType.Singleplayer ? 70 : 100;
|
||||
// return 100
|
||||
}
|
||||
// numSpawnPhaseTurns(): number {
|
||||
// return this.gameConfig().gameType == GameType.Singleplayer ? 70 : 100;
|
||||
// // return 100
|
||||
// }
|
||||
|
||||
unitInfo(type: UnitType): UnitInfo {
|
||||
const info = super.unitInfo(type);
|
||||
|
||||
@@ -86,6 +86,8 @@ export class UnitImpl implements Unit {
|
||||
}
|
||||
this._lastTile = this._tile;
|
||||
this._tile = tile;
|
||||
this.mg.removeUnit(this);
|
||||
this.mg.addUnit(this);
|
||||
this.mg.addUpdate(this.toUpdate());
|
||||
}
|
||||
setTroops(troops: number): void {
|
||||
|
||||
Reference in New Issue
Block a user