moved yl_speak_up.init_mob_table to a more appropriate place

This commit is contained in:
Sokomine 2022-09-14 22:54:53 +02:00
parent 46ebb1d894
commit ffd98fc924
3 changed files with 7 additions and 5 deletions

View File

@ -27,10 +27,6 @@ yl_speak_up.npc_owner = {}
-- store the current trade between player and npc in case it gets edited in the meantime
yl_speak_up.trade = {}
function yl_speak_up.init_mob_table()
return false
end
yl_speak_up.reset_vars_for_player = function(pname, reset_fs_version)
yl_speak_up.speak_to[pname] = nil

View File

@ -145,6 +145,8 @@ if(yl_speak_up.enable_yl_mobs) then
dofile(modpath .. "interface_mobs_api.lua")
-- the actual mobs, using mobs_redo
dofile(modpath .. "mobs.lua")
-- may store a table of registered mobs in the future; currently not really used
yl_speak_up.mob_table = yl_speak_up.init_mob_table() or {}
end
-- register all the necessary things; this ought to be done only once
@ -153,7 +155,6 @@ end
dofile(modpath .. "register_once.lua")
yl_speak_up.mob_table = yl_speak_up.init_mob_table() or {}
minetest.log("action","[MOD] yl_speak_up loaded")

View File

@ -4,6 +4,11 @@
-- Mob functions
--###
function yl_speak_up.init_mob_table()
return false
end
function yl_speak_up.on_rightclick(self, clicker)
--local item = clicker:get_wielded_item()
local name = clicker:get_player_name()