2022-04-24 01:18:05 +02:00
|
|
|
---Drewol, what are you doing? Why is there no game.LOGGER_DEBUG?
|
|
|
|
game.LOGGER_DEBUG = 0
|
2022-05-04 03:34:37 +02:00
|
|
|
|
|
|
|
-- add missing inputs
|
|
|
|
game.MOUSE_LEFT = 0
|
|
|
|
game.MOUSE_RIGHT = 1
|
|
|
|
game.MOUSE_MIDDLE = 2
|
|
|
|
|
|
|
|
game.KNOB_LEFT = 0
|
|
|
|
game.KNOB_RIGHT = 1
|
2022-08-11 03:15:01 +02:00
|
|
|
|
|
|
|
-- some cool extensions to the builtins ----------------------------------------
|
|
|
|
|
|
|
|
---Looks for the last match of pattern in the string.
|
|
|
|
---@param s string
|
|
|
|
---@param pattern string
|
|
|
|
---@param init? integer
|
|
|
|
---@param plain? boolean
|
|
|
|
function string.rfind(s, pattern, init, plain)
|
|
|
|
pattern = pattern:reverse()
|
|
|
|
return s:len() - s:reverse():find(pattern, init, plain) + 1
|
|
|
|
end
|