minetest-mods / skinsdb

Player skin mod, supporting unified_inventory, sfinv and smart_inventory
27 stars 41 forks source link

Bugfix #8 Create and get UI-context on demand #9

Closed bell07 closed 6 years ago

bell07 commented 6 years ago

Should solve the Issue #8

If UE does call the register_on_joinplayer before skinsdb the context table is created on demand now

SmallJoker commented 6 years ago

I'm not sure whether this is the optimal solution. Apparently it works but we have u_i in our dependency list, which means that our on_joinplayer callback is registered before the one in u_i.

bell07 commented 6 years ago

Is it ensured in core the registered callbacks are called in registration order after init phase? My asumption was the dependency ensures the module loading order (dofile init.lua) only.

I do not have an other explanation or idea how to fix

bell07 commented 6 years ago

@SmallJoker now I understand what you meant. We have u_e in skinsdb dependency so u_e callback is registered before skinsdb one. That is may the reason why the u_e callback is executed before the skinsdb callback. But if this is the reason, why it does work sometimes and does not work in other cases? What is the right way to solve such issues?