Cleanup deprecation warnings
This commit is contained in:
parent
d41d8e042b
commit
49a7451781
110
api.lua
110
api.lua
@ -57,21 +57,21 @@ function vehicles.object_attach(entity, player, attach_at, visible, eye_offset)
|
|||||||
minetest.after(0.2, function()
|
minetest.after(0.2, function()
|
||||||
player_api.set_animation(player, "sit" , 30)
|
player_api.set_animation(player, "sit" , 30)
|
||||||
end)
|
end)
|
||||||
entity.object:setyaw(player:get_look_yaw() - math.pi / 2)
|
entity.object:set_yaw(player:get_look_horizontal())
|
||||||
end
|
end
|
||||||
|
|
||||||
function vehicles.object_detach(entity, player, offset)
|
function vehicles.object_detach(entity, player, offset)
|
||||||
entity.driver = nil
|
entity.driver = nil
|
||||||
entity.object:setvelocity({x=0, y=0, z=0})
|
entity.object:set_velocity({x=0, y=0, z=0})
|
||||||
player:set_detach()
|
player:set_detach()
|
||||||
player_api.player_attached[player:get_player_name()] = false
|
player_api.player_attached[player:get_player_name()] = false
|
||||||
player_api.set_animation(player, "stand" , 30)
|
player_api.set_animation(player, "stand" , 30)
|
||||||
player:set_properties({visual_size = {x=1, y=1}})
|
player:set_properties({visual_size = {x=1, y=1}})
|
||||||
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
player:set_eye_offset({x=0, y=0, z=0}, {x=0, y=0, z=0})
|
||||||
local pos = player:getpos()
|
local pos = player:get_pos()
|
||||||
pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z}
|
pos = {x = pos.x + offset.x, y = pos.y + 0.2 + offset.y, z = pos.z + offset.z}
|
||||||
minetest.after(0.1, function()
|
minetest.after(0.1, function()
|
||||||
player:setpos(pos)
|
player:set_pos(pos)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -145,9 +145,9 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
local shoot_anim2 = def.shoot_anim2 or nil
|
local shoot_anim2 = def.shoot_anim2 or nil
|
||||||
|
|
||||||
--variables
|
--variables
|
||||||
local velo = entity.object:getvelocity()
|
local velo = entity.object:get_velocity()
|
||||||
local vec_stop = {x=velo.x*decell,y=velo.y+1*-2,z=velo.z*decell}
|
local vec_stop = {x=velo.x*decell,y=velo.y+1*-2,z=velo.z*decell}
|
||||||
local pos = entity.object:getpos()
|
local pos = entity.object:get_pos()
|
||||||
local node = minetest.get_node(pos).name
|
local node = minetest.get_node(pos).name
|
||||||
local node_under = minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z})
|
local node_under = minetest.get_node({x=pos.x, y=pos.y+2, z=pos.z})
|
||||||
local accell = 1
|
local accell = 1
|
||||||
@ -172,13 +172,13 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
or is_water(node_under.name)
|
or is_water(node_under.name)
|
||||||
|
|
||||||
local function is_watercraft_and_in_water()
|
local function is_watercraft_and_in_water()
|
||||||
entity.object:setvelocity({x=velo.x*0.9, y=math.min(2, velo.y+0.5), z=velo.z*0.9})
|
entity.object:set_velocity({x=velo.x*0.9, y=math.min(2, velo.y+0.5), z=velo.z*0.9})
|
||||||
end
|
end
|
||||||
local function is_watercraft_and_not_on_water()
|
local function is_watercraft_and_not_on_water()
|
||||||
entity.object:setvelocity(vec_stop)
|
entity.object:set_velocity(vec_stop)
|
||||||
end
|
end
|
||||||
local function not_watercraft_and_on_or_in_water()
|
local function not_watercraft_and_on_or_in_water()
|
||||||
entity.object:setvelocity({x=velo.x*0.9, y=-1, z=velo.z*0.9})
|
entity.object:set_velocity({x=velo.x*0.9, y=-1, z=velo.z*0.9})
|
||||||
end
|
end
|
||||||
|
|
||||||
if not entity.driver then
|
if not entity.driver then
|
||||||
@ -191,7 +191,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
not_watercraft_and_on_or_in_water()
|
not_watercraft_and_on_or_in_water()
|
||||||
else
|
else
|
||||||
--stop
|
--stop
|
||||||
entity.object:setvelocity(vec_stop)
|
entity.object:set_velocity(vec_stop)
|
||||||
--animation
|
--animation
|
||||||
if moving_anim ~= nil and entity.moving and not hovering then
|
if moving_anim ~= nil and entity.moving and not hovering then
|
||||||
entity.object:set_animation(stand_anim, 20, 0)
|
entity.object:set_animation(stand_anim, 20, 0)
|
||||||
@ -203,7 +203,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
local ctrl = entity.driver:get_player_control()
|
local ctrl = entity.driver:get_player_control()
|
||||||
local dir = entity.driver:get_look_dir()
|
local dir = entity.driver:get_look_dir()
|
||||||
local vec_backward = {x=-dir.x*speed/4,y=velo.y+1*-2,z=-dir.z*speed/4}
|
local vec_backward = {x=-dir.x*speed/4,y=velo.y+1*-2,z=-dir.z*speed/4}
|
||||||
local yaw = entity.driver:get_look_yaw()
|
local yaw = entity.driver:get_look_horizontal()
|
||||||
local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(entity.driver:get_player_name())
|
local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(entity.driver:get_player_name())
|
||||||
|
|
||||||
--dummy variables
|
--dummy variables
|
||||||
@ -313,20 +313,20 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
|
|
||||||
|
|
||||||
--face the right way
|
--face the right way
|
||||||
local target_yaw = yaw+math.pi+math.pi/2+extra_yaw
|
local target_yaw = yaw+extra_yaw
|
||||||
local entity_yaw = entity.object:getyaw()
|
local entity_yaw = entity.object:get_yaw()
|
||||||
local change_yaw = (((target_yaw-entity_yaw+math.pi)%(math.pi*2))-math.pi)/
|
local change_yaw = (((target_yaw-entity_yaw+math.pi)%(math.pi*2))-math.pi)/
|
||||||
(turning_factor*absolute_speed+1)
|
(turning_factor*absolute_speed+1)
|
||||||
if entity_yaw ~= target_yaw and not uses_arrow_keys then
|
if entity_yaw ~= target_yaw and not uses_arrow_keys then
|
||||||
entity.object:setyaw(entity_yaw+change_yaw)
|
entity.object:set_yaw(entity_yaw+change_yaw)
|
||||||
dir.x = -math.sin(entity_yaw)
|
dir.x = -math.sin(entity_yaw)
|
||||||
dir.z = math.cos(entity_yaw)
|
dir.z = math.cos(entity_yaw)
|
||||||
else
|
else
|
||||||
if ctrl.left then
|
if ctrl.left then
|
||||||
entity.object:setyaw(entity_yaw+(math.pi/360)*absolute_speed/2)
|
entity.object:set_yaw(entity_yaw+(math.pi/360)*absolute_speed/2)
|
||||||
end
|
end
|
||||||
if ctrl.right then
|
if ctrl.right then
|
||||||
entity.object:setyaw(entity_yaw-(math.pi/360)*absolute_speed/2)
|
entity.object:set_yaw(entity_yaw-(math.pi/360)*absolute_speed/2)
|
||||||
end
|
end
|
||||||
dir.x = -math.sin(entity_yaw)
|
dir.x = -math.sin(entity_yaw)
|
||||||
dir.z = math.cos(entity_yaw)
|
dir.z = math.cos(entity_yaw)
|
||||||
@ -347,7 +347,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
velo2 = velo
|
velo2 = velo
|
||||||
end
|
end
|
||||||
local effect_pos = {x=pos.x-dir.x*2, y=pos.y, z=pos.z-dir.z*2}
|
local effect_pos = {x=pos.x-dir.x*2, y=pos.y, z=pos.z-dir.z*2}
|
||||||
entity.object:setvelocity({x=velo2.x*(0.95), y=velo.y, z=velo2.z*(0.95)})
|
entity.object:set_velocity({x=velo2.x*(0.95), y=velo.y, z=velo2.z*(0.95)})
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
4, --amount
|
4, --amount
|
||||||
0.5, --time
|
0.5, --time
|
||||||
@ -370,7 +370,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
|
|
||||||
--boost
|
--boost
|
||||||
elseif ctrl.up and not shoots2 and ctrl.aux1 and entity.boost then
|
elseif ctrl.up and not shoots2 and ctrl.aux1 and entity.boost then
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+8*dir.x,
|
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+8*dir.x,
|
||||||
y=velo.y-gravity/2,
|
y=velo.y-gravity/2,
|
||||||
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+8*dir.z})
|
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+8*dir.z})
|
||||||
@ -403,7 +403,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
end
|
end
|
||||||
--rise
|
--rise
|
||||||
elseif ctrl.jump and fly and fly_mode == "rise" then
|
elseif ctrl.jump and fly and fly_mode == "rise" then
|
||||||
entity.object:setvelocity(vec_rise)
|
entity.object:set_velocity(vec_rise)
|
||||||
--lib_mount animation
|
--lib_mount animation
|
||||||
if moving_anim ~= nil and not entity.moving then
|
if moving_anim ~= nil and not entity.moving then
|
||||||
entity.object:set_animation(moving_anim, anim_speed, 0)
|
entity.object:set_animation(moving_anim, anim_speed, 0)
|
||||||
@ -411,21 +411,21 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
end
|
end
|
||||||
--hover in place
|
--hover in place
|
||||||
elseif ctrl.jump and ctrl.up and fly and fly_mode == "hold" then
|
elseif ctrl.jump and ctrl.up and fly and fly_mode == "hold" then
|
||||||
entity.object:setvelocity({x=dir.x*speed, y=0, z=dir.z*speed})
|
entity.object:set_velocity({x=dir.x*speed, y=0, z=dir.z*speed})
|
||||||
--move forward
|
--move forward
|
||||||
elseif ctrl.up and not fixed then
|
elseif ctrl.up and not fixed then
|
||||||
if not fly and not is_watercraft then
|
if not fly and not is_watercraft then
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=(dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x)/(braking*(0.1)+1),
|
x=(dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x)/(braking*(0.1)+1),
|
||||||
y=velo.y-0.5,
|
y=velo.y-0.5,
|
||||||
z=(dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z)/(braking*(0.1)+1)})
|
z=(dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z)/(braking*(0.1)+1)})
|
||||||
elseif not fly then
|
elseif not fly then
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x,
|
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x,
|
||||||
y=0,
|
y=0,
|
||||||
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z})
|
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z})
|
||||||
else
|
else
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x,
|
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x,
|
||||||
y=dir.y*(speed*0.2)*math.log(vtimer+0.5)+4*dir.y+1,
|
y=dir.y*(speed*0.2)*math.log(vtimer+0.5)+4*dir.y+1,
|
||||||
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z})
|
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z})
|
||||||
@ -444,7 +444,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
velo2 = velo
|
velo2 = velo
|
||||||
end
|
end
|
||||||
local effect_pos = {x=pos.x-dir.x*2, y=pos.y, z=pos.z-dir.z*2}
|
local effect_pos = {x=pos.x-dir.x*2, y=pos.y, z=pos.z-dir.z*2}
|
||||||
entity.object:setvelocity({x=velo2.x*(0.95), y=velo.y, z=velo2.z*(0.95)})
|
entity.object:set_velocity({x=velo2.x*(0.95), y=velo.y, z=velo2.z*(0.95)})
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
4, --amount
|
4, --amount
|
||||||
0.5, --time
|
0.5, --time
|
||||||
@ -465,7 +465,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
vtimer = vtimer-vtimer/10
|
vtimer = vtimer-vtimer/10
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=-dir.x*(speed/4)*accell,
|
x=-dir.x*(speed/4)*accell,
|
||||||
y=velo.y-0.5,
|
y=velo.y-0.5,
|
||||||
z=-dir.z*(speed/4)*accell})
|
z=-dir.z*(speed/4)*accell})
|
||||||
@ -477,7 +477,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
velo2 = velo
|
velo2 = velo
|
||||||
end
|
end
|
||||||
local effect_pos = {x=pos.x-dir.x*2, y=pos.y, z=pos.z-dir.z*2}
|
local effect_pos = {x=pos.x-dir.x*2, y=pos.y, z=pos.z-dir.z*2}
|
||||||
entity.object:setvelocity({x=velo2.x*(0.95), y=velo.y, z=velo2.z*(0.95)})
|
entity.object:set_velocity({x=velo2.x*(0.95), y=velo.y, z=velo2.z*(0.95)})
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
4, --amount
|
4, --amount
|
||||||
0.5, --time
|
0.5, --time
|
||||||
@ -498,7 +498,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
vtimer = vtimer-vtimer/10
|
vtimer = vtimer-vtimer/10
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
entity.object:setvelocity({x=-dir.x*(speed/4)*accell,y=0,z=-dir.z*(speed/4)*accell})
|
entity.object:set_velocity({x=-dir.x*(speed/4)*accell,y=0,z=-dir.z*(speed/4)*accell})
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
--animation
|
--animation
|
||||||
@ -508,7 +508,7 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
end
|
end
|
||||||
--stop
|
--stop
|
||||||
elseif not ctrl.down or ctrl.up then
|
elseif not ctrl.down or ctrl.up then
|
||||||
entity.object:setvelocity({x=velo.x*decell,y=velo.y-gravity,z=velo.z*decell})
|
entity.object:set_velocity({x=velo.x*decell,y=velo.y-gravity,z=velo.z*decell})
|
||||||
--animation
|
--animation
|
||||||
if moving_anim ~= nil and entity.moving and not hovering then
|
if moving_anim ~= nil and entity.moving and not hovering then
|
||||||
entity.object:set_animation(stand_anim, anim_speed, 0)
|
entity.object:set_animation(stand_anim, anim_speed, 0)
|
||||||
@ -520,10 +520,10 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
if inv:contains_item("main", arrow.."_item") or infinite_arrow then
|
if inv:contains_item("main", arrow.."_item") or infinite_arrow then
|
||||||
if not creative_mode then inv:remove_item("main", arrow.."_item") end
|
if not creative_mode then inv:remove_item("main", arrow.."_item") end
|
||||||
entity.loaded = false
|
entity.loaded = false
|
||||||
local obj = minetest.env:add_entity({x=pos.x+0+dir.x*2,y=pos.y+shoot_y+dir.y,z=pos.z+0+dir.z*2}, arrow)
|
local obj = minetest.add_entity({x=pos.x+0+dir.x*2,y=pos.y+shoot_y+dir.y,z=pos.z+0+dir.z*2}, arrow)
|
||||||
local vec = {x=dir.x*14,y=dir.y*14+shoot_angle,z=dir.z*14}
|
local vec = {x=dir.x*14,y=dir.y*14+shoot_angle,z=dir.z*14}
|
||||||
obj:setyaw(yaw+math.pi/2+extra_yaw)
|
obj:set_yaw(yaw+math.pi/2+extra_yaw)
|
||||||
obj:setvelocity(vec)
|
obj:set_velocity(vec)
|
||||||
local object = obj:get_luaentity()
|
local object = obj:get_luaentity()
|
||||||
object.launcher = entity.driver
|
object.launcher = entity.driver
|
||||||
object.vehicle = entity.object
|
object.vehicle = entity.object
|
||||||
@ -544,10 +544,10 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
if inv:contains_item("main", arrow2.."_item") or infinite_arrow2 then
|
if inv:contains_item("main", arrow2.."_item") or infinite_arrow2 then
|
||||||
if not creative_mode then inv:remove_item("main", arrow2.."_item") end
|
if not creative_mode then inv:remove_item("main", arrow2.."_item") end
|
||||||
entity.loaded2 = false
|
entity.loaded2 = false
|
||||||
local obj = minetest.env:add_entity({x=pos.x+0+dir.x*2,y=pos.y+shoot_y2+dir.y,z=pos.z+0+dir.z*2}, arrow2)
|
local obj = minetest.add_entity({x=pos.x+0+dir.x*2,y=pos.y+shoot_y2+dir.y,z=pos.z+0+dir.z*2}, arrow2)
|
||||||
local vec = {x=dir.x*20,y=dir.y*20+shoot_angle,z=dir.z*20}
|
local vec = {x=dir.x*20,y=dir.y*20+shoot_angle,z=dir.z*20}
|
||||||
obj:setyaw(yaw+math.pi/2+extra_yaw)
|
obj:set_yaw(yaw+math.pi/2+extra_yaw)
|
||||||
obj:setvelocity(vec)
|
obj:set_velocity(vec)
|
||||||
local object = obj:get_luaentity()
|
local object = obj:get_luaentity()
|
||||||
object.launcher = entity.driver
|
object.launcher = entity.driver
|
||||||
object.vehicle = entity.object
|
object.vehicle = entity.object
|
||||||
@ -567,9 +567,9 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
if jump == "hover" and ctrl.jump and not entity.jumpcharge then
|
if jump == "hover" and ctrl.jump and not entity.jumpcharge then
|
||||||
if not ctrl.up then
|
if not ctrl.up then
|
||||||
local vec_hover = {x=velo.x+0,y=hover_speed,z=velo.z+0}
|
local vec_hover = {x=velo.x+0,y=hover_speed,z=velo.z+0}
|
||||||
entity.object:setvelocity(vec_hover)
|
entity.object:set_velocity(vec_hover)
|
||||||
else
|
else
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x,
|
x=dir.x*(speed*0.2)*math.log(vtimer+0.5)+4*dir.x,
|
||||||
y=hover_speed,
|
y=hover_speed,
|
||||||
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z})
|
z=dir.z*(speed*0.2)*math.log(vtimer+0.5)+4*dir.z})
|
||||||
@ -590,9 +590,9 @@ function vehicles.object_drive(entity, dtime, def)
|
|||||||
if jump == "jump" and ctrl.jump and not entity.jumpcharge then
|
if jump == "jump" and ctrl.jump and not entity.jumpcharge then
|
||||||
if not ctrl.up then
|
if not ctrl.up then
|
||||||
local vec_jump = {x=velo.x+0,y=jump_speed,z=velo.z+0}
|
local vec_jump = {x=velo.x+0,y=jump_speed,z=velo.z+0}
|
||||||
entity.object:setvelocity(vec_jump)
|
entity.object:set_velocity(vec_jump)
|
||||||
else
|
else
|
||||||
entity.object:setvelocity({
|
entity.object:set_velocity({
|
||||||
x=dir.x*speed/4*math.atan(0.5*vtimer-2)+8*dir.x,
|
x=dir.x*speed/4*math.atan(0.5*vtimer-2)+8*dir.x,
|
||||||
y=jump_speed,
|
y=jump_speed,
|
||||||
z=dir.z*speed/4*math.atan(0.5*vtimer-2)+8*dir.z})
|
z=dir.z*speed/4*math.atan(0.5*vtimer-2)+8*dir.z})
|
||||||
@ -641,30 +641,30 @@ function vehicles.object_glide(self, dtime, speed, decell, gravity, moving_anim,
|
|||||||
end
|
end
|
||||||
local ctrl = self.driver:get_player_control()
|
local ctrl = self.driver:get_player_control()
|
||||||
local dir = self.driver:get_look_dir()
|
local dir = self.driver:get_look_dir()
|
||||||
local velo = self.object:getvelocity()
|
local velo = self.object:get_velocity()
|
||||||
local vec_glide = {x=dir.x*speed*decell, y=velo.y, z=dir.z*speed*decell}
|
local vec_glide = {x=dir.x*speed*decell, y=velo.y, z=dir.z*speed*decell}
|
||||||
local yaw = self.driver:get_look_yaw()
|
local yaw = self.driver:get_look_horizontal()
|
||||||
if not ctrl.sneak then
|
if not ctrl.sneak then
|
||||||
self.object:setyaw(yaw+math.pi+math.pi/2)
|
self.object:set_yaw(yaw)
|
||||||
self.object:setvelocity(vec_glide)
|
self.object:set_velocity(vec_glide)
|
||||||
self.object:setacceleration({x=0, y=gravity, z=0})
|
self.object:setacceleration({x=0, y=gravity, z=0})
|
||||||
end
|
end
|
||||||
if ctrl.sneak then
|
if ctrl.sneak then
|
||||||
local vec = {x=0,y=gravity*15,z=0}
|
local vec = {x=0,y=gravity*15,z=0}
|
||||||
local yaw = self.driver:get_look_yaw()
|
local yaw = self.driver:get_look_horizontal()
|
||||||
self.object:setyaw(yaw+math.pi+math.pi/2)
|
self.object:set_yaw(yaw)
|
||||||
self.object:setvelocity(vec)
|
self.object:set_velocity(vec)
|
||||||
end
|
end
|
||||||
if velo.y == 0 then
|
if velo.y == 0 then
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
for dx=-1,1 do
|
for dx=-1,1 do
|
||||||
for dy=-1,1 do
|
for dy=-1,1 do
|
||||||
for dz=-1,1 do
|
for dz=-1,1 do
|
||||||
local p = {x=pos.x+dx, y=pos.y-1, z=pos.z+dz}
|
local p = {x=pos.x+dx, y=pos.y-1, z=pos.z+dz}
|
||||||
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
local t = {x=pos.x+dx, y=pos.y+dy, z=pos.z+dz}
|
||||||
local n = minetest.env:get_node(p).name
|
local n = minetest.get_node(p).name
|
||||||
if n ~= "massdestruct:parachute" and n ~= "air" then
|
if n ~= "massdestruct:parachute" and n ~= "air" then
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
@ -682,10 +682,10 @@ function vehicles.register_spawner(vehicle, desc, texture, is_boat)
|
|||||||
wield_scale = {x = 1.5, y = 1.5, z = 1},
|
wield_scale = {x = 1.5, y = 1.5, z = 1},
|
||||||
on_place = function(item, placer, pointed_thing)
|
on_place = function(item, placer, pointed_thing)
|
||||||
local dir = placer:get_look_dir()
|
local dir = placer:get_look_dir()
|
||||||
local playerpos = placer:getpos()
|
local playerpos = placer:get_pos()
|
||||||
local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(placer:get_player_name())
|
local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(placer:get_player_name())
|
||||||
if pointed_thing.type == "node" and not is_boat then
|
if pointed_thing.type == "node" and not is_boat then
|
||||||
local obj = minetest.env:add_entity(pointed_thing.above, vehicle)
|
local obj = minetest.add_entity(pointed_thing.above, vehicle)
|
||||||
local object = obj:get_luaentity()
|
local object = obj:get_luaentity()
|
||||||
object.owner = placer
|
object.owner = placer
|
||||||
if not creative_mode then
|
if not creative_mode then
|
||||||
@ -693,8 +693,8 @@ function vehicles.register_spawner(vehicle, desc, texture, is_boat)
|
|||||||
return item
|
return item
|
||||||
end
|
end
|
||||||
elseif pointed_thing.type == "node" and minetest.get_item_group(pointed_thing.name, "water") then
|
elseif pointed_thing.type == "node" and minetest.get_item_group(pointed_thing.name, "water") then
|
||||||
local obj = minetest.env:add_entity(pointed_thing.under, vehicle)
|
local obj = minetest.add_entity(pointed_thing.under, vehicle)
|
||||||
obj:setvelocity({x=0, y=-1, z=0})
|
obj:set_velocity({x=0, y=-1, z=0})
|
||||||
local object = obj:get_luaentity()
|
local object = obj:get_luaentity()
|
||||||
object.owner = placer
|
object.owner = placer
|
||||||
if not creative_mode then
|
if not creative_mode then
|
||||||
@ -707,7 +707,7 @@ function vehicles.register_spawner(vehicle, desc, texture, is_boat)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function vehicles.explodinate(ent, radius)
|
function vehicles.explodinate(ent, radius)
|
||||||
local pos = ent.object:getpos()
|
local pos = ent.object:get_pos()
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 90,
|
amount = 90,
|
||||||
time = 4,
|
time = 4,
|
||||||
@ -756,8 +756,8 @@ function vehicles.on_punch(self, puncher)
|
|||||||
local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(self.driver:get_player_name())
|
local creative_mode = creative and creative.is_enabled_for and creative.is_enabled_for(self.driver:get_player_name())
|
||||||
if self.driver == puncher and (hp == self.hp_max-5 or hp == self.hp_max or creative_mode) then
|
if self.driver == puncher and (hp == self.hp_max-5 or hp == self.hp_max or creative_mode) then
|
||||||
local name = self.object:get_luaentity().name
|
local name = self.object:get_luaentity().name
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.env:add_item(pos, name.."_spawner")
|
minetest.add_item(pos, name.."_spawner")
|
||||||
vehicles.object_detach(self, self.driver, {x=1, y=0, z=1})
|
vehicles.object_detach(self, self.driver, {x=1, y=0, z=1})
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
|
52
init.lua
52
init.lua
@ -11,12 +11,12 @@ local enable_built_in = true
|
|||||||
if enable_built_in then
|
if enable_built_in then
|
||||||
|
|
||||||
local function missile_bullet_hit_check(self, obj, pos)
|
local function missile_bullet_hit_check(self, obj, pos)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
do
|
do
|
||||||
local return_v = {}
|
local return_v = {}
|
||||||
local if_return = false
|
local if_return = false
|
||||||
for _, obj in ipairs(minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)) do
|
for _, obj in ipairs(minetest.get_objects_inside_radius({x=pos.x,y=pos.y,z=pos.z}, 2)) do
|
||||||
function no_launcher_or_not_attched()
|
local function no_launcher_or_not_attched()
|
||||||
local b1, b2 = pcall(function() return obj ~= self.launcher:get_attach() end)
|
local b1, b2 = pcall(function() return obj ~= self.launcher:get_attach() end)
|
||||||
if not b1 then
|
if not b1 then
|
||||||
return true -- no launcher
|
return true -- no launcher
|
||||||
@ -52,8 +52,8 @@ local function missile_on_step_auxiliary(self, obj, pos)
|
|||||||
minetest.after(10, function()
|
minetest.after(10, function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
local vec = self.object:getvelocity()
|
local vec = self.object:get_velocity()
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 1,
|
amount = 1,
|
||||||
time = 0.5,
|
time = 0.5,
|
||||||
@ -81,7 +81,7 @@ local function missile_on_step_auxiliary(self, obj, pos)
|
|||||||
}, nil)
|
}, nil)
|
||||||
end
|
end
|
||||||
if minetest.get_modpath('tnt') then
|
if minetest.get_modpath('tnt') then
|
||||||
tnt.boom(self.object:getpos(), {damage_radius=5,radius=5,ignore_protection=false})
|
tnt.boom(self.object:get_pos(), {damage_radius=5,radius=5,ignore_protection=false})
|
||||||
end
|
end
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
@ -105,9 +105,9 @@ minetest.register_entity("vehicles:missile", {
|
|||||||
end
|
end
|
||||||
local dir = player:get_look_dir()
|
local dir = player:get_look_dir()
|
||||||
local vec = {x=dir.x*16,y=dir.y*16,z=dir.z*16}
|
local vec = {x=dir.x*16,y=dir.y*16,z=dir.z*16}
|
||||||
local yaw = player:get_look_yaw()
|
local yaw = player:get_look_horizontal()
|
||||||
self.object:setyaw(yaw+math.pi/2)
|
self.object:set_yaw(yaw+math.pi)
|
||||||
self.object:setvelocity(vec)
|
self.object:set_velocity(vec)
|
||||||
missile_on_step_auxiliary(self, obj, pos)
|
missile_on_step_auxiliary(self, obj, pos)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
@ -133,7 +133,7 @@ minetest.register_entity("vehicles:missile_2", {
|
|||||||
damage = 2,
|
damage = 2,
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
on_step = function(self, obj, pos)
|
on_step = function(self, obj, pos)
|
||||||
local velo = self.object:getvelocity()
|
local velo = self.object:get_velocity()
|
||||||
if velo.y <= 1.2 and velo.y >= -1.2 then
|
if velo.y <= 1.2 and velo.y >= -1.2 then
|
||||||
self.object:set_animation({x=1, y=1}, 5, 0)
|
self.object:set_animation({x=1, y=1}, 5, 0)
|
||||||
elseif velo.y <= -1.2 then
|
elseif velo.y <= -1.2 then
|
||||||
@ -159,7 +159,7 @@ minetest.register_entity("vehicles:water", {
|
|||||||
minetest.after(5, function()
|
minetest.after(5, function()
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end)
|
end)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.add_particlespawner({
|
minetest.add_particlespawner({
|
||||||
amount = 1,
|
amount = 1,
|
||||||
time = 1,
|
time = 1,
|
||||||
@ -193,7 +193,7 @@ minetest.register_entity("vehicles:bullet", {
|
|||||||
damage = 2,
|
damage = 2,
|
||||||
collisionbox = {0, 0, 0, 0, 0, 0},
|
collisionbox = {0, 0, 0, 0, 0, 0},
|
||||||
on_activate = function(self)
|
on_activate = function(self)
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.sound_play("shot",
|
minetest.sound_play("shot",
|
||||||
{gain = 0.4, max_hear_distance = 3, loop = false})
|
{gain = 0.4, max_hear_distance = 3, loop = false})
|
||||||
end,
|
end,
|
||||||
@ -304,7 +304,7 @@ minetest.register_entity("vehicles:turret", {
|
|||||||
end,
|
end,
|
||||||
on_punch = vehicles.on_punch,
|
on_punch = vehicles.on_punch,
|
||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
self.object:setvelocity({x=0, y=-1, z=0})
|
self.object:set_velocity({x=0, y=-1, z=0})
|
||||||
if self.driver then
|
if self.driver then
|
||||||
vehicles.object_drive(self, dtime, {
|
vehicles.object_drive(self, dtime, {
|
||||||
fixed = true,
|
fixed = true,
|
||||||
@ -486,7 +486,7 @@ minetest.register_entity("vehicles:geep", {
|
|||||||
brakes = true,
|
brakes = true,
|
||||||
},
|
},
|
||||||
function()
|
function()
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
4, --amount
|
4, --amount
|
||||||
1, --time
|
1, --time
|
||||||
@ -557,7 +557,7 @@ minetest.register_entity("vehicles:ambulance", {
|
|||||||
function()
|
function()
|
||||||
if not self.siren_ready then
|
if not self.siren_ready then
|
||||||
minetest.sound_play("ambulance",
|
minetest.sound_play("ambulance",
|
||||||
{pos=self.object:getpos(), gain = 0.1, max_hear_distance = 3, loop = false})
|
{pos=self.object:get_pos(), gain = 0.1, max_hear_distance = 3, loop = false})
|
||||||
self.siren_ready = true
|
self.siren_ready = true
|
||||||
minetest.after(4, function()
|
minetest.after(4, function()
|
||||||
self.siren_ready = false
|
self.siren_ready = false
|
||||||
@ -614,7 +614,7 @@ minetest.register_entity("vehicles:ute", {
|
|||||||
brakes = true,
|
brakes = true,
|
||||||
},
|
},
|
||||||
function()
|
function()
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
15, --amount
|
15, --amount
|
||||||
1, --time
|
1, --time
|
||||||
@ -768,7 +768,7 @@ minetest.register_entity("vehicles:nizzan", {
|
|||||||
brakes = true,
|
brakes = true,
|
||||||
},
|
},
|
||||||
function()
|
function()
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
15, --amount
|
15, --amount
|
||||||
1, --time
|
1, --time
|
||||||
@ -830,7 +830,7 @@ minetest.register_entity("vehicles:nizzan2", {
|
|||||||
brakes = true,
|
brakes = true,
|
||||||
},
|
},
|
||||||
function()
|
function()
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.add_particlespawner(
|
minetest.add_particlespawner(
|
||||||
15, --amount
|
15, --amount
|
||||||
1, --time
|
1, --time
|
||||||
@ -1705,7 +1705,7 @@ minetest.register_tool("vehicles:backpack", {
|
|||||||
},
|
},
|
||||||
on_use = function(item, placer, pointed_thing)
|
on_use = function(item, placer, pointed_thing)
|
||||||
local dir = placer:get_look_dir()
|
local dir = placer:get_look_dir()
|
||||||
local playerpos = placer:getpos()
|
local playerpos = placer:get_pos()
|
||||||
local pname = placer:get_player_name()
|
local pname = placer:get_player_name()
|
||||||
local obj = minetest.env:add_entity({x=playerpos.x+0+dir.x,y=playerpos.y+1+dir.y,z=playerpos.z+0+dir.z}, "vehicles:parachute")
|
local obj = minetest.env:add_entity({x=playerpos.x+0+dir.x,y=playerpos.y+1+dir.y,z=playerpos.z+0+dir.z}, "vehicles:parachute")
|
||||||
local entity = obj:get_luaentity()
|
local entity = obj:get_luaentity()
|
||||||
@ -1735,12 +1735,12 @@ minetest.register_entity("vehicles:wing_glider", {
|
|||||||
on_step = function(self, dtime)
|
on_step = function(self, dtime)
|
||||||
if self.driver then
|
if self.driver then
|
||||||
local dir = self.driver:get_look_dir()
|
local dir = self.driver:get_look_dir()
|
||||||
local velo = self.object:getvelocity()
|
local velo = self.object:get_velocity()
|
||||||
local speed = math.sqrt(math.pow(velo.x, 2)+math.pow(velo.z, 2))
|
local speed = math.sqrt(math.pow(velo.x, 2)+math.pow(velo.z, 2))
|
||||||
local vec = {x=dir.x*16,y=dir.y*16+1,z=dir.z*16}
|
local vec = {x=dir.x*16,y=dir.y*16+1,z=dir.z*16}
|
||||||
local yaw = self.driver:get_look_yaw()
|
local yaw = self.driver:get_look_horizontal()
|
||||||
self.object:setyaw(yaw+math.pi/2)
|
self.object:set_yaw(yaw+math.pi)
|
||||||
self.object:setvelocity(vec)
|
self.object:set_velocity(vec)
|
||||||
self.driver:set_animation({x=162, y=167}, 0, 0)
|
self.driver:set_animation({x=162, y=167}, 0, 0)
|
||||||
if not self.anim then
|
if not self.anim then
|
||||||
self.object:set_animation({x=25, y=45}, 10, 0)
|
self.object:set_animation({x=25, y=45}, 10, 0)
|
||||||
@ -1755,7 +1755,7 @@ minetest.register_entity("vehicles:wing_glider", {
|
|||||||
on_punch = function(self, puncher)
|
on_punch = function(self, puncher)
|
||||||
if not self.driver then
|
if not self.driver then
|
||||||
local name = self.object:get_luaentity().name
|
local name = self.object:get_luaentity().name
|
||||||
local pos = self.object:getpos()
|
local pos = self.object:get_pos()
|
||||||
minetest.env:add_item(pos, name.."_spawner")
|
minetest.env:add_item(pos, name.."_spawner")
|
||||||
self.object:remove()
|
self.object:remove()
|
||||||
end
|
end
|
||||||
@ -1783,7 +1783,7 @@ minetest.register_tool("vehicles:wings", {
|
|||||||
on_use = function(item, placer, pointed_thing)
|
on_use = function(item, placer, pointed_thing)
|
||||||
local wings_ready = true
|
local wings_ready = true
|
||||||
local dir = placer:get_look_dir()
|
local dir = placer:get_look_dir()
|
||||||
local playerpos = placer:getpos()
|
local playerpos = placer:get_pos()
|
||||||
local objs = minetest.get_objects_inside_radius({x=playerpos.x,y=playerpos.y,z=playerpos.z}, 2)
|
local objs = minetest.get_objects_inside_radius({x=playerpos.x,y=playerpos.y,z=playerpos.z}, 2)
|
||||||
for k, obj2 in pairs(objs) do
|
for k, obj2 in pairs(objs) do
|
||||||
if obj2:get_luaentity() ~= nil and obj2:get_luaentity().name == "vehicles:wing_glider" then
|
if obj2:get_luaentity() ~= nil and obj2:get_luaentity().name == "vehicles:wing_glider" then
|
||||||
@ -1827,7 +1827,7 @@ minetest.register_tool("vehicles:rc", {
|
|||||||
},
|
},
|
||||||
on_use = function(item, placer, pointed_thing)
|
on_use = function(item, placer, pointed_thing)
|
||||||
local dir = placer:get_look_dir()
|
local dir = placer:get_look_dir()
|
||||||
local playerpos = placer:getpos()
|
local playerpos = placer:get_pos()
|
||||||
local pname = placer:get_player_name()
|
local pname = placer:get_player_name()
|
||||||
local inv = minetest.get_inventory({type="player", name=pname})
|
local inv = minetest.get_inventory({type="player", name=pname})
|
||||||
if inv:contains_item("main", "vehicles:missile_2_item") then
|
if inv:contains_item("main", "vehicles:missile_2_item") then
|
||||||
@ -1838,7 +1838,7 @@ minetest.register_tool("vehicles:rc", {
|
|||||||
object.launcher = placer
|
object.launcher = placer
|
||||||
object.vehicle = nil
|
object.vehicle = nil
|
||||||
local vec = {x=dir.x*6,y=dir.y*6,z=dir.z*6}
|
local vec = {x=dir.x*6,y=dir.y*6,z=dir.z*6}
|
||||||
obj:setvelocity(vec)
|
obj:set_velocity(vec)
|
||||||
return item
|
return item
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
26
nodes.lua
26
nodes.lua
@ -60,7 +60,7 @@ minetest.register_node("vehicles:neon_arrow", {
|
|||||||
}},
|
}},
|
||||||
inventory_image = "vehicles_neon_arrow_inv.png",
|
inventory_image = "vehicles_neon_arrow_inv.png",
|
||||||
weild_image = "vehicles_neon_arrow_inv.png",
|
weild_image = "vehicles_neon_arrow_inv.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -84,7 +84,7 @@ minetest.register_node("vehicles:neon_arrow_flp", {
|
|||||||
}},
|
}},
|
||||||
inventory_image = "vehicles_neon_arrow_inv.png^[transformFX",
|
inventory_image = "vehicles_neon_arrow_inv.png^[transformFX",
|
||||||
weild_image = "vehicles_neon_arrow_inv.png^[transformFX",
|
weild_image = "vehicles_neon_arrow_inv.png^[transformFX",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -104,7 +104,6 @@ minetest.register_node("vehicles:add_arrow", {
|
|||||||
visual_scale = 2.0,
|
visual_scale = 2.0,
|
||||||
tiles = {"vehicles_arrows.png"},
|
tiles = {"vehicles_arrows.png"},
|
||||||
inventory_image = "vehicles_arrows.png",
|
inventory_image = "vehicles_arrows.png",
|
||||||
use_texture_alpha = true,
|
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -122,7 +121,6 @@ minetest.register_node("vehicles:add_arrow_flp", {
|
|||||||
description = S("arrows(right)"),
|
description = S("arrows(right)"),
|
||||||
drawtype = "signlike",
|
drawtype = "signlike",
|
||||||
visual_scale = 2.0,
|
visual_scale = 2.0,
|
||||||
use_texture_alpha = true,
|
|
||||||
tiles = {"vehicles_arrows.png^[transformFX"},
|
tiles = {"vehicles_arrows.png^[transformFX"},
|
||||||
inventory_image = "vehicles_arrows.png^[transformFX",
|
inventory_image = "vehicles_arrows.png^[transformFX",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
@ -148,7 +146,7 @@ minetest.register_node("vehicles:scifi_ad", {
|
|||||||
}},
|
}},
|
||||||
inventory_image = "vehicles_scifinodes_inv.png",
|
inventory_image = "vehicles_scifinodes_inv.png",
|
||||||
weild_image = "vehicles_scifinodes_inv.png",
|
weild_image = "vehicles_scifinodes_inv.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -168,7 +166,7 @@ minetest.register_node("vehicles:mt_sign", {
|
|||||||
visual_scale = 3.0,
|
visual_scale = 3.0,
|
||||||
tiles = {"vehicles_neonmt.png",},
|
tiles = {"vehicles_neonmt.png",},
|
||||||
inventory_image = "vehicles_neonmt.png",
|
inventory_image = "vehicles_neonmt.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -188,7 +186,7 @@ minetest.register_node("vehicles:pacman_sign", {
|
|||||||
visual_scale = 2.0,
|
visual_scale = 2.0,
|
||||||
tiles = {"vehicles_pacman.png",},
|
tiles = {"vehicles_pacman.png",},
|
||||||
inventory_image = "vehicles_pacman.png",
|
inventory_image = "vehicles_pacman.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -208,7 +206,7 @@ minetest.register_node("vehicles:whee_sign", {
|
|||||||
visual_scale = 3.0,
|
visual_scale = 3.0,
|
||||||
tiles = {"vehicles_whee.png",},
|
tiles = {"vehicles_whee.png",},
|
||||||
inventory_image = "vehicles_whee.png",
|
inventory_image = "vehicles_whee.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -228,7 +226,7 @@ minetest.register_node("vehicles:checker_sign", {
|
|||||||
visual_scale = 3.0,
|
visual_scale = 3.0,
|
||||||
tiles = {"vehicles_checker2.png",},
|
tiles = {"vehicles_checker2.png",},
|
||||||
inventory_image = "vehicles_checker2.png",
|
inventory_image = "vehicles_checker2.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -248,7 +246,7 @@ minetest.register_node("vehicles:car_sign", {
|
|||||||
visual_scale = 3.0,
|
visual_scale = 3.0,
|
||||||
tiles = {"vehicles_sign1.png",},
|
tiles = {"vehicles_sign1.png",},
|
||||||
inventory_image = "vehicles_sign1.png",
|
inventory_image = "vehicles_sign1.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -268,7 +266,7 @@ minetest.register_node("vehicles:nyan_sign", {
|
|||||||
visual_scale = 2.0,
|
visual_scale = 2.0,
|
||||||
tiles = {"vehicles_sign2.png",},
|
tiles = {"vehicles_sign2.png",},
|
||||||
inventory_image = "vehicles_sign2.png",
|
inventory_image = "vehicles_sign2.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -288,7 +286,7 @@ minetest.register_node("vehicles:flag", {
|
|||||||
visual_scale = 3.0,
|
visual_scale = 3.0,
|
||||||
tiles = {"vehicles_flag.png",},
|
tiles = {"vehicles_flag.png",},
|
||||||
inventory_image = "vehicles_flag.png",
|
inventory_image = "vehicles_flag.png",
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "clip",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "wallmounted",
|
paramtype2 = "wallmounted",
|
||||||
sunlight_propagates = true,
|
sunlight_propagates = true,
|
||||||
@ -344,7 +342,7 @@ minetest.register_node("vehicles:light_barrier", {
|
|||||||
"vehicles_lightblock.png^[transformR90",
|
"vehicles_lightblock.png^[transformR90",
|
||||||
"vehicles_lightblock.png",
|
"vehicles_lightblock.png",
|
||||||
},
|
},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
@ -377,7 +375,7 @@ minetest.register_node("vehicles:light_barrier2", {
|
|||||||
"vehicles_lightblock2.png^[transformR90",
|
"vehicles_lightblock2.png^[transformR90",
|
||||||
"vehicles_lightblock2.png",
|
"vehicles_lightblock2.png",
|
||||||
},
|
},
|
||||||
use_texture_alpha = true,
|
use_texture_alpha = "blend",
|
||||||
drawtype = "nodebox",
|
drawtype = "nodebox",
|
||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
paramtype2 = "facedir",
|
paramtype2 = "facedir",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user