set yl_speak_up.orig_mobs_update_tag only *once*
This commit is contained in:
parent
d5cfe54938
commit
336c02694c
2
init.lua
2
init.lua
@ -233,7 +233,7 @@ yl_speak_up.reload = function(modpath, log_entry)
|
||||
-- some general functions that are useful for mobs_redo
|
||||
-- (react to right-click, nametag color etc.)
|
||||
-- only gets loaded if mobs_redo (mobs) exists as mod
|
||||
dofile(yl_speak_up.modpath .. "interface_mobs_api.lua")
|
||||
dofile(modpath .. "interface_mobs_api.lua")
|
||||
|
||||
-- initialize and load all registered generic dialogs
|
||||
yl_speak_up.load_generic_dialogs()
|
||||
|
@ -92,7 +92,10 @@ end
|
||||
|
||||
-- we need to override this function from mobs_redo mod so that color
|
||||
-- changes to the name tag color are possible
|
||||
yl_speak_up.orig_mobs_update_tag = mobs.mob_class.update_tag
|
||||
-- BUT: Only do this once. NOT at each reset!
|
||||
if(not(yl_speak_up.orig_mobs_update_tag)) then
|
||||
yl_speak_up.orig_mobs_update_tag = mobs.mob_class.update_tag
|
||||
end
|
||||
-- update nametag and infotext
|
||||
mobs.mob_class.update_tag = function(self)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user