Skip to content

Commit 0c379ad

Browse files
committed
default ABILITYES
1 parent 4425eeb commit 0c379ad

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Diff for: src/main/kotlin/dev/sterner/common/components/VoidBoundRevelationComponent.kt

+8-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ class VoidBoundRevelationComponent(private val player: Player) : AutoSyncedCompo
1717

1818
var thoughtsQueue: MutableMap<Component, ThoughtData> = mutableMapOf()
1919

20-
var unlockedItemAbilities = mutableSetOf(ItemAbility.NONE)
20+
var unlockedItemAbilities = defaultAbilities()
21+
22+
private fun defaultAbilities(): MutableSet<ItemAbility> {
23+
return mutableSetOf(ItemAbility.NONE, ItemAbility.MINING_3X3)
24+
}
2125

2226
fun addUnlockedItemAbility(ability: ItemAbility) {
2327
unlockedItemAbilities.add(ability)
@@ -151,7 +155,9 @@ class VoidBoundRevelationComponent(private val player: Player) : AutoSyncedCompo
151155
}
152156

153157
unlockedItemAbilities.clear()
154-
unlockedItemAbilities.add(ItemAbility.NONE)
158+
defaultAbilities().forEach{
159+
unlockedItemAbilities.add(it)
160+
}
155161
val unlockedList = tag.getList("UnlockedItems", 10)
156162
for (i in 0 until unlockedList.size) {
157163
val item = unlockedList.getCompound(i)

0 commit comments

Comments
 (0)