weather in weathercodex

This commit is contained in:
minjaesong
2024-04-14 00:18:30 +09:00
parent 670a308c78
commit 4fba0f70c9
48 changed files with 311 additions and 208 deletions

View File

@@ -1,12 +1,13 @@
package net.torvald.terrarum.blockproperties
import net.torvald.terrarum.Codex
import net.torvald.terrarum.TaggedProp
import net.torvald.terrarum.gameitems.ItemID
/**
* Created by minjaesong on 2021-07-28.
*/
class WireProp {
class WireProp : TaggedProp {
var id: ItemID = ""
var numericID: Int = -1
@@ -27,15 +28,5 @@ class WireProp {
@Transient var tags = HashSet<String>()
fun hasTag(s: String) = tags.contains(s)
fun hasAnyTagOf(vararg s: String) = s.any { hasTag(it) }
fun hasAnyTag(s: Collection<String>) = s.any { hasTag(it) }
fun hasAnyTag(s: Array<String>) = s.any { hasTag(it) }
fun hasAllTagOf(vararg s: String) = s.all { hasTag(it) }
fun hasAllTag(s: Collection<String>) = s.all { hasTag(it) }
fun hasAllTag(s: Array<String>) = s.all { hasTag(it) }
fun hasNoTagOf(vararg s: String) = s.none { hasTag(it) }
fun hasNoTag(s: Collection<String>) = s.none { hasTag(it) }
fun hasNoTag(s: Array<String>) = s.none { hasTag(it) }
override fun hasTag(s: String) = tags.contains(s)
}