Fix training units
This commit is contained in:
		| @@ -7,3 +7,4 @@ export const QUARTERS_ID = 19; | |||||||
| export const HORSE_STABLE_ID = 20; | export const HORSE_STABLE_ID = 20; | ||||||
| export const GUILD_HALL_ID = 24; | export const GUILD_HALL_ID = 24; | ||||||
| export const EMBASSY_ID = 25; | export const EMBASSY_ID = 25; | ||||||
|  | export const PALACE_ID = 26; | ||||||
|   | |||||||
| @@ -9,7 +9,7 @@ import { BuildBuildingTask } from '../Task/BuildBuildingTask'; | |||||||
| import { Resources } from '../Core/Resources'; | import { Resources } from '../Core/Resources'; | ||||||
| import { Coordinates } from '../Core/Village'; | import { Coordinates } from '../Core/Village'; | ||||||
| import { SendResourcesTask } from '../Task/SendResourcesTask'; | import { SendResourcesTask } from '../Task/SendResourcesTask'; | ||||||
| import { EMBASSY_ID, HORSE_STABLE_ID, QUARTERS_ID } from '../Core/Buildings'; | import { EMBASSY_ID, HORSE_STABLE_ID, PALACE_ID, QUARTERS_ID } from '../Core/Buildings'; | ||||||
| import { BuildingPageAttributes, isForgePage, isGuildHallPage, isMarketSendResourcesPage } from './PageDetectors'; | import { BuildingPageAttributes, isForgePage, isGuildHallPage, isMarketSendResourcesPage } from './PageDetectors'; | ||||||
| import { createTrainTroopButtons } from './BuildingPage/TrooperPage'; | import { createTrainTroopButtons } from './BuildingPage/TrooperPage'; | ||||||
| import { createSendResourcesButton } from './BuildingPage/MarketPage'; | import { createSendResourcesButton } from './BuildingPage/MarketPage'; | ||||||
| @@ -51,6 +51,10 @@ export class BuildingPageController { | |||||||
|             createTrainTroopButtons((troopId, res, count) => this.onScheduleTrainTroopers(troopId, res, count)); |             createTrainTroopButtons((troopId, res, count) => this.onScheduleTrainTroopers(troopId, res, count)); | ||||||
|         } |         } | ||||||
|  |  | ||||||
|  |         if (buildTypeId === PALACE_ID && sheetId === 1) { | ||||||
|  |             createTrainTroopButtons((troopId, res, count) => this.onScheduleTrainTroopers(troopId, res, count)); | ||||||
|  |         } | ||||||
|  |  | ||||||
|         if (isMarketSendResourcesPage()) { |         if (isMarketSendResourcesPage()) { | ||||||
|             createSendResourcesButton((res, crd, scale) => this.onSendResources(res, crd, scale)); |             createSendResourcesButton((res, crd, scale) => this.onSendResources(res, crd, scale)); | ||||||
|         } |         } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user