Update things
50
init.lua
|
@ -9,6 +9,7 @@ minetest.register_entity("tardis:lamp", {
|
||||||
physical = false,
|
physical = false,
|
||||||
visual = "sprite",
|
visual = "sprite",
|
||||||
visual_size = {x=1, y=1},
|
visual_size = {x=1, y=1},
|
||||||
|
use_texture_alpha = true,
|
||||||
textures = {"tardis_lamp.png"},
|
textures = {"tardis_lamp.png"},
|
||||||
glow = 14,
|
glow = 14,
|
||||||
})
|
})
|
||||||
|
@ -22,6 +23,7 @@ minetest.register_entity("tardis:tardis", {
|
||||||
mesh = "tardis_exterior.obj",
|
mesh = "tardis_exterior.obj",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = true,
|
||||||
textures = {"(tardis_exterior.png)"},
|
textures = {"(tardis_exterior.png)"},
|
||||||
|
backface_culling = true,
|
||||||
|
|
||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
self.object:set_acceleration({x=0, y=-gravity, z=0})
|
self.object:set_acceleration({x=0, y=-gravity, z=0})
|
||||||
|
@ -35,7 +37,7 @@ minetest.register_entity("tardis:tardis", {
|
||||||
alpha = math.floor(tonumber(alpha))
|
alpha = math.floor(tonumber(alpha))
|
||||||
local tex = self.object:get_properties().textures
|
local tex = self.object:get_properties().textures
|
||||||
local base = tex[1]:match("%(.*%)")
|
local base = tex[1]:match("%(.*%)")
|
||||||
local mod = "^[resize:1000x1000^[mask:tardis_transparent_".. string.format("%04d", alpha) .. ".png"
|
local mod = "^[opacity:" .. alpha
|
||||||
if alpha >= 255 then
|
if alpha >= 255 then
|
||||||
tex[1] = base
|
tex[1] = base
|
||||||
elseif alpha <= 0 then
|
elseif alpha <= 0 then
|
||||||
|
@ -79,41 +81,20 @@ minetest.register_entity("tardis:tardis", {
|
||||||
self:set_alpha(0)
|
self:set_alpha(0)
|
||||||
minetest.after(12, self.fade, self, 0, 2, 0.04)
|
minetest.after(12, self.fade, self, 0, 2, 0.04)
|
||||||
|
|
||||||
-- 1st
|
|
||||||
minetest.after(11, function(self)
|
for i=11,18 do
|
||||||
self:lamp(true)
|
minetest.after(i, function(self, i)
|
||||||
minetest.after(1, function(self)
|
if i%2 == 0 then
|
||||||
self:lamp(false)
|
self:lamp(false)
|
||||||
-- 2nd
|
else
|
||||||
minetest.after(1, function(self)
|
|
||||||
self:lamp(true)
|
self:lamp(true)
|
||||||
minetest.after(1, function(self)
|
end
|
||||||
self:lamp(false)
|
end, self, i)
|
||||||
-- 3rd
|
end
|
||||||
minetest.after(1, function(self)
|
|
||||||
self:lamp(true)
|
minetest.after(18.5, function(self)
|
||||||
minetest.after(1, function(self)
|
self:lamp(false)
|
||||||
self:lamp(false)
|
|
||||||
-- 4th
|
|
||||||
minetest.after(1, function(self)
|
|
||||||
self:lamp(true)
|
|
||||||
minetest.after(1, function(self)
|
|
||||||
self:lamp(false)
|
|
||||||
-- 5th
|
|
||||||
minetest.after(0.5, function(self)
|
|
||||||
self:lamp(true)
|
|
||||||
minetest.after(1, function(self)
|
|
||||||
self:lamp(false)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
end, self)
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
end, self)
|
|
||||||
|
|
||||||
minetest.sound_play("tardis_remat", {
|
minetest.sound_play("tardis_remat", {
|
||||||
pos = self.object:get_pos(),
|
pos = self.object:get_pos(),
|
||||||
|
@ -127,4 +108,3 @@ minetest.register_entity("tardis:tardis", {
|
||||||
self:remat()
|
self:remat()
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Before Width: | Height: | Size: 150 B |
|
@ -1,2 +0,0 @@
|
||||||
convert tardis_lamp.png \
|
|
||||||
-channel A -ordered-dither o8x8 tardis_lamp.png
|
|
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 8.7 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 23 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 24 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 29 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 30 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 35 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 45 KiB |