add gs
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
local CorePackages = game:GetService("CorePackages")
|
||||
|
||||
local Immutable = require(CorePackages.AppTempCommon.Common.Immutable)
|
||||
local ReceivedPlacesInfos = require(CorePackages.AppTempCommon.LuaApp.Actions.ReceivedPlacesInfos)
|
||||
|
||||
local LuaAppFlags = CorePackages.AppTempCommon.LuaApp.Flags
|
||||
local convertUniverseIdToString = require(LuaAppFlags.ConvertUniverseIdToString)
|
||||
|
||||
return function(state, action)
|
||||
state = state or {}
|
||||
|
||||
if action.type == ReceivedPlacesInfos.name then
|
||||
for _, placeInfo in pairs(action.placesInfos) do
|
||||
local universeId = convertUniverseIdToString(placeInfo.universeId)
|
||||
|
||||
state = Immutable.Set(state, universeId, placeInfo)
|
||||
end
|
||||
end
|
||||
|
||||
return state
|
||||
end
|
||||
Reference in New Issue
Block a user