Skip to content

Commit

Permalink
Vending Machines no longer charge for their products (shiptest-ss13#922)
Browse files Browse the repository at this point in the history
Co-authored-by: Mark Suckerberg <[email protected]>
  • Loading branch information
ZephyrTFA and Mark Suckerberg authored Mar 29, 2022
1 parent c06e8e4 commit 7e6eb5c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions code/modules/mining/machine_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
mining_point_vendor = TRUE
default_price = 100
extra_price = 200
all_items_free = FALSE
// Mining products are handled differently, because I am too lazy to convert this list stolen from the old vendor.
products = list( //if you add something to this, please, for the love of god, sort it by price/type. use tabs and not spaces.
/obj/item/stack/marker_beacon/thirty = 6,
Expand Down Expand Up @@ -86,6 +87,10 @@
return
return ..()

/obj/machinery/vending/mining_equipment/freebie(mob/fatty, freebies)
message_admins("proc freebie was called on [src] which should never happen. I am causing a runtime to print the stack trace. inform a maintainer")
CRASH("freebie called on [src]")

/obj/machinery/vending/mining_equipment/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer)
var/selection = show_radial_menu(redeemer, src, voucher_items, require_near = TRUE, tooltips = TRUE)
if(!selection || !Adjacent(redeemer) || QDELETED(voucher) || voucher.loc != redeemer)
Expand Down
4 changes: 2 additions & 2 deletions code/modules/vending/_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
var/age_restrictions = TRUE

///A variable to change on a per instance basis on the map that allows the instance to remove cost and ID requirements
var/all_items_free = FALSE //change this on the object on the map. DO NOT APPLY THIS GLOBALLY.
var/all_items_free = TRUE

///ID's that can load this vending machine wtih refills
var/list/canload_access_list
Expand All @@ -168,7 +168,6 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
/// used for narcing on underages
var/obj/item/radio/Radio


/**
* Initialize the vending machine
*
Expand Down Expand Up @@ -953,6 +952,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
max_integrity = 400
payment_department = NO_FREEBIES
refill_canister = /obj/item/vending_refill/custom
all_items_free = FALSE
/// where the money is sent
var/datum/bank_account/private_a
/// max number of items that the custom vendor can hold
Expand Down

0 comments on commit 7e6eb5c

Please sign in to comment.