mt-mods / homedecor_modpack

home decor
Other
2 stars 9 forks source link

restart smoke particle effects on reload #48

Closed superfloh247 closed 1 year ago

wsor4035 commented 1 year ago

@superfloh247 really is no why to this pr, like is it error correction, minetest just stopping particles randomly, etc. could you expand on the title please?

OgelGames commented 1 year ago

@superfloh247 really is no why to this pr, like is it error correction, minetest just stopping particles randomly, etc. could you expand on the title please?

It's pretty clear what the "why" is, particle spawners don't persist over server restarts. It's the same reason this LBM exists: https://github.com/mt-mods/homedecor_modpack/blob/8893d66dc64e4d8d1b51cb9da1ccf9fe43e802d7/fake_fire/init.lua#L326-L335

I'm spotting a few bugs in the code (existing ones, not in this PR), namely the LBMs don't respect the right-click-toggled state, and fake_fire:ice_fire seems to never remove its fire particles, added here: https://github.com/mt-mods/homedecor_modpack/blob/8893d66dc64e4d8d1b51cb9da1ccf9fe43e802d7/fake_fire/init.lua#L114

superfloh247 commented 1 year ago

the LBMs don't respect the right-click-toggled state

minetest removes the particle spawner anyway.

    local this_spawner_meta = minetest.get_meta(pos)
    local id = this_spawner_meta:get_int("smoky")

id = 1 after restart of the game, but no particles. so just stopping and restarting the smoke seems to be the only working solution

Niklp09 commented 1 year ago

If there are no other objections, I would merge the PR