diff --git a/code/game/machinery/vending/cm_vending.dm b/code/game/machinery/vending/cm_vending.dm index b0a09dcd1767..d00d7dd0d6ae 100644 --- a/code/game/machinery/vending/cm_vending.dm +++ b/code/game/machinery/vending/cm_vending.dm @@ -441,13 +441,6 @@ GLOBAL_LIST_EMPTY(vending_products) tgui_interact(user) /// Handles redeeming coin tokens. -/obj/structure/machinery/cm_vending/attackby(obj/item/attacking_item, mob/user) - if(!istype(attacking_item, /obj/item/coin/marine)) - ..() - if(!can_access_to_vend(user, ignore_hack = TRUE)) - return FALSE - redeem_token(attacking_item, user) - /obj/structure/machinery/cm_vending/proc/redeem_token(obj/item/coin/marine/token, mob/user) var/reward_typepath switch(token.token_type) @@ -766,6 +759,13 @@ GLOBAL_LIST_EMPTY(vending_products) hack_access(user) return TRUE + ///If we want to redeem a token + else if(istype(W, /obj/item/coin/marine)) + if(!can_access_to_vend(user, ignore_hack = TRUE)) + return FALSE + redeem_token(W, user) + return FALSE + ..() /obj/structure/machinery/cm_vending/proc/get_listed_products(mob/user)