Skip to content

Commit

Permalink
runtime fix and code maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
Birdtalon committed Dec 3, 2023
1 parent 94ef4d0 commit 5c1f4c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions code/game/machinery/vending/cm_vending.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 5c1f4c0

Please sign in to comment.