mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-10 09:42:29 +00:00
Techfabs print 5x cable coil (#84067)
## About The Pull Request - Fixes #84050 ## Changelog 🆑 fix: Techfabs now print 5x cable coil /🆑
This commit is contained in:
@@ -411,14 +411,25 @@
|
||||
|
||||
var/atom/movable/created
|
||||
if(is_stack)
|
||||
created = new design.build_path(target, items_remaining)
|
||||
var/obj/item/stack/stack_item = initial(design.build_path)
|
||||
var/max_stack_amount = initial(stack_item.max_amount)
|
||||
var/number_to_make = (initial(stack_item.amount) * items_remaining)
|
||||
while(number_to_make > max_stack_amount)
|
||||
created = new stack_item(null, max_stack_amount) //it's imporant to spawn things in nullspace, since obj's like stacks qdel when they enter a tile/merge with other stacks of the same type, resulting in runtimes.
|
||||
created.pixel_x = created.base_pixel_x + rand(-6, 6)
|
||||
created.pixel_y = created.base_pixel_y + rand(-6, 6)
|
||||
created.forceMove(target)
|
||||
number_to_make -= max_stack_amount
|
||||
|
||||
created = new stack_item(null, number_to_make)
|
||||
else
|
||||
created = new design.build_path(target)
|
||||
created = new design.build_path(null)
|
||||
split_materials_uniformly(design_materials, material_cost_coefficient, created)
|
||||
|
||||
created.pixel_x = created.base_pixel_x + rand(-6, 6)
|
||||
created.pixel_y = created.base_pixel_y + rand(-6, 6)
|
||||
SSblackbox.record_feedback("nested tally", "lathe_printed_items", 1, list("[type]", "[created.type]"))
|
||||
created.forceMove(target)
|
||||
|
||||
if(is_stack)
|
||||
items_remaining = 0
|
||||
|
||||
Reference in New Issue
Block a user