local g=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local w=g:WaitForChild("\077\111\100\117\108\101\115")local v=require(w.src.utils.Logger)local A=require(w.src.actions.rooms.addPlayerToRoom)local C=require(w.src.actions.toClient.clientSetRoom)local function Q(g,w)return function(Q)v:d("\080\108\097\121\101\114 \101\110\116\101\114\101\100 \114\111\111\109\058",g.Name)Q:dispatch(A(g,w))Q:dispatch(C(g,w))end end return Q
--[[
    This is a thunk for adding player to room!

]]
local ReplicatedStorage = game:GetService('ReplicatedStorage')
local Modules = ReplicatedStorage:WaitForChild('Modules')
local logger = require(Modules.src.utils.Logger)

local addPlayerToRoom = require(Modules.src.actions.rooms.addPlayerToRoom)
local clientSetRoom = require(Modules.src.actions.toClient.clientSetRoom)

local function playerEnteredRoom(player, roomId)
	return function(store)
		logger:d('Player entered room:', player.Name)
		store:dispatch(addPlayerToRoom(player, roomId))
		store:dispatch(clientSetRoom(player, roomId))
	end
end

return playerEnteredRoom