In general this is working well. Things I'm still wondering about:
May this "patch" mobs that use more than one mesh? Probably we don't have such now, maybe we will in the future, mods may have these?
The only correct way is to check on entity/player side... maybe check for items in ABM, but that would have to be profiled.
We probably want to punch with something else than self.object
. Not sure if this is material for this PR, but I know them punching themselves causes weird things in logs.
I think you should be able to use name selectors for it, like *.png
Considering incoming things like #4261, it'd be prudent to focus on groups like tool, weapon, armor, or such, as you said.
local function add_new_proportional_layer(player, hudbar_def, part_state, offset_y, offset_x_left, offset_x_right, value, texture_height_y, z_index)
?
Having that many arguments, you should…
Your second snippet has wrong namespaces. Besides, there's option 3:
table.update(vl_hudbars.settings, {
-- stuff here
})
Tbh the variable is misnamed if it isn't a boolean. Idk how useful that is, because you could as well check for the existence of the global table mcl_potions
instead of storing the variable…