Fixed a bug with usewith listeners where the ids could be flipped in inappropriate contexts

This commit is contained in:
Ceikry
2022-08-24 23:15:01 +00:00
committed by Ryan
parent c3250acce1
commit 77b0fc4eb6
@@ -171,7 +171,10 @@ object InteractionListeners {
var flipped = false
val method = if (with is Player) get(-1, used.id, 4) ?: return false
else get(used.id,with.id,type) ?: get(with.id,used.id,type).also { flipped = true } ?: return false
else get(used.id,with.id,type) ?:
if (type == InteractionListener.ITEM)
get(with.id,used.id,type).also { flipped = true } ?: return false
else return false
val destOverride = if(flipped) {
getOverride(type, used.id, "use") ?: getOverride(type, with.id) ?: getOverride(type, "use")