diff options
author | FaceDeer <derksenmobile@gmail.com> | 2017-01-02 16:05:48 -0700 |
---|---|---|
committer | FaceDeer <derksenmobile@gmail.com> | 2017-01-02 16:05:48 -0700 |
commit | ec1ee19893c3e645b34607e9df069f164be7f31c (patch) | |
tree | 275abf701f3ac1d0be0ce77b3c39b6a347b6d7bc /entities.lua | |
parent | 5ba5b76ba74f1c71eb89dc5935a19cfea2b0a014 (diff) |
adding output location visualizer entities for the build heads.
Diffstat (limited to 'entities.lua')
-rw-r--r-- | entities.lua | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/entities.lua b/entities.lua new file mode 100644 index 0000000..b3d12cb --- /dev/null +++ b/entities.lua @@ -0,0 +1,51 @@ +minetest.register_entity("digtron:marker", { + initial_properties = { + visual = "cube", + visual_size = {x=1.1, y=1.1}, + textures = {"digtron_marker_side.png","digtron_marker_side.png","digtron_marker.png","digtron_marker.png","digtron_marker_side.png","digtron_marker_side.png"}, + collisionbox = {-0.55, -0.55, -0.55, 0.55, 0.55, 0.55}, + physical = false, + }, + + on_activate = function(self, staticdata) + minetest.after(5.0, + function(self) + self.object:remove() + end, + self) + end, + + on_rightclick=function(self, clicker) + self.object:remove() + end, + + on_punch = function(self, hitter) + self.object:remove() + end, +}) + +minetest.register_entity("digtron:marker_vertical", { + initial_properties = { + visual = "cube", + visual_size = {x=1.1, y=1.1}, + textures = {"digtron_marker.png","digtron_marker.png","digtron_marker_side.png^[transformR90","digtron_marker_side.png^[transformR90","digtron_marker_side.png^[transformR90","digtron_marker_side.png^[transformR90"}, + collisionbox = {-0.55, -0.55, -0.55, 0.55, 0.55, 0.55}, + physical = false, + }, + + on_activate = function(self, staticdata) + minetest.after(5.0, + function(self) + self.object:remove() + end, + self) + end, + + on_rightclick=function(self, clicker) + self.object:remove() + end, + + on_punch = function(self, hitter) + self.object:remove() + end, +}) |