10 lines
1.5 KiB
JSON
10 lines
1.5 KiB
JSON
{"file_path": "game.ReplicatedStorage.OrnamentMachine.Config", "datamodel_type": "Edit", "studio_id": "0411fa4a-b0e9-4eb3-8d9b-e8e08277ee91",
|
|
"edits": [
|
|
{"old_string": "\t Half = { 6.3, 6.3 }, -- footprint of the round track (the mesh boxes overestimate it)\n",
|
|
"new_string": "\t Half = { 6.3, 6.3 }, -- footprint of the round track (the mesh boxes overestimate it)\n\t Inner = 4.9, -- free circle inside the rails: smaller items may stand in it\n"},
|
|
{"old_string": "\treturn pair and math.abs(ax - bx) <= 0.5 and math.abs(az - bz) <= 0.5\nend\n",
|
|
"new_string": "\treturn pair and math.abs(ax - bx) <= 0.5 and math.abs(az - bz) <= 0.5\nend\n-- an item may stand inside a ring item (Inner = free radius, the train) when its whole footprint fits in that circle\nfunction Config.InsideRingOk(a, ax, az, ar, b, bx, bz, br)\n\tlocal function fits(ring, rx, rz, item, ix, iz, ir)\n\t\tlocal R = Config.ShopById[ring] and Config.ShopById[ring].Inner\n\t\tif not R or Config.ShopById[item] and Config.ShopById[item].Inner then return false end\n\t\tlocal fx, fz = Config.DecorFootprint(item, ir)\n\t\tlocal dx, dz = math.abs(ix - rx) + fx, math.abs(iz - rz) + fz\n\t\treturn dx * dx + dz * dz <= R * R\n\tend\n\treturn fits(a, ax, az, b, bx, bz, br) or fits(b, bx, bz, a, ax, az, ar)\nend\n"},
|
|
{"old_string": "\t\t\tand not Config.AroundTreeOk(id, x, z, other, pl.X, pl.Z) then",
|
|
"new_string": "\t\t\tand not Config.AroundTreeOk(id, x, z, other, pl.X, pl.Z) and not Config.InsideRingOk(id, x, z, r, other, pl.X, pl.Z, pl.R) then"}
|
|
]}
|