model/sourcemdl: type annotations (lint type baseline back at 92); bundles regenerated
This commit is contained in:
1 parent
7a69ba8455
commit
fe1ee676c6
5 files changed
+165
-177
No files matched your search
@@ -10,12 +10,8 @@ local KeyValues = require("@rosetta/codecs/text/KeyValues")
|
||||
local Material = {}
|
||||
|
||||
local function dir(s: string): string
|
||||
local d = string.gsub(s, "\\", "/")
|
||||
d = string.gsub(d, "^/+", "")
|
||||
if d ~= "" and string.sub(d, -1) ~= "/" then
|
||||
d ..= "/"
|
||||
end
|
||||
return d
|
||||
local d: string = string.gsub(string.gsub(s, "\\", "/"), "^/+", "")
|
||||
return if d ~= "" and string.sub(d, -1) ~= "/" then d .. "/" else d
|
||||
end
|
||||
|
||||
local function path(s: string): string
|
||||
@@ -87,7 +83,7 @@ local function color(v: any): { number }?
|
||||
return { (tonumber(r) :: number) * scale, (tonumber(g) :: number) * scale, (tonumber(b) :: number) * scale }
|
||||
end
|
||||
|
||||
function Material.apply(scene: Types.Scene, textures: { { name: string } }, cdmaterials: { string }, opts: any?, warnings: { string })
|
||||
function Material.apply(scene: Types.Scene, textures: { any }, cdmaterials: { string }, opts: any?, warnings: { string })
|
||||
if type(opts) ~= "table" or (opts.files == nil and opts.resolve == nil) then
|
||||
return
|
||||
end
|
||||
|
||||
Reference in new issue
Block a user