summaryrefslogtreecommitdiff
path: root/src/mapnode.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-11-17 11:22:24 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-11-29 19:13:49 +0200
commitcc03718d3c492a401bbc4b071d0ae1f0c808de95 (patch)
treed3b701f5ab5ca0b2d94a22a0c49eeeb0ba98fb51 /src/mapnode.h
parentd7cb6146c8ddbd3e1c03c9743e32d7d4e86ec78e (diff)
downloadminetest-cc03718d3c492a401bbc4b071d0ae1f0c808de95.tar.gz
minetest-cc03718d3c492a401bbc4b071d0ae1f0c808de95.tar.bz2
minetest-cc03718d3c492a401bbc4b071d0ae1f0c808de95.zip
Node place/dig Lua callbacks
Diffstat (limited to 'src/mapnode.h')
-rw-r--r--src/mapnode.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mapnode.h b/src/mapnode.h
index e287ea54f..65fc3b3e2 100644
--- a/src/mapnode.h
+++ b/src/mapnode.h
@@ -183,6 +183,30 @@ struct MapNode
param2 |= (c&0x0f)<<4;
}
}
+ u8 getParam1() const
+ {
+ return param1;
+ }
+ void setParam1(u8 p)
+ {
+ param1 = p;
+ }
+ u8 getParam2() const
+ {
+ if(param0 < 0x80)
+ return param2;
+ else
+ return param2 & 0x0f;
+ }
+ void setParam2(u8 p)
+ {
+ if(param0 < 0x80)
+ param2 = p;
+ else{
+ param2 &= 0xf0;
+ param2 |= (p&0x0f);
+ }
+ }
void setLight(enum LightBank bank, u8 a_light, INodeDefManager *nodemgr);
u8 getLight(enum LightBank bank, INodeDefManager *nodemgr) const;