This commit is contained in:
tenplus1 2023-08-08 15:46:35 +01:00
parent 484af893eb
commit e99649cc36
4 changed files with 16 additions and 23 deletions

View File

@ -1,7 +0,0 @@
default
mobs
farming?
3d_armor?
fire
tnt
shields?

View File

@ -2,7 +2,7 @@ local path = minetest.get_modpath("nssm")
-- translation
local S
if minetest.get_translator ~= nil then
if minetest.get_translator then
S = minetest.get_translator("nssm") -- 5.x translation function
else -- boilerplate function
S = function(str, ...)

View File

@ -17,7 +17,7 @@ end
local function spears_shot(itemstack, player)
local spear = itemstack:get_name() .. '_entity'
local spear = itemstack:get_name() .. "_entity"
local speed = 16
local gravity = 9.8
@ -224,33 +224,33 @@ function spears_register_spear(kind, desc, eq, toughness, material, scale)
minetest.register_entity("nssm:spear_" .. kind .. "_entity", SPEAR_ENTITY)
minetest.register_craft({
output = 'nssm:spear_' .. kind,
output = "nssm:spear_" .. kind,
recipe = {
{'group:wood', 'group:wood', material}
{"group:wood", "group:wood", material}
}
})
minetest.register_craft({
output = 'nssm:spear_' .. kind,
output = "nssm:spear_" .. kind,
recipe = {
{material, 'group:wood', 'group:wood'}
{material, "group:wood", "group:wood"}
}
})
end
spears_register_spear('ant', 'Ant', 6, 50, 'nssm:ant_mandible')
spears_register_spear("ant", "Ant", 6, 50, "nssm:ant_mandible")
spears_register_spear('mantis', 'Mantis', 6, 20, 'nssm:mantis_claw')
spears_register_spear("mantis", "Mantis", 6, 20, "nssm:mantis_claw")
spears_register_spear('manticore', 'Manticore', 8, 16, 'nssm:manticore_spine')
spears_register_spear("manticore", "Manticore", 8, 16, "nssm:manticore_spine")
spears_register_spear('ice_tooth', 'Ice Tooth', 16, 200, 'nssm:ice_tooth')
spears_register_spear("ice_tooth", "Ice Tooth", 16, 200, "nssm:ice_tooth")
spears_register_spear('little_ice_tooth', 'Little Ice Tooth', 7, 20, 'nssm:little_ice_tooth')
spears_register_spear("little_ice_tooth", "Little Ice Tooth", 7, 20, "nssm:little_ice_tooth")
spears_register_spear('duck_beak', 'Duck Beak', 5, 12, 'nssm:duck_beak')
spears_register_spear("duck_beak", "Duck Beak", 5, 12, "nssm:duck_beak")
spears_register_spear('felucco_horn', 'Felucco Horn', 7, 18, 'nssm:felucco_horn')
spears_register_spear("felucco_horn", "Felucco Horn", 7, 18, "nssm:felucco_horn")
spears_register_spear('of_peace', 'Grand Peace', 30, 300, 'nssm:wrathful_moranga', 2)
spears_register_spear("of_peace", "Grand Peace", 30, 300, "nssm:wrathful_moranga", 2)

View File

@ -4,8 +4,8 @@ local default_dir = {x = 1, y = 1, z = 1}
-- Function used to shoot:
local function weapons_shot(itemstack, placer, pointed_thing, velocity, name)
local dir = placer:get_look_dir();
local playerpos = placer:get_pos();
local dir = placer:get_look_dir()
local playerpos = placer:get_pos()
local obj = minetest.add_entity({
x = playerpos.x + dir.x,
y = playerpos.y + 2 + dir.y,