mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-20 17:41:37 +00:00
Add gameId and placeId project properties
This commit is contained in:
parent
98db3b4f08
commit
c7ab6c435c
6 changed files with 34 additions and 0 deletions
|
|
@ -111,6 +111,7 @@ function ServeSession:start()
|
|||
self.__apiContext:connect()
|
||||
:andThen(function(serverInfo)
|
||||
self:__setStatus(Status.Connected, serverInfo.projectName)
|
||||
self:__applyGameAndPlaceId(serverInfo)
|
||||
|
||||
local rootInstanceId = serverInfo.rootInstanceId
|
||||
|
||||
|
|
@ -128,6 +129,16 @@ function ServeSession:stop()
|
|||
self:__stopInternal()
|
||||
end
|
||||
|
||||
function ServeSession:__applyGameAndPlaceId(serverInfo)
|
||||
if serverInfo.gameId ~= nil then
|
||||
game:SetUniverseId(serverInfo.gameId)
|
||||
end
|
||||
|
||||
if serverInfo.placeId ~= nil then
|
||||
game:SetPlaceId(serverInfo.placeId)
|
||||
end
|
||||
end
|
||||
|
||||
function ServeSession:__onActiveScriptChanged(activeScript)
|
||||
if not self.__openScriptsExternally then
|
||||
Log.trace("Not opening script {} because feature not enabled.", activeScript)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue