Bed Texture......

master
wzy2006 2020-04-23 15:36:05 +08:00
parent 6d0a4eb07e
commit 6f73ce9e76
11 changed files with 11 additions and 7 deletions

View File

@ -851,3 +851,9 @@ function working_villages.register_villager(product_name, def)
product_name = product_name,
})
end
function working_villages.random_texture(...)
math.randomseed(os.time())
local args = { ... }
return args[math.random(1, #args)]
-- body
end

View File

@ -1,6 +1,7 @@
working_villages.herbs={
groups = {
"flora",
"leaves"
},
names = {
"default:apple",

View File

@ -2,16 +2,13 @@ working_villages.register_villager("working_villages:villager_male", {
hp_max = 30,
weight = 20,
mesh = "character.b3d",
textures = {"villager_male.png"},
textures = {working_villages.random_texture("villager_male.png")},
egg_image = "villager_male_egg.png",
})
local product_name = "working_villages:villager_female"
local texture_name = "villager_female.png"
local egg_img_name = "villager_female_egg.png"
working_villages.register_villager(product_name, {
working_villages.register_villager("working_villages:villager_female", {
hp_max = 20,
weight = 20,
mesh = "character.b3d",
textures = {texture_name},
egg_image = egg_img_name,
textures = {working_villages.random_texture("villager_female.png","character_castaway_female.png","character_farmer_female.png","character_princess.png", "character_rogue_female.png")},
egg_image = "villager_female_egg.png",
})

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB