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;
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<AutorunInfo :autorunMode="globalInfo.autorunUser" />
|
||||
</div>
|
||||
<div class="s-border-t col py-2 col-8 col-lg-4 subYearMonth">
|
||||
현재: {{ globalInfo.year }}年 {{ globalInfo.month }}月 ({{ globalInfo.turnterm }}분 턴 서버)
|
||||
현재: {{ globalInfo.year }}年 {{ globalInfo.month }}月 ({{ globalInfo.turnterm == -60 ? '가변 60' : globalInfo.turnterm }}분 턴 서버)
|
||||
</div>
|
||||
<div class="s-border-t col py-2 col-4 col-lg-2 subOnlineUserCnt">
|
||||
전체 접속자 수: {{ (globalInfo.onlineUserCnt ?? 0).toLocaleString() }}명
|
||||
|
||||
@@ -175,8 +175,9 @@ import { clamp } from "lodash-es";
|
||||
import { formatCityName } from "@/utilGame/formatCityName";
|
||||
import { isValidObjKey } from "@/utilGame/isValidObjKey";
|
||||
import { calcInjury } from "@/utilGame/calcInjury";
|
||||
import { addMinutes } from "date-fns/esm";
|
||||
import { addMinutes } from "date-fns/addMinutes";
|
||||
import type { GameIActionInfo } from "@/defs/GameObj";
|
||||
import { VarTurn60 } from "@/varTurn60";
|
||||
const imagePath = window.pathConfig.gameImage;
|
||||
const gameConstStore = unwrap(inject<Ref<GameConstStore>>("gameConstStore"));
|
||||
const props = defineProps<{
|
||||
@@ -278,7 +279,12 @@ watch(
|
||||
() => {
|
||||
let turnTime = parseTime(general.value.turntime);
|
||||
if (turnTime.getTime() < props.lastExecuted.getTime()) {
|
||||
turnTime = addMinutes(turnTime, props.turnTerm);
|
||||
if(props.turnTerm == -60){
|
||||
turnTime = VarTurn60.fromDatetime(turnTime).addTurn(1).toDate();
|
||||
}
|
||||
else {
|
||||
turnTime = addMinutes(turnTime, props.turnTerm);
|
||||
}
|
||||
}
|
||||
nextExecuteMinute.value = Math.floor(clamp((turnTime.getTime() - props.lastExecuted.getTime()) / 60000, 0, 999));
|
||||
},
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { MsgItem, MsgTarget, MsgType } from "@/defs/API/Message";
|
||||
import { parseTime } from "@/util/parseTime";
|
||||
import { differenceInMilliseconds, addMinutes } from "date-fns/esm";
|
||||
import { addMinutes, differenceInMilliseconds } from "date-fns";
|
||||
import { computed, onMounted, ref, toRef, watch, type ComputedRef, type Ref } from "vue";
|
||||
import linkifyStr from "linkify-string";
|
||||
import { SammoAPI } from "@/SammoAPI";
|
||||
|
||||
Reference in New Issue
Block a user