-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.lua
More file actions
80 lines (69 loc) · 2.31 KB
/
main.lua
File metadata and controls
80 lines (69 loc) · 2.31 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
Lust = SMODS and SMODS.current_mod or {}
Lust._DEBUG_MODE = false
require("lust/loading")
G.C.BUTTPLUG = HEX("ff009d")
local update_ref = Game.update
function Game:update(dt, ...)
Lust.dt = (Lust.dt or 0) - dt
if Lust.dt <= -0.35 and not Lust.reset then
Lust.buttplug.send_vibrate_cmd(0, { 0 })
Lust.reset = true
end
return update_ref(self, dt, ...)
end
function Lust.vibrate(intensity)
local plug_amt = G.SETTINGS.buttplug_intensity/100
if plug_amt < 0.05 then shake_amt = 0 end
if plug_amt > 0 then
Lust.buttplug.send_vibrate_cmd(0, {intensity * plug_amt})
end
Lust.last_speed = G.CURR_BP_VIBRATION * plug_amt
Lust.reset = false
end
if SMODS then
SMODS.Atlas {
key = "modicon",
path = "icon.png",
px = 34,
py = 34,
}:register()
function _table_merge(target, source, ...)
assert(type(target) == "table", "Target is not a table")
local tables_to_merge = { source, ... }
if #tables_to_merge == 0 then
return target
end
for k, t in ipairs(tables_to_merge) do
assert(type(t) == "table", string.format("Expected a table as parameter %d", k))
end
for i = 1, #tables_to_merge do
local from = tables_to_merge[i]
for k, v in pairs(from) do
if type(v) == "table" then
target[k] = target[k] or {}
target[k] = _table_merge(target[k], v)
else
target[k] = v
end
end
end
return target
end
local init_localization_ref = init_localization
function init_localization(...)
if not G.localization.__lust_injected then
local en_loc = require("lust/localization/en-us")
_table_merge(G.localization, en_loc)
if G.SETTINGS.language ~= "en-us" then
local success, current_loc = pcall(function()
return require("lust/localization/" .. G.SETTINGS.language)
end)
if success and current_loc then
_table_merge(G.localization, current_loc)
end
end
G.localization.__lust_injected = true
end
return init_localization_ref(...)
end
end