변수명 재정의
This commit is contained in:
@@ -12,7 +12,7 @@ import { addSeconds } from "date-fns";
|
||||
|
||||
export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
protected readonly _indirectNames: (keyof IGeneralEntity)[] = [
|
||||
"id", "nationID", "squadID", "nationID", "turntime"
|
||||
"id", "nationID", "squadID", "nationID", "turnTime"
|
||||
];
|
||||
protected readonly _entityType = "General";
|
||||
protected readonly _raw: IGeneralEntity;
|
||||
@@ -142,24 +142,24 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
else{
|
||||
raw.officerLevel = OfficerLevel.normal;
|
||||
}
|
||||
raw.nationBelong = 0;
|
||||
raw.nationJoinedRelYear = 0;
|
||||
});
|
||||
}
|
||||
|
||||
public updateTurntime(){
|
||||
public updateTurnTime(){
|
||||
const secondsPerTurn = this.rsc.gameEnv().raw.secondsPerTurn;
|
||||
|
||||
this.forceUpdate((raw) => {
|
||||
raw.turntime = addSeconds(raw.turntime, secondsPerTurn);
|
||||
raw.turnTime = addSeconds(raw.turnTime, secondsPerTurn);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
public compareTurntime(other: General): number {
|
||||
if(this._raw.turntime < other._raw.turntime){
|
||||
public compareTurnTime(other: General): number {
|
||||
if(this._raw.turnTime < other._raw.turnTime){
|
||||
return -1;
|
||||
}
|
||||
if(this._raw.turntime > other._raw.turntime){
|
||||
if(this._raw.turnTime > other._raw.turnTime){
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user