--[[
	Fixes the window, pressurizing the room if all windows are now fixed
]]

function Window:fix()
	self._state = Constants.State.Window.Normal

	local glass = self._model:FindFirstChild("Glass")
	glass.CanCollide = true
	glass.Material = Enum.Material.Glass
	glass.Color = Color3.fromRGB(116, 161, 255)
	glass.Transparency = 0.3

	local room = self._associatedRoom

	if room:allWindowsNormal() and room:isBreached() then
		room:ventRoom()
	end

	DestroyMarker:FireAllClients(glass)
end
