[#modding] after a creature is destroyed by the event logic of an item they're holding, the...
Issue #3977
resolved
Marked for crossposting by: From Entropy to helado
Message (jump):
<From Entropy to helado> after a creature is destroyed by the event logic of an item they're holding, their other items' event logic continues to execute. in my case this cases a
GameObject.IsUnderSky()
check to have invalid input because that method doesn't expect the object in question to already be in the destruction process. ideally inventory item events should stop firing once the creature is destroyed
Comments (5)
-
-
this turned out to be easy enough to guard against with
!floater.IsInGraveyard()
, but it may still be worth looking into the exception fromfloater.IsUnderSky()
-
repo owner -
assigned issue to
- edited description
-
assigned issue to
-
- changed status to open
-
- changed status to resolved
Fixed in next update.
- Log in to comment
here’s the logic in question that is causing an error: https://github.com/HeladoDeBrownie/Caves-of-Qud-Antiweight-Orbs/blob/55cfd52ecebd0ac6b11ec603fd3d6eb70058e220/SkywardlyInclined.cs#L53
let me know if you think it’s my code that’s at fault, but it seems odd to have to explicitly check if the item’s holder is in the destruction process