forked from mtcontrib/mobs_monster
Compare commits
9 Commits
69ca619580
...
b3e50d295c
Author | SHA1 | Date | |
---|---|---|---|
b3e50d295c | |||
ae0e50bb69 | |||
f792de52af | |||
cab9cf25c6 | |||
23e24bff06 | |||
f39fc78e4a | |||
cd201150b6 | |||
70d92995bb | |||
1c4ce9e402 |
@ -1,5 +1,5 @@
|
|||||||
default
|
|
||||||
mobs
|
mobs
|
||||||
|
default?
|
||||||
lucky_block?
|
lucky_block?
|
||||||
toolranks?
|
toolranks?
|
||||||
intllib?
|
intllib?
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
local dirt_types = {
|
local dirt_types = {
|
||||||
|
|
||||||
|
@ -1,5 +1,15 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
|
local master_types = {
|
||||||
|
|
||||||
|
{ nodes = {"nether:rack"},
|
||||||
|
skins = {"mobs_dungeon_master_nether.png"},
|
||||||
|
},
|
||||||
|
{ nodes = {"nether:rack_deep"},
|
||||||
|
skins = {"mobs_dungeon_master_netherdeep.png"},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
-- Dungeon Master by PilzAdam
|
-- Dungeon Master by PilzAdam
|
||||||
@ -62,13 +72,39 @@ mobs:register_mob("mobs_monster:dungeon_master", {
|
|||||||
speed_normal = 15,
|
speed_normal = 15,
|
||||||
speed_run = 15,
|
speed_run = 15,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
-- check surrounding nodes and spawn a specific monster
|
||||||
|
on_spawn = function(self)
|
||||||
|
|
||||||
|
local pos = self.object:get_pos() ; pos.y = pos.y - 1
|
||||||
|
local tmp
|
||||||
|
|
||||||
|
for n = 1, #master_types do
|
||||||
|
|
||||||
|
tmp = master_types[n]
|
||||||
|
|
||||||
|
if minetest.find_node_near(pos, 1, tmp.nodes) then
|
||||||
|
|
||||||
|
self.base_texture = tmp.skins
|
||||||
|
self.object:set_properties({textures = tmp.skins})
|
||||||
|
|
||||||
|
if tmp.drops then
|
||||||
|
self.drops = tmp.drops
|
||||||
|
end
|
||||||
|
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return true -- run only once, false/nil runs every activation
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
if not mobs.custom_spawn_monster then
|
if not mobs.custom_spawn_monster then
|
||||||
mobs:spawn({
|
mobs:spawn({
|
||||||
name = "mobs_monster:dungeon_master",
|
name = "mobs_monster:dungeon_master",
|
||||||
nodes = {"default:stone", "default:sandstone", "nether:netherrack"},
|
nodes = {"default:stone", "nether:rack", "nether:rack_deep", "hell:hellrack"},
|
||||||
max_light = 5,
|
max_light = 5,
|
||||||
chance = 9000,
|
chance = 9000,
|
||||||
active_object_count = 1,
|
active_object_count = 1,
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
local mob_drops = {
|
local mob_drops = {
|
||||||
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
|
{name = "fireflies:firefly", chance = 1, min = 1, max = 1}
|
||||||
|
30
init.lua
30
init.lua
@ -2,10 +2,32 @@
|
|||||||
-- Load support for intllib.
|
-- Load support for intllib.
|
||||||
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
local path = minetest.get_modpath(minetest.get_current_modname()) .. "/"
|
||||||
|
|
||||||
local S = minetest.get_translator and minetest.get_translator("mobs_monster") or
|
local S
|
||||||
dofile(path .. "intllib.lua")
|
|
||||||
|
|
||||||
mobs.intllib = S
|
-- Check for translation method
|
||||||
|
local S
|
||||||
|
if minetest.get_translator ~= nil then
|
||||||
|
S = minetest.get_translator("mobs_monster") -- 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
|
||||||
|
|
||||||
|
mobs.intllib_monster = S
|
||||||
|
|
||||||
|
|
||||||
-- Check for custom mob spawn file
|
-- Check for custom mob spawn file
|
||||||
@ -43,4 +65,4 @@ end
|
|||||||
dofile(path .. "lucky_block.lua")
|
dofile(path .. "lucky_block.lua")
|
||||||
|
|
||||||
|
|
||||||
print (S("[MOD] Mobs Redo Monsters loaded"))
|
print ("[MOD] Mobs Redo Monsters loaded")
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
-- Support for the old multi-load method
|
|
||||||
dofile(minetest.get_modpath("intllib").."/init.lua")
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
|
|
||||||
local guard_types = {
|
local guard_types = {
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
|
|
||||||
-- Lava Flan by Zeg9 (additional textures by JurajVajda)
|
-- Lava Flan by Zeg9 (additional textures by JurajVajda)
|
||||||
|
|
||||||
|
@ -30,3 +30,7 @@ mobs.fireball.png was originally made by Sapier and edited by Benrob:
|
|||||||
--
|
--
|
||||||
-- (c) Sapier
|
-- (c) Sapier
|
||||||
-- Contact sapier a t gmx net
|
-- Contact sapier a t gmx net
|
||||||
|
|
||||||
|
Textures created by wwar (cc0)
|
||||||
|
mobs_dungeon_master_nether.png
|
||||||
|
mobs_dungeon_master_netherdeep.png
|
||||||
|
14
locale/mobs_monster.es.tr
Normal file
14
locale/mobs_monster.es.tr
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# textdomain:mobs_monster
|
||||||
|
Cobweb=Telarania
|
||||||
|
Dirt Monster=Mounstro de tierra
|
||||||
|
Dungeon Master=Maestro de mazmorra
|
||||||
|
Lava Flan=Flan de lava
|
||||||
|
Lava Pickaxe=Hacha de lava
|
||||||
|
Lava orb=Esfera de lava
|
||||||
|
Mese Monster=Mounstro de mese
|
||||||
|
#Obsidian Flan=
|
||||||
|
Oerkki=Oerkki
|
||||||
|
Sand Monster=Mounstro de arena
|
||||||
|
Spider=Arania
|
||||||
|
Stone Monster=Mounstro de piedra
|
||||||
|
Tree Monster=Mounstro de madera
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
|
|
||||||
-- Mese Monster by Zeg9
|
-- Mese Monster by Zeg9
|
||||||
|
|
||||||
@ -12,6 +11,9 @@ mobs:register_mob("mobs_monster:mese_monster", {
|
|||||||
shoot_interval = 0.5,
|
shoot_interval = 0.5,
|
||||||
arrow = "mobs_monster:mese_arrow",
|
arrow = "mobs_monster:mese_arrow",
|
||||||
shoot_offset = 2,
|
shoot_offset = 2,
|
||||||
|
--arrow_override = function(self)
|
||||||
|
-- self.velocity = 20
|
||||||
|
--end,
|
||||||
hp_min = 10,
|
hp_min = 10,
|
||||||
hp_max = 25,
|
hp_max = 25,
|
||||||
armor = 80,
|
armor = 80,
|
||||||
|
4
mod.conf
4
mod.conf
@ -1,4 +1,4 @@
|
|||||||
name = mobs_monster
|
name = mobs_monster
|
||||||
depends = default, mobs
|
depends = mobs
|
||||||
optional_depends = lucky_block, toolranks, intllib
|
optional_depends = default, lucky_block, toolranks, intllib
|
||||||
description = Adds many types of monsters.
|
description = Adds many types of monsters.
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
|
|
||||||
-- Oerkki by PilzAdam
|
-- Oerkki by PilzAdam
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
|
|
||||||
-- custom particle effects
|
-- custom particle effects
|
||||||
local effect = function(
|
local effect = function(
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
local get_velocity = function(self)
|
local get_velocity = function(self)
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
local stone_types = {
|
local stone_types = {
|
||||||
|
|
||||||
|
BIN
textures/mobs_dungeon_master_nether.png
Normal file
BIN
textures/mobs_dungeon_master_nether.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.1 KiB |
BIN
textures/mobs_dungeon_master_netherdeep.png
Normal file
BIN
textures/mobs_dungeon_master_netherdeep.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.7 KiB |
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
local S = mobs.intllib
|
local S = mobs.intllib_monster
|
||||||
|
|
||||||
local tree_types = {
|
local tree_types = {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user