mirror of
https://github.com/Dadido3/noita-mapcap.git
synced 2024-11-18 17:17:31 +00:00
Fix missing default interval in LiveReload
This commit is contained in:
parent
6ca93b54d7
commit
a4314f3e91
@ -33,10 +33,11 @@ end
|
|||||||
---
|
---
|
||||||
---Just put this into your `OnWorldPreUpdate` or `OnWorldPostUpdate` callback:
|
---Just put this into your `OnWorldPreUpdate` or `OnWorldPostUpdate` callback:
|
||||||
---
|
---
|
||||||
--- LiveReload:Reload("mods/your-mod/") -- The trailing path separator is needed!
|
--- LiveReload:Reload("mods/your-mod/", 60) -- The trailing path separator is needed!
|
||||||
---@param modPath string
|
---@param modPath string
|
||||||
---@param interval integer
|
---@param interval integer
|
||||||
function LiveReload:Reload(modPath, interval)
|
function LiveReload:Reload(modPath, interval)
|
||||||
|
interval = interval or 60
|
||||||
self.Counter = (self.Counter or 0) + 1
|
self.Counter = (self.Counter or 0) + 1
|
||||||
if self.Counter < interval then return end
|
if self.Counter < interval then return end
|
||||||
self.Counter = nil
|
self.Counter = nil
|
||||||
|
Loading…
Reference in New Issue
Block a user