mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
plugin: Add setting for opening scripts externally
This commit is contained in:
parent
a2356773dc
commit
0e4f6dea2b
4 changed files with 131 additions and 133 deletions
|
|
@ -45,6 +45,7 @@ ServeSession.Status = Status
|
|||
|
||||
local validateServeOptions = t.strictInterface({
|
||||
apiContext = t.table,
|
||||
openScriptsExternally = t.boolean,
|
||||
})
|
||||
|
||||
function ServeSession.new(options)
|
||||
|
|
@ -75,6 +76,7 @@ function ServeSession.new(options)
|
|||
self = {
|
||||
__status = Status.NotStarted,
|
||||
__apiContext = options.apiContext,
|
||||
__openScriptsExternally = options.openScriptsExternally,
|
||||
__reconciler = reconciler,
|
||||
__instanceMap = instanceMap,
|
||||
__statusChangedCallback = nil,
|
||||
|
|
@ -125,7 +127,7 @@ function ServeSession:stop()
|
|||
end
|
||||
|
||||
function ServeSession:__onActiveScriptChanged(activeScript)
|
||||
if not DevSettings:alwaysOpenScriptsExternally() then
|
||||
if not self.__openScriptsExternally then
|
||||
Log.trace("Not opening script {} because feature not enabled.", activeScript)
|
||||
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue