summaryrefslogtreecommitdiff
path: root/nodedef.go
diff options
context:
space:
mode:
authoranon5 <anon5clam@protonmail.com>2021-09-19 12:45:50 +0000
committeranon5 <anon5clam@protonmail.com>2021-09-19 12:45:50 +0000
commitbcc58cb3048faa146ed0f90b330ebbe791d53b5c (patch)
tree2373852a0557ea584a62134159eb646b15619be3 /nodedef.go
parentd6ba88b091f6c9be3b48ab0fe3f94211ee210700 (diff)
Switch to Minetest 5.4.1 protocol and other changes
Diffstat (limited to 'nodedef.go')
-rw-r--r--nodedef.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/nodedef.go b/nodedef.go
index 91b8235..8664caf 100644
--- a/nodedef.go
+++ b/nodedef.go
@@ -158,3 +158,27 @@ type NodeDef struct {
//mt:end
}
+
+func BuiltinNodeDefs(n int) map[Content]NodeDef {
+ defs := make(map[Content]NodeDef, 3+n)
+ defs[Unknown] = NodeDef{
+ Name: "unknown",
+ }
+ defs[Air] = NodeDef{
+ Name: "air",
+ DrawType: DrawNothing,
+ P1Type: P1Light,
+ Translucent: true,
+ Transparent: true,
+ Replaceable: true,
+ Floodable: true,
+ GndContent: true,
+ }
+ defs[Ignore] = NodeDef{
+ Name: "ignore",
+ DrawType: DrawNothing,
+ Replaceable: true,
+ GndContent: true,
+ }
+ return defs
+}