random color of amoguses

This commit is contained in:
Kacper Kostka 2023-01-29 08:25:10 +01:00
parent 2b97c8ba4a
commit 8ecc69cea0
4 changed files with 37 additions and 7 deletions

View File

@ -29,17 +29,41 @@ minetest.register_node("amogus_blocks:tv", {
})
minetest.register_node("amogus_blocks:bricks", {
description = "Bricks",
description = "Red Bricks",
tiles = {"Bricks.png"},
drop = 'amogus_blocks:grey_bricks', groups = {stone=3},
drop = 'amogus_blocks:bricks', groups = {stone=3},
})
minetest.register_node("amogus_blocks:grey_bricks", {
description = "Bricks 2",
description = "Bricks",
tiles = {"Bricks2.png"}, groups = {stone=3},
drop = 'amogus_blocks:grey_bricks',
})
minetest.register_node("amogus_blocks:blue_bricks", {
description = "Bricks",
tiles = {"Bricks_blue.png"}, groups = {stone=3},
drop = 'amogus_blocks:blue_bricks',
})
minetest.register_node("amogus_blocks:yellow_bricks", {
description = "Bricks",
tiles = {"Bricks_yellow.png"}, groups = {stone=3},
drop = 'amogus_blocks:yellow_bricks',
})
minetest.register_node("amogus_blocks:green_bricks", {
description = "Bricks",
tiles = {"Bricks_green.png"}, groups = {stone=3},
drop = 'amogus_blocks:green_bricks',
})
minetest.register_node("amogus_blocks:purple_bricks", {
description = "Bricks",
tiles = {"Bricks_purple.png"}, groups = {stone=3},
drop = 'amogus_blocks:purple_bricks',
})
minetest.register_node("amogus_blocks:planks", {
description = "Planks",
tiles = {"Planks.png"},
@ -268,6 +292,7 @@ minetest.register_node("amogus_blocks:stone", {
},
--sounds = default.node_sound_stone_defaults(),
groups = {stone = 3},
})

View File

@ -1,6 +1,10 @@
-- create a random number from 0 to 3
local textures_b = {
"amogus_entity.png",
"amogus_entity_b.png",
"amogus_entity_g.png",
"amogus_entity_br.png"
}
local entity = {
physical = true,
collisionbox = {-0.5, 0, -0.5, 0.5, 1, 0.5},
@ -9,7 +13,6 @@ local entity = {
visual_size = {x=10, y=10, z=10},
mesh = "amogus_entity.obj",
textures = {"amogus_entity.png",},
on_rightclick = function(self, clicker)
minetest.chat_send_player(clicker:get_player_name(), "WHY ARE YOU SUCH SUSSY BAKA?")
end,
@ -36,6 +39,8 @@ local entity = {
last_y_velocity = 0,
on_activate = function(self, staticdata)
local texture = textures_b[math.random(#textures_b)]
self.object:set_properties({textures = {texture}})
self.object:set_yaw(math.random() * 2 * math.pi)
self.rotation_direction = math.random(-1, 1)
self.min_max_jump_force_diff = self.max_jump_force - self.min_jump_force

View File

Before

Width:  |  Height:  |  Size: 614 B

After

Width:  |  Height:  |  Size: 614 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 430 B

After

Width:  |  Height:  |  Size: 432 B