[z2025] Use world state enum for adding/ remove a state in bg and various cleanups

Thanks to stfc for additional input

Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>

(based on commit 54f9eb7)

Signed-off-by: Nighoo <nighoo@overninethousand.de>

(cleaned version of f339eff)

(based on commit [s1636] - abc7282)