]> git.lizzy.rs Git - dragonfireclient.git/blob - games/devtest/mods/testentities/visuals.lua
Rename “Minimal development test” to “Development Test” (#9928)
[dragonfireclient.git] / games / devtest / mods / testentities / visuals.lua
1 -- Minimal test entities to test visuals
2
3 minetest.register_entity("testentities:sprite", {
4         initial_properties = {
5                 visual = "sprite",
6                 textures = { "testentities_sprite.png" },
7         },
8 })
9
10 minetest.register_entity("testentities:upright_sprite", {
11         initial_properties = {
12                 visual = "upright_sprite",
13                 textures = {
14                         "testentities_upright_sprite1.png",
15                         "testentities_upright_sprite2.png",
16                 },
17         },
18 })
19
20 minetest.register_entity("testentities:cube", {
21         initial_properties = {
22                 visual = "cube",
23                 textures = {
24                         "testentities_cube1.png",
25                         "testentities_cube2.png",
26                         "testentities_cube3.png",
27                         "testentities_cube4.png",
28                         "testentities_cube5.png",
29                         "testentities_cube6.png",
30                 },
31         },
32 })
33
34 minetest.register_entity("testentities:item", {
35         initial_properties = {
36                 visual = "item",
37                 wield_item = "testnodes:normal",
38         },
39 })
40
41 minetest.register_entity("testentities:wielditem", {
42         initial_properties = {
43                 visual = "wielditem",
44                 wield_item = "testnodes:normal",
45         },
46 })
47
48 minetest.register_entity("testentities:mesh", {
49         initial_properties = {
50                 visual = "mesh",
51                 mesh = "testnodes_pyramid.obj",
52                 textures = {
53                         "testnodes_mesh_stripes2.png"
54                 },
55         },
56 })
57
58 -- Advanced visual tests
59
60 -- A test entity for testing animated and yaw-modulated sprites
61 minetest.register_entity("testentities:yawsprite", {
62         initial_properties = {
63                 selectionbox = {-0.3, -0.5, -0.3, 0.3, 0.3, 0.3},
64                 visual = "sprite",
65                 visual_size = {x=0.6666, y=1},
66                 textures = {"testentities_dungeon_master.png^[makealpha:128,0,0^[makealpha:128,128,0"},
67                 spritediv = {x=6, y=5},
68                 initial_sprite_basepos = {x=0, y=0},
69                 on_activate = function(self, staticdata)
70                         self.object:set_sprite({x=0, y=0}, 1, 0, true)
71                 end,
72         },
73 })
74