refac: rsc -> rc
This commit is contained in:
@@ -25,20 +25,20 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
|
||||
constructor(
|
||||
raw: IGeneralEntity,
|
||||
protected readonly rsc: IResourceController
|
||||
protected readonly rc: IResourceController
|
||||
){
|
||||
super();
|
||||
this._raw = raw;
|
||||
}
|
||||
|
||||
public bootstrap(){
|
||||
const rsc = this.rsc;
|
||||
const rc = this.rc;
|
||||
const raw = this._raw;
|
||||
this._city = new WeakRef(must(rsc.city(raw.cityID)));
|
||||
this._nation = new WeakRef(must(rsc.nation(raw.nationID)));
|
||||
this._city = new WeakRef(must(rc.city(raw.cityID)));
|
||||
this._nation = new WeakRef(must(rc.nation(raw.nationID)));
|
||||
|
||||
if(raw.squadID){
|
||||
this._squad = new WeakRef(must(rsc.squad(raw.squadID, raw.nationID)));
|
||||
this._squad = new WeakRef(must(rc.squad(raw.squadID, raw.nationID)));
|
||||
}
|
||||
|
||||
this.reconfigureIActionHandlers();
|
||||
@@ -141,7 +141,7 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
else{
|
||||
raw.officerLevel = OfficerLevel.normal;
|
||||
}
|
||||
raw.nationJoinedYearMonth = this.rsc.gameEnv.raw.yearMonth;
|
||||
raw.nationJoinedYearMonth = this.rc.gameEnv.raw.yearMonth;
|
||||
});
|
||||
nation.notifyJoinGeneral(this);
|
||||
|
||||
@@ -153,7 +153,7 @@ export class General extends LazyEntityUpdater<IGeneralEntity> {
|
||||
}
|
||||
|
||||
public updateTurnTime(){
|
||||
const secondsPerTurn = this.rsc.gameEnv.raw.secondsPerTurn;
|
||||
const secondsPerTurn = this.rc.gameEnv.raw.secondsPerTurn;
|
||||
|
||||
this.forceUpdate((raw) => {
|
||||
raw.turnTime = addSeconds(raw.turnTime, secondsPerTurn);
|
||||
|
||||
Reference in New Issue
Block a user