forked from mtcontrib/mob_horse
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
1c10898fb2
55
init.lua
55
init.lua
|
@ -10,11 +10,10 @@ else
|
||||||
if minetest.get_modpath("intllib") then
|
if minetest.get_modpath("intllib") then
|
||||||
dofile(minetest.get_modpath("intllib") .. "/init.lua")
|
dofile(minetest.get_modpath("intllib") .. "/init.lua")
|
||||||
if intllib.make_gettext_pair then
|
if intllib.make_gettext_pair then
|
||||||
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
|
S = intllib.make_gettext_pair() -- new gettext method
|
||||||
else
|
else
|
||||||
gettext = intllib.Getter() -- old text file method
|
S = intllib.Getter() -- old text file method
|
||||||
end
|
end
|
||||||
S = gettext
|
|
||||||
else -- boilerplate function
|
else -- boilerplate function
|
||||||
S = function(str, ...)
|
S = function(str, ...)
|
||||||
local args = {...}
|
local args = {...}
|
||||||
|
@ -27,11 +26,7 @@ end
|
||||||
|
|
||||||
|
|
||||||
-- 0.4.17 or 5.0 check
|
-- 0.4.17 or 5.0 check
|
||||||
local y_off = 20
|
local y_off = minetest.features.object_independent_selectionbox and 10 or 20
|
||||||
if minetest.features.object_independent_selectionbox then
|
|
||||||
y_off = 10
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
-- horse shoes (speed, jump, brake/reverse speed, overlay texture)
|
-- horse shoes (speed, jump, brake/reverse speed, overlay texture)
|
||||||
local shoes = {
|
local shoes = {
|
||||||
|
@ -100,7 +95,7 @@ mobs:register_mob("mob_horse:horse", {
|
||||||
self.accel = 6
|
self.accel = 6
|
||||||
self.terrain_type = 3
|
self.terrain_type = 3
|
||||||
self.driver_attach_at = {x = 0, y = y_off, z = -2}
|
self.driver_attach_at = {x = 0, y = y_off, z = -2}
|
||||||
self.driver_eye_offset = {x = 0, y = 3, z = 0}
|
self.driver_eye_offset = {x = 0, y = y_off + 3, z = 0}
|
||||||
self.driver_scale = {x = 0.8, y = 0.8} -- shrink driver to fit model
|
self.driver_scale = {x = 0.8, y = 0.8} -- shrink driver to fit model
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -340,34 +335,32 @@ minetest.register_craft({
|
||||||
-- crystal horseshoes
|
-- crystal horseshoes
|
||||||
if minetest.get_modpath("ethereal") then
|
if minetest.get_modpath("ethereal") then
|
||||||
|
|
||||||
minetest.register_craftitem(":mobs:horseshoe_crystal", {
|
minetest.register_craftitem(":mobs:horseshoe_crystal", {
|
||||||
description = S("Crystal HorseShoes (use on horse to apply)"),
|
description = S("Crystal HorseShoes (use on horse to apply)"),
|
||||||
inventory_image = "mobs_horseshoe_crystal.png"
|
inventory_image = "mobs_horseshoe_crystal.png"
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_craft({
|
|
||||||
output = "mobs:horseshoe_crystal",
|
|
||||||
recipe = {
|
|
||||||
{"", "ethereal:crystal_block", ""},
|
|
||||||
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"},
|
|
||||||
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
|
minetest.register_craft({
|
||||||
|
output = "mobs:horseshoe_crystal",
|
||||||
|
recipe = {
|
||||||
|
{"", "ethereal:crystal_block", ""},
|
||||||
|
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"},
|
||||||
|
{"ethereal:crystal_ingot", "", "ethereal:crystal_ingot"}
|
||||||
|
}
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
-- lucky blocks
|
-- lucky blocks
|
||||||
if minetest.get_modpath("lucky_block") then
|
if minetest.get_modpath("lucky_block") then
|
||||||
|
|
||||||
lucky_block:add_blocks({
|
lucky_block:add_blocks({
|
||||||
{"dro", {"mobs:horseshoe_steel"}},
|
{"dro", {"mobs:horseshoe_steel"}},
|
||||||
{"dro", {"mobs:horseshoe_bronze"}},
|
{"dro", {"mobs:horseshoe_bronze"}},
|
||||||
{"dro", {"mobs:horseshoe_mese"}},
|
{"dro", {"mobs:horseshoe_mese"}},
|
||||||
{"dro", {"mobs:horseshoe_diamond"}},
|
{"dro", {"mobs:horseshoe_diamond"}},
|
||||||
{"dro", {"mobs:horseshoe_crystal"}}
|
{"dro", {"mobs:horseshoe_crystal"}}
|
||||||
})
|
})
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.log("action", "[mob_horse] loaded.")
|
print("[MOD] Mobs Redo Horse loaded")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user