Skip to content

Commit

Permalink
Update _vending.dm (#22766)
Browse files Browse the repository at this point in the history
  • Loading branch information
ynot01 authored Oct 25, 2024
1 parent df0de4d commit 18d011d
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions code/modules/vending/_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY CANISTER CHARGES in vending_items.dm
*/

#define MAX_VENDING_INPUT_AMOUNT 30
/**
* # vending record datum
*
Expand Down Expand Up @@ -197,10 +196,10 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C

/// how many items have been inserted in a vendor
var/loaded_items = 0

///Name of lighting mask for the vending machine
var/light_mask

/// used for narcing on underages
var/obj/item/radio/alertradio

Expand Down Expand Up @@ -485,9 +484,6 @@ GLOBAL_LIST_EMPTY(vending_products)
var/loaded = 0
var/denied_items = 0
for(var/obj/item/the_item in T.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 chef compartment is full."))
break
if(canLoadItem(the_item) && loadingAttempt(the_item,user))
SEND_SIGNAL(T, COMSIG_TRY_STORAGE_TAKE, the_item, src, TRUE)
loaded++
Expand Down Expand Up @@ -693,7 +689,7 @@ GLOBAL_LIST_EMPTY(vending_products)
obj_flags |= EMAGGED
to_chat(user, span_notice("You short out the product lock on [src]."))
return TRUE

/obj/machinery/vending/_try_interact(mob/user)
if(seconds_electrified && !(stat & NOPOWER))
if(shock(user, 100))
Expand Down Expand Up @@ -966,7 +962,7 @@ GLOBAL_LIST_EMPTY(vending_products)
if(COOLDOWN_FINISHED(src, product_ad_cooldown) && LAZYLEN(small_ads) > 0)
COOLDOWN_START(src, product_ad_cooldown, product_cd)
current_ad = pick(small_ads)

if(seconds_electrified > MACHINE_NOT_ELECTRIFIED)
seconds_electrified--

Expand Down

0 comments on commit 18d011d

Please sign in to comment.