aboutsummaryrefslogtreecommitdiff
path: root/games/devtest/mods/testentities/visuals.lua
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2020-07-18 13:53:15 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2020-07-18 13:53:15 +0200
commitffe3c2ae0db6fed0f2b08b71bfa69f3d3df3bb1f (patch)
treecc7d9f74a43215c5d8e3965a2bfc2aea5867a7a0 /games/devtest/mods/testentities/visuals.lua
parent45aa2516b2fc675df7049bc9ed713600c95b6423 (diff)
parent82731d0d3d8bfe9e56f89466991f13c037f3a61e (diff)
downloaddragonfireclient-ffe3c2ae0db6fed0f2b08b71bfa69f3d3df3bb1f.tar.xz
Update to minetest 5.4.0-dev
Diffstat (limited to 'games/devtest/mods/testentities/visuals.lua')
-rw-r--r--games/devtest/mods/testentities/visuals.lua84
1 files changed, 84 insertions, 0 deletions
diff --git a/games/devtest/mods/testentities/visuals.lua b/games/devtest/mods/testentities/visuals.lua
new file mode 100644
index 000000000..83f361f16
--- /dev/null
+++ b/games/devtest/mods/testentities/visuals.lua
@@ -0,0 +1,84 @@
+-- Minimal test entities to test visuals
+
+minetest.register_entity("testentities:sprite", {
+ initial_properties = {
+ visual = "sprite",
+ textures = { "testentities_sprite.png" },
+ },
+})
+
+minetest.register_entity("testentities:upright_sprite", {
+ initial_properties = {
+ visual = "upright_sprite",
+ textures = {
+ "testentities_upright_sprite1.png",
+ "testentities_upright_sprite2.png",
+ },
+ },
+})
+
+minetest.register_entity("testentities:cube", {
+ initial_properties = {
+ visual = "cube",
+ textures = {
+ "testentities_cube1.png",
+ "testentities_cube2.png",
+ "testentities_cube3.png",
+ "testentities_cube4.png",
+ "testentities_cube5.png",
+ "testentities_cube6.png",
+ },
+ },
+})
+
+minetest.register_entity("testentities:item", {
+ initial_properties = {
+ visual = "item",
+ wield_item = "testnodes:normal",
+ },
+})
+
+minetest.register_entity("testentities:wielditem", {
+ initial_properties = {
+ visual = "wielditem",
+ wield_item = "testnodes:normal",
+ },
+})
+
+minetest.register_entity("testentities:mesh", {
+ initial_properties = {
+ visual = "mesh",
+ mesh = "testnodes_pyramid.obj",
+ textures = {
+ "testnodes_mesh_stripes2.png"
+ },
+ },
+})
+
+minetest.register_entity("testentities:mesh_unshaded", {
+ initial_properties = {
+ visual = "mesh",
+ mesh = "testnodes_pyramid.obj",
+ textures = {
+ "testnodes_mesh_stripes2.png"
+ },
+ shaded = false,
+ },
+})
+
+-- Advanced visual tests
+
+-- A test entity for testing animated and yaw-modulated sprites
+minetest.register_entity("testentities:yawsprite", {
+ initial_properties = {
+ selectionbox = {-0.3, -0.5, -0.3, 0.3, 0.3, 0.3},
+ visual = "sprite",
+ visual_size = {x=0.6666, y=1},
+ textures = {"testentities_dungeon_master.png^[makealpha:128,0,0^[makealpha:128,128,0"},
+ spritediv = {x=6, y=5},
+ initial_sprite_basepos = {x=0, y=0},
+ },
+ on_activate = function(self, staticdata)
+ self.object:set_sprite({x=0, y=0}, 1, 0, true)
+ end,
+})