Skip to content

Commit

Permalink
Release v7.4.0-uplift.syncback.rc.16
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekkonot committed Aug 22, 2024
1 parent e28c36c commit 3260cef
Show file tree
Hide file tree
Showing 5 changed files with 11,524 additions and 1,286 deletions.
32 changes: 19 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rojo"
version = "7.4.0-uplift.syncback.rc.14"
version = "7.4.0-uplift.syncback.rc.16"
rust-version = "1.70.0"
authors = ["Lucien Greathouse <me@lpghatguy.com>"]
description = "Enables professional-grade development tools for Roblox developers"
Expand Down Expand Up @@ -51,17 +51,17 @@ memofs = { version = "0.2.0", path = "crates/memofs" }

# These dependencies are being pulled directly from our GitHub fork so they can
# be commented away for now.
# rbx_binary = "0.7.4"
# rbx_dom_weak = "2.7.0"
# rbx_reflection = "4.5.0"
# rbx_reflection_database = "0.2.10"
# rbx_xml = "0.13.3"

rbx_binary = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
rbx_dom_weak = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
rbx_reflection = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
rbx_reflection_database = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
rbx_xml = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
rbx_binary = "0.7.7"
rbx_dom_weak = "2.9.0"
rbx_reflection = "4.7.0"
rbx_reflection_database = "0.2.12"
rbx_xml = "0.13.5"

# rbx_binary = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
# rbx_dom_weak = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
# rbx_reflection = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
# rbx_reflection_database = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }
# rbx_xml = { git = "https://github.com/UpliftGames/rbx-dom.git", rev = "9607d73d8d1e5ff2b07b6af2826b7ddffc83fd5c" }

anyhow = "1.0.44"
backtrace = "0.3.61"
Expand Down
2 changes: 1 addition & 1 deletion plugin/Version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.4.0-uplift.syncback.rc.14
7.4.0-uplift.syncback.rc.16
59 changes: 41 additions & 18 deletions plugin/rbx_dom_lua/customProperties.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,21 @@ local TERRAIN_MATERIAL_COLORS = {
Enum.Material.Pavement,
}

local function isAttributeNameValid(attributeName)
-- For SetAttribute to succeed, the attribute name must be less than or
-- equal to 100 characters...
return #attributeName <= 100
-- ...and must only contain alphanumeric characters, periods, hyphens,
-- underscores, or forward slashes.
and attributeName:match("[^%w%.%-_/]") == nil
end

local function isAttributeNameReserved(attributeName)
-- For SetAttribute to succeed, attribute names must not use the RBX
-- prefix, which is reserved by Roblox.
return attributeName:sub(1, 3) == "RBX"
end

-- Defines how to read and write properties that aren't directly scriptable.
--
-- The reflection database refers to these as having scriptability = "Custom"
Expand All @@ -40,26 +55,33 @@ return {
local didAllWritesSucceed = true

for attributeName, attributeValue in pairs(value) do
local isNameValid =
-- For our SetAttribute to succeed, the attribute name must be
-- less than or equal to 100 characters...
#attributeName <= 100
-- ...must only contain alphanumeric characters, periods, hyphens,
-- underscores, or forward slashes...
and attributeName:match("[^%w%.%-_/]") == nil
-- ... and must not use the RBX prefix, which is reserved by Roblox.
and attributeName:sub(1, 3) ~= "RBX"

if isNameValid then
instance:SetAttribute(attributeName, attributeValue)
else
if isAttributeNameReserved(attributeName) then
-- If the attribute name is reserved, then we don't
-- really care about reporting any failures about
-- it.
continue
end

if not isAttributeNameValid(attributeName) then
didAllWritesSucceed = false
continue
end

instance:SetAttribute(attributeName, attributeValue)
end

for key in pairs(existing) do
if value[key] == nil then
instance:SetAttribute(key, nil)
for existingAttributeName in pairs(existing) do
if isAttributeNameReserved(existingAttributeName) then
continue
end

if not isAttributeNameValid(existingAttributeName) then
didAllWritesSucceed = false
continue
end

if value[existingAttributeName] == nil then
instance:SetAttribute(existingAttributeName, nil)
end
end

Expand Down Expand Up @@ -113,13 +135,14 @@ return {
},
WorldPivotData = {
read = function(instance)
return true, instance:GetPivot()
return true, instance.WorldPivot
end,
write = function(instance, _, value)
if value == nil then
return true, nil
else
return true, instance:PivotTo(value)
instance.WorldPivot = value
return true
end
end,
},
Expand Down
Loading

0 comments on commit 3260cef

Please sign in to comment.