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
This commit is contained in:
RandomGamer123
2022-09-02 09:50:15 +12:00
committed by GitHub
parent 6011de221b
commit 3792bfb389
@@ -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)