reloadGame beta
Function of @v12-engine/engine
ts
export declare function reloadGame(world: World, game: Rules): void;Puts a new version of a world's game into it while it runs, as a game's files are saved during development (hot reload): its unit types, abilities, buffs, items, upgrades and races, the code of their effects and of its orders, and its rules. What world.redefine changed while it ran stays over them, and its units take their types as they are now. What the world was made of otherwise (its systems, hooks, components, resources) is not: a change to those wants a new game, which is said (hotRules loads the page again for one). Throws for another game, or a module that is no game (as createRegistry)