mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 11:39:49 -06:00
Move helper lua functions for script scheduling to scripts/common.lua
This commit is contained in:
@@ -1,25 +1,13 @@
|
||||
function enable(name, enabled)
|
||||
return "openspace.setPropertyValue('" .. name .. ".renderable.enabled', " .. (enabled and "true" or "false") .. ");";
|
||||
end
|
||||
-- Load the common helper functions
|
||||
dofile(openspace.absPath('${SCRIPTS}/common.lua'))
|
||||
|
||||
function scheduleEnabled(time, name, enabled)
|
||||
return
|
||||
{
|
||||
Time = time,
|
||||
ReversibleLuaScript = {
|
||||
Forward = enable(name, enabled),
|
||||
Backward = enable(name, not enabled)
|
||||
}
|
||||
}
|
||||
end
|
||||
|
||||
return
|
||||
return
|
||||
{
|
||||
scheduleEnabled("2016 SEP 08 23:05:01", "OsirisRexTrailEarth", true),
|
||||
scheduleEnabled("2016 SEP 09 00:00:00", "OsirisRexTrailSolarSystem", true),
|
||||
scheduleEnabled("2016 SEP 09 02:00:00", "OsirisRexTrailEarth", false),
|
||||
scheduleEnabled("2018 OCT 11 00:00:00", "OsirisRexTrailBennu", true),
|
||||
scheduleEnabled("2018 OCT 15 00:00:00", "OsirisRexTrailSolarSystem", false),
|
||||
scheduleEnabled("2019 AUG 01 00:00:00", "OsirisRexTrailSolarSystem", true),
|
||||
scheduleEnabled("2019 AUG 01 00:00:00", "OsirisRexTrailBennu", false),
|
||||
helper.scheduledScript.enable("2016 SEP 08 23:05:01", "OsirisRexTrailEarth", true),
|
||||
helper.scheduledScript.enable("2016 SEP 09 00:00:00", "OsirisRexTrailSolarSystem", true),
|
||||
helper.scheduledScript.enable("2016 SEP 09 02:00:00", "OsirisRexTrailEarth", false),
|
||||
helper.scheduledScript.enable("2018 OCT 11 00:00:00", "OsirisRexTrailBennu", true),
|
||||
helper.scheduledScript.enable("2018 OCT 15 00:00:00", "OsirisRexTrailSolarSystem", false),
|
||||
helper.scheduledScript.enable("2019 AUG 01 00:00:00", "OsirisRexTrailSolarSystem", true),
|
||||
helper.scheduledScript.enable("2019 AUG 01 00:00:00", "OsirisRexTrailBennu", false),
|
||||
}
|
||||
Reference in New Issue
Block a user