# Source URL: https://dev.epicgames.com/documentation/en-us/uefn/lego-santas-toy-factory-in-unreal-editor-for-fortnite
# Local doc: epic-docs/community/snippets/epic-sample/santas-toy-factory-tycoon-core.md
# Section: Santa's Toy Factory — Tycoon Core (game loop)
**`factory_manager.verse`**
* ```
# This file defines the factory_manager that handles initialising and running a factory.
# It is also able to calculate how much was produced while the player was offline.
# Finally, it can calculate when the factory storage will be full.
using { /Fortnite.com/Devices }
using { /UnrealEngine.com/Temporary/SpatialMath }
using { /Verse.org/Simulation }
using { Config }
using { Persistence }
using { Verse.Scripts.TimeSystem }
using { UserInterface }
using { Utility }
# The minimum distance a product must move on the belt before the mould can produce again.
FactoryBeltMinDistanceToProduce<public>:float = 4.0
factory_manager<public> := class(creative_device):
# The belts of the factory.
@editable
FactoryBelts:[]factory_belt = array{}
# The moulds of the factory.
@editable
Verse Library
verse
01 Santa S Toy Factory Tycoon Core Game Loop
Manages factory production logic, calculates offline progress, tracks storage capacity, and handles UI updates.
extracted-snippets/community/snippets/epic-sample/santas-toy-factory-tycoon-core/01-santa-s-toy-factory-tycoon-core-game-loop.verse
Sign in free to read the full source 🌴
This Verse Library file is members-only. Create a free account to view the complete source and download the .verse file.