Skip to content

Commit

Permalink
Fixes perma sustenance vendor not selling to people (#221)
Browse files Browse the repository at this point in the history
* Fixes perma sustenance vendor not selling to people (#80666)

## About The Pull Request

Fixes #80568
Makes the whole asking for labour points only apply to the labour camp
sustenance vendor instead of all sustenance vendors

Changes the text you get for trying to buy from the sustenance vendor
without prisoner ID to clarify it only sells to prisoners

## Why It's Good For The Game

Billions of prisoners must eat moldy tofu

## Changelog
:cl:
fix: The sustenance vendor in perma actually serves food now
/:cl:

* Fixes perma sustenance vendor not selling to people

---------

Co-authored-by: uaioy <[email protected]>
Co-authored-by: NovaBot <[email protected]>
  • Loading branch information
3 people authored and Iajret committed Jan 3, 2024
1 parent 75c8f14 commit 5bb7339
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions code/modules/vending/sustenance.dm
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,11 @@
if(isliving(user))
var/mob/living/living_user = user
if(!(machine_stat & NOPOWER) && !istype(living_user.get_idcard(TRUE), /obj/item/card/id/advanced/prisoner))
speak("No valid labor points account found. Vending is not permitted.")
speak("No valid prisoner account found. Vending is not permitted.")
return
return ..()

/obj/machinery/vending/sustenance/proceed_payment(obj/item/card/id/paying_id_card, datum/data/vending_product/product_to_vend, price_to_use)
/obj/machinery/vending/sustenance/labor_camp/proceed_payment(obj/item/card/id/paying_id_card, datum/data/vending_product/product_to_vend, price_to_use)
if(!istype(paying_id_card, /obj/item/card/id/advanced/prisoner))
speak("I don't take bribes! Pay with labor points!")
return FALSE
Expand All @@ -66,7 +66,7 @@
paying_scum_id.points -= price_to_use
return TRUE

/obj/machinery/vending/sustenance/fetch_balance_to_use(obj/item/card/id/passed_id)
/obj/machinery/vending/sustenance/labor_camp/fetch_balance_to_use(obj/item/card/id/passed_id)
if(!istype(passed_id, /obj/item/card/id/advanced/prisoner))
return null //no points balance - no balance at all
var/obj/item/card/id/advanced/prisoner/paying_scum_id = passed_id
Expand Down

0 comments on commit 5bb7339

Please sign in to comment.