diff --git a/hwe/index.php b/hwe/index.php index fc6df238..f3eb5ab1 100644 --- a/hwe/index.php +++ b/hwe/index.php @@ -150,7 +150,9 @@ if (!$otherTextInfo) { 'lastExecuted' => $gameStor->turntime, 'isLocked' => $plock, 'isTournamentActive' => $isTournamentActive, - 'isBettingActive' => $isBettingActive + 'isBettingActive' => $isBettingActive, + 'mapName' => GameConst::$mapName, + 'unitSet' => GameConst::$unitSet, ] ]) ?> diff --git a/hwe/sammo/API/NationCommand/GetReservedCommand.php b/hwe/sammo/API/NationCommand/GetReservedCommand.php index 4bf4ab34..f4c43c55 100644 --- a/hwe/sammo/API/NationCommand/GetReservedCommand.php +++ b/hwe/sammo/API/NationCommand/GetReservedCommand.php @@ -117,6 +117,8 @@ class GetReservedCommand extends \sammo\BaseAPI 'autorun_limit' => $generalObj->getAuxVar('autorun_limit'), 'officerLevel' => $me['officer_level'], 'commandList' => getChiefCommandTable($generalObj), + 'mapName' => GameConst::$mapName, + 'unitSet' => GameConst::$unitSet, ]; } } diff --git a/hwe/ts/PageChiefCenter.vue b/hwe/ts/PageChiefCenter.vue index fc2f07e0..e549eafa 100644 --- a/hwe/ts/PageChiefCenter.vue +++ b/hwe/ts/PageChiefCenter.vue @@ -392,6 +392,8 @@ export default defineComponent({ autorun_limit: undefined, officerLevel: undefined, commandList: undefined, + mapName: undefined, + unitSet: undefined, }); async function reloadTable(): Promise { diff --git a/hwe/ts/defs.ts b/hwe/ts/defs.ts index f85fbc93..bf95199b 100644 --- a/hwe/ts/defs.ts +++ b/hwe/ts/defs.ts @@ -223,6 +223,8 @@ export type ChiefResponse = { category: string; values: CommandItem[]; }[]; + mapName: string, + unitSet: string, }; diff --git a/hwe/ts/util/StoredActionsHelper.ts b/hwe/ts/util/StoredActionsHelper.ts index 474ff5de..70f3cf87 100644 --- a/hwe/ts/util/StoredActionsHelper.ts +++ b/hwe/ts/util/StoredActionsHelper.ts @@ -1,5 +1,4 @@ import type { TurnObj } from '@/defs'; -import { clone } from 'lodash'; import { ref } from 'vue'; @@ -9,9 +8,9 @@ export class StoredActionsHelper { public readonly recentActionsKey: string; public readonly storedActionsKey: string; - constructor(protected serverNick: string, protected type: 'general' | 'nation', protected maxRecent = 10) { - this.recentActionsKey = `${serverNick}_${type}RecentActions`; - this.storedActionsKey = `${serverNick}_${type}StoredActions`; + constructor(protected serverNick: string, protected type: 'general' | 'nation', protected mapName: string, protected unitSet: string, protected maxRecent = 10) { + this.recentActionsKey = `${serverNick}_${mapName}_${unitSet}_${type}RecentActions`; + this.storedActionsKey = `${serverNick}_${mapName}_${unitSet}_${type}StoredActions`; this.loadRecentActions(); this.loadStoredActions(); }