[NO GBP] Vendor load limit Qol & custom vendor deconstruction fix (#92559)

## About The Pull Request
- Fixes runtime when deconstructing custom vending machine
- Removes arbitrary limit on loading items from a bag into the vending
machine.

## Changelog
🆑
qol: you can stock more than 30 items from a bag into an vending machine
fix: fixes runtime when deconstructing custom vending machines
/🆑
This commit is contained in:
SyncIt21
2025-08-17 07:20:43 +05:30
committed by GitHub
parent 1f6444b3a5
commit 3db06ae8b1
2 changed files with 2 additions and 8 deletions
+2
View File
@@ -128,6 +128,8 @@
/obj/machinery/vending/custom/restock(obj/item/vending_refill/canister)
. = 0
if(!canister.products?.len)
if(!canister.products)
canister.products = list()
return
var/update_static_data = FALSE
-8
View File
@@ -1,6 +1,3 @@
/// Maximum amount of items in a storage bag that we're transferring items to the vendor from.
#define MAX_VENDING_INPUT_AMOUNT 30
//================================TOOL ACTS==============================================
/obj/machinery/vending/crowbar_act(mob/living/user, obj/item/attack_item)
if(!component_parts)
@@ -115,9 +112,6 @@
var/loaded = 0
var/denied_items = 0
for(var/obj/item/the_item in storage_item.contents)
if(contents.len >= MAX_VENDING_INPUT_AMOUNT) // no more than 30 item can fit inside, legacy from snack vending although not sure why it exists
to_chat(user, span_warning("[src]'s compartment is full."))
break
if(loadingAttempt(the_item, user))
loaded++
else
@@ -231,5 +225,3 @@
. = ..()
if (!Adjacent(user, src))
return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN
#undef MAX_VENDING_INPUT_AMOUNT