Fix Rojo breaking when users undo/redo in Studio (#708)

This commit is contained in:
boatbomber
2023-07-05 14:09:11 -07:00
committed by GitHub
parent 658d211779
commit ce530e795a
3 changed files with 104 additions and 11 deletions

View File

@@ -5,6 +5,8 @@
Patches can come from the server or be generated by the client.
]]
local ChangeHistoryService = game:GetService("ChangeHistoryService")
local Packages = script.Parent.Parent.Parent.Packages
local Log = require(Packages.Log)
@@ -17,6 +19,8 @@ local reify = require(script.Parent.reify)
local setProperty = require(script.Parent.setProperty)
local function applyPatch(instanceMap, patch)
local patchTimestamp = DateTime.now():FormatLocalTime("LTS", "en-us")
-- Tracks any portions of the patch that could not be applied to the DOM.
local unappliedPatch = PatchSet.newEmpty()
@@ -199,6 +203,8 @@ local function applyPatch(instanceMap, patch)
end
end
ChangeHistoryService:SetWaypoint("Rojo: Patch " .. patchTimestamp)
return unappliedPatch
end