[MIRROR] Add check for ordering permissions before using department account as payee for NIRN, also fixes #68765 [MDB IGNORE] (#15984)

* Add check for ordering permissions before using department account as payee for NIRN, also fixes #68765 (#69290)

About The Pull Request

See title
Why It's Good For The Game

Fixes #68765, also currently, while NIRN is meant to parallel the features of the cargo console for non-heads of staff, requests are also paid by the department account instead of the general cargo budget for non-heads of staff
Changelog

cl
fix: Putting a budget card into NIRN now gives the proper error message if you are trying to buy something privately, and treat you as a normal cargo request order by someone without any permissions otherwise
fix: NIRN orders should now charge the department that bought it only if a head of staff ordered it
/cl

* Add check for ordering permissions before using department account as payee for NIRN, also fixes #68765

Co-authored-by: RandomGamer123 <31096837+RandomGamer123@users.noreply.github.com>
This commit is contained in:
SkyratBot
2022-09-04 15:15:04 +02:00
committed by GitHub
parent 547b485ac8
commit bbd1afb772
@@ -234,7 +234,7 @@
computer.say("ERROR: Small crates may only be purchased by private accounts.")
return
if(!self_paid && ishuman(usr) && !account)
if(!requestonly && !self_paid && ishuman(usr) && !account)
var/obj/item/card/id/id_card = card_slot?.GetID()
account = SSeconomy.get_dep_account(id_card?.registered_account?.account_job.paycheck_department)