mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-11-22 10:31:06 +01:00
Convert old mob to the new stalker
This commit is contained in:
parent
0dcf38094c
commit
22b6c25458
2 changed files with 39 additions and 3 deletions
|
@ -11,7 +11,7 @@ local function get_texture(self)
|
|||
local on_name = self.standing_on
|
||||
local texture
|
||||
local texture_suff = ""
|
||||
if on_name ~= "air" then
|
||||
if on_name and on_name ~= "air" then
|
||||
local tiles = minetest.registered_nodes[on_name].tiles
|
||||
if tiles then
|
||||
local tile = tiles[1]
|
||||
|
@ -64,7 +64,7 @@ mcl_mobs.register_mob("mobs_mc:stalker", {
|
|||
head_eye_height = 1.8;
|
||||
curiosity = 2,
|
||||
textures = {
|
||||
{"([combine:16x24:0,0=vl_stalker_default.png:0,16=vl_stalker_default.png)^vl_mobs_stalker_overlay.png",
|
||||
{get_texture({}),
|
||||
"mobs_mc_empty.png"},
|
||||
},
|
||||
visual_size = {x=2, y=2},
|
||||
|
@ -185,7 +185,7 @@ mcl_mobs.register_mob("mobs_mc:stalker_charged", {
|
|||
--BOOM
|
||||
|
||||
textures = {
|
||||
{"([combine:16x24:0,0=vl_stalker_default.png:0,16=vl_stalker_default.png)^vl_mobs_stalker_overlay.png",
|
||||
{get_texture({}),
|
||||
"vl_stalker_charge.png"},
|
||||
},
|
||||
use_texture_alpha = true,
|
||||
|
@ -296,6 +296,36 @@ mcl_mobs.register_mob("mobs_mc:stalker_charged", {
|
|||
glow = 3,
|
||||
})
|
||||
|
||||
-- compat
|
||||
minetest.register_entity("mobs_mc:creeper", {
|
||||
on_activate = function(self, staticdata, dtime)
|
||||
local obj = minetest.add_entity(self.object:get_pos(), "mobs_mc:stalker", staticdata)
|
||||
obj:set_properties({
|
||||
visual_size = {x=2, y=2},
|
||||
mesh = "vl_stalker.b3d",
|
||||
textures = {
|
||||
{get_texture({}),
|
||||
"mobs_mc_empty.png"},
|
||||
},
|
||||
})
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
minetest.register_entity("mobs_mc:creeper_charged", {
|
||||
on_activate = function(self, staticdata, dtime)
|
||||
local obj = minetest.add_entity(self.object:get_pos(), "mobs_mc:stalker_charged", staticdata)
|
||||
obj:set_properties({
|
||||
visual_size = {x=2, y=2},
|
||||
mesh = "vl_stalker.b3d",
|
||||
textures = {
|
||||
{get_texture({}),
|
||||
"vl_stalker_charge.png"},
|
||||
},
|
||||
})
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
|
||||
mcl_mobs:spawn_specific(
|
||||
"mobs_mc:stalker",
|
||||
"overworld",
|
||||
|
@ -446,3 +476,4 @@ mcl_vars.mg_overworld_max)
|
|||
|
||||
-- spawn eggs
|
||||
mcl_mobs.register_egg("mobs_mc:stalker", S("Stalker"), "#0da70a", "#000000", 0)
|
||||
minetest.register_alias("mobs_mc:creeper", "mobs_mc:stalker")
|
||||
|
|
|
@ -497,6 +497,11 @@ mcl_mobs.register_mob("mobs_mc:rover", {
|
|||
minetest.register_entity("mobs_mc:enderman", {
|
||||
on_activate = function(self, staticdata, dtime)
|
||||
minetest.add_entity(self.object:get_pos(), "mobs_mc:rover", staticdata)
|
||||
obj:set_properties({
|
||||
mesh = "vl_rover.b3d",
|
||||
textures = { "vl_mobs_rover.png^vl_mobs_rover_face.png" },
|
||||
visual_size = {x=10, y=10},
|
||||
})
|
||||
self.object:remove()
|
||||
end,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue