Add skybox.get_skies()

This commit is contained in:
LoneWolfHT 2021-02-19 14:46:22 -08:00 committed by sofar
parent de87a485c0
commit 176bef035d
2 changed files with 14 additions and 0 deletions

View File

@ -86,6 +86,10 @@ skybox.add = function(def)
table.add(skies, def)
end
skybox.get_skies = function()
return table.copy(skies)
end
--
-- registrations and load/save code
--

View File

@ -36,6 +36,16 @@ The `skybox` handle can be used to perform various actions:
`skybox.add(skyboxdef)`
-- Add a new skybox with skyboxdef to the list of available skyboxes.
`skybox.get_skies()`
-- Get a list of availiable skyboxes
-- Example value of `skybox.get_skies()[1]`:
--[[
```lua
{"DarkStormy", "#1f2226", 0.5, { density = 0.5, color = "#aaaaaae0", ambient = "#000000",
height = 64, thickness = 32, speed = {x = 6, y = -6},}},
```
]]
```
skyboxdef = {