Skip to content

Commit

Permalink
Migrate part BrickColor properties to BasePart.Color (#328)
Browse files Browse the repository at this point in the history
Closes #319.

Note that this makes `BasePart.BrickColor` and `BasePart.brickColor`
canonical, serializable properties! With this PR, they only turn into
`BasePart.Color` on deserialization, but may be serialized as-is.
  • Loading branch information
kennethloeffler authored Jul 26, 2023
1 parent 5db11f8 commit f899fba
Show file tree
Hide file tree
Showing 5 changed files with 278 additions and 100 deletions.
10 changes: 8 additions & 2 deletions patches/parts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ Change:
# BasePart.BrickColor now defers to the Color3 properties in every case, so
# we can basically pretend that BrickColor and brickColor never existed.
brickColor:
AliasFor: Color
Serialization:
Type: Migrate
To: Color
Migration: BrickColorToColor
BrickColor:
AliasFor: Color
Serialization:
Type: Migrate
To: Color
Migration: BrickColorToColor
Color:
Serialization:
Type: SerializesAs
Expand Down
Loading

0 comments on commit f899fba

Please sign in to comment.