Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed object list limit for OOT #172

Merged
merged 1 commit into from
Nov 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions fast64_internal/oot/oot_level_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,11 @@ def readRoomData(room, roomHeader, alternateRoomHeaders):
room.disableSunMoon = roomHeader.disableSunMoon
room.echo = roomHeader.echo
room.objectList.extend([getCustomProperty(item, "objectID") for item in roomHeader.objectList])
if len(room.objectList) > 15:
raise PluginError("Error: A scene can only have a maximum of 15 objects (OOT, not blender objects).")

if len(room.objectList) > 16:
print(
"Warning: A room can only have a maximum of 16 objects in its object list, unless more memory is allocated in code.",
)
Dragorn421 marked this conversation as resolved.
Show resolved Hide resolved

if alternateRoomHeaders is not None:
if not alternateRoomHeaders.childNightHeader.usePreviousHeader:
Expand Down
3 changes: 3 additions & 0 deletions fast64_internal/oot/oot_scene_room.py
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,9 @@ def drawRoomHeaderProperty(layout, roomProp, dropdownLabel, headerIndex, objName
elif menuTab == "Objects":
objBox = layout.column()
objBox.box().label(text="Objects")
if len(roomProp.objectList) > 16:
objBox.label(text="You are over the 16 object limit.", icon="ERROR")
objBox.label(text="You must allocate more memory in code.")
for i in range(len(roomProp.objectList)):
drawObjectProperty(objBox, roomProp.objectList[i], headerIndex, i, objName)
drawAddButton(objBox, len(roomProp.objectList), "Object", headerIndex, objName)
Expand Down