diff options
Diffstat (limited to 'types.go')
-rw-r--r-- | types.go | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -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 +} |