5.x
This commit is contained in:
parent
484af893eb
commit
e99649cc36
@ -1,7 +0,0 @@
|
||||
default
|
||||
mobs
|
||||
farming?
|
||||
3d_armor?
|
||||
fire
|
||||
tnt
|
||||
shields?
|
2
init.lua
2
init.lua
@ -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, ...)
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user