Compare commits
6 Commits
57594aebbd
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| f1e4f91461 | |||
| 18b3debb53 | |||
| 79bd47ff0c | |||
| f284a27ded | |||
| a6bfb8e8c7 | |||
| 4a8c91a4ec |
8
_test.lua
Normal file
8
_test.lua
Normal file
@@ -0,0 +1,8 @@
|
||||
local rootPath = utils.get_appdata_path("PopstarDevs", "2Take1Menu") .. "\\scripts\\"
|
||||
|
||||
function load(file)
|
||||
local chunk, status = loadfile(rootPath .. file)
|
||||
if chunk then chunk() end
|
||||
end
|
||||
|
||||
load("ts-lua\\dist\\test.lua")
|
||||
22
test.lua
22
test.lua
@@ -1,22 +0,0 @@
|
||||
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
||||
fps = 60
|
||||
duration = 5
|
||||
menu.add_feature(
|
||||
"test",
|
||||
"action",
|
||||
0,
|
||||
function()
|
||||
do
|
||||
local i = 0
|
||||
while i < (fps * duration) do
|
||||
scriptdraw.draw_rect(
|
||||
v2(0, 0),
|
||||
v2(1, 1),
|
||||
4294967295
|
||||
)
|
||||
system.wait(0)
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
)
|
||||
360
ts-lua/dist/test.lua
vendored
360
ts-lua/dist/test.lua
vendored
@@ -1,11 +1,341 @@
|
||||
--[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
||||
fps = 60
|
||||
duration = 5
|
||||
menu.add_feature(
|
||||
"test",
|
||||
"action",
|
||||
0,
|
||||
function()
|
||||
|
||||
local ____modules = {}
|
||||
local ____moduleCache = {}
|
||||
local ____originalRequire = require
|
||||
local function require(file)
|
||||
if ____moduleCache[file] then
|
||||
return ____moduleCache[file]
|
||||
end
|
||||
if ____modules[file] then
|
||||
____moduleCache[file] = ____modules[file]()
|
||||
return ____moduleCache[file]
|
||||
else
|
||||
if ____originalRequire then
|
||||
return ____originalRequire(file)
|
||||
else
|
||||
error("module '" .. file .. "' not found")
|
||||
end
|
||||
end
|
||||
end
|
||||
____modules = {
|
||||
["index"] = function() --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
||||
end,
|
||||
["classes.Feature"] = function() --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
||||
-- Lua Library inline imports
|
||||
function __TS__Class(self)
|
||||
local c = {prototype = {}}
|
||||
c.prototype.__index = c.prototype
|
||||
c.prototype.constructor = c
|
||||
return c
|
||||
end
|
||||
|
||||
function __TS__ArrayPush(arr, ...)
|
||||
local items = {...}
|
||||
for ____, item in ipairs(items) do
|
||||
arr[#arr + 1] = item
|
||||
end
|
||||
return #arr
|
||||
end
|
||||
|
||||
function __TS__ArraySplice(list, ...)
|
||||
local len = #list
|
||||
local actualArgumentCount = select("#", ...)
|
||||
local start = select(1, ...)
|
||||
local deleteCount = select(2, ...)
|
||||
local actualStart
|
||||
if start < 0 then
|
||||
actualStart = math.max(len + start, 0)
|
||||
else
|
||||
actualStart = math.min(start, len)
|
||||
end
|
||||
local itemCount = math.max(actualArgumentCount - 2, 0)
|
||||
local actualDeleteCount
|
||||
if actualArgumentCount == 0 then
|
||||
actualDeleteCount = 0
|
||||
elseif actualArgumentCount == 1 then
|
||||
actualDeleteCount = len - actualStart
|
||||
else
|
||||
actualDeleteCount = math.min(
|
||||
math.max(deleteCount or 0, 0),
|
||||
len - actualStart
|
||||
)
|
||||
end
|
||||
local out = {}
|
||||
do
|
||||
local k = 0
|
||||
while k < actualDeleteCount do
|
||||
local from = actualStart + k
|
||||
if list[from + 1] then
|
||||
out[k + 1] = list[from + 1]
|
||||
end
|
||||
k = k + 1
|
||||
end
|
||||
end
|
||||
if itemCount < actualDeleteCount then
|
||||
do
|
||||
local k = actualStart
|
||||
while k < (len - actualDeleteCount) do
|
||||
local from = k + actualDeleteCount
|
||||
local to = k + itemCount
|
||||
if list[from + 1] then
|
||||
list[to + 1] = list[from + 1]
|
||||
else
|
||||
list[to + 1] = nil
|
||||
end
|
||||
k = k + 1
|
||||
end
|
||||
end
|
||||
do
|
||||
local k = len
|
||||
while k > ((len - actualDeleteCount) + itemCount) do
|
||||
list[k] = nil
|
||||
k = k - 1
|
||||
end
|
||||
end
|
||||
elseif itemCount > actualDeleteCount then
|
||||
do
|
||||
local k = len - actualDeleteCount
|
||||
while k > actualStart do
|
||||
local from = (k + actualDeleteCount) - 1
|
||||
local to = (k + itemCount) - 1
|
||||
if list[from + 1] then
|
||||
list[to + 1] = list[from + 1]
|
||||
else
|
||||
list[to + 1] = nil
|
||||
end
|
||||
k = k - 1
|
||||
end
|
||||
end
|
||||
end
|
||||
local j = actualStart
|
||||
for i = 3, actualArgumentCount do
|
||||
list[j + 1] = select(i, ...)
|
||||
j = j + 1
|
||||
end
|
||||
do
|
||||
local k = #list - 1
|
||||
while k >= ((len - actualDeleteCount) + itemCount) do
|
||||
list[k + 1] = nil
|
||||
k = k - 1
|
||||
end
|
||||
end
|
||||
return out
|
||||
end
|
||||
|
||||
function __TS__ClassExtends(target, base)
|
||||
target.____super = base
|
||||
local staticMetatable = setmetatable({__index = base}, base)
|
||||
setmetatable(target, staticMetatable)
|
||||
local baseMetatable = getmetatable(base)
|
||||
if baseMetatable then
|
||||
if type(baseMetatable.__index) == "function" then
|
||||
staticMetatable.__index = baseMetatable.__index
|
||||
end
|
||||
if type(baseMetatable.__newindex) == "function" then
|
||||
staticMetatable.__newindex = baseMetatable.__newindex
|
||||
end
|
||||
end
|
||||
setmetatable(target.prototype, base.prototype)
|
||||
if type(base.prototype.__index) == "function" then
|
||||
target.prototype.__index = base.prototype.__index
|
||||
end
|
||||
if type(base.prototype.__newindex) == "function" then
|
||||
target.prototype.__newindex = base.prototype.__newindex
|
||||
end
|
||||
if type(base.prototype.__tostring) == "function" then
|
||||
target.prototype.__tostring = base.prototype.__tostring
|
||||
end
|
||||
end
|
||||
|
||||
local ____exports = {}
|
||||
____exports.FeatureParent = __TS__Class()
|
||||
local FeatureParent = ____exports.FeatureParent
|
||||
FeatureParent.name = "FeatureParent"
|
||||
function FeatureParent.prototype.____constructor(self, name, parent)
|
||||
self.parentid = 0
|
||||
self.children = {}
|
||||
self.name = name
|
||||
if parent then
|
||||
self.parent = parent
|
||||
self.parentid = parent.id
|
||||
self.parent:addChild(self)
|
||||
end
|
||||
self.feat = menu.add_feature(
|
||||
name,
|
||||
self:type(),
|
||||
self.parentid,
|
||||
function() return self:select() end
|
||||
)
|
||||
self.id = self.feat.id
|
||||
end
|
||||
function FeatureParent.prototype.type(self)
|
||||
return "parent"
|
||||
end
|
||||
function FeatureParent.prototype.hidden(self)
|
||||
return self.feat.hidden
|
||||
end
|
||||
function FeatureParent.prototype.setHidden(self, val)
|
||||
self.feat.hidden = val
|
||||
end
|
||||
function FeatureParent.prototype.select(self)
|
||||
end
|
||||
function FeatureParent.prototype.addChild(self, feat)
|
||||
do
|
||||
local i = 0
|
||||
while i < #self.children do
|
||||
if self.children[i + 1]:equals(feat) then
|
||||
return
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
__TS__ArrayPush(self.children, feat)
|
||||
end
|
||||
function FeatureParent.prototype.removeChild(self, feat)
|
||||
do
|
||||
local i = 0
|
||||
while i < #self.children do
|
||||
if self.children[i + 1]:equals(feat) then
|
||||
__TS__ArraySplice(self.children, i, 1)
|
||||
end
|
||||
i = i + 1
|
||||
end
|
||||
end
|
||||
end
|
||||
function FeatureParent.prototype.equals(self, feat)
|
||||
return self.id == feat.id
|
||||
end
|
||||
____exports.FeatureAction = __TS__Class()
|
||||
local FeatureAction = ____exports.FeatureAction
|
||||
FeatureAction.name = "FeatureAction"
|
||||
__TS__ClassExtends(FeatureAction, ____exports.FeatureParent)
|
||||
function FeatureAction.prototype.____constructor(self, name, parent, handler)
|
||||
FeatureAction.____super.prototype.____constructor(self, name, parent)
|
||||
if handler then
|
||||
self.handler = handler
|
||||
end
|
||||
end
|
||||
function FeatureAction.prototype.type(self)
|
||||
return "action"
|
||||
end
|
||||
function FeatureAction.prototype.select(self)
|
||||
if self.handler then
|
||||
self:handler(self)
|
||||
end
|
||||
end
|
||||
function FeatureAction.prototype.setHandler(self, handler)
|
||||
self.handler = handler
|
||||
end
|
||||
____exports.FeatureToggle = __TS__Class()
|
||||
local FeatureToggle = ____exports.FeatureToggle
|
||||
FeatureToggle.name = "FeatureToggle"
|
||||
__TS__ClassExtends(FeatureToggle, ____exports.FeatureAction)
|
||||
function FeatureToggle.prototype.____constructor(self, name, parent, defaultvalue, handler)
|
||||
if defaultvalue == nil then
|
||||
defaultvalue = false
|
||||
end
|
||||
FeatureToggle.____super.prototype.____constructor(self, name, parent, handler)
|
||||
self:setValue(defaultvalue)
|
||||
end
|
||||
function FeatureToggle.prototype.type(self)
|
||||
return "toggle"
|
||||
end
|
||||
function FeatureToggle.prototype.value(self)
|
||||
return self.feat.on
|
||||
end
|
||||
function FeatureToggle.prototype.setValue(self, val)
|
||||
self.feat.on = val
|
||||
end
|
||||
function FeatureToggle.prototype.toggle(self)
|
||||
self.feat.on = not self.feat.on
|
||||
end
|
||||
____exports.FeatureNum = __TS__Class()
|
||||
local FeatureNum = ____exports.FeatureNum
|
||||
FeatureNum.name = "FeatureNum"
|
||||
__TS__ClassExtends(FeatureNum, ____exports.FeatureAction)
|
||||
function FeatureNum.prototype.____constructor(self, name, parent, defaultnum, handler)
|
||||
if defaultnum == nil then
|
||||
defaultnum = 0
|
||||
end
|
||||
FeatureNum.____super.prototype.____constructor(self, name, parent, handler)
|
||||
self:setNum(defaultnum)
|
||||
end
|
||||
function FeatureNum.prototype.type(self)
|
||||
return "action_value_i"
|
||||
end
|
||||
function FeatureNum.prototype.num(self)
|
||||
return self.feat.value_i
|
||||
end
|
||||
function FeatureNum.prototype.setNum(self, val)
|
||||
self.feat.value_i = val
|
||||
end
|
||||
function FeatureNum.prototype.min(self)
|
||||
return self.feat.min_i
|
||||
end
|
||||
function FeatureNum.prototype.setMin(self, val)
|
||||
self.feat.min_i = math.floor(val + 0.5)
|
||||
end
|
||||
function FeatureNum.prototype.max(self)
|
||||
return self.feat.max_i
|
||||
end
|
||||
function FeatureNum.prototype.setMax(self, val)
|
||||
self.feat.max_i = math.floor(val + 0.5)
|
||||
end
|
||||
function FeatureNum.prototype.step(self)
|
||||
return self.feat.mod_i
|
||||
end
|
||||
function FeatureNum.prototype.setStep(self, val)
|
||||
self.feat.mod_i = math.floor(val + 0.5)
|
||||
end
|
||||
____exports.FeatureNumToggle = __TS__Class()
|
||||
local FeatureNumToggle = ____exports.FeatureNumToggle
|
||||
FeatureNumToggle.name = "FeatureNumToggle"
|
||||
__TS__ClassExtends(FeatureNumToggle, ____exports.FeatureNum)
|
||||
function FeatureNumToggle.prototype.____constructor(self, name, parent, defaultnum, defaultvalue, handler)
|
||||
if defaultnum == nil then
|
||||
defaultnum = 0
|
||||
end
|
||||
if defaultvalue == nil then
|
||||
defaultvalue = false
|
||||
end
|
||||
FeatureNumToggle.____super.prototype.____constructor(self, name, parent, defaultnum, handler)
|
||||
self:setValue(defaultvalue)
|
||||
end
|
||||
function FeatureNumToggle.prototype.type(self)
|
||||
return "value_i"
|
||||
end
|
||||
function FeatureNumToggle.prototype.value(self)
|
||||
return self.feat.on
|
||||
end
|
||||
function FeatureNumToggle.prototype.setValue(self, val)
|
||||
self.feat.on = val
|
||||
end
|
||||
function FeatureNumToggle.prototype.toggle(self)
|
||||
self.feat.on = not self.feat.on
|
||||
end
|
||||
return ____exports
|
||||
end,
|
||||
["test"] = function() --[[ Generated with https://github.com/TypeScriptToLua/TypeScriptToLua ]]
|
||||
-- Lua Library inline imports
|
||||
function __TS__New(target, ...)
|
||||
local instance = setmetatable({}, target.prototype)
|
||||
instance:____constructor(...)
|
||||
return instance
|
||||
end
|
||||
|
||||
local ____exports = {}
|
||||
local ____Feature = require("classes.Feature")
|
||||
local FeatureAction = ____Feature.FeatureAction
|
||||
local FeatureParent = ____Feature.FeatureParent
|
||||
local fps = 60
|
||||
local duration = 5
|
||||
local testParent = __TS__New(FeatureParent, "test")
|
||||
__TS__New(
|
||||
FeatureAction,
|
||||
"display box",
|
||||
testParent,
|
||||
function(____, f)
|
||||
do
|
||||
local i = 0
|
||||
while i < (fps * duration) do
|
||||
@@ -20,3 +350,19 @@ menu.add_feature(
|
||||
end
|
||||
end
|
||||
)
|
||||
__TS__New(
|
||||
FeatureAction,
|
||||
"print parent data",
|
||||
testParent,
|
||||
function(____, f)
|
||||
if f.parent then
|
||||
print(
|
||||
(("parent: " .. f.parent.name) .. "\nid: ") .. tostring(f.parent.id)
|
||||
)
|
||||
end
|
||||
end
|
||||
)
|
||||
return ____exports
|
||||
end,
|
||||
}
|
||||
return require("test")
|
||||
|
||||
187
ts-lua/package-lock.json
generated
187
ts-lua/package-lock.json
generated
@@ -1,27 +1,166 @@
|
||||
{
|
||||
"name": "ts-lua",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"lockfileVersion": 1,
|
||||
"dependencies": {
|
||||
"@rauschma/stringio": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/@rauschma/stringio/-/stringio-1.4.0.tgz",
|
||||
"integrity": "sha512-3uor2f/MXZkmX5RJf8r+OC3WvZVzpSme0yyL0rQDPEnatE02qRcqwEwnsgpgriEck0S/n4vWtUd6tTtrJwk45Q==",
|
||||
"requires": {
|
||||
"@types/node": "^10.0.3"
|
||||
"packages": {
|
||||
"": {
|
||||
"devDependencies": {
|
||||
"lua-types": "^2.10.1",
|
||||
"types-ts-2take1": "git+https://git@git.zomo.dev/zomo/types-ts-2take1",
|
||||
"typescript-to-lua": "^0.40.1"
|
||||
}
|
||||
},
|
||||
"node_modules/enhanced-resolve": {
|
||||
"version": "5.8.2",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz",
|
||||
"integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/node": {
|
||||
"version": "10.17.60",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-10.17.60.tgz",
|
||||
"integrity": "sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw=="
|
||||
"graceful-fs": "^4.2.4",
|
||||
"tapable": "^2.2.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/function-bind": {
|
||||
"version": "1.1.1",
|
||||
"resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz",
|
||||
"integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/graceful-fs": {
|
||||
"version": "4.2.6",
|
||||
"resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz",
|
||||
"integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/has": {
|
||||
"version": "1.0.3",
|
||||
"resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz",
|
||||
"integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"function-bind": "^1.1.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/is-core-module": {
|
||||
"version": "2.4.0",
|
||||
"resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz",
|
||||
"integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"has": "^1.0.3"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/lua-types": {
|
||||
"version": "2.10.1",
|
||||
"resolved": "https://registry.npmjs.org/lua-types/-/lua-types-2.10.1.tgz",
|
||||
"integrity": "sha512-Ai7L25I5kHZYGN5C3LALUse7Eus0k/kM9tEO2zwReG2Xuker0c+0e2M4iyfiEvlGOmBc7cDouqJ5lFwyg8JqiQ==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"typescript-to-lua": "^0.39.0"
|
||||
}
|
||||
},
|
||||
"node_modules/lua-types/node_modules/typescript-to-lua": {
|
||||
"version": "0.39.6",
|
||||
"resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-0.39.6.tgz",
|
||||
"integrity": "sha512-Yq+XsmFKknMlz9jm1FvTw5B7R4H8lYUly4uwxlR44aT4OFyG9S7mOImrTIF07j414PdrJSQ5dAAhQOBVRqHbMw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"resolve": "^1.15.1",
|
||||
"source-map": "^0.7.3",
|
||||
"typescript": "~4.3.2"
|
||||
},
|
||||
"bin": {
|
||||
"tstl": "dist/tstl.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.13.0"
|
||||
}
|
||||
},
|
||||
"node_modules/path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
"integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/resolve": {
|
||||
"version": "1.20.0",
|
||||
"resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz",
|
||||
"integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"is-core-module": "^2.2.0",
|
||||
"path-parse": "^1.0.6"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/ljharb"
|
||||
}
|
||||
},
|
||||
"node_modules/source-map": {
|
||||
"version": "0.7.3",
|
||||
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz",
|
||||
"integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">= 8"
|
||||
}
|
||||
},
|
||||
"node_modules/tapable": {
|
||||
"version": "2.2.0",
|
||||
"resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz",
|
||||
"integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/types-ts-2take1": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "git+https://git@git.zomo.dev/zomo/types-ts-2take1#dc5f38b2321b7c6d8adecf8c037c7a5650d48a1d",
|
||||
"dev": true,
|
||||
"license": "UNLICENSED"
|
||||
},
|
||||
"node_modules/typescript": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz",
|
||||
"integrity": "sha512-uauPG7XZn9F/mo+7MrsRjyvbxFpzemRjKEZXS4AK83oP2KKOJPvb+9cO/gmnv8arWZvhnjVOXz7B49m1l0e9Ew==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"tsc": "bin/tsc",
|
||||
"tsserver": "bin/tsserver"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=4.2.0"
|
||||
}
|
||||
},
|
||||
"node_modules/typescript-to-lua": {
|
||||
"version": "0.40.1",
|
||||
"resolved": "https://registry.npmjs.org/typescript-to-lua/-/typescript-to-lua-0.40.1.tgz",
|
||||
"integrity": "sha512-wbnXddF+kPWKDQMcuVZLRUeZsMde5Qni6FnYIc3SKOAhg2/ZAm9ctWQsyQLwH8piMUX+uZzFXaJ3pMe186crfw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"enhanced-resolve": "^5.8.2",
|
||||
"resolve": "^1.15.1",
|
||||
"source-map": "^0.7.3",
|
||||
"typescript": "~4.3.2"
|
||||
},
|
||||
"bin": {
|
||||
"tstl": "dist/tstl.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12.13.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "14.17.4",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.17.4.tgz",
|
||||
"integrity": "sha512-8kQ3+wKGRNN0ghtEn7EGps/B8CzuBz1nXZEIGGLP2GnwbqYn4dbTs7k+VKLTq1HvZLRCIDtN3Snx1Ege8B7L5A=="
|
||||
},
|
||||
"dependencies": {
|
||||
"enhanced-resolve": {
|
||||
"version": "5.8.2",
|
||||
"resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz",
|
||||
@@ -84,15 +223,6 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node-ts": {
|
||||
"version": "5.1.1",
|
||||
"resolved": "https://registry.npmjs.org/node-ts/-/node-ts-5.1.1.tgz",
|
||||
"integrity": "sha512-summDCKhk7qaMlhe50vSzdhLqTowv4xCD+jEkPToYQD0fU1jshfC61hj5oPE7PZmYG1Af+HsVu8Vhr/jhFVENA==",
|
||||
"requires": {
|
||||
"@rauschma/stringio": "^1.4.0",
|
||||
"@types/node": "^14.14.0"
|
||||
}
|
||||
},
|
||||
"path-parse": {
|
||||
"version": "1.0.7",
|
||||
"resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz",
|
||||
@@ -121,6 +251,11 @@
|
||||
"integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==",
|
||||
"dev": true
|
||||
},
|
||||
"types-ts-2take1": {
|
||||
"version": "git+https://git@git.zomo.dev/zomo/types-ts-2take1#dc5f38b2321b7c6d8adecf8c037c7a5650d48a1d",
|
||||
"dev": true,
|
||||
"from": "types-ts-2take1@git+https://git@git.zomo.dev/zomo/types-ts-2take1"
|
||||
},
|
||||
"typescript": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.4.tgz",
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"build": "tstl && $npm_package_scripts_postbuild",
|
||||
"postbuild": "cp dist/test.lua ../test.lua",
|
||||
"postbuild": "cp ./dist/test.lua ../",
|
||||
"dev": "tstl --watch"
|
||||
},
|
||||
"devDependencies": {
|
||||
"lua-types": "^2.10.1",
|
||||
"types-ts-2take1": "git+https://git@git.zomo.dev/zomo/types-ts-2take1",
|
||||
"typescript-to-lua": "^0.40.1"
|
||||
}
|
||||
}
|
||||
|
||||
163
ts-lua/src/classes/Feature.ts
Normal file
163
ts-lua/src/classes/Feature.ts
Normal file
@@ -0,0 +1,163 @@
|
||||
type AnyFeature = FeatureParent|FeatureAction|FeatureToggle|FeatureNum|FeatureNumToggle;
|
||||
|
||||
export class FeatureParent {
|
||||
|
||||
type(): menu.featureTypes { return "parent"; }
|
||||
|
||||
name: string;
|
||||
id: number;
|
||||
parent?: FeatureParent|null;
|
||||
parentid: number = 0;
|
||||
children: AnyFeature[] = [];
|
||||
|
||||
feat: Feat;
|
||||
|
||||
hidden(): boolean {
|
||||
return this.feat.hidden;
|
||||
}
|
||||
setHidden(val: boolean) {
|
||||
this.feat.hidden = val;
|
||||
}
|
||||
|
||||
select() {}
|
||||
|
||||
constructor(name: string, parent?: FeatureParent|null) {
|
||||
this.name = name;
|
||||
|
||||
if (parent) {
|
||||
this.parent = parent;
|
||||
this.parentid = parent.id;
|
||||
this.parent.addChild(this);
|
||||
}
|
||||
|
||||
this.feat = menu.add_feature(name, this.type(), this.parentid, () => this.select());
|
||||
this.id = this.feat.id;
|
||||
}
|
||||
|
||||
/* children */
|
||||
|
||||
addChild(feat: AnyFeature) {
|
||||
for (let i = 0; i < this.children.length; i++)
|
||||
if (this.children[i].equals(feat))
|
||||
return;
|
||||
this.children.push(feat);
|
||||
}
|
||||
|
||||
removeChild(feat: AnyFeature) {
|
||||
for (let i = 0; i < this.children.length; i++)
|
||||
if (this.children[i].equals(feat))
|
||||
this.children.splice(i, 1);
|
||||
}
|
||||
|
||||
/* util */
|
||||
|
||||
equals(feat: AnyFeature): boolean {
|
||||
return this.id === feat.id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class FeatureAction extends FeatureParent {
|
||||
|
||||
type(): menu.featureTypes { return "action"; }
|
||||
|
||||
handler?: (feat: this) => void;
|
||||
|
||||
select() {
|
||||
if (this.handler)
|
||||
this.handler(this);
|
||||
}
|
||||
|
||||
constructor(name: string, parent?: FeatureParent|null, handler?: (feat: AnyFeature) => void) {
|
||||
super(name, parent);
|
||||
|
||||
if (handler)
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
setHandler(handler: (feat: AnyFeature) => void) {
|
||||
this.handler = handler;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class FeatureToggle extends FeatureAction {
|
||||
|
||||
type(): menu.featureTypes { return "toggle"; }
|
||||
|
||||
value(): boolean {
|
||||
return this.feat.on;
|
||||
}
|
||||
setValue(val: boolean) {
|
||||
this.feat.on = val;
|
||||
}
|
||||
toggle() {
|
||||
this.feat.on = !this.feat.on;
|
||||
}
|
||||
|
||||
constructor(name: string, parent?: FeatureParent|null, defaultvalue = false, handler?: (feat: AnyFeature) => void) {
|
||||
super(name, parent, handler);
|
||||
this.setValue(defaultvalue);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class FeatureNum extends FeatureAction {
|
||||
|
||||
type(): menu.featureTypes { return "action_value_i"; }
|
||||
|
||||
num(): number {
|
||||
return this.feat.value_i;
|
||||
}
|
||||
setNum(val: number) {
|
||||
this.feat.value_i = val;
|
||||
}
|
||||
|
||||
min(): number {
|
||||
return this.feat.min_i;
|
||||
}
|
||||
setMin(val: number) {
|
||||
this.feat.min_i = Math.round(val);
|
||||
}
|
||||
|
||||
max(): number {
|
||||
return this.feat.max_i;
|
||||
}
|
||||
setMax(val: number) {
|
||||
this.feat.max_i = Math.round(val);
|
||||
}
|
||||
|
||||
step(): number {
|
||||
return this.feat.mod_i;
|
||||
}
|
||||
setStep(val: number) {
|
||||
this.feat.mod_i = Math.round(val);
|
||||
}
|
||||
|
||||
constructor(name: string, parent?: FeatureParent|null, defaultnum = 0, handler?: (feat: AnyFeature) => void) {
|
||||
super(name, parent, handler);
|
||||
this.setNum(defaultnum);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class FeatureNumToggle extends FeatureNum {
|
||||
|
||||
type(): menu.featureTypes { return "value_i"; }
|
||||
|
||||
value(): boolean {
|
||||
return this.feat.on;
|
||||
}
|
||||
setValue(val: boolean) {
|
||||
this.feat.on = val;
|
||||
}
|
||||
toggle() {
|
||||
this.feat.on = !this.feat.on;
|
||||
}
|
||||
|
||||
constructor(name: string, parent?: FeatureParent|null, defaultnum = 0, defaultvalue = false, handler?: (feat: AnyFeature) => void) {
|
||||
super(name, parent, defaultnum, handler);
|
||||
this.setValue(defaultvalue);
|
||||
}
|
||||
|
||||
}
|
||||
0
ts-lua/src/index.ts
Normal file
0
ts-lua/src/index.ts
Normal file
@@ -1,7 +1,11 @@
|
||||
const fps = 60,
|
||||
duration = 5 //seconds
|
||||
|
||||
menu.add_feature('test', 'action', 0, () => {
|
||||
import { FeatureAction, FeatureParent } from './classes/Feature'
|
||||
|
||||
let testParent = new FeatureParent('test')
|
||||
|
||||
new FeatureAction('display box', testParent, f => {
|
||||
|
||||
for (let i = 0; i < fps * duration; i++) {
|
||||
|
||||
@@ -11,3 +15,10 @@ menu.add_feature('test', 'action', 0, () => {
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
new FeatureAction('print parent data', testParent, f => {
|
||||
|
||||
if (f.parent)
|
||||
print(`parent: ${f.parent.name}\nid: ${f.parent.id}`)
|
||||
|
||||
})
|
||||
|
||||
@@ -5,13 +5,14 @@
|
||||
"target": "esnext",
|
||||
"lib": ["esnext"],
|
||||
"moduleResolution": "node",
|
||||
"types": ["lua-types/5.4"],
|
||||
"types": ["lua-types/5.4", "types-ts-2take1"],
|
||||
"strict": true,
|
||||
"typeRoots": [
|
||||
"./types"
|
||||
]
|
||||
"typeRoots": []
|
||||
},
|
||||
"tstl": {
|
||||
"luaTarget": "JIT"
|
||||
"luaTarget": "universal",
|
||||
"luaLibImport": "inline",
|
||||
"luaBundle": "test.lua",
|
||||
"luaBundleEntry": "./src/test.ts",
|
||||
},
|
||||
}
|
||||
32
ts-lua/types/2take1.d.ts
vendored
32
ts-lua/types/2take1.d.ts
vendored
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* Menu Functions
|
||||
* @public
|
||||
*/
|
||||
|
||||
type Entity = number;
|
||||
type Ped = Entity;
|
||||
type Player = Ped;
|
||||
type Vehicle = Entity;
|
||||
type Group = number;
|
||||
type Hash = number;
|
||||
type Pickup = Hash;
|
||||
type Ptfx = number;
|
||||
|
||||
type Thread = number;
|
||||
|
||||
type Feature = number;
|
||||
|
||||
// C++ Types
|
||||
type vector<T> = object;
|
||||
type uint8_t = number;
|
||||
type uint32_t = number;
|
||||
type int32_t = number;
|
||||
type uint64_t = number;
|
||||
type integer = number;
|
||||
type int = number;
|
||||
type float = number;
|
||||
type BYTE = number;
|
||||
//type wstring = string;
|
||||
|
||||
// lua C++ adjacent types
|
||||
type table<T> = vector<T>;
|
||||
22
ts-lua/types/D3D.d.ts
vendored
22
ts-lua/types/D3D.d.ts
vendored
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* D3D Functions
|
||||
*
|
||||
* These functions should only be used from renderers: feature, which can be set through the renderer property
|
||||
*
|
||||
* Renderer callbacks are executed from the d3d thread
|
||||
* @example
|
||||
* menu.add_feature("d3d renderer", "toggle", 0, nil).renderer = d3d_draw
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace d3d {
|
||||
|
||||
function draw_text(text: string, pos: v2, size: v2, scale: float, color: int, flags: int): void;
|
||||
function register_sprite(path: string): int;
|
||||
function draw_sprite(id: int, pos: v2, scale: float, rot: float, color: int): void;
|
||||
function get_sprite_origin(id: int): v2;
|
||||
function get_sprite_size(id: int): v2;
|
||||
function draw_line(start: v2, end: v2, size: int, color: int): void;
|
||||
function draw_rect(pos: v2, size: v2, color: int): void;
|
||||
|
||||
}
|
||||
18
ts-lua/types/Events.d.ts
vendored
18
ts-lua/types/Events.d.ts
vendored
@@ -1,18 +0,0 @@
|
||||
/**
|
||||
* Hook Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace hook {
|
||||
|
||||
type eventNames = "exit"|"chat"|"player_join"|"player_leave"|"script";
|
||||
|
||||
function add_event_listener(eventName: "exit", callback: (code: integer) => void|never): int;
|
||||
function add_event_listener(eventName: "chat", callback: (player: integer, body: string) => void|never): int;
|
||||
function add_event_listener(eventName: "player_join", callback: (player: integer) => void|never): int;
|
||||
function add_event_listener(eventName: "player_leave", callback: (player: integer) => void|never): int;
|
||||
function add_event_listener(eventName: "script", callback: (id: integer, params: vector<int>) => void|never): int;
|
||||
|
||||
function remove_event_listener(eventName: eventNames, id: int): boolean;
|
||||
|
||||
}
|
||||
16
ts-lua/types/Hooks.d.ts
vendored
16
ts-lua/types/Hooks.d.ts
vendored
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Hook Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace hook {
|
||||
|
||||
type script_event_hook = (source: Player, target: Player, params: int[], count: int) => false|null;
|
||||
type net_event_hook = (source: Player, target: Player, eventId: int) => false|null;
|
||||
|
||||
function register_script_event_hook(callback: script_event_hook): int
|
||||
function remove_script_event_hook(id: int): boolean
|
||||
function register_net_event_hook(callback: net_event_hook): int
|
||||
function remove_net_event_hook(id: int): boolean
|
||||
|
||||
}
|
||||
26
ts-lua/types/Input.d.ts
vendored
26
ts-lua/types/Input.d.ts
vendored
@@ -1,26 +0,0 @@
|
||||
/**
|
||||
* Input Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace input {
|
||||
|
||||
enum resonse {
|
||||
SUCCESS = 0,
|
||||
PENDING,
|
||||
FAILED
|
||||
}
|
||||
|
||||
enum types {
|
||||
ASCII = 0,
|
||||
ALPHA,
|
||||
ALPHA_NUM,
|
||||
NUM,
|
||||
NUM_DOT,
|
||||
FLOAT
|
||||
|
||||
}
|
||||
|
||||
function get(title: string, default_value: string, len: int, type: int): [int, string];
|
||||
|
||||
}
|
||||
26
ts-lua/types/Menu.d.ts
vendored
26
ts-lua/types/Menu.d.ts
vendored
@@ -1,26 +0,0 @@
|
||||
|
||||
|
||||
/**
|
||||
* Menu Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace menu {
|
||||
|
||||
type featureTypes = "parent"|"toggle"|"action"|"value_i"|"action_value_i"|"autoaction_value_i";
|
||||
|
||||
function add_feature(name: string, type: featureTypes, parent: Feature, script_handler: (feat: Feat) => void|never): Feat;
|
||||
function delete_feature(id: int): boolean;
|
||||
function set_menu_can_navigate(): void;
|
||||
function get_version(): void;
|
||||
function add_player_feature(name: string, type: string, parent: integer, script_handler: (feat: Feat) => void|never): PlayerFeat
|
||||
function get_player_feature(i: uint32_t): PlayerFeat
|
||||
function is_threading_mode(mode: int): boolean
|
||||
/**
|
||||
* @privateRemarks callback declaration may be wrong
|
||||
*/
|
||||
function create_thread(callback: (() => void|never), context: any): Thread
|
||||
function has_thread_finished(id: Thread): boolean
|
||||
function delete_thread(id: Thread): boolean
|
||||
|
||||
}
|
||||
500
ts-lua/types/RAGE/AI.d.ts
vendored
500
ts-lua/types/RAGE/AI.d.ts
vendored
@@ -1,500 +0,0 @@
|
||||
/**
|
||||
* AI Functions
|
||||
* @remarks https://pastebin.com/2gFqJ3Px
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace ai {
|
||||
|
||||
/**
|
||||
* @remarks https://pastebin.com/2gFqJ3Px
|
||||
*/
|
||||
enum CTask {
|
||||
HandsUp = 0,
|
||||
ClimbLadder = 1,
|
||||
ExitVehicle = 2,
|
||||
CombatRoll = 3,
|
||||
AimGunOnFoot = 4,
|
||||
MovePlayer = 5,
|
||||
PlayerOnFoot = 6,
|
||||
Weapon = 8,
|
||||
PlayerWeapon = 9,
|
||||
PlayerIdles = 10,
|
||||
AimGun = 12,
|
||||
Complex = 12,
|
||||
FSMClone = 12,
|
||||
MotionBase = 12,
|
||||
Move = 12,
|
||||
MoveBase = 12,
|
||||
NMBehaviour = 12,
|
||||
NavBase = 12,
|
||||
Scenario = 12,
|
||||
SearchBase = 12,
|
||||
SearchInVehicleBase = 12,
|
||||
ShockingEvent = 12,
|
||||
TrainBase = 12,
|
||||
VehicleFSM = 12,
|
||||
VehicleGoTo = 12,
|
||||
VehicleMissionBase = 12,
|
||||
VehicleTempAction = 12,
|
||||
Pause = 14,
|
||||
DoNothing = 15,
|
||||
GetUp = 16,
|
||||
GetUpAndStandStill = 17,
|
||||
FallOver = 18,
|
||||
FallAndGetUp = 19,
|
||||
Crawl = 20,
|
||||
ComplexOnFire = 25,
|
||||
DamageElectric = 26,
|
||||
TriggerLookAt = 28,
|
||||
ClearLookAt = 29,
|
||||
SetCharDecisionMaker = 30,
|
||||
SetPedDefensiveArea = 31,
|
||||
UseSequence = 32,
|
||||
MoveStandStill = 34,
|
||||
ComplexControlMovement = 35,
|
||||
MoveSequence = 36,
|
||||
AmbientClips = 38,
|
||||
MoveInAir = 39,
|
||||
NetworkClone = 40,
|
||||
UseClimbOnRoute = 41,
|
||||
UseDropDownOnRoute = 42,
|
||||
UseLadderOnRoute = 43,
|
||||
SetBlockingOfNonTemporaryEvents = 44,
|
||||
ForceMotionState = 45,
|
||||
SlopeScramble = 46,
|
||||
GoToAndClimbLadder = 47,
|
||||
ClimbLadderFully = 48,
|
||||
Rappel = 49,
|
||||
Vault = 50,
|
||||
DropDown = 51,
|
||||
AffectSecondaryBehaviour = 52,
|
||||
AmbientLookAtEvent = 53,
|
||||
OpenDoor = 54,
|
||||
ShovePed = 55,
|
||||
SwapWeapon = 56,
|
||||
GeneralSweep = 57,
|
||||
Police = 58,
|
||||
PoliceOrderResponse = 59,
|
||||
PursueCriminal = 60,
|
||||
ArrestPed = 62,
|
||||
ArrestPed2 = 63,
|
||||
Busted = 64,
|
||||
FirePatrol = 65,
|
||||
HeliOrderResponse = 66,
|
||||
HeliPassengerRappel = 67,
|
||||
AmbulancePatrol = 68,
|
||||
PoliceWantedResponse = 69,
|
||||
Swat = 70,
|
||||
SwatWantedResponse = 72,
|
||||
SwatOrderResponse = 73,
|
||||
SwatGoToStagingArea = 74,
|
||||
SwatFollowInLine = 75,
|
||||
Witness = 76,
|
||||
GangPatrol = 77,
|
||||
Army = 78,
|
||||
ShockingEventWatch = 80,
|
||||
ShockingEventGoto = 82,
|
||||
ShockingEventHurryAway = 83,
|
||||
ShockingEventReactToAircraft = 84,
|
||||
ShockingEventReact = 85,
|
||||
ShockingEventBackAway = 86,
|
||||
ShockingPoliceInvestigate = 87,
|
||||
ShockingEventStopAndStare = 88,
|
||||
ShockingNiceCarPicture = 89,
|
||||
ShockingEventThreatResponse = 90,
|
||||
TakeOffHelmet = 92,
|
||||
CarReactToVehicleCollision = 93,
|
||||
CarReactToVehicleCollisionGetOut = 95,
|
||||
DyingDead = 97,
|
||||
WanderingScenario = 100,
|
||||
WanderingInRadiusScenario = 101,
|
||||
MoveBetweenPointsScenario = 103,
|
||||
ChatScenario = 104,
|
||||
CowerScenario = 106,
|
||||
DeadBodyScenario = 107,
|
||||
SayAudio = 114,
|
||||
WaitForSteppingOut = 116,
|
||||
CoupleScenario = 117,
|
||||
UseScenario = 118,
|
||||
UseVehicleScenario = 119,
|
||||
Unalerted = 120,
|
||||
StealVehicle = 121,
|
||||
ReactToPursuit = 122,
|
||||
HitWall = 125,
|
||||
Cower = 126,
|
||||
Crouch = 127,
|
||||
Melee = 128,
|
||||
MoveMeleeMovement = 129,
|
||||
MeleeActionResult = 130,
|
||||
MeleeUpperbodyAnims = 131,
|
||||
MoVEScripted = 133,
|
||||
ScriptedAnimation = 134,
|
||||
SynchronizedScene = 135,
|
||||
ComplexEvasiveStep = 137,
|
||||
WalkRoundCarWhileWandering = 138,
|
||||
ComplexStuckInAir = 140,
|
||||
WalkRoundEntity = 141,
|
||||
MoveWalkRoundVehicle = 142,
|
||||
ReactToGunAimedAt = 144,
|
||||
DuckAndCover = 146,
|
||||
AggressiveRubberneck = 147,
|
||||
InVehicleBasic = 150,
|
||||
CarDriveWander = 151,
|
||||
LeaveAnyCar = 152,
|
||||
ComplexGetOffBoat = 153,
|
||||
CarSetTempAction = 155,
|
||||
BringVehicleToHalt = 156,
|
||||
CarDrive = 157,
|
||||
PlayerDrive = 159,
|
||||
EnterVehicle = 160,
|
||||
EnterVehicleAlign = 161,
|
||||
OpenVehicleDoorFromOutside = 162,
|
||||
EnterVehicleSeat = 163,
|
||||
CloseVehicleDoorFromInside = 164,
|
||||
InVehicleSeatShuffle = 165,
|
||||
ExitVehicleSeat = 167,
|
||||
CloseVehicleDoorFromOutside = 168,
|
||||
ControlVehicle = 169,
|
||||
MotionInAutomobile = 170,
|
||||
MotionOnBicycle = 171,
|
||||
MotionOnBicycleController = 172,
|
||||
MotionInVehicle = 173,
|
||||
MotionInTurret = 174,
|
||||
ReactToBeingJacked = 175,
|
||||
ReactToBeingAskedToLeaveVehicle = 176,
|
||||
TryToGrabVehicleDoor = 177,
|
||||
GetOnTrain = 178,
|
||||
GetOffTrain = 179,
|
||||
RideTrain = 180,
|
||||
MountThrowProjectile = 190,
|
||||
GoToCarDoorAndStandStill = 195,
|
||||
MoveGoToVehicleDoor = 196,
|
||||
SetPedInVehicle = 197,
|
||||
SetPedOutOfVehicle = 198,
|
||||
VehicleMountedWeapon = 199,
|
||||
VehicleGun = 200,
|
||||
VehicleProjectile = 201,
|
||||
SmashCarWindow = 204,
|
||||
MoveGoToPoint = 205,
|
||||
MoveAchieveHeading = 206,
|
||||
MoveFaceTarget = 207,
|
||||
ComplexGoToPointAndStandStillTimed = 208,
|
||||
MoveGoToPointAndStandStill = 208,
|
||||
MoveFollowPointRoute = 209,
|
||||
MoveSeekEntity_CEntitySeekPosCalculatorStandard = 210,
|
||||
MoveSeekEntity_CEntitySeekPosCalculatorLastNavMeshIntersection = 211,
|
||||
//MoveSeekEntity_CEntitySeekPosCalculatorLastNavMeshIntersection = 212,
|
||||
MoveSeekEntity_CEntitySeekPosCalculatorXYOffsetFixed = 213,
|
||||
//MoveSeekEntity_CEntitySeekPosCalculatorXYOffsetFixed = 214,
|
||||
ExhaustedFlee = 215,
|
||||
GrowlAndFlee = 216,
|
||||
ScenarioFlee = 217,
|
||||
SmartFlee = 218,
|
||||
FlyAway = 219,
|
||||
WalkAway = 220,
|
||||
Wander = 221,
|
||||
WanderInArea = 222,
|
||||
FollowLeaderInFormation = 223,
|
||||
GoToPointAnyMeans = 224,
|
||||
TurnToFaceEntityOrCoord = 225,
|
||||
FollowLeaderAnyMeans = 226,
|
||||
FlyToPoint = 228,
|
||||
FlyingWander = 229,
|
||||
GoToPointAiming = 230,
|
||||
GoToScenario = 231,
|
||||
SeekEntityAiming = 233,
|
||||
SlideToCoord = 234,
|
||||
SwimmingWander = 235,
|
||||
MoveTrackingEntity = 237,
|
||||
MoveFollowNavMesh = 238,
|
||||
MoveGoToPointOnRoute = 239,
|
||||
EscapeBlast = 240,
|
||||
MoveWander = 241,
|
||||
MoveBeInFormation = 242,
|
||||
MoveCrowdAroundLocation = 243,
|
||||
MoveCrossRoadAtTrafficLights = 244,
|
||||
MoveWaitForTraffic = 245,
|
||||
MoveGoToPointStandStillAchieveHeading = 246,
|
||||
MoveGetOntoMainNavMesh = 251,
|
||||
MoveSlideToCoord = 252,
|
||||
MoveGoToPointRelativeToEntityAndStandStill = 253,
|
||||
HelicopterStrafe = 254,
|
||||
GetOutOfWater = 256,
|
||||
MoveFollowEntityOffset = 259,
|
||||
FollowWaypointRecording = 261,
|
||||
MotionPed = 264,
|
||||
MotionPedLowLod = 265,
|
||||
HumanLocomotion = 268,
|
||||
MotionBasicLocomotionLowLod = 269,
|
||||
MotionStrafing = 270,
|
||||
MotionTennis = 271,
|
||||
MotionAiming = 272,
|
||||
BirdLocomotion = 273,
|
||||
FlightlessBirdLocomotion = 274,
|
||||
FishLocomotion = 278,
|
||||
QuadLocomotion = 279,
|
||||
MotionDiving = 280,
|
||||
MotionSwimming = 281,
|
||||
MotionParachuting = 282,
|
||||
MotionDrunk = 283,
|
||||
RepositionMove = 284,
|
||||
MotionAimingTransition = 285,
|
||||
ThrowProjectile = 286,
|
||||
Cover = 287,
|
||||
MotionInCover = 288,
|
||||
AimAndThrowProjectile = 289,
|
||||
Gun = 290,
|
||||
AimFromGround = 291,
|
||||
AimGunVehicleDriveBy = 295,
|
||||
AimGunScripted = 296,
|
||||
ReloadGun = 298,
|
||||
WeaponBlocked = 299,
|
||||
EnterCover = 300,
|
||||
ExitCover = 301,
|
||||
AimGunFromCoverIntro = 302,
|
||||
AimGunFromCoverOutro = 303,
|
||||
AimGunBlindFire = 304,
|
||||
CombatClosestTargetInArea = 307,
|
||||
CombatAdditionalTask = 308,
|
||||
InCover = 309,
|
||||
AimSweep = 313,
|
||||
SharkCircle = 318,
|
||||
SharkAttack = 319,
|
||||
Agitated = 320,
|
||||
AgitatedAction = 321,
|
||||
Confront = 322,
|
||||
Intimidate = 323,
|
||||
Shove = 324,
|
||||
Shoved = 325,
|
||||
CrouchToggle = 327,
|
||||
Revive = 328,
|
||||
Parachute = 334,
|
||||
ParachuteObject = 335,
|
||||
TakeOffPedVariation = 336,
|
||||
CombatSeekCover = 339,
|
||||
CombatFlank = 341,
|
||||
Combat = 342,
|
||||
CombatMounted = 343,
|
||||
MoveCircle = 344,
|
||||
MoveCombatMounted = 345,
|
||||
Search = 346,
|
||||
SearchOnFoot = 347,
|
||||
SearchInAutomobile = 348,
|
||||
SearchInBoat = 349,
|
||||
SearchInHeli = 350,
|
||||
ThreatResponse = 351,
|
||||
Investigate = 352,
|
||||
StandGuardFSM = 353,
|
||||
Patrol = 354,
|
||||
ShootAtTarget = 355,
|
||||
SetAndGuardArea = 356,
|
||||
StandGuard = 357,
|
||||
Separate = 358,
|
||||
StayInCover = 359,
|
||||
VehicleCombat = 360,
|
||||
VehiclePersuit = 361,
|
||||
VehicleChase = 362,
|
||||
DraggingToSafety = 363,
|
||||
DraggedToSafety = 364,
|
||||
VariedAimPose = 365,
|
||||
MoveWithinAttackWindow = 366,
|
||||
MoveWithinDefensiveArea = 367,
|
||||
ShootOutTire = 368,
|
||||
ShellShocked = 369,
|
||||
BoatChase = 370,
|
||||
BoatCombat = 371,
|
||||
BoatStrafe = 372,
|
||||
HeliChase = 373,
|
||||
HeliCombat = 374,
|
||||
SubmarineCombat = 375,
|
||||
SubmarineChase = 376,
|
||||
PlaneChase = 377,
|
||||
TargetUnreachable = 378,
|
||||
TargetUnreachableInInterior = 379,
|
||||
TargetUnreachableInExterior = 380,
|
||||
StealthKill = 381,
|
||||
Writhe = 382,
|
||||
Advance = 383,
|
||||
Charge = 384,
|
||||
MoveToTacticalPoint = 385,
|
||||
ToHurtTransit = 386,
|
||||
AnimatedHitByExplosion = 387,
|
||||
NMRelax = 388,
|
||||
NMPose = 390,
|
||||
NMBrace = 391,
|
||||
NMBuoyancy = 392,
|
||||
NMInjuredOnGround = 393,
|
||||
NMShot = 394,
|
||||
NMHighFall = 395,
|
||||
NMBalance = 396,
|
||||
NMElectrocute = 397,
|
||||
NMPrototype = 398,
|
||||
NMExplosion = 399,
|
||||
NMOnFire = 400,
|
||||
NMScriptControl = 401,
|
||||
NMJumpRollFromRoadVehicle = 402,
|
||||
NMFlinch = 403,
|
||||
NMSit = 404,
|
||||
NMFallDown = 405,
|
||||
BlendFromNM = 406,
|
||||
NMControl = 407,
|
||||
NMDangle = 408,
|
||||
NMGenericAttach = 411,
|
||||
NMDrunk = 412,
|
||||
NMDraggingToSafety = 413,
|
||||
NMThroughWindscreen = 414,
|
||||
NMRiverRapids = 415,
|
||||
NMSimple = 416,
|
||||
RageRagdoll = 417,
|
||||
JumpVault = 420,
|
||||
Jump = 421,
|
||||
Fall = 422,
|
||||
ReactAimWeapon = 424,
|
||||
Chat = 425,
|
||||
MobilePhone = 426,
|
||||
ReactToDeadPed = 427,
|
||||
SearchForUnknownThreat = 429,
|
||||
Bomb = 431,
|
||||
Detonator = 432,
|
||||
AnimatedAttach = 434,
|
||||
CutScene = 440,
|
||||
ReactToExplosion = 441,
|
||||
ReactToImminentExplosion = 442,
|
||||
DiveToGround = 443,
|
||||
ReactAndFlee = 444,
|
||||
Sidestep = 445,
|
||||
CallPolice = 446,
|
||||
ReactInDirection = 447,
|
||||
ReactToBuddyShot = 448,
|
||||
VehicleGoToAutomobileNew = 453,
|
||||
VehicleGoToPlane = 454,
|
||||
VehicleGoToHelicopter = 455,
|
||||
VehicleGoToSubmarine = 456,
|
||||
VehicleGoToBoat = 457,
|
||||
VehicleGoToPointAutomobile = 458,
|
||||
VehicleGoToPointWithAvoidanceAutomobile = 459,
|
||||
VehiclePursue = 460,
|
||||
VehicleRam = 461,
|
||||
VehicleSpinOut = 462,
|
||||
VehicleApproach = 463,
|
||||
VehicleThreePointTurn = 464,
|
||||
VehicleDeadDriver = 465,
|
||||
VehicleCruiseNew = 466,
|
||||
VehicleCruiseBoat = 467,
|
||||
VehicleStop = 468,
|
||||
VehiclePullOver = 469,
|
||||
VehiclePassengerExit = 470,
|
||||
VehicleFlee = 471,
|
||||
VehicleFleeAirborne = 472,
|
||||
VehicleFleeBoat = 473,
|
||||
VehicleFollowRecording = 474,
|
||||
VehicleFollow = 475,
|
||||
VehicleBlock = 476,
|
||||
VehicleBlockCruiseInFront = 477,
|
||||
VehicleBlockBrakeInFront = 478,
|
||||
VehicleBlockBackAndForth = 479,
|
||||
VehicleCrash = 480,
|
||||
VehicleLand = 481,
|
||||
VehicleLandPlane = 482,
|
||||
VehicleHover = 483,
|
||||
VehicleAttack = 484,
|
||||
VehicleAttackTank = 485,
|
||||
VehicleCircle = 486,
|
||||
VehiclePoliceBehaviour = 487,
|
||||
VehiclePoliceBehaviourHelicopter = 488,
|
||||
VehiclePoliceBehaviourBoat = 489,
|
||||
VehicleEscort = 490,
|
||||
VehicleHeliProtect = 491,
|
||||
VehiclePlayerDriveAutomobile = 493,
|
||||
VehiclePlayerDriveBike = 494,
|
||||
VehiclePlayerDriveBoat = 495,
|
||||
VehiclePlayerDriveSubmarine = 496,
|
||||
VehiclePlayerDriveSubmarineCar = 497,
|
||||
VehiclePlayerDrivePlane = 498,
|
||||
VehiclePlayerDriveHeli = 499,
|
||||
VehiclePlayerDriveAutogyro = 500,
|
||||
VehiclePlayerDriveDiggerArm = 501,
|
||||
VehiclePlayerDriveTrain = 502,
|
||||
VehiclePlaneChase = 503,
|
||||
VehicleNoDriver = 504,
|
||||
VehicleAnimation = 505,
|
||||
VehicleConvertibleRoof = 506,
|
||||
VehicleParkNew = 507,
|
||||
VehicleFollowWaypointRecording = 508,
|
||||
VehicleGoToNavmesh = 509,
|
||||
VehicleReactToCopSiren = 510,
|
||||
VehicleGotoLongRange = 511,
|
||||
VehicleWait = 512,
|
||||
VehicleReverse = 513,
|
||||
VehicleBrake = 514,
|
||||
VehicleHandBrake = 515,
|
||||
VehicleTurn = 516,
|
||||
VehicleGoForward = 517,
|
||||
VehicleSwerve = 518,
|
||||
VehicleFlyDirection = 519,
|
||||
VehicleHeadonCollision = 520,
|
||||
VehicleBoostUseSteeringAngle = 521,
|
||||
VehicleShotTire = 522,
|
||||
VehicleBurnout = 523,
|
||||
VehicleRevEngine = 524,
|
||||
VehicleSurfaceInSubmarine = 525,
|
||||
VehiclePullAlongside = 526,
|
||||
VehicleTransformToSubmarine = 527,
|
||||
AnimatedFallback = 528
|
||||
}
|
||||
|
||||
function task_goto_entity(e: Entity, target: Entity, duration: int, distance: float, speed: float): void;
|
||||
function task_combat_ped(ped: Ped, target: Ped, a3: int, a4: int): boolean;
|
||||
function task_go_to_coord_by_any_means(ped: Ped, coords: v3, speed: float, p4: any, p5: boolean, walkStyle: int, a7: float): any;
|
||||
function task_wander_standard(ped: Ped, unk0: float, unk1: boolean): boolean;
|
||||
function task_vehicle_drive_wander(ped: Ped, vehicle: Vehicle, speed: float, driveStyle: int): void;
|
||||
function task_start_scenario_in_place(ped: Ped, name: string, unkDelay: int, playEnterAnim: boolean): void;
|
||||
function task_start_scenario_at_position(ped: Ped, name: string, coord: v3, heading: float, duration: int, sittingScenario: boolean, teleport: boolean): void;
|
||||
function task_stand_guard(ped: Ped, coord: v3, heading: float, name: string): void;
|
||||
function play_anim_on_running_scenario(ped: Ped, dict: string, name: string): void;
|
||||
function does_scenario_group_exist(name: string): boolean;
|
||||
function is_scenario_group_enabled(name: string): boolean;
|
||||
function set_scenario_group_enabled(name: string, b: boolean): boolean;
|
||||
function reset_scenario_groups_enabled(): void;
|
||||
function set_exclusive_scenario_group(name: string): boolean;
|
||||
function reset_exclusive_scenario_group(): boolean;
|
||||
function is_scenario_type_enabled(name: string): boolean;
|
||||
function set_scenario_type_enabled(name: string, b: boolean): boolean;
|
||||
function reset_scenario_types_enabled(): void;
|
||||
function is_ped_active_in_scenario(ped: Ped): boolean;
|
||||
function task_follow_to_offset_of_entity(ped: Ped, entity: Entity, offset: v3, speed: float, timeout: int, stopRange: float, persistFollowing: boolean): void;
|
||||
function task_vehicle_drive_to_coord_longrange(ped: Ped, vehicle: Vehicle, pos: v3, speed: float, mode: int, stopRange: float): void;
|
||||
function task_shoot_at_entity(entity: Entity, target: Entity, duration: int, firingPattern: Hash): void;
|
||||
function task_vehicle_escort(ped: Ped, vehicle: Vehicle, targetVehicle: Vehicle, mode: int, speed: float, drivingStyle: int, minDistance: float, a8: int, noRoadsDistance: float): void;
|
||||
function task_vehicle_follow(driver: Ped, vehicle: Vehicle, targetEntity: Entity, speed: float, drivingStyle: int, minDistance: int): void;
|
||||
function task_vehicle_drive_to_coord(ped: Ped, vehicle: Vehicle, coord: v3, speed: float, a5: int, vehicleModel: Hash, driveMode: int, stopRange: float, a9: float): void;
|
||||
function task_vehicle_shoot_at_coord(ped: Ped, coord: v3, a3: float): void;
|
||||
function task_vehicle_shoot_at_ped(ped: Ped, target: Ped, a3: float): void;
|
||||
function task_vehicle_aim_at_coord(ped: Ped, coord: v3): void;
|
||||
function task_vehicle_aim_at_ped(ped: Ped, target: Ped): void;
|
||||
function task_stay_in_cover(ped: Ped): void;
|
||||
function task_go_to_coord_while_aiming_at_coord(ped: Ped, gotoCoord: v3, aimCoord: v3, moveSpeed: float, a5: boolean, a6: float, a7: float, a8: boolean, flags: any, a10: boolean, firingPattern: Hash): void;
|
||||
function task_go_to_coord_while_aiming_at_entity(ped: Ped, gotoCoord: v3, target: Entity, moveSpeed: float, a5: boolean, a6: float, a7: float, a8: boolean, flags: any, a10: boolean, firingPattern: Hash): void;
|
||||
function task_go_to_entity_while_aming_at_coord(ped: Ped, gotoEntity: Entity, aimCoord: v3, a4: float, shoot: boolean, a6: float, a7: float, a8: boolean, a9: boolean, firingPattern: Hash): void;
|
||||
function task_go_to_entity_while_aiming_at_entity(ped: Ped, gotoEntity: Entity, target: Entity, a4: float, shoot: boolean, a6: float, a7: float, a8: boolean, a9: boolean, firingPattern: Hash): void;
|
||||
function task_open_vehicle_door(ped: Ped, vehicle: Vehicle, timeOut: int, doorIndex: int, speed: float): void;
|
||||
function task_enter_vehicle(ped: Ped, vehicle: Vehicle, timeout: int, seat: int, speed: float, flag: uint32_t, p6: any): void;
|
||||
function task_leave_vehicle(ped: Ped, vehicle: Vehicle, flag: uint32_t): void;
|
||||
function task_sky_dive(ped: Ped, a2: boolean): void;
|
||||
function task_parachute(ped: Ped, a2: boolean, a3: boolean): void;
|
||||
function task_parachute_to_target(ped: Ped, coord: v3): void;
|
||||
function set_parachute_task_target(ped: Ped, coord: v3): void;
|
||||
function set_parachute_task_thrust(ped: Ped, thrust: float): void;
|
||||
function task_rappel_from_heli(ped: Ped, a2: float): void;
|
||||
function task_vehicle_chase(driver: Ped, target: Entity): void;
|
||||
function set_task_vehicle_chase_behaviour_flag(ped: Ped, flag: int, set: boolean): void;
|
||||
function set_task_vehicle_chase_ideal_persuit_distance(ped: Ped, dist: float): void;
|
||||
function task_shoot_gun_at_coord(ped: Ped, coord: v3, duration: int, firingPattern: Hash): void;
|
||||
function task_aim_gun_at_coord(ped: Ped, coord: v3, time: int, a4: boolean, a5: boolean): void;
|
||||
function task_turn_ped_to_face_entity(ped: Ped, entity: Entity, duration: int): void;
|
||||
function task_aim_gun_at_entity(ped: Ped, entity: Entity, duration: int, a4: boolean): void;
|
||||
function is_task_active(ped: Ped, taskId: any): boolean;
|
||||
|
||||
}
|
||||
|
||||
15
ts-lua/types/RAGE/Audio.d.ts
vendored
15
ts-lua/types/RAGE/Audio.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Audio Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace audio {
|
||||
|
||||
function play_sound(soundId: int, audioName: string, audioRef: string, p4: boolean, p5: any, p6: boolean): void;
|
||||
function play_sound_frontend(soundId: int, audioName: string, audioRef: string, p4: boolean): void;
|
||||
function play_sound_from_entity(soundId: int, audioName: string, entity: Entity, audioRef: string): void;
|
||||
function play_sound_from_coord(soundId: int, audioName: string, pos: v3, audioRef: string, a5: boolean, range: int, a7: boolean): void;
|
||||
function stop_sound(soundId: int): void;
|
||||
|
||||
}
|
||||
|
||||
14
ts-lua/types/RAGE/Cam.d.ts
vendored
14
ts-lua/types/RAGE/Cam.d.ts
vendored
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Cam Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace cam {
|
||||
|
||||
function get_gameplay_cam_rot(): v3;
|
||||
function get_gameplay_cam_pos(): v3;
|
||||
function get_gameplay_cam_relative_pitch(): float;
|
||||
function get_gameplay_cam_relative_yaw(): float;
|
||||
|
||||
}
|
||||
|
||||
15
ts-lua/types/RAGE/Control.d.ts
vendored
15
ts-lua/types/RAGE/Control.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Control Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace control {
|
||||
|
||||
function disable_control_action(inputGroup: int, control: int, disable: boolean): boolean;
|
||||
function is_control_just_pressed(inputGroup: int, control: int): boolean;
|
||||
function is_disabled_control_just_pressed(inputGroup: int, control: int): boolean;
|
||||
function is_control_pressed(inputGroup: int, control: int): boolean;
|
||||
function is_disabled_control_pressed(inputGroup: int, control: int): boolean;
|
||||
|
||||
}
|
||||
|
||||
14
ts-lua/types/RAGE/Cutscene.d.ts
vendored
14
ts-lua/types/RAGE/Cutscene.d.ts
vendored
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Cutscene Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace cutscene {
|
||||
|
||||
function stop_cutscene_immediately(): void;
|
||||
function remove_cutscene(): void;
|
||||
function is_cutscene_active(): boolean;
|
||||
function is_cutscene_playing(): boolean;
|
||||
|
||||
}
|
||||
|
||||
15
ts-lua/types/RAGE/Decorator.d.ts
vendored
15
ts-lua/types/RAGE/Decorator.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Decorator Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace decorator {
|
||||
|
||||
function decor_register(name: string, type: int): void;
|
||||
function decor_exists_on(e: Entity, decor: string): boolean;
|
||||
function decor_remove(e: Entity, decor: string): boolean;
|
||||
function decor_get_int(entity: Entity, name: string): int;
|
||||
function decor_set_int(entity: Entity, name: string, value: int) : boolean;
|
||||
|
||||
}
|
||||
|
||||
73
ts-lua/types/RAGE/Entity.d.ts
vendored
73
ts-lua/types/RAGE/Entity.d.ts
vendored
@@ -1,73 +0,0 @@
|
||||
/**
|
||||
* Entity Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace entity {
|
||||
|
||||
function get_entity_coords(entity: Entity): v3;
|
||||
function set_entity_coords_no_offset(entity: Entity, pos: v3): boolean;
|
||||
function get_entity_rotation(entity: Entity): v3;
|
||||
function set_entity_rotation(entity: Entity, rot: v3): boolean;
|
||||
function set_entity_heading(entity: Entity, heading: float): boolean;
|
||||
function set_entity_velocity(entity: Entity, velocity: v3): boolean;
|
||||
function get_entity_velocity(entity: Entity): v3;
|
||||
function is_an_entity(entity: Entity): boolean;
|
||||
function is_entity_a_ped(entity: Entity): boolean;
|
||||
function is_entity_a_vehicle(entity: Entity): boolean;
|
||||
function is_entity_an_object(entity: Entity): boolean;
|
||||
function is_entity_dead(entity: Entity): boolean;
|
||||
function is_entity_on_fire(entity: Entity): boolean;
|
||||
function is_entity_visible(entity: Entity): boolean;
|
||||
function is_entity_attached(entity: Entity): boolean;
|
||||
function set_entity_visible(entity: Entity, toggle: boolean): boolean;
|
||||
function get_entity_type(entity: Entity): int;
|
||||
function set_entity_gravity(entity: Entity, gravity: boolean): boolean;
|
||||
function apply_force_to_entity(ped: Ped, forceType: int, x: float, y: float, z: float, rx: float, ry: float, rz: float, isRel: boolean, highForce: boolean): void;
|
||||
function get_entity_attached_to(entity: Entity): Entity;
|
||||
function detach_entity(e: Entity): boolean;
|
||||
function get_entity_model_hash(e: Entity): Hash;
|
||||
function get_entity_heading(entity: Entity): float;
|
||||
function attach_entity_to_entity(subject: Entity, target: Entity, boneIndex: int, offset: v3, rot: v3, softPinning: boolean, collision: boolean, isPed: boolean, vertexIndex: int, fixedRot: boolean): boolean;
|
||||
function set_entity_as_mission_entity(entity: Entity, toggle: boolean, unk: boolean): void;
|
||||
function set_entity_collision(entity: Entity, toggle: boolean, physics: boolean, unk0: boolean): boolean;
|
||||
function is_entity_in_air(entity: Entity): boolean;
|
||||
function set_entity_as_no_longer_needed(entity: Entity): boolean;
|
||||
function set_entity_no_collsion_entity(entity: Entity, target: Entity, unk: boolean): boolean;
|
||||
function freeze_entity(entity: Entity, toggle: boolean): void;
|
||||
function get_entity_offset_from_coords(lEntity: Entity, coords: v3): [boolean, v3];
|
||||
function get_entity_offset_from_entity(lEntity: Entity, lEntity2: Entity): [boolean, v3];
|
||||
function set_entity_alpha(entity: Entity, alpha: int, skinput: boolean): void;
|
||||
function reset_entity_alpha(entity: Entity): void;
|
||||
function delete_entity(e: Entity): boolean;
|
||||
function set_entity_god_mode(entity: Entity, toggle: boolean): void;
|
||||
function get_entity_god_mode(entity: Entity): boolean;
|
||||
function is_entity_in_water(entity: Entity): boolean;
|
||||
function get_entity_speed(entity: Entity): float;
|
||||
function set_entity_lights(entity: Entity, toggle: boolean): void;
|
||||
function set_entity_max_speed(entity: Entity, speed: float): void;
|
||||
function get_entity_pitch(entity: Entity): float;
|
||||
function get_entity_roll(e: Entity): float;
|
||||
function get_entity_physics_rotation(e: Entity): v3;
|
||||
function get_entity_physics_heading(e: Entity): float;
|
||||
function get_entity_physics_pitch(e: Entity): float;
|
||||
function get_entity_physics_roll(e: Entity): float;
|
||||
function does_entity_have_physics(entity: Entity): boolean;
|
||||
function get_entity_rotation_velocity(entity: Entity): v3;
|
||||
function get_entity_submerged_level(entity: Entity): float;
|
||||
function get_entity_population_type(entity: Entity): int32_t;
|
||||
function is_entity_static(entity: Entity): boolean;
|
||||
function is_entity_in_zone(entity: Entity, zone: string): boolean;
|
||||
function is_entity_upright(entity: Entity, angle: float): boolean;
|
||||
function is_entity_upside_down(entity: Entity): boolean;
|
||||
function has_entity_been_damaged_by_any_object(entity: Entity): boolean;
|
||||
function has_entity_been_damaged_by_any_vehicle(entity: Entity): boolean;
|
||||
function has_entity_been_damaged_by_any_ped(entity: Entity): boolean;
|
||||
function has_entity_been_damaged_by_entity(e1: Entity, e2: Entity): boolean;
|
||||
function does_entity_have_drawable(entity: Entity): boolean;
|
||||
function has_entity_collided_with_anything(entity: Entity): boolean;
|
||||
function get_entity_entity_has_collided_with(entity: Entity): Entity;
|
||||
function get_entity_bone_index_by_name(entity: Entity, name: string): int;
|
||||
|
||||
}
|
||||
|
||||
13
ts-lua/types/RAGE/Fire.d.ts
vendored
13
ts-lua/types/RAGE/Fire.d.ts
vendored
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Fire Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace fire {
|
||||
|
||||
function add_explosion(pos: v3, type: int, isAudible: boolean, isInvis: boolean, fCamShake: float, owner: Ped): boolean;
|
||||
function start_entity_fire(ped: Ped): Ped;
|
||||
function stop_entity_fire(ped: Ped): void;
|
||||
|
||||
}
|
||||
|
||||
35
ts-lua/types/RAGE/Gameplay.d.ts
vendored
35
ts-lua/types/RAGE/Gameplay.d.ts
vendored
@@ -1,35 +0,0 @@
|
||||
/**
|
||||
* Gameplay Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace gameplay {
|
||||
|
||||
function get_hash_key(input: string): Hash;
|
||||
function display_onscreen_keyboard(title: string, default_text: string, maxLength: int): void;
|
||||
function update_onscreen_keyboard(): boolean;
|
||||
function get_onscreen_keyboard_result(): string;
|
||||
function is_onscreen_keyboard_active(): boolean;
|
||||
function set_override_weather(weatherIndex: int): void;
|
||||
function clear_override_weather(): void;
|
||||
function set_blackout(toggle: boolean): void;
|
||||
function set_mobile_radio(toggle: boolean): void;
|
||||
function get_game_state(): int;
|
||||
function is_game_state(num: int): boolean;
|
||||
function clear_area_of_objects(coord: v3, radius: float, flags: int): void;
|
||||
function clear_area_of_vehicles(coord: v3, radius: float, a3: boolean, a4: boolean, a5: boolean, a6: boolean, a7: boolean): void;
|
||||
function clear_area_of_peds(coord: v3, radius: float, a3: boolean): void;
|
||||
function clear_area_of_cops(coord: v3, radius: float, a3: boolean): void;
|
||||
function set_cloud_hat_opacity(opacity: float): void;
|
||||
function get_cloud_hat_opacity(): float;
|
||||
function preload_cloud_hat(szName: string): void;
|
||||
function clear_cloud_hat(): void;
|
||||
function load_cloud_hat(szName: string, transitionTime: float): void;
|
||||
function unload_cloud_hat(szName: string, a2: float): void;
|
||||
function get_ground_z(pos: v3): [boolean,float];
|
||||
function get_frame_count(): uint64_t;
|
||||
function get_frame_time(): float;
|
||||
function shoot_single_bullet_between_coords(start: v3, end: v3, damage: int32_t, weapon: Hash, owner: Ped, audible: boolean, invisible: boolean, speed: float): boolean;
|
||||
|
||||
}
|
||||
|
||||
55
ts-lua/types/RAGE/Graphics.d.ts
vendored
55
ts-lua/types/RAGE/Graphics.d.ts
vendored
@@ -1,55 +0,0 @@
|
||||
/**
|
||||
* Graphics Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace graphics {
|
||||
|
||||
function get_screen_height(): int;
|
||||
function get_screen_width(): int;
|
||||
function request_named_ptfx_asset(asset: string): void;
|
||||
function has_named_ptfx_asset_loaded(asset: string): boolean;
|
||||
function set_next_ptfx_asset(asset: string): void;
|
||||
function set_next_ptfx_asset_by_hash(hash: Hash): void;
|
||||
function start_ptfx_looped_on_entity(name: string, e: Entity, offset: v3, rot: v3, scale: float): Ptfx;
|
||||
function start_ptfx_non_looped_on_entity(name: string, e: Entity, offset: v3, rot: v3, scale: float): boolean;
|
||||
function remove_ptfx_from_entity(entity: Entity): void;
|
||||
function does_looped_ptfx_exist(ptfx: Ptfx): boolean;
|
||||
function start_particle_fx_looped_at_coord(name: string, pos: v3, rot: v3, scale: float, xAxis: boolean, yAxis: boolean, zAxis: boolean, a8: boolean): Ptfx;
|
||||
function start_particle_fx_non_looped_at_coord(name: string, pos: v3, rot: v3, scale: float, xAxis: boolean, yAxis: boolean, zAxis: boolean): boolean;
|
||||
function start_networked_particle_fx_non_looped_at_coord(name: string, pos: v3, rot: v3, scale: float, xAxis: boolean, yAxis: boolean, zAxis: boolean): boolean;
|
||||
function remove_particle_fx(ptfx: Ptfx, a2: boolean): void;
|
||||
function remove_particle_fx_in_range(pos: v3, range: float): void;
|
||||
function set_particle_fx_looped_offsets(ptfx: Ptfx, pos: v3, rot: v3): void;
|
||||
function set_particle_fx_looped_evolution(ptfx: Ptfx, propertyName: string, amount: float, a4: boolean): void;
|
||||
function set_particle_fx_looped_color(ptfx: Ptfx, r: float, b: float, g: float, a5: boolean): void;
|
||||
function set_particle_fx_looped_alpha(ptfx: Ptfx, a: float): void;
|
||||
function set_particle_fx_looped_scale(ptfx: Ptfx, scale: float): void;
|
||||
function set_particle_fx_looped_far_clip_dist(ptfx: Ptfx, dist: float): void;
|
||||
function enable_clown_blood_vfx(toggle: boolean): void;
|
||||
function enable_alien_blood_vfx(toggle: boolean): void;
|
||||
function animpostfx_play(effect: Hash, duration: int32_t, looped: boolean): void;
|
||||
function animpostfx_stop(effect: Hash): void;
|
||||
function animpostfx_is_running(effect: Hash): boolean;
|
||||
function animpostfx_stop_all(): void;
|
||||
function request_scaleform_movie(szName: string): any;
|
||||
function begin_scaleform_movie_method(scaleform: any, szMethod: string): boolean;
|
||||
function scaleform_movie_method_add_param_texture_name_string(val: string): void;
|
||||
function scaleform_movie_method_add_param_int(val: int32_t): void;
|
||||
function scaleform_movie_method_add_param_float(val: float): void;
|
||||
function scaleform_movie_method_add_param_boolean(val: boolean): void;
|
||||
function draw_scaleform_movie_fullscreen(scaleform: any, r: int, g: int, b: int, a: int, a6: int): void;
|
||||
function draw_scaleform_movie(scaleform: any, x: float, y: float, w: float, h: float, r: int, g: int, b: int, a: int, a10: int): void;
|
||||
function end_scaleform_movie_method(): void;
|
||||
function draw_marker(type: any, pos: v3, dir: v3, rot: v3, scale: v3, red: int, green: int, blue: int, alpha: int, bobUpAndDown: boolean, faceCam: boolean, a12: int, rotate: boolean, textureDict: string|null, textureName: string|null, drawOntEnts: boolean): void;
|
||||
function create_checkpoint(type: any, thisPos: v3, nextPos: v3, radius: float, red: int, green: int, blue: int, alpha: int, reserved: int): any;
|
||||
function set_checkpoint_icon_height(checkpoint: any, height: float): void;
|
||||
function set_checkpoint_cylinder_height(checkpoint: any, nearHeight: float, farHeight: float, radius: float): void;
|
||||
function set_checkpoint_rgba(checkpoint: any, r: int, g: int, b: int, a: int): void;
|
||||
function set_checkpoint_icon_rgba(checkpoint: any, r: int, g: int, b: int, a: int): void;
|
||||
function delete_checkpoint(checkpoint: any): void;
|
||||
function has_scaleform_movie_loaded(scaleform: any): boolean;
|
||||
function set_scaleform_movie_as_no_longer_needed(scaleform: any): void;
|
||||
|
||||
}
|
||||
|
||||
15
ts-lua/types/RAGE/Interior.d.ts
vendored
15
ts-lua/types/RAGE/Interior.d.ts
vendored
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* Interior Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace interior {
|
||||
|
||||
function get_interior_from_entity(entity: Entity): any;
|
||||
function get_interior_at_coords_with_type(coords: v3, interiorType: string): any;
|
||||
function enable_interior_prop(id: any, prop: string): void;
|
||||
function disable_interior_prop(id: any, prop: string): void;
|
||||
function refresh_interior(id: any): void;
|
||||
|
||||
}
|
||||
|
||||
27
ts-lua/types/RAGE/Network.d.ts
vendored
27
ts-lua/types/RAGE/Network.d.ts
vendored
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
* Network Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace network {
|
||||
|
||||
function network_is_host(): boolean;
|
||||
function has_control_of_entity(entity: Entity): boolean;
|
||||
function request_control_of_entity(entity: Entity): boolean;
|
||||
function is_session_started(): boolean;
|
||||
function network_session_kick_player(player: Player): void;
|
||||
function is_friend_online(name: string): boolean;
|
||||
function is_friend_in_multiplayer(name: string): boolean;
|
||||
function get_friend_scid(name: string): uint32_t;
|
||||
function get_friend_count(): uint32_t;
|
||||
function get_max_friends(): uint32_t;
|
||||
function network_hash_from_player(player: Player): Hash;
|
||||
function get_friend_index_name(index: uint32_t): string|null;
|
||||
function is_friend_index_online(index: uint32_t): boolean;
|
||||
function is_scid_friend(scid: uint32_t): boolean;
|
||||
function get_entity_player_is_spectating(player: Player): Entity|null;
|
||||
function get_player_player_is_spectating(player: Player): Player|null;
|
||||
function send_chat_message(msg: string, teamOnly: boolean): boolean;
|
||||
|
||||
}
|
||||
|
||||
13
ts-lua/types/RAGE/Object.d.ts
vendored
13
ts-lua/types/RAGE/Object.d.ts
vendored
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Object Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace object {
|
||||
|
||||
function create_object(model: Hash, pos: v3, networked: boolean, dynamic: boolean): Object ;
|
||||
function get_all_objects(): vector<Object>;
|
||||
function get_all_pickups(): vector<Pickup>;
|
||||
|
||||
}
|
||||
|
||||
83
ts-lua/types/RAGE/Ped.d.ts
vendored
83
ts-lua/types/RAGE/Ped.d.ts
vendored
@@ -1,83 +0,0 @@
|
||||
/**
|
||||
* Ped Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace ped {
|
||||
|
||||
function is_ped_in_any_vehicle(ped: Ped): boolean;
|
||||
function set_group_formation(group: Ped, formation: int): boolean;
|
||||
function set_ped_as_group_member(ped: Ped, groupId: int): boolean;
|
||||
function get_ped_group(ped: Ped): Group;
|
||||
function get_group_size(group: int): int;
|
||||
function get_ped_health(ped: Ped): float;
|
||||
function set_ped_health(ped: Ped, value: float): boolean;
|
||||
function is_ped_ragdoll(ped: Ped): boolean;
|
||||
function is_ped_a_player(ped: Ped): boolean;
|
||||
function get_current_ped_weapon(ped: Ped): Hash;
|
||||
function set_ped_into_vehicle(ped: Ped, vehicle: Vehicle, seat: int): boolean;
|
||||
function get_ped_drawable_variation(ped: Ped, group: int): int;
|
||||
function get_ped_texture_variation(ped: Ped, group: int): int;
|
||||
function get_ped_prop_index(ped: Ped, group: int): int;
|
||||
function get_ped_prop_texture_index(ped: Ped, group: int): int;
|
||||
function set_ped_component_variation(ped: Ped, component: int, drawable: int, texture: int, pallette: int): boolean;
|
||||
function set_ped_prop_index(ped: Ped, component: int, drawable: int, texture: int, unk: int): boolean;
|
||||
function set_ped_can_switch_weapons(ped: Ped, toggle: boolean): void;
|
||||
function is_ped_shooting(ped: Ped): boolean;
|
||||
function get_ped_bone_index(ped: Ped, bone: int): int;
|
||||
function get_ped_bone_coords(ped: Ped, boneId: Hash, offset: v3): [boolean, v3];
|
||||
function get_ped_relationship_group_hash(ped: Ped): Hash;
|
||||
function set_ped_relationship_group_hash(ped: Ped, hash: Hash): void;
|
||||
function get_vehicle_ped_is_using(ped: Ped): Vehicle;
|
||||
function clear_all_ped_props(ped: Ped): void;
|
||||
function clear_ped_tasks_immediately(ped: Ped): int;
|
||||
function clear_ped_blood_damage(ped: Ped): void;
|
||||
function is_ped_in_vehicle(ped: Ped, vehicle: Vehicle): boolean;
|
||||
function is_ped_using_any_scenario(ped: Ped): boolean;
|
||||
function set_ped_to_ragdoll(ped: Ped, time1: int, time2: int, type: int): boolean;
|
||||
function set_ped_can_ragdoll(ped: Ped, toggle: boolean): boolean;
|
||||
function can_ped_ragdoll(ped: Ped): boolean;
|
||||
function get_ped_last_weapon_impact(ped: Ped): [boolean, v3];
|
||||
function set_ped_combat_ability(ped: Ped, ability: BYTE): boolean;
|
||||
function get_ped_max_health(entity: Entity): float;
|
||||
function set_ped_max_health(entity: Entity, health: float): boolean;
|
||||
function resurrect_ped(ped: Ped): boolean;
|
||||
function set_ped_combat_movement(ped: Ped, type: int): void;
|
||||
function set_ped_combat_range(ped: Ped, type: int): void;
|
||||
function set_ped_combat_attributes(ped: Ped, attr: int, toggle: boolean): void;
|
||||
function set_ped_accuracy(ped: Ped, accuracy: int): void;
|
||||
function create_ped(type: int, model: Hash, pos: v3, heading: float, isNetworked: boolean, unk1: boolean): Ped;
|
||||
function get_number_of_ped_drawable_variations(ped: Ped, comp: int): int;
|
||||
function get_number_of_ped_texture_variations(ped: Ped, comp: int, draw: int): int;
|
||||
function get_number_of_ped_prop_drawable_variations(ped: Ped, groupId: int): int;
|
||||
function get_number_of_ped_prop_texture_variations(ped: Ped, groupId: int, drawId: int): int;
|
||||
function set_ped_random_component_variation(ped: Ped): void;
|
||||
function set_ped_default_component_variation(ped: Ped): void;
|
||||
function set_ped_movement_clipset(ped: Ped, szClipset: string): void;
|
||||
function reset_ped_movement_clipset(ped: Ped, unk0: boolean): void;
|
||||
function clone_ped(ped: Ped): Ped;
|
||||
function set_ped_config_flag(ped: Ped, flag: int, value: uint8_t): boolean;
|
||||
function set_ped_ragdoll_blocking_flags(ped: Ped, flags: int): boolean;
|
||||
function reset_ped_ragdoll_blocking_flags(ped: Ped, flags: int): boolean;
|
||||
function set_ped_density_multiplier_this_frame(mult: float): void;
|
||||
function set_scenario_ped_density_multiplier_this_frame(m1: float, m2: float): void;
|
||||
function get_all_peds(): vector<Ped>;
|
||||
function create_group(): Group;
|
||||
function remove_group(group: Group): void;
|
||||
function set_ped_as_group_leader(ped: Ped, group: Group): void;
|
||||
function remove_ped_from_group(ped: Ped): void;
|
||||
function is_ped_group_member(ped: Ped, group: Group): boolean;
|
||||
function set_group_formation_spacing(group: Group, a2: float, a3: float, a4: float): boolean;
|
||||
function reset_group_formation_default_spacing(group: Group): boolean;
|
||||
function set_ped_never_leaves_group(ped: Ped, toggle: boolean): void;
|
||||
function does_group_exist(group: Group): boolean;
|
||||
function is_ped_in_group(ped: Ped): boolean;
|
||||
function set_create_random_cops(t: boolean): void;
|
||||
function can_create_random_cops(): boolean;
|
||||
function is_ped_swimming(ped: Ped): boolean;
|
||||
function is_ped_swimming_underwater(ped: Ped): boolean;
|
||||
function clear_relationship_between_groups(group1: Hash, group2: Hash): void;
|
||||
function set_relationship_between_groups(relation: int, group1: Hash, group2: Hash): void;
|
||||
|
||||
}
|
||||
|
||||
74
ts-lua/types/RAGE/Player.d.ts
vendored
74
ts-lua/types/RAGE/Player.d.ts
vendored
@@ -1,74 +0,0 @@
|
||||
/**
|
||||
* Player Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace player {
|
||||
|
||||
enum eModderDetectionFlags {
|
||||
MDF_MANUAL = 1 << 0x00,
|
||||
MDF_PLAYER_MODEL = 1 << 0x01,
|
||||
MDF_SCID_0 = 1 << 0x02,
|
||||
MDF_SCID_SPOOF = 1 << 0x03,
|
||||
MDF_INVALID_OBJECT_CRASH = 1 << 0x04,
|
||||
MDF_INVALID_PED_CRASH = 1 << 0x05,
|
||||
MDF_CLONE_SPAWN = 1 << 0x06,
|
||||
MDF_MODEL_CHANGE_CRASH = 1 << 0x07,
|
||||
MDF_PLAYER_MODEL_CHANGE = 1 << 0x08,
|
||||
MDF_RAC = 1 << 0x09,
|
||||
MDF_MONEY_DROP = 1 << 0x0A,
|
||||
MDF_SEP = 1 << 0x0B,
|
||||
MDF_ATTACH_OBJECT = 1 << 0x0C,
|
||||
MDF_ATTACH_PED = 1 << 0x0D,
|
||||
|
||||
MDF_ENDS = 1 << 0x0E
|
||||
}
|
||||
|
||||
function get_player_ped(player: Player): Ped;
|
||||
function player_id(): Player;
|
||||
function set_player_model(hash: Hash): void;
|
||||
function get_player_group(player: Player): Group;
|
||||
function is_player_female(player: Player): boolean;
|
||||
function is_player_friend(player: Player): boolean;
|
||||
function is_player_playing(player: Player): boolean;
|
||||
function is_player_free_aiming(player: Player): boolean;
|
||||
function get_entity_player_is_aiming_at(player: Player): Entity;
|
||||
function get_personal_vehicle(): Vehicle;
|
||||
function set_player_visible_locally(player: Player, toggle: boolean): void;
|
||||
function set_local_player_visible_locally(toggle: boolean): void;
|
||||
function set_player_as_modder(player: Player, flags: int): void;
|
||||
function get_player_name(player: Player): string;
|
||||
function get_player_scid(player: Player): int;
|
||||
function is_player_pressing_horn(player: Player): boolean;
|
||||
function get_player_ip(player: Player): int;
|
||||
function is_player_modder(player: Player, mask: int): boolean;
|
||||
function is_player_god(player: Player): boolean;
|
||||
function get_player_wanted_level(player: Player): int;
|
||||
function player_count(): int;
|
||||
function is_player_in_any_vehicle(player: Player): boolean;
|
||||
function get_player_coords(player: Player): v3;
|
||||
function get_player_heading(player: Player): float;
|
||||
function get_player_health(player: Player): float;
|
||||
function get_player_max_health(player: Player): float;
|
||||
function get_player_armour(player: Player): float;
|
||||
function get_player_from_ped(ped: Ped): int;
|
||||
function get_player_team(player: Player): int;
|
||||
function get_player_vehicle(player: Player): Vehicle;
|
||||
function is_player_vehicle_god(player: Player): boolean;
|
||||
function is_player_host(player: Player): boolean;
|
||||
function get_host(): Player;
|
||||
function is_player_spectating(player: Player): boolean;
|
||||
function get_player_model(player: Player): Hash;
|
||||
function send_player_sms(player: Player, msg: string): boolean;
|
||||
function unset_player_as_modder(player: Player, flags: int): boolean;
|
||||
function get_player_modder_flags(player: Player): int;
|
||||
function get_modder_flag_text(flag: int): string;
|
||||
function get_modder_flag_ends(): int;
|
||||
function add_modder_flag(text: string): int;
|
||||
function is_player_valid(player: Player): boolean;
|
||||
function get_player_host_token(player: Player): int;
|
||||
function get_player_host_priority(player: Player): int;
|
||||
function set_player_targeting_mode(mode: int): void;
|
||||
|
||||
}
|
||||
|
||||
16
ts-lua/types/RAGE/Script.d.ts
vendored
16
ts-lua/types/RAGE/Script.d.ts
vendored
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Script Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace script {
|
||||
|
||||
function trigger_script_event(eventId: int, player: Player, params: vector<int>): void;
|
||||
function get_host_of_this_script(): Player;
|
||||
function get_global_f(i: int): float;
|
||||
function get_global_i(i: int): int;
|
||||
function get_local_f(script: Hash, i: int): float;
|
||||
function get_local_i(script: Hash, i: int): int;
|
||||
|
||||
}
|
||||
|
||||
33
ts-lua/types/RAGE/ScriptDraw.d.ts
vendored
33
ts-lua/types/RAGE/ScriptDraw.d.ts
vendored
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* ScriptDraw Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace scriptdraw {
|
||||
|
||||
enum eDrawTextFlags {
|
||||
TEXTFLAG_NONE = 0,
|
||||
TEXTFLAG_CENTER = 1 << 0,
|
||||
TEXTFLAG_SHADOW = 1 << 1,
|
||||
TEXTFLAG_VCENTER = 1 << 2,
|
||||
TEXTFLAG_BOTTOM = 1 << 3,
|
||||
TEXTFLAG_JUSTIFY_RIGHT = 1 << 4,
|
||||
}
|
||||
|
||||
function draw_text(text: string, pos: v2, size: v2, scale: float, color: uint32_t, flags: uint32_t): void;
|
||||
//function wdraw_text(text: wstring, pos: v2, size: v2, scale: float, color: uint32_t, flags: uint32_t): void;
|
||||
function register_sprite(path: string): uint32_t;
|
||||
function draw_sprite(id: uint32_t, pos: v2, scale: float, rot: float, color: uint32_t): void;
|
||||
function draw_line(start: v2, end: v2, size: uint32_t, color: uint32_t): void;
|
||||
function draw_rect(pos: v2, size: v2, color: uint32_t): void;
|
||||
function pos_pixel_to_rel_x(input: float): float;
|
||||
function pos_pixel_to_rel_y(input: float): float;
|
||||
function pos_rel_to_pixel_x(input: float): float;
|
||||
function pos_rel_to_pixel_y(input: float): float;
|
||||
function size_pixel_to_rel_x(input: float): float;
|
||||
function size_pixel_to_rel_y(input: float): float;
|
||||
function size_rel_to_pixel_x(input: float): float;
|
||||
function size_rel_to_pixel_y(input: float): float;
|
||||
|
||||
}
|
||||
|
||||
16
ts-lua/types/RAGE/Stats.d.ts
vendored
16
ts-lua/types/RAGE/Stats.d.ts
vendored
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* Stats Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace stats {
|
||||
|
||||
function stat_get_int(hash: Hash, unk0: int): int32_t|null;
|
||||
function stat_get_float(hash: Hash, unk0: int): float|null;
|
||||
function stat_get_boolean(hash: Hash, unk0: int): boolean|null;
|
||||
function stat_set_int(hash: Hash, value: int32_t, save: boolean): boolean;
|
||||
function stat_set_float(hash: Hash, value: float, save: boolean): boolean;
|
||||
function stat_set_boolean(hash: Hash, value: boolean, save: boolean): boolean;
|
||||
|
||||
}
|
||||
|
||||
32
ts-lua/types/RAGE/Streaming.d.ts
vendored
32
ts-lua/types/RAGE/Streaming.d.ts
vendored
@@ -1,32 +0,0 @@
|
||||
/**
|
||||
* Streaming Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace streaming {
|
||||
|
||||
function request_model(hash: Hash): boolean;
|
||||
function has_model_loaded(hash: Hash): boolean;
|
||||
function set_model_as_no_longer_needed(hash: Hash): boolean;
|
||||
function is_model_in_cdimage(hash: Hash): boolean;
|
||||
function is_model_valid(hash: Hash): boolean;
|
||||
function is_model_a_plane(hash: Hash): boolean;
|
||||
function is_model_a_vehicle(hash: Hash): boolean;
|
||||
function is_model_a_heli(hash: Hash): boolean;
|
||||
function request_ipl(szName: string): void;
|
||||
function remove_ipl(szName: string): void;
|
||||
function request_anim_set(szName: string): void;
|
||||
function has_anim_set_loaded(szName: string): boolean;
|
||||
function request_anim_dict(szName: string): void;
|
||||
function has_anim_dict_loaded(szName: string): boolean;
|
||||
function is_model_a_bike(ulHash: Hash): boolean;
|
||||
function is_model_a_car(ulHash: Hash): boolean;
|
||||
function is_model_a_bicycle(ulHash: Hash): boolean;
|
||||
function is_model_a_quad(ulHash: Hash): boolean;
|
||||
function is_model_a_boat(ulHash: Hash): boolean;
|
||||
function is_model_a_train(ulHash: Hash): boolean;
|
||||
function is_model_an_object(ulHash: Hash): boolean;
|
||||
function is_model_a_ped(ulHash: Hash): boolean;
|
||||
|
||||
}
|
||||
|
||||
12
ts-lua/types/RAGE/System.d.ts
vendored
12
ts-lua/types/RAGE/System.d.ts
vendored
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* System Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace system {
|
||||
|
||||
function wait(ms: int): void
|
||||
function yield(ms: int): void
|
||||
|
||||
}
|
||||
|
||||
14
ts-lua/types/RAGE/Time.d.ts
vendored
14
ts-lua/types/RAGE/Time.d.ts
vendored
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Time Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace time {
|
||||
|
||||
function set_clock_time(hour: int, minute: int, second: int): void;
|
||||
function get_clock_hours(): int;
|
||||
function get_clock_minutes(): int;
|
||||
function get_clock_seconds(): int;
|
||||
|
||||
}
|
||||
|
||||
49
ts-lua/types/RAGE/UI.d.ts
vendored
49
ts-lua/types/RAGE/UI.d.ts
vendored
@@ -1,49 +0,0 @@
|
||||
/**
|
||||
* UI Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace ui {
|
||||
|
||||
type Blip = any;
|
||||
type Pickup = any;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
*/
|
||||
function notify_above_map(message: string, title: string, color: int): void
|
||||
function get_entity_from_blip(blip: Blip): Entity
|
||||
function get_blip_from_entity(entity: Entity): Blip
|
||||
function add_blip_for_entity(entity: Entity): Blip
|
||||
function set_blip_sprite(blip: Blip, spriteId: int): boolean
|
||||
function set_blip_colour(blip: Blip, colour: int): boolean
|
||||
function hide_hud_component_this_frame(componentId: int): void
|
||||
function hide_hud_and_radar_this_frame(): void
|
||||
function get_label_text(label: string): string
|
||||
function draw_rect(x: float, y: float, width: float, height: float, r: int, g: int, b: int, a: int): void
|
||||
function draw_line(pos1: v3, pos2: v3, r: int, g: int, b: int, a: int): void
|
||||
function draw_text(pszText: string, pos: v2): void
|
||||
function set_text_scale(scale: float): void
|
||||
function set_text_color(r: int, g: int, b: int, a: int): void
|
||||
function set_text_font(font: int): void
|
||||
function set_text_wrap(start: float, end: float): void
|
||||
function set_text_outline(b: boolean): void
|
||||
function set_text_centre(b: boolean): void
|
||||
function set_new_waypoint(coord: v2): void
|
||||
function get_waypoint_coord(): v2
|
||||
function is_hud_component_active(componentId: int32_t): boolean
|
||||
function show_hud_component_this_frame(componentId: int32_t): void
|
||||
function set_waypoint_off(): void
|
||||
function set_blip_as_mission_creator_blip(blip: Blip, toggle: boolean): boolean
|
||||
function is_mission_creator_blip(blip: Blip): boolean
|
||||
function add_blip_for_radius(pos: v3, radius: float): Blip
|
||||
function add_blip_for_pickup(pickup: Pickup): Blip
|
||||
function add_blip_for_coord(pos: v3): Blip
|
||||
function set_blip_coord(blip: Blip, coord: v3): void
|
||||
function get_blip_coord(blip: Blip): v3
|
||||
function remove_blip(blip: Blip): boolean
|
||||
function set_blip_route(blip: Blip, toggle: boolean): void
|
||||
function set_blip_route_color(blip: Blip, color: int32_t): void
|
||||
|
||||
}
|
||||
|
||||
25
ts-lua/types/RAGE/Utils.d.ts
vendored
25
ts-lua/types/RAGE/Utils.d.ts
vendored
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Utils Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace utils {
|
||||
|
||||
function str_to_vk(keyName: string): int
|
||||
//function string_to_wstring(str: string): wstring
|
||||
//function wstring_to_string(str: wstring): string
|
||||
function get_all_files_in_directory(path: string, extension: string): vector<string>
|
||||
function get_all_sub_directories_in_directory(path: string): vector<string>
|
||||
function file_exists(path: string): boolean
|
||||
function dir_exists(path: string): boolean
|
||||
function make_dir(path: string): boolean
|
||||
function get_appdata_path(dir: string, file: string): string
|
||||
function from_clipboard(): string
|
||||
function to_clipboard(str: string): void
|
||||
function time(): int
|
||||
function time_ms(): int
|
||||
function str_to_vecu64(str: string): vector<uint64_t>
|
||||
function vecu64_to_str(vec: vector<uint64_t>): string
|
||||
|
||||
}
|
||||
|
||||
132
ts-lua/types/RAGE/Vehicle.d.ts
vendored
132
ts-lua/types/RAGE/Vehicle.d.ts
vendored
@@ -1,132 +0,0 @@
|
||||
/**
|
||||
* Vehicle Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace vehicle {
|
||||
|
||||
function set_vehicle_tire_smoke_color(vehicle: Vehicle, r: int, g: int, b: int): void;
|
||||
function get_ped_in_vehicle_seat(vehicle: Vehicle, seat: int): Ped;
|
||||
function get_free_seat(vehicle: Vehicle): int;
|
||||
function is_vehicle_full(vehicle: Vehicle): boolean;
|
||||
function set_vehicle_stolen(vehicle: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_color(v: Vehicle, p: BYTE, s: BYTE, pearl: BYTE, wheel: BYTE): boolean;
|
||||
function get_mod_text_label(veh: Vehicle, modType: int, modValue: int): string;
|
||||
function get_mod_slot_name(veh: Vehicle, modType: int): string;
|
||||
function get_num_vehicle_mods(veh: Vehicle, modType: int): int;
|
||||
function set_vehicle_mod(vehicle: Vehicle, modType: int, modIndex: int, customTires: boolean): boolean;
|
||||
function get_vehicle_mod(vehicle: Vehicle, modType: int): int;
|
||||
function set_vehicle_mod_kit_type(vehicle: Vehicle, type: int): boolean;
|
||||
function set_vehicle_extra(veh: Vehicle, extra: int, toggle: boolean): void;
|
||||
function does_extra_exist(veh: Vehicle, extra: int): boolean;
|
||||
function is_vehicle_extra_turned_on(veh: Vehicle, extra: int): boolean;
|
||||
function toggle_vehicle_mod(veh: Vehicle, mod: int, toggle: boolean): void;
|
||||
function set_vehicle_bulletproof_tires(veh: Vehicle, toggle: boolean): void;
|
||||
function is_vehicle_a_convertible(veh: Vehicle): boolean;
|
||||
function get_convertible_roof_state(veh: Vehicle): boolean;
|
||||
function set_convertible_roof(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_indicator_lights(veh: Vehicle, index: int, toggle: boolean): void;
|
||||
function set_vehicle_brake_lights(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_can_be_visibly_damaged(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_engine_on(veh: Vehicle, toggle: boolean, instant: boolean, noAutoTurnOn: boolean): void;
|
||||
function set_vehicle_fixed(veh: Vehicle): void;
|
||||
function set_vehicle_deformation_fixed(veh: Vehicle): void;
|
||||
function set_vehicle_undriveable(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_on_ground_properly(veh: Vehicle): boolean;
|
||||
function set_vehicle_forward_speed(veh: Vehicle, speed: float): void;
|
||||
function set_vehicle_number_plate_text(veh: Vehicle, text: string): void;
|
||||
function set_vehicle_door_open(veh: Vehicle, doorIndex: int, loose: boolean, openInstantly: boolean): void;
|
||||
function set_vehicle_doors_shut(veh: Vehicle, closeInstantly: boolean): void;
|
||||
function is_toggle_mod_on(veh: Vehicle, index: int): boolean;
|
||||
function set_vehicle_wheel_type(veh: Vehicle, type: int): void;
|
||||
function set_vehicle_number_plate_index(veh: Vehicle, index: int): void;
|
||||
function set_vehicle_tires_can_burst(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_tire_burst(veh: Vehicle, index: int, onRim: boolean, unk0: float): void;
|
||||
function get_num_vehicle_mod(veh: Vehicle, modType: int): int;
|
||||
function is_vehicle_engine_running(veh: Vehicle): boolean;
|
||||
function set_vehicle_engine_health(veh: Vehicle, health: float): void;
|
||||
function is_vehicle_damaged(veh: Vehicle): boolean;
|
||||
function is_vehicle_on_all_wheels(veh: Vehicle): boolean;
|
||||
function create_vehicle(model: Hash, pos: v3, heading: float, networked: boolean, unk2: boolean): Vehicle;
|
||||
function set_vehicle_doors_locked(vehicle: Vehicle, lockStatus: int): boolean;
|
||||
function set_vehicle_neon_lights_color(vehicle: Vehicle, color: int): boolean;
|
||||
function get_vehicle_neon_lights_color(vehicle: Vehicle): int;
|
||||
function set_vehicle_neon_light_enabled(vehicle: Vehicle, index: int, toggle: boolean): boolean;
|
||||
function is_vehicle_neon_light_enabled(vehicle: Vehicle, index: int, toggle: boolean): boolean;
|
||||
function set_vehicle_density_multipliers_this_frame(mult: float): void;
|
||||
function set_random_vehicle_density_multiplier_this_frame(mult: float): void;
|
||||
function set_parked_vehicle_density_multiplier_this_frame(mult: float): void;
|
||||
function set_ambient_vehicle_range_multiplier_this_frame(mult: float): void;
|
||||
function is_vehicle_rocket_boost_active(veh: Vehicle): boolean;
|
||||
function set_vehicle_rocket_boost_active(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_rocket_boost_percentage(veh: Vehicle, percentage: float): void;
|
||||
function set_vehicle_rocket_boost_refill_time(veh: Vehicle, refillTime: float): void;
|
||||
function control_landing_gear(veh: Vehicle, state: int32_t): void;
|
||||
function get_landing_gear_state(veh: Vehicle): int32_t;
|
||||
function get_vehicle_livery(veh: Vehicle): int32_t;
|
||||
function set_vehicle_livery(veh: Vehicle, index: int32_t): boolean;
|
||||
function is_vehicle_stopped(veh: Vehicle): boolean;
|
||||
function get_vehicle_number_of_passengers(veh: Vehicle): int32_t;
|
||||
function get_vehicle_max_number_of_passengers(veh: Vehicle): int32_t;
|
||||
function get_vehicle_model_number_of_seats(modelHash: Hash): int32_t;
|
||||
function get_vehicle_livery_count(veh: Vehicle): int32_t;
|
||||
function get_vehicle_roof_livery_count(veh: Vehicle): int32_t;
|
||||
function is_vehicle_model(veh: Vehicle, model: Hash): boolean;
|
||||
function is_vehicle_stuck_on_roof(veh: Vehicle): boolean;
|
||||
function set_vehicle_doors_locked_for_player(veh: Vehicle, player: Player, toggle: boolean): void;
|
||||
function get_vehicle_doors_locked_for_player(veh: Vehicle, player: Player): boolean;
|
||||
function set_vehicle_doors_locked_for_all_players(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_doors_locked_for_non_script_players(veh: Vehicle, toggle: boolean): void;
|
||||
function set_vehicle_doors_locked_for_team(veh: Vehicle, team: int32_t, toggle: boolean): void;
|
||||
function explode_vehicle(veh: Vehicle, isAudible: boolean, isInvisible: boolean): void;
|
||||
function set_vehicle_out_of_control(veh: Vehicle, killDriver: boolean, explodeOnImpact: boolean): void;
|
||||
function set_vehicle_timed_explosion(veh: Vehicle, ped: Ped, toggle: boolean): void;
|
||||
function add_vehicle_phone_explosive_device(veh: Vehicle): void;
|
||||
function has_vehicle_phone_explosive_device(): boolean;
|
||||
function detonate_vehicle_phone_explosive_device(): void;
|
||||
function set_taxi_lights(veh: Vehicle, state: boolean): void;
|
||||
function is_taxi_light_on(veh: Vehicle): boolean;
|
||||
function set_vehicle_colors(veh: Vehicle, primary: int32_t, secondary: int32_t): boolean;
|
||||
function set_vehicle_extra_colors(veh: Vehicle, pearl: int32_t, wheel: int32_t): boolean;
|
||||
function get_vehicle_primary_color(veh: Vehicle): int32_t;
|
||||
function get_vehicle_secondary_color(veh: Vehicle): int32_t;
|
||||
function get_vehicle_pearlecent_color(veh: Vehicle): int32_t;
|
||||
function get_vehicle_wheel_color(veh: Vehicle): int32_t;
|
||||
function set_vehicle_fullbeam(veh: Vehicle, toggle: boolean): boolean;
|
||||
function set_vehicle_custom_primary_colour(veh: Vehicle, color: uint32_t): void;
|
||||
function get_vehicle_custom_primary_colour(veh: Vehicle): uint32_t;
|
||||
function clear_vehicle_custom_primary_colour(veh: Vehicle): void;
|
||||
function is_vehicle_primary_colour_custom(veh: Vehicle): boolean;
|
||||
function set_vehicle_custom_secondary_colour(veh: Vehicle, color: uint32_t): void;
|
||||
function get_vehicle_custom_secondary_colour(veh: Vehicle): uint32_t;
|
||||
function clear_vehicle_custom_secondary_colour(veh: Vehicle): void;
|
||||
function is_vehicle_secondary_colour_custom(veh: Vehicle): boolean;
|
||||
function set_vehicle_custom_pearlescent_colour(veh: Vehicle, color: uint32_t): void;
|
||||
function get_vehicle_custom_pearlescent_colour(veh: Vehicle): uint32_t;
|
||||
function set_vehicle_custom_wheel_colour(veh: Vehicle, color: uint32_t): void;
|
||||
function get_vehicle_custom_wheel_colour(veh: Vehicle): uint32_t;
|
||||
function get_livery_name(veh: Vehicle, livery: int32_t): string;
|
||||
function set_vehicle_window_tint(veh: Vehicle, t: int32_t): void;
|
||||
function get_vehicle_window_tint(veh: Vehicle): int32_t;
|
||||
/**
|
||||
* gets the model hash of every vehicle type
|
||||
*/
|
||||
function get_all_vehicle_model_hashes(): vector<Hash>;
|
||||
/**
|
||||
* gets all vehicle objects loaded, like traffic or personal vehicles
|
||||
*/
|
||||
function get_all_vehicles(): vector<Vehicle>;
|
||||
function modify_vehicle_top_speed(veh: Vehicle, f: float): void;
|
||||
function set_vehicle_engine_torque_multiplier_this_frame(veh: Vehicle, f: float): void;
|
||||
function get_vehicle_headlight_color(v: Vehicle): int32_t;
|
||||
function set_vehicle_headlight_color(v: Vehicle, color: int32_t): boolean;
|
||||
function set_heli_blades_full_speed(v: Vehicle): void;
|
||||
function set_heli_blades_speed(v: Vehicle, speed: float): void;
|
||||
function set_vehicle_parachute_active(v: Vehicle, toggle: boolean): void;
|
||||
function does_vehicle_have_parachute(v: Vehicle): boolean;
|
||||
function can_vehicle_parachute_be_activated(v: Vehicle): boolean;
|
||||
function set_vehicle_can_be_locked_on(veh: Vehicle, toggle: boolean, skipSomeCheck: boolean): void;
|
||||
|
||||
|
||||
}
|
||||
|
||||
13
ts-lua/types/RAGE/Water.d.ts
vendored
13
ts-lua/types/RAGE/Water.d.ts
vendored
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Water Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace water {
|
||||
|
||||
function get_waves_intensity(): float;
|
||||
function set_waves_intensity(intensity: float): void;
|
||||
function reset_waves_intensity(): void;
|
||||
|
||||
}
|
||||
|
||||
34
ts-lua/types/RAGE/Weapon.d.ts
vendored
34
ts-lua/types/RAGE/Weapon.d.ts
vendored
@@ -1,34 +0,0 @@
|
||||
/**
|
||||
* Weapon Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace weapon {
|
||||
|
||||
function give_delayed_weapon_to_ped(ped: Ped, hash: Hash, time: int, equipNow: boolean): void;
|
||||
function get_weapon_tint_count(weapon: Hash): int;
|
||||
function get_ped_weapon_tint_index(ped: Ped, weapon: Hash): int;
|
||||
function set_ped_weapon_tint_index(ped: Ped, weapon: Hash, index: int): void;
|
||||
function give_weapon_component_to_ped(ped: Ped, weapon: Hash, component: Hash): void;
|
||||
function remove_all_ped_weapons(ped: Ped): void;
|
||||
function remove_weapon_from_ped(ped: Ped, weapon: Hash): void;
|
||||
function get_max_ammo(ped: Ped, weapon: Hash): [boolean,int];
|
||||
function set_ped_ammo(ped: Ped, weapon: Hash, ammo: int): boolean;
|
||||
function remove_weapon_component_from_ped(ped: Ped, weapon: Hash, component: Hash): void;
|
||||
function has_ped_got_weapon_component(ped: Ped, weapon: Hash, component: Hash): boolean;
|
||||
function get_ped_ammo_type_from_weapon(ped: Ped, weapon: Hash): Hash;
|
||||
function set_ped_ammo_by_type(ped: Ped, type: Hash, amount: uint32_t): void;
|
||||
function has_ped_got_weapon(ped: Ped, weapon: Hash): boolean;
|
||||
function get_all_weapon_hashes(): vector<Hash>;
|
||||
function get_weapon_name(weapon: Hash): string;
|
||||
function get_weapon_weapon_wheel_slot(weapon: Hash): int;
|
||||
function get_weapon_model(weapon: Hash): Hash;
|
||||
function get_weapon_audio_item(weapon: Hash): Hash;
|
||||
function get_weapon_slot(weapon: Hash): Hash;
|
||||
function get_weapon_ammo_type(weapon: Hash): int;
|
||||
function get_weapon_weapon_group(weapon: Hash): Hash;
|
||||
function get_weapon_weapon_type(weapon: Hash): Hash;
|
||||
function get_weapon_pickup(weapon: Hash): Hash;
|
||||
|
||||
}
|
||||
|
||||
23
ts-lua/types/RAGE/Worldprobe.d.ts
vendored
23
ts-lua/types/RAGE/Worldprobe.d.ts
vendored
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Worldprobe Functions
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare namespace worldprobe {
|
||||
|
||||
enum eRayIntersect {
|
||||
RAYINT_MAP = 1 << 0,
|
||||
RAYINT_VEH = 1 << 1,
|
||||
RAYINT_PED = 1 << 2,
|
||||
RAYINT_PED2 = 1 << 3,
|
||||
RAYINT_OBJECT = 1 << 4,
|
||||
RAYINT_UNK0 = 1 << 5,
|
||||
RAYINT_UNK1 = 1 << 6,
|
||||
RAYINT_UNK2 = 1 << 7,
|
||||
RAYINT_VEGETATION = 1 << 8,
|
||||
}
|
||||
|
||||
function raycast(start: v3, end: v3, intersect: int, ignore: Entity): [hit: boolean, hitPos: v3, hitSurf: v3, hitMat: Hash, hitEnt: Entity]
|
||||
|
||||
}
|
||||
|
||||
103
ts-lua/types/structs/Feat.d.ts
vendored
103
ts-lua/types/structs/Feat.d.ts
vendored
@@ -1,103 +0,0 @@
|
||||
/**
|
||||
* a feature from the menu
|
||||
* @public
|
||||
*/
|
||||
declare class Feat {
|
||||
|
||||
/**
|
||||
* only for testing,
|
||||
*
|
||||
* @param type "debug"
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* new Feat("debug")
|
||||
*
|
||||
*/
|
||||
constructor(type: "debug");
|
||||
|
||||
/**
|
||||
* feature on/off boolean
|
||||
*/
|
||||
public get on(): boolean;
|
||||
public set on(on: boolean);
|
||||
|
||||
readonly parent: Feat|null;
|
||||
|
||||
/**
|
||||
* Only for parents
|
||||
*/
|
||||
readonly children: Feat[];
|
||||
|
||||
/**
|
||||
* Only for parents
|
||||
*/
|
||||
readonly child_count: number;
|
||||
|
||||
readonly type: number;
|
||||
|
||||
/**
|
||||
* Ids will be recycled after the feature is deleted
|
||||
*/
|
||||
readonly id: number;
|
||||
|
||||
/**
|
||||
* value for integer features
|
||||
*/
|
||||
public get value_i(): integer;
|
||||
public set value_i(value_i: integer);
|
||||
|
||||
/**
|
||||
* min value
|
||||
*/
|
||||
public get min_1(): integer;
|
||||
public set min_1(min_1: integer);
|
||||
|
||||
/**
|
||||
* max value
|
||||
*/
|
||||
public get max_i(): integer;
|
||||
public set max_i(max_i: integer);
|
||||
|
||||
/**
|
||||
* step size
|
||||
*/
|
||||
public get mod_i(): integer;
|
||||
public set mod_i(mod_i: integer);
|
||||
|
||||
/**
|
||||
* deprecated
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public get threaded(): boolean;
|
||||
public set threaded(threaded: boolean);
|
||||
|
||||
public get name(): string;
|
||||
public set name(name: string);
|
||||
|
||||
/**
|
||||
* d3d handler
|
||||
*
|
||||
* @privateRemarks
|
||||
*
|
||||
* it's only defined as `any` because I don't understand the d3d handler function enough
|
||||
*/
|
||||
public get renderer(): any;
|
||||
public set renderer(renderer: any);
|
||||
|
||||
/**
|
||||
* show/hide feature
|
||||
*/
|
||||
public get hidden(): boolean;
|
||||
public set hidden(hidden: boolean);
|
||||
|
||||
/**
|
||||
* additional context passed to script handlers
|
||||
*/
|
||||
public get data(): any;
|
||||
public set data(data: any);
|
||||
|
||||
public toggle(): Feat;
|
||||
|
||||
}
|
||||
24
ts-lua/types/structs/MenuKey.d.ts
vendored
24
ts-lua/types/structs/MenuKey.d.ts
vendored
@@ -1,24 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
declare class MenuKey {
|
||||
|
||||
/**
|
||||
* vector of virtual keys
|
||||
*/
|
||||
readonly keys: table<uint32_t>;
|
||||
|
||||
public push_vk(virtualKeyCode: uint32_t): void;
|
||||
|
||||
public push_str(key: string): boolean;
|
||||
|
||||
public pop(): void;
|
||||
|
||||
public clear(): void;
|
||||
|
||||
public is_down(): boolean;
|
||||
|
||||
public is_down_stepped(): boolean;
|
||||
|
||||
}
|
||||
42
ts-lua/types/structs/PlayerFeat.d.ts
vendored
42
ts-lua/types/structs/PlayerFeat.d.ts
vendored
@@ -1,42 +0,0 @@
|
||||
/**
|
||||
* a player feature
|
||||
* @public
|
||||
*/
|
||||
declare class PlayerFeat {
|
||||
|
||||
/**
|
||||
* only for testing,
|
||||
*
|
||||
* @param type "debug"
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* new Feat("debug")
|
||||
*
|
||||
*/
|
||||
constructor(type: "debug");
|
||||
|
||||
readonly feats: Feat[];
|
||||
|
||||
readonly id: number;
|
||||
|
||||
readonly parent_id: number;
|
||||
|
||||
/**
|
||||
* deprecated
|
||||
*/
|
||||
public get threaded(): boolean;
|
||||
public set threaded(threaded: boolean);
|
||||
|
||||
/**
|
||||
* Make sure you set the renderer with the PlayerFeat function, and not the Feat function. Otherwise the handler will not receive the player id in the second param.
|
||||
*
|
||||
* @privateRemarks
|
||||
*
|
||||
* it's only defined as `any` because I don't understand the d3d handler function enough
|
||||
*
|
||||
*/
|
||||
public get renderer(): any;
|
||||
public set renderer(renderer: any);
|
||||
|
||||
}
|
||||
27
ts-lua/types/structs/Regex.d.ts
vendored
27
ts-lua/types/structs/Regex.d.ts
vendored
@@ -1,27 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
declare class Regex {
|
||||
|
||||
/**
|
||||
* only for testing,
|
||||
*
|
||||
* @param type "debug"
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* new Feat("debug")
|
||||
*
|
||||
*/
|
||||
constructor(type: "debug");
|
||||
|
||||
readonly pattern: string;
|
||||
|
||||
constructor(pattern: string);
|
||||
|
||||
public search(subject: string): RegexResult;
|
||||
|
||||
public __tostring(): string;
|
||||
|
||||
}
|
||||
39
ts-lua/types/structs/RegexResult.d.ts
vendored
39
ts-lua/types/structs/RegexResult.d.ts
vendored
@@ -1,39 +0,0 @@
|
||||
/**
|
||||
*
|
||||
* @privateRemarks
|
||||
*
|
||||
* example directly translated from the api docs and is untested
|
||||
*
|
||||
* I also don't know if javascript's regex will work
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* let r = new Regex("^(test123)"),
|
||||
* s = "test123 abcd 345345",
|
||||
* m = r.search(r, s)
|
||||
*
|
||||
* if (m.count > 0)
|
||||
* ui.notify_above_map(m.matches[1], "Lua regex", 140)
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
declare class RegexResult {
|
||||
|
||||
/**
|
||||
* only for testing,
|
||||
*
|
||||
* @param type "debug"
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* new Feat("debug")
|
||||
*/
|
||||
constructor(type: "debug");
|
||||
|
||||
readonly count: integer;
|
||||
|
||||
readonly matches: string[];
|
||||
|
||||
public __tostring(): string;
|
||||
|
||||
}
|
||||
33
ts-lua/types/structs/v2.d.ts
vendored
33
ts-lua/types/structs/v2.d.ts
vendored
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* a 2x1 matrix
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare class v2 {
|
||||
|
||||
readonly x: float;
|
||||
readonly y: float;
|
||||
|
||||
/**
|
||||
* **instanciating this class with `new` will break the lua**
|
||||
* @deprecated
|
||||
*/
|
||||
constructor(x: float, y: float);
|
||||
|
||||
public __add(val: v2|v3|float): v2;
|
||||
public __sub(val: v2|v3|float): v2;
|
||||
public __mul(val: v2|v3|float): v2;
|
||||
public __div(val: v2|v3|float): v2;
|
||||
public __eq(val: v2): boolean;
|
||||
public __lt(val: v2): boolean;
|
||||
public __le(val: v2): boolean;
|
||||
public __tostring(): string
|
||||
|
||||
public magnitude(val: v2|null): float;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @noSelf
|
||||
*/
|
||||
declare function v2(x: float, y: float): v2
|
||||
54
ts-lua/types/structs/v3.d.ts
vendored
54
ts-lua/types/structs/v3.d.ts
vendored
@@ -1,54 +0,0 @@
|
||||
/**
|
||||
* a 3x1 matrix
|
||||
*
|
||||
* @privateRemarks
|
||||
*
|
||||
* example directly translated from the api docs and is untested
|
||||
*
|
||||
* @example
|
||||
*
|
||||
* let player_id = player.player_id(),
|
||||
* player_ped = player.get_player_ped(player_id),
|
||||
* pos = player.get_player_coords(player_id),
|
||||
* rot = entity.get_entity_rotation(player_ped),
|
||||
* dir = rot
|
||||
*
|
||||
* dir.transformRotToDir()
|
||||
* dir *= 4
|
||||
* pos += dir
|
||||
*
|
||||
* @public
|
||||
* @noSelf
|
||||
*/
|
||||
declare class v3 {
|
||||
|
||||
readonly x: float;
|
||||
readonly y: float;
|
||||
readonly z: float;
|
||||
|
||||
/**
|
||||
* **instanciating this class with `new` will break the lua**
|
||||
* @deprecated
|
||||
*/
|
||||
constructor(x: float, y: float, z: float);
|
||||
|
||||
public __add(val: v2|v3|float): v3;
|
||||
public __sub(val: v2|v3|float): v3;
|
||||
public __mul(val: v2|v3|float): v3;
|
||||
public __div(val: v2|v3|float): v3;
|
||||
public __eq(val: v2): boolean;
|
||||
public __lt(val: v2): boolean;
|
||||
public __le(val: v2): boolean;
|
||||
public __tostring(): string
|
||||
|
||||
public magnitude(val: v3|null): float;
|
||||
public transformRotToDir(): void;
|
||||
public radToDeg(): void;
|
||||
public degToRad(): void;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @noSelf
|
||||
*/
|
||||
declare function v3(x: float, y: float, z: float): v3
|
||||
Reference in New Issue
Block a user