mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-22 23:06:18 +00:00
Safeguard against the "plight_timer is nil" bug
it's not a bug that ever happens in real/normal gameplay but testers run into it in debug runs sometimes and i'm not sure why
This commit is contained in:
parent
3ec401e18d
commit
785ee492cc
1 changed files with 3 additions and 0 deletions
|
|
@ -737,6 +737,9 @@ def plight_start_timer
|
||||||
end
|
end
|
||||||
|
|
||||||
def plight_update_timer
|
def plight_update_timer
|
||||||
|
if $game_oneshot.plight_timer == nil
|
||||||
|
plight_start_timer
|
||||||
|
end
|
||||||
Script.tmp_v1 = ((Time.now - $game_oneshot.plight_timer) / 60).to_i
|
Script.tmp_v1 = ((Time.now - $game_oneshot.plight_timer) / 60).to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue