summaryrefslogtreecommitdiff
path: root/types.go
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-07-16 22:43:36 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-07-16 22:43:36 +0200
commite63a04085cf4a7a89eca1968bb5c1631f6202815 (patch)
tree79a3a5b4802f6ded9de44306a260dd2370b27da3 /types.go
parent164261fab87997d7363c79aa9ad71a48866c6c2b (diff)
downloadmtmap-e63a04085cf4a7a89eca1968bb5c1631f6202815.tar.xz
Skip special idsv0.2.3
Diffstat (limited to 'types.go')
-rw-r--r--types.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/types.go b/types.go
index abb02e2..bd51350 100644
--- a/types.go
+++ b/types.go
@@ -1,6 +1,7 @@
package mtmap
import (
+ "fmt"
"github.com/anon55555/mt"
)
@@ -34,3 +35,23 @@ type StaticObj struct {
Pos [3]float32
Data string
}
+
+type ErrInvalidNodeName struct {
+ Name string
+}
+
+func (e ErrInvalidNodeName) Error() string {
+ return fmt.Sprintf("invalid node \"%v\"", e.Name)
+}
+
+type ErrInvalidNodeId struct {
+ Id mt.Content
+}
+
+func (e ErrInvalidNodeId) Error() string {
+ return fmt.Sprintf("invalid node %v", e.Id)
+}
+
+func isSpecial(id mt.Content) bool {
+ return id >= 125 && id <= 127
+}