Skip to content

Commit

Permalink
That's a good point
Browse files Browse the repository at this point in the history
  • Loading branch information
realforest2001 committed Nov 30, 2023
1 parent 4b3484c commit 114c05e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
9 changes: 2 additions & 7 deletions code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -448,14 +448,9 @@ GLOBAL_LIST_EMPTY(vending_products)
return FALSE
redeem_token(attacking_item, user)

/obj/structure/machinery/cm_vending/proc/get_token_type(obj/item/coin/marine/token)
if(!istype(token))
return VEND_TOKEN_VOID
return token.token_type

/obj/structure/machinery/cm_vending/proc/redeem_token(obj/item/token, mob/user)
/obj/structure/machinery/cm_vending/proc/redeem_token(obj/item/coin/marine/token, mob/user)
var/reward_typepath
switch(get_token_type(token))
switch(token.token_type)
if(VEND_TOKEN_VOID)
to_chat(user, SPAN_WARNING("ERROR: TOKEN NOT RECOGNISED."))
return FALSE
Expand Down
4 changes: 2 additions & 2 deletions code/game/machinery/vending/vendor_types/crew/synthetic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ GLOBAL_LIST_INIT(cm_vending_clothing_synth_snowflake, list(
req_access = list(ACCESS_MARINE_SYNTH)
vendor_role = list(JOB_SYNTH)

/obj/structure/machinery/cm_vending/own_points/experimental_tools/redeem_token(obj/item/token, mob/user)
if(get_token_type(token) == VEND_TOKEN_SYNTH)
/obj/structure/machinery/cm_vending/own_points/experimental_tools/redeem_token(obj/item/coin/marine/token, mob/user)
if(token.token_type == VEND_TOKEN_SYNTH)
if(user.drop_inv_item_to_loc(token, src))
available_points = 30
available_points_to_display = available_points
Expand Down

0 comments on commit 114c05e

Please sign in to comment.