forked from FonWasH/live_in_night_city
-
Notifications
You must be signed in to change notification settings - Fork 1
/
init.lua
41 lines (32 loc) · 1.03 KB
/
init.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
local user = require("modules/models/User")
local player = require("modules/models/Player")
local cron = require("modules/utils/Cron")
local observers = require("modules/controllers/Observers")
local listeners = require("modules/controllers/Listeners")
LiNC = {
description = "Live in Night City (a.k.a. survival mode)",
version = "0.3.5",
strings = {},
config = {}
}
Notif = require("modules/views/Notification")
User = user:new()
Player = player:new()
registerForEvent("onInit", function()
User:load()
observers.init()
listeners.init()
cron.Every(1.0, {tick = 1}, function(_)
if Player.state.enable then
Player:getConsumption()
Player:updateMetabolism()
end
end)
print("[Live in Night City] is initialized (v" .. LiNC.version .. ")")
end)
registerForEvent("onUpdate", function(delta)
cron.Update(delta)
end)
registerHotkey("LiveInNightCity", "Show Needs", function()
Notif.show()
end)