diff options
author | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-21 00:57:49 +1100 |
---|---|---|
committer | Kae <80987908+Novaenia@users.noreply.github.com> | 2024-03-21 00:57:49 +1100 |
commit | 57ca6776e41eb4d72fd65bc6b88ca8074180ef15 (patch) | |
tree | 154c718fa32d4454c017d5f50ea0ea87b57b49ae /assets/opensb/objects | |
parent | a096fa3ffc3627ace2d858b61456e578fb7bc25a (diff) |
Lua patches
Diffstat (limited to 'assets/opensb/objects')
-rw-r--r-- | assets/opensb/objects/opensb/object.patch.lua | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/assets/opensb/objects/opensb/object.patch.lua b/assets/opensb/objects/opensb/object.patch.lua new file mode 100644 index 0000000..d2a37a9 --- /dev/null +++ b/assets/opensb/objects/opensb/object.patch.lua @@ -0,0 +1,19 @@ +local function modLight(light) + for i = 1, #light do + light[i] = light[i] * 0.4 + end +end + +function patch(object, path) + if object.lightColor then + modLight(object.lightColor) + object.pointLight = true + return object; + elseif object.lightColors then + for i, v in pairs(object.lightColors) do + modLight(v) + end + object.pointLight = true + return object; + end +end
\ No newline at end of file |