Bed Texture......
6
api.lua
|
@ -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
|
|
@ -1,6 +1,7 @@
|
|||
working_villages.herbs={
|
||||
groups = {
|
||||
"flora",
|
||||
"leaves"
|
||||
},
|
||||
names = {
|
||||
"default:apple",
|
||||
|
|
11
register.lua
|
@ -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",
|
||||
})
|
||||
|
|
After Width: | Height: | Size: 893 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 1.7 KiB |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.0 KiB |