Detect bookshelves by script
This commit is contained in:
parent
487f5741b7
commit
3b78c86e79
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -8,7 +8,6 @@ FormList Property ETR_ItemsStored Auto
|
||||
FormList Property ETR_PersistentStorageList Auto
|
||||
|
||||
Container Property ETR_CellStorageContainer Auto
|
||||
Container Property PlayerBookShelfContainer Auto
|
||||
|
||||
Keyword Property LocTypePlayerHouse Auto
|
||||
|
||||
@ -88,14 +87,9 @@ Event OnUpdate()
|
||||
endif
|
||||
bRescanHome = false
|
||||
|
||||
ObjectReference bookShelf
|
||||
if lastDestContainer && lastDestContainer.GetBaseObject() == PlayerBookShelfContainer
|
||||
bookShelf = lastDestContainer
|
||||
endif
|
||||
|
||||
if bookShelf && bookShelf as PlayerBookShelfContainerScript
|
||||
if lastDestContainer && lastDestContainer as PlayerBookShelfContainerScript
|
||||
int iLimit = 10
|
||||
while iLimit >= 0 && (bookShelf as PlayerBookShelfContainerScript).GetState() == "PlacingBooks"
|
||||
while iLimit >= 0 && (lastDestContainer as PlayerBookShelfContainerScript).GetState() == "PlacingBooks"
|
||||
Debug.Notification("Waiting for shelf update")
|
||||
iLimit -= 1
|
||||
Utility.wait(0.5)
|
||||
|
@ -8,7 +8,6 @@ FormList Property ETR_ItemsStored Auto
|
||||
FormList Property ETR_PersistentStorageList Auto
|
||||
|
||||
Container Property ETR_CellStorageContainer Auto
|
||||
Container Property PlayerBookShelfContainer Auto
|
||||
|
||||
Keyword Property LocTypePlayerHouse Auto
|
||||
|
||||
@ -81,15 +80,19 @@ Event OnUpdate()
|
||||
bRescanHome = false
|
||||
|
||||
ObjectReference bookShelf
|
||||
if lastDestContainer && lastDestContainer.GetBaseObject() == PlayerBookShelfContainer
|
||||
bookShelf = lastDestContainer
|
||||
elseif lastSourceContainer && lastSourceContainer.GetBaseObject() == PlayerBookShelfContainer
|
||||
bookShelf = lastSourceContainer
|
||||
if lastDestContainer
|
||||
if lastDestContainer as PlayerBookShelfContainerScript
|
||||
bookShelf = lastDestContainer
|
||||
endif
|
||||
elseif lastSourceContainer
|
||||
if lastSourceContainer as PlayerBookShelfContainerScript
|
||||
bookShelf = lastSourceContainer
|
||||
endif
|
||||
endif
|
||||
|
||||
if bookShelf && bookShelf as PlayerBookShelfContainerScript
|
||||
if bookShelf
|
||||
int iLimit = 10
|
||||
while iLimit >= 0 && (bookShelf as PlayerBookShelfContainerScript).GetState() == "PlacingBooks"
|
||||
while iLimit > 0 && (bookShelf as PlayerBookShelfContainerScript).GetState() == "PlacingBooks"
|
||||
Debug.Notification("Waiting for shelf update")
|
||||
iLimit -= 1
|
||||
Utility.wait(0.5)
|
||||
|
Loading…
Reference in New Issue
Block a user