misc: storedActionHelper 저장 키에 map, unit 지정
This commit is contained in:
+3
-1
@@ -150,7 +150,9 @@ if (!$otherTextInfo) {
|
||||
'lastExecuted' => $gameStor->turntime,
|
||||
'isLocked' => $plock,
|
||||
'isTournamentActive' => $isTournamentActive,
|
||||
'isBettingActive' => $isBettingActive
|
||||
'isBettingActive' => $isBettingActive,
|
||||
'mapName' => GameConst::$mapName,
|
||||
'unitSet' => GameConst::$unitSet,
|
||||
]
|
||||
]) ?>
|
||||
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
|
||||
|
||||
@@ -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,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -392,6 +392,8 @@ export default defineComponent({
|
||||
autorun_limit: undefined,
|
||||
officerLevel: undefined,
|
||||
commandList: undefined,
|
||||
mapName: undefined,
|
||||
unitSet: undefined,
|
||||
});
|
||||
|
||||
async function reloadTable(): Promise<void> {
|
||||
|
||||
@@ -223,6 +223,8 @@ export type ChiefResponse = {
|
||||
category: string;
|
||||
values: CommandItem[];
|
||||
}[];
|
||||
mapName: string,
|
||||
unitSet: string,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user