mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
manufacturing lathe now prints items according to their quantity in the autolathe (#92439)
## About The Pull Request manufacturing lathe now prints items according to their quantity in the autolathe https://github.com/user-attachments/assets/c63764ff-08e1-410e-892f-0aa7539ff317 ## Why It's Good For The Game manufacturing lattice did not take into account the number of printed items at a time, which is why, for example, it produced 1 wire at a price of 5 ## Changelog 🆑 fix: manufacturing lathe now prints items according to their quantity in the autolathe /🆑
This commit is contained in:
@@ -143,7 +143,14 @@
|
||||
var/atom/movable/created
|
||||
if(is_stack)
|
||||
var/obj/item/stack/stack_item = initial(design.build_path)
|
||||
created = new stack_item(null, 1)
|
||||
var/max_stack_amount = initial(stack_item.max_amount)
|
||||
var/amount = initial(stack_item.amount)
|
||||
while(amount > max_stack_amount)
|
||||
var/obj/item/stack/new_stack = new stack_item(null, max_stack_amount)
|
||||
if(!send_resource(new_stack, dir))
|
||||
withheld = new_stack
|
||||
amount -= max_stack_amount
|
||||
created = new stack_item(null, amount)
|
||||
else
|
||||
created = new design.build_path(null)
|
||||
split_materials_uniformly(materials_needed, target_object = created)
|
||||
@@ -155,7 +162,6 @@
|
||||
if(!send_resource(created, dir))
|
||||
withheld = created
|
||||
|
||||
|
||||
/obj/machinery/power/manufacturing/lathe/proc/finalize_build()
|
||||
print_sound.stop()
|
||||
deltimer(busy)
|
||||
|
||||
Reference in New Issue
Block a user