1
0
의 미러 https://codeberg.org/tenplus1/mob_horse.git synced 2025-08-04 08:10:45 +02:00

Compare commits

16 커밋

작성자 SHA1 메시지 날짜
6d4701ca5f Merge remote-tracking branch 'upstream/master' 2022-01-22 20:01:06 +01:00
f550d5b4a1 Merge remote-tracking branch 'upstream/master' 2021-11-26 21:42:13 +01:00
d0ccec70cb Merge remote-tracking branch 'upstream/master' 2021-11-01 10:30:36 +01:00
0cbaa0b223 Merge remote-tracking branch 'upstream/master' 2021-06-20 17:11:26 +02:00
e16866479f Merge remote-tracking branch 'upstream/master' 2021-05-09 21:38:19 +02:00
2ac1e816ed Merge remote-tracking branch 'upstream/master' 2021-03-25 21:40:28 +01:00
d2c0afcff2 Merge remote-tracking branch 'upstream/master' 2021-03-12 12:23:24 +01:00
70f40e2fb4 Merge remote-tracking branch 'upstream/master' 2021-01-23 12:53:58 +01:00
5f26b248b1 Merge remote-tracking branch 'upstream/master' 2020-12-15 23:24:51 +01:00
0919faf76e Merge remote-tracking branch 'upstream/master' 2020-08-29 20:30:38 +02:00
a826466332 Merge remote-tracking branch 'upstream/master' 2020-08-25 20:05:23 +02:00
03127ee343 Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-06-20 15:34:26 +02:00
2769a472cc Merge remote-tracking branch 'upstream/master' into nalc-1.2-dev 2020-02-29 18:04:43 +01:00
6e7db683ac Merge branch 'master' of yunohost.local:mtcontrib/mob_horse into nalc-1.2-dev 2019-12-22 13:50:07 +01:00
6fb7f56af4 Merge branch 'master' into nalc-1.2 2019-05-10 00:44:45 +02:00
9b33936616 Ajoute message de chargement du mod dans le journal "action" 2018-12-27 18:30:03 +01:00
9개의 변경된 파일358개의 추가작업 그리고 72개의 파일을 삭제

3
depends.txt Normal file
파일 보기

@ -0,0 +1,3 @@
mobs
lucky_block?
intllib?

164
init.lua
파일 보기

