Specify argument names explicitly

This commit is contained in:
DBotThePony 2025-03-14 19:32:17 +07:00
parent 4ab667b37e
commit 3a5f37bd76
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -141,16 +141,16 @@ interface ISlottedContainer<out S : IContainerSlot> : IEnhancedContainer<S> {
if (stack.isEmpty) if (stack.isEmpty)
return false return false
val result = addItem(stack, simulate, slots, onlyIntoExisting = onlyIntoExisting, popTime = popTime, ignoreFilters = ignoreFilters) val result = addItem(stack, simulate = simulate, slots = slots, onlyIntoExisting = onlyIntoExisting, popTime = popTime, ignoreFilters = ignoreFilters)
if (!simulate) stack.count = result.count if (!simulate) stack.count = result.count
return result.count != stack.count return result.count != stack.count
} }
fun fullyAddItem(stack: ItemStack, slots: IntCollection = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null, ignoreFilters: Boolean): Boolean { fun fullyAddItem(stack: ItemStack, slots: IntCollection = slotRange, onlyIntoExisting: Boolean = false, popTime: Int? = null, ignoreFilters: Boolean): Boolean {
if (!addItem(stack, true, slots, popTime = popTime, onlyIntoExisting = onlyIntoExisting, ignoreFilters = ignoreFilters).isEmpty) if (!addItem(stack, simulate = true, slots = slots, popTime = popTime, onlyIntoExisting = onlyIntoExisting, ignoreFilters = ignoreFilters).isEmpty)
return false return false
return addItem(stack, false, slots, popTime = popTime, onlyIntoExisting = onlyIntoExisting, ignoreFilters = ignoreFilters).isEmpty return addItem(stack, simulate = false, slots = slots, popTime = popTime, onlyIntoExisting = onlyIntoExisting, ignoreFilters = ignoreFilters).isEmpty
} }
override fun addItem( override fun addItem(
@ -160,7 +160,7 @@ interface ISlottedContainer<out S : IContainerSlot> : IEnhancedContainer<S> {
onlyIntoExisting: Boolean, onlyIntoExisting: Boolean,
popTime: Int? popTime: Int?
): ItemStack { ): ItemStack {
return addItem(stack, simulate, slots, onlyIntoExisting, popTime, ignoreFilters = false) return addItem(stack, simulate = simulate, slots = slots, onlyIntoExisting = onlyIntoExisting, popTime = popTime, ignoreFilters = false)
} }
override fun consumeItem( override fun consumeItem(
@ -170,10 +170,10 @@ interface ISlottedContainer<out S : IContainerSlot> : IEnhancedContainer<S> {
onlyIntoExisting: Boolean, onlyIntoExisting: Boolean,
popTime: Int? popTime: Int?
): Boolean { ): Boolean {
return consumeItem(stack, simulate, slots, onlyIntoExisting, popTime, ignoreFilters = false) return consumeItem(stack, simulate = simulate, slots = slots, onlyIntoExisting = onlyIntoExisting, popTime = popTime, ignoreFilters = false)
} }
override fun fullyAddItem(stack: ItemStack, slots: IntCollection, onlyIntoExisting: Boolean, popTime: Int?): Boolean { override fun fullyAddItem(stack: ItemStack, slots: IntCollection, onlyIntoExisting: Boolean, popTime: Int?): Boolean {
return fullyAddItem(stack, slots, onlyIntoExisting, popTime, ignoreFilters = false) return fullyAddItem(stack, slots = slots, onlyIntoExisting = onlyIntoExisting, popTime = popTime, ignoreFilters = false)
} }
} }