- Engine
- UE 5.5
- Роль
- Role
- всё, соло
- everything, solo
- Код
- Code
- 100% Blueprints
- Версия
- Version
- 0.0.2
Сдача заказа
Order delivery
Точка сдачи сравнивает содержимое коробки с активными заказами. Нашёлся заказ: начисляются очки и заказ закрывается. Не нашёлся: коробка очищается.The delivery zone compares the box contents with active orders. If an order matches, score is added and the order closes. If not, the box is emptied.
Машина принимает предмет
Machine accepts an item
Все машины наследуются от BP_MasterMachine. Плавильня отличается только Data Asset с рецептами.All machines inherit from BP_MasterMachine. The smelter differs only by its recipe Data Asset.
Решения
Decisions
Предметы, рецепты, машины и пулы заказов лежат в Primary Data Assets. Новый слиток или рецепт добавляется без новой логики.
Items, recipes, machines and order pools are Primary Data Assets. A new ingot or recipe needs no new logic.
Машины и менеджер заказов работают на таймерах. Счёт и коробка обновляют UI только по событию, без биндингов каждый кадр.
Machines and the order manager run on timers. Score and box UI update only on events, with no per-frame bindings.
Взаимодействие идёт через BPI_Interact и BPI_OpenMenu. Персонажу не нужно знать класс объекта.
Interaction goes through BPI_Interact and BPI_OpenMenu. The character does not need to know the object's class.
Число предметов в заказе, время на предмет и лимит заказов настраиваются в Data Asset уровня.
Items per order, time per item and the active order limit are set in the level's Data Asset.
Pending kill при броске. Брошенный предмет включал коллизию, коробка или машина сразу забирала его и вызывала Destroy Actor. Код броска ещё выполнялся и обращался к удалённым компонентам. Решение: предмет отключает коллизию и исчезает через Set Life Span 0.05. Бросок успевает завершиться, и предмет не засчитывается дважды.
Pending kill on throw. A thrown item enabled its collision, and the box or machine grabbed it at once and called Destroy Actor. The throw code was still running and touched destroyed components. Fix: the item disables collision and is removed with Set Life Span 0.05. The throw finishes, and the item cannot be counted twice.