@ -1,11 +1,39 @@
-- translation and get mod path
local S = minetest.get_translator("mob_horse")
-- Load support for intllib.
local MP = minetest.get_modpath(minetest.get_current_modname()) .. "/"
-- horse shoes (speed, jump, brake/reverse speed, overlay texture)
-- Check for translation method
local S
if minetest.get_translator ~= nil then
S = minetest.get_translator("mob_horse") -- 5.x translation function
else
if minetest.get_modpath("intllib") then
dofile(minetest.get_modpath("intllib") .. "/init.lua")
if intllib.make_gettext_pair then
gettext, ngettext = intllib.make_gettext_pair() -- new gettext method
else
gettext = intllib.Getter() -- old text file method
end
S = gettext
else -- boilerplate function
S = function(str, ...)
local args = {...}
return str:gsub("@%d+", function(match)
return args[tonumber(match:sub(2))]
end)
end
end
end
-- 0.4.17 or 5.0 check
local y_off = 20
if minetest.features.object_independent_selectionbox then
y_off = 10
end
-- horse shoes (speed, jump, break, overlay texture)
local shoes = {
["mobs:horseshoe_steel"] = {7, 4, 2, "mobs_horseshoe_steelo.png"},
["mobs:horseshoe_bronze"] = {7, 4, 4, "mobs_horseshoe_bronzeo.png"},
@ -14,8 +42,8 @@ local shoes = {
["mobs:horseshoe_crystal"] = {11, 6, 9, "mobs_horseshoe_crystalo.png"}
}
-- rideable horse
-- rideable horse
mobs:register_mob("mob_horse:horse", {
type = "animal",
visual = "mesh",
@ -23,13 +51,19 @@ mobs:register_mob("mob_horse:horse", {
mesh = "mobs_horse.x",
collisionbox = {-0.4, -0.01, -0.4, 0.4, 1.25, 0.4},
animation = {
speed_normal = 15, speed_run = 30,
stand_start = 25, stand_end = 50, -- 75
stand2_start = 25, stand2_end = 25,
stand3_start = 55, stand3_end = 75, stand3_loop = false,
walk_start = 75, walk_end = 100,
run_start = 75, run_end = 100,
punch_start = 55, punch_end = 75, punch_speed = 35,
speed_normal = 15,
speed_run = 30,
stand_start = 25,
stand_end = 50, -- 75
stand2_start = 25,
stand2_end = 25,
stand3_start = 55,
stand3_end = 75,
stand3_loop = false,
walk_start = 75,
walk_end = 100,
run_start = 75,
run_end = 100
},
textures = {
{"mobs_horse.png"}, -- textures by Mjollna
@ -37,28 +71,23 @@ mobs:register_mob("mob_horse:horse", {
{"mobs_horseara.png"}
},
fear_height = 3,
--runaway = true,
runaway = true,
fly = false,
walk_chance = 60,
view_range = 7,
view_range = 5,
follow = {
"farming:wheat", "default:apple", "farming:oat",
"farming:barley", "farming:corn"
},
passive = false, attack_type = "dogfight", reach = 2.5, damage = 3,
attack_chance = 95,
attack_monsters = true,
hp_min = 15,
hp_max = 23,
armor = 100,
"farming:barley", "farming:corn"},
passive = true,
hp_min = 12,
hp_max = 16,
armor = 200,
lava_damage = 5,
fire_damage = 4,
fall_damage = 1,
water_damage = 0,
fall_damage = 5,
water_damage = 1,
makes_footstep_sound = true,
drops = {
{name = "mobs:leather", chance = 1, min = 0, max = 2},
{name = "mobs:meat_raw", chance = 1, min = 1, max = 2}
{name = "mobs:leather", chance = 1, min = 0, max = 2}
},
do_custom = function(self, dtime)
@ -70,8 +99,8 @@ mobs:register_mob("mob_horse:horse", {
self.max_speed_reverse = 2
self.accel = 6
self.terrain_type = 3
self.driver_attach_at = {x = 0, y = 10, z = -2}
self.driver_eye_offset = {x = 0, y = 10 + 3, z = 0}
self.driver_attach_at = {x = 0, y = y_off, z = -2}
self.driver_eye_offset = {x = 0, y = 3, z = 0}
self.driver_scale = {x = 0.8, y = 0.8} -- shrink driver to fit model
end
@ -115,13 +144,19 @@ mobs:register_mob("mob_horse:horse", {
on_rightclick = function(self, clicker)
-- make sure player is clicking
if not clicker or not clicker:is_player() then return end
if not clicker or not clicker:is_player() then
return
end
-- feed, tame or heal horse
if mobs:feed_tame(self, clicker, 10, true, true) then return end
if mobs:feed_tame(self, clicker, 10, true, true) then
return
end
-- applying protection rune
if mobs:protect(self, clicker) then return end
if mobs:protect(self, clicker) then
return
end
local player_name = clicker:get_player_name()
@ -141,13 +176,14 @@ mobs:register_mob("mob_horse:horse", {
end
-- attach saddle to horse
if not self.driver and not self.child
if not self.driver
and not self.child
and clicker:get_wielded_item():get_name() == "mobs:saddle"
and not self.saddle then
self.saddle = true
self.order = "stand"
self.object:set_properties({stepheight = 1.2})
self.object:set_properties({stepheight = 1.1})
-- take saddle from inventory
inv:remove_item("main", "mobs:saddle")
@ -180,7 +216,6 @@ mobs:register_mob("mob_horse:horse", {
-- apply horseshoe overlay to current horse texture
if overlay then
self.texture_mods = "^" .. overlay
if self.saddle then
@ -213,16 +248,10 @@ mobs:register_mob("mob_horse:horse", {
if self.saddle and self.owner == player_name then
mobs.attach(self, clicker)
end
end,
--[[
on_sound = function(self, def)
if def.loudness > 0.8 then -- if loud enough startle horse into jumping
self.object:set_velocity({x = 0, y = 5, z = 0})
end
end
]]
})
-- check for custom spawn.lua
local input = io.open(MP .. "spawn.lua", "r")
@ -244,12 +273,11 @@ else
})
end
-- spawn egg
mobs:register_egg("mob_horse:horse", S("Horse"), "wool_brown.png", 1)
-- steel horseshoes
-- steel horseshoes
minetest.register_craftitem(":mobs:horseshoe_steel", {
description = S("Steel HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_steel.png",
@ -265,7 +293,6 @@ minetest.register_craft({
})
-- bronze horseshoes
minetest.register_craftitem(":mobs:horseshoe_bronze", {
description = S("Bronze HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_bronze.png"
@ -281,7 +308,6 @@ minetest.register_craft({
})
-- mese horseshoes
minetest.register_craftitem(":mobs:horseshoe_mese", {
description = S("Mese HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_mese.png"
@ -297,7 +323,6 @@ minetest.register_craft({
})
-- diamond horseshoes
minetest.register_craftitem(":mobs:horseshoe_diamond", {
description = S("Diamond HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_diamond.png"
@ -313,35 +338,36 @@ minetest.register_craft({
})
-- crystal horseshoes
if minetest.get_modpath("ethereal") then
minetest.register_craftitem(":mobs:horseshoe_crystal", {
description = S("Crystal HorseShoes (use on horse to apply)"),
inventory_image = "mobs_horseshoe_crystal.png"
})
minetest.register_craftitem(":mobs:horseshoe_crystal", {
description = S("Crystal HorseShoes (use on horse to apply)"),
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
-- lucky blocks
if minetest.get_modpath("lucky_block") then
lucky_block:add_blocks({
{"dro", {"mobs:horseshoe_steel"}},
{"dro", {"mobs:horseshoe_bronze"}},
{"dro", {"mobs:horseshoe_mese"}},
{"dro", {"mobs:horseshoe_diamond"}},
{"dro", {"mobs:horseshoe_crystal"}}
})
lucky_block:add_blocks({
{"dro", {"mobs:horseshoe_steel"}},
{"dro", {"mobs:horseshoe_bronze"}},
{"dro", {"mobs:horseshoe_mese"}},
{"dro", {"mobs:horseshoe_diamond"}},
{"dro", {"mobs:horseshoe_crystal"}}
})
end
print("[MOD] Mobs Redo Horse loaded")
minetest.log("action", "[mob_horse] loaded.")

59
locale/it_IT.po Normal file
파일 보기

@ -0,0 +1,59 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: 2020-05-11 13:43+0200\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.2.1\n"
"Last-Translator: Hamlet <hamlatgitlab@riseup.net>\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"Language: it_IT\n"
#: init.lua
msgid "Horse"
msgstr "Cavallo"
#: init.lua
msgid "Horse shoes fitted -"
msgstr "Ferri di cavallo indossati -"
#: init.lua
msgid " speed: "
msgstr " velocità: "
#: init.lua
msgid " , jump height: "
msgstr " , altezza di salto: "
#: init.lua
msgid " , stop speed: "
msgstr " , velocità di arresto: "
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr "I ferri di cavallo funzionano solo sui cavalli!"
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo d'acciaio (usarli su un cavallo per applicarli)"
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo di bronzo (usarli su un cavallo per applicarli)"
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo di mese (usarli su un cavallo per applicarli)"
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr "Ferri di cavallo di diamante (usarli su un cavallo per applicarli)"

59
locale/ms.po Normal file
파일 보기

@ -0,0 +1,59 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: 2018-02-06 00:14+0800\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 2.0.6\n"
"Last-Translator: MuhdNurHidayat (MNH48) <mnh48mail@gmail.com>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"Language: ms\n"
#: init.lua
msgid "Horse"
msgstr "Kuda"
#: init.lua
msgid "Horse shoes fitted -"
msgstr "Ladam telah dipasang pada kuda -"
#: init.lua
msgid " speed: "
msgstr " kelajuan: "
#: init.lua
msgid " , jump height: "
msgstr " , ketinggian lompat: "
#: init.lua
msgid " , stop speed: "
msgstr " , kelajuan berhenti: "
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr "Ladam hanya boleh dipakaikan pada kuda!"
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Keluli (guna pada kuda untuk pakaikan ia)"
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Gangsa (guna pada kuda untuk pakaikan ia)"
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Mese (guna pada kuda untuk pakaikan ia)"
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr "Ladam Kuda Intan (guna pada kuda untuk pakaikan ia)"

58
locale/template.pot Normal file
파일 보기

@ -0,0 +1,58 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua
msgid "Horse"
msgstr ""
#: init.lua
msgid "Horse shoes fitted -"
msgstr ""
#: init.lua
msgid " speed: "
msgstr ""
#: init.lua
msgid " , jump height: "
msgstr ""
#: init.lua
msgid " , stop speed: "
msgstr ""
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr ""
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr ""
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr ""
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr ""
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr ""

58
locale/zh_CN.pot Normal file
파일 보기

@ -0,0 +1,58 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2018-02-06 00:07+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"
#: init.lua
msgid "Horse"
msgstr "马"
#: init.lua
msgid "Horse shoes fitted -"
msgstr "马蹄铁 -"
#: init.lua
msgid " speed: "
msgstr "速度:"
#: init.lua
msgid " , jump height: "
msgstr ",跳跃高度"
#: init.lua
msgid " , stop speed: "
msgstr ",停止速度:"
#: init.lua
msgid "Horse shoes only work on horses!"
msgstr "马蹄铁只对马有效!"
#: init.lua
msgid "Steel HorseShoes (use on horse to apply)"
msgstr "钢马蹄铁(用在马匹上)"
#: init.lua
msgid "Bronze HorseShoes (use on horse to apply)"
msgstr "青铜马蹄铁(用在马匹上)"
#: init.lua
msgid "Mese HorseShoes (use on horse to apply)"
msgstr "黄石马蹄铁(用在马匹上)"
#: init.lua
msgid "Diamond HorseShoes (use on horse to apply)"
msgstr "钻石马蹄铁(用在马匹上)"

12
locale/zh_CN.txt Normal file
파일 보기

@ -0,0 +1,12 @@
#Mod: mob_horse
Horse = 马
Horse shoes fitted - = 马蹄铁 -
speed: = 速度:
, jump height: = ,跳跃高度:
, stop speed: = ,停止速度:
Horse shoes only work on horses! = 马蹄铁只对马有效!
Steel HorseShoes (use on horse to apply) = 钢马蹄铁(用在马匹上)
Bronze HorseShoes (use on horse to apply) = 青铜马蹄铁(用在马匹上)
Mese HorseShoes (use on horse to apply) = 黄石马蹄铁(用在马匹上)
Diamond HorseShoes (use on horse to apply) = 钻石马蹄铁(用在马匹上)

12
locale/zh_TW.txt Normal file
파일 보기

@ -0,0 +1,12 @@
#Mod: mob_horse
Horse = 馬
Horse shoes fitted - = 馬蹄鐵 -
speed: = 速度:
, jump height: = ,跳躍高度:
, stop speed: = ,停止速度:
Horse shoes only work on horses! = 馬蹄鐵只對馬有效!
Steel HorseShoes (use on horse to apply) = 鋼馬蹄鐵(用在馬匹上)
Bronze HorseShoes (use on horse to apply) = 青銅馬蹄鐵(用在馬匹上)
Mese HorseShoes (use on horse to apply) = 黃石馬蹄鐵(用在馬匹上)
Diamond HorseShoes (use on horse to apply) = 鑽石馬蹄鐵(用在馬匹上)

파일 보기

@ -1,5 +1,4 @@
name = mob_horse
description = Adds a rideable horse into game with horse shoe upgrades.
depends = mobs
optional_depends = lucky_block
min_minetest_version = 5.0
optional_depends = lucky_block, intllib
description = Adds a rideable horse into game with horse shoe upgrades.