aboutsummaryrefslogtreecommitdiff
path: root/games/minimal/mods/default/textures/default_fence.png
diff options
context:
space:
mode:
authorChristian Haug <christian@metaboks.org>2016-10-25 21:36:29 +0000
committerest31 <MTest31@outlook.com>2016-12-14 00:27:19 +0100
commit289cf93d4b469e3f1883d400a0d63e7cf287d4a7 (patch)
tree6e19485ff24d57bc69f9cfc6f16b02323c3f1b93 /games/minimal/mods/default/textures/default_fence.png
parentef4eb46b617d7602ef9aa91e777fd3a03cd6bd73 (diff)
downloadminetest-289cf93d4b469e3f1883d400a0d63e7cf287d4a7.tar.gz
minetest-289cf93d4b469e3f1883d400a0d63e7cf287d4a7.tar.bz2
minetest-289cf93d4b469e3f1883d400a0d63e7cf287d4a7.zip
Translated using Weblate (Norwegian Bokmål)
Currently translated at 1.5% (14 of 918 strings)
Diffstat (limited to 'games/minimal/mods/default/textures/default_fence.png')
0 files changed, 0 insertions, 0 deletions
#n133'>133 134 135 136 137
-- 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

-- An 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}, 3, 0.5, true)
	end,
})

-- An entity for testing animated upright sprites
minetest.register_entity("testentities:upright_animated", {
	initial_properties = {
		visual = "upright_sprite",
		textures = {"testnodes_anim.png"},
		spritediv = {x = 1, y = 4},
	},
	on_activate = function(self)
		self.object:set_sprite({x=0, y=0}, 4, 1.0, false)
	end,
})

minetest.register_entity("testentities:nametag", {
	initial_properties = {
		visual = "sprite",
		textures = { "testentities_sprite.png" },
	},

	on_activate = function(self, staticdata)
		if staticdata ~= "" then
			local data = minetest.deserialize(staticdata)
			self.color = data.color
			self.bgcolor = data.bgcolor
		else
			self.color = {
				r = math.random(0, 255),
				g = math.random(0, 255),
				b = math.random(0, 255),
			}

			if math.random(0, 10) > 5 then
				self.bgcolor = {
					r = math.random(0, 255),
					g = math.random(0, 255),
					b = math.random(0, 255),
					a = math.random(0, 255),
				}
			end
		end

		assert(self.color)
		self.object:set_properties({
			nametag = tostring(math.random(1000, 10000)),
			nametag_color = self.color,
			nametag_bgcolor = self.bgcolor,
		})
	end,

	get_staticdata = function(self)
		return minetest.serialize({ color = self.color, bgcolor = self.bgcolor })
	end,
})