More fixes and jumping to 1.0.0-alpha version
parent
3786aa1a77
commit
ba618e33ca
|
@ -32,7 +32,7 @@ elseif minetest.get_modpath("luxury_decor") then
|
|||
recipe = {"luxury_decor:wolfram_wire_reel", "luxury_decor:plastic_sheet", "dye:red"}
|
||||
})
|
||||
else
|
||||
error("From 'turret' mod: No one required dependency is avaialble!")
|
||||
error("No one required dependency is avaialble! Please, enable \'basic_materials\' or \'luxury_decor\' to use this mod!")
|
||||
end
|
||||
|
||||
minetest.register_craft({
|
||||
|
|
|
@ -146,8 +146,10 @@ turret.direct_ray_to_entity = function(pos)
|
|||
|
||||
local new_ray_dir
|
||||
if ang < math.rad(ANGLE_SPEED_DIRECT) then
|
||||
new_ray_dir = vector.rotate_around_axis(cur_ray_dir, pivot_vec, ang)
|
||||
new_ray_dir = vector.normalize(rel_tpos)
|
||||
minetest.debug("ang: " .. ang)
|
||||
minetest.debug("tpos_dir: " .. minetest.pos_to_string(vector.normalize(rel_tpos)))
|
||||
minetest.debug("new_ray_dir: " .. minetest.pos_to_string(new_ray_dir))
|
||||
minetest.debug("ANGLE: " .. vector.angle(rel_tpos, new_ray_dir))
|
||||
|
||||
else
|
||||
|
@ -191,9 +193,9 @@ turret.shoot = function(pos)
|
|||
local vel = vector.multiply(ray_dir, 10)
|
||||
|
||||
local offset_horiz = {-0.2, 0.2}
|
||||
local offset_vert = {-0.1, 0, 0.1}
|
||||
local offset_vert = {-0.1, 0, 0.4}
|
||||
|
||||
local rand_offset = {x=offset_horiz[math.random(1, 2)], y=offset_vert[math.random(1, 2)]+0.175, z=0.1}
|
||||
local rand_offset = {x=offset_horiz[math.random(1, 2)], y=offset_vert[math.random(1, 2)]+0.175, z=0}
|
||||
local yaw = vector.angle({x=0, y=0, z=1}, turret.get_turret_unitdir(pos))
|
||||
local res_pos = vector.add(pos, vector.rotate(rand_offset, {x=0, y=yaw, z=0}))
|
||||
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,7 +12,7 @@ minetest.register_entity("turret:ray", {
|
|||
|
||||
minetest.register_entity("turret:fiery_dart", {
|
||||
visual = "mesh",
|
||||
visual_size = {x=25, y=25, z=25},
|
||||
visual_size = {x=5, y=5, z=20},
|
||||
physical = true,
|
||||
pointable = false,
|
||||
mesh = "fiery_dart.b3d",
|
||||
|
@ -40,7 +40,7 @@ minetest.register_node("turret:turret_off", {
|
|||
description = "Turret",
|
||||
drawtype = "mesh",
|
||||
mesh = "turret2.b3d",
|
||||
tiles = {"turret.png"},
|
||||
tiles = {"turret_turret.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
|
@ -81,7 +81,7 @@ minetest.register_node("turret:turret_on", {
|
|||
description = "Turret",
|
||||
drawtype = "mesh",
|
||||
mesh = "turret_unfold2.b3d",
|
||||
tiles = {"turret.png"},
|
||||
tiles = {"turret_turret.png"},
|
||||
paramtype = "light",
|
||||
paramtype2 = "facedir",
|
||||
sunlight_propagates = true,
|
||||
|
@ -126,5 +126,5 @@ minetest.register_craftitem("turret:turret_eye", {
|
|||
|
||||
minetest.register_craftitem("turret:red_led", {
|
||||
description = "Red LED",
|
||||
inventory_image = "red_led.png"
|
||||
inventory_image = "turret_red_led.png"
|
||||
})
|
||||
|
|
Before Width: | Height: | Size: 529 B After Width: | Height: | Size: 529 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 5.2 KiB After Width: | Height: | Size: 5.2 KiB |
Loading…
Reference in New Issue