feat: -60 turnterm 가변턴
This commit is contained in:
@@ -256,7 +256,7 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import addMinutes from "date-fns/esm/addMinutes";
|
||||
import { addMinutes } from "date-fns/addMinutes";
|
||||
import queryString from "query-string";
|
||||
import { onMounted, ref, watch, type PropType, inject, type Ref } from "vue";
|
||||
import { formatTime } from "@util/formatTime";
|
||||
@@ -282,6 +282,7 @@ import { unwrap_err } from "@/util/unwrap_err";
|
||||
import type { GameConstStore } from "@/GameConstStore";
|
||||
import { postFilterNationCommandGen } from "@/utilGame/postFilterNationCommandGen";
|
||||
import { unwrap } from "@/util/unwrap";
|
||||
import { VarTurn60 } from "@/varTurn60";
|
||||
|
||||
const toasts = unwrap(useToast());
|
||||
|
||||
@@ -536,13 +537,19 @@ function updateCommandList() {
|
||||
...obj,
|
||||
year,
|
||||
month,
|
||||
time: formatTime(nextTurnTime, props.turnTerm >= 5 ? "HH:mm" : "mm:ss"),
|
||||
time: formatTime(nextTurnTime, Math.abs(props.turnTerm) >= 5 ? "HH:mm" : "mm:ss"),
|
||||
tooltip: tooltip.length == 0 ? undefined : tooltip.join("\n"),
|
||||
style,
|
||||
});
|
||||
|
||||
yearMonth += 1;
|
||||
nextTurnTime = addMinutes(nextTurnTime, props.turnTerm);
|
||||
|
||||
if(props.turnTerm == -60){
|
||||
nextTurnTime = VarTurn60.fromDatetime(nextTurnTime).addTurn(1).toDate();
|
||||
}
|
||||
else{
|
||||
nextTurnTime = addMinutes(nextTurnTime, props.turnTerm);
|
||||
}
|
||||
}
|
||||
reservedCommandList.value = _reservedCommandList;
|
||||
updated.value = true;
|
||||
|
||||
Reference in New Issue
Block a user