Skip to content

Commit

Permalink
Release Rojo v7.4.4 (#964)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dekkonot authored Aug 22, 2024
1 parent f4e2f5a commit 5bd3c74
Show file tree
Hide file tree
Showing 6 changed files with 8,343 additions and 629 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased Changes

## [7.4.4] - August 22nd, 2024
* Fixed issue with reading attributes from `Lighting` in new place files
* `Instance.Archivable` will now default to `true` when building a project into a binary (`rbxm`/`rbxl`) file rather than `false`.

## [7.4.3] - August 6th, 2024
* Fixed issue with building binary files introduced in 7.4.2
* Fixed `value of type nil cannot be converted to number` warning spam in output. [#955]
Expand Down
26 changes: 13 additions & 13 deletions Cargo.lock

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

12 changes: 6 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rojo"
version = "7.4.3"
version = "7.4.4"
rust-version = "1.70.0"
authors = ["Lucien Greathouse <[email protected]>"]
description = "Enables professional-grade development tools for Roblox developers"
Expand Down Expand Up @@ -49,11 +49,11 @@ memofs = { version = "0.3.0", path = "crates/memofs" }
# rbx_reflection_database = { path = "../rbx-dom/rbx_reflection_database" }
# rbx_xml = { path = "../rbx-dom/rbx_xml" }

rbx_binary = "0.7.6"
rbx_dom_weak = "2.8.0"
rbx_reflection = "4.6.0"
rbx_reflection_database = "0.2.11"
rbx_xml = "0.13.4"
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"

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.3
7.4.4
54 changes: 38 additions & 16 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
Loading

0 comments on commit 5bd3c74

Please sign in to comment.