Fixes a define from 2017 (#37522)

* Fixes a define from 2017

* The defines

* forgot that bit
This commit is contained in:
ShiftyRail
2025-05-06 14:05:18 +01:00
committed by GitHub
parent 773239a9aa
commit d5c96122cf
5 changed files with 13 additions and 9 deletions

3
__DEFINES/economy.dm Normal file
View File

@@ -0,0 +1,3 @@
#define SECURITY_AUTO_LOGIN 0
#define SECURITY_MANUAL_LOGIN 1
#define SECURITY_CARD_AND_MANUAL_LOGIN 2

View File

@@ -174,18 +174,18 @@ log transactions
if(CHANGE_SECURITY_LEVEL)
dat += "Select a new security level for this account:<br><hr>"
var/text = "Zero - Either the account number or card is required to access this account. Vendor transactions will pay from your bank account if your virtual wallet has insufficient funds."
if(authenticated_account.security_level != 0)
if(authenticated_account.security_level != SECURITY_AUTO_LOGIN)
if(authenticated_account.disabled)
text = "<b>ACCOUNT DISABLED CAN NOT USE</b><br><s>[text]</s>"
else
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=0'>[text]</a>"
dat += "[text]<hr>"
text = "One - An account number and pin must be manually entered to access this account and process transactions."
if(authenticated_account.security_level != 1)
if(authenticated_account.security_level != SECURITY_MANUAL_LOGIN)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=1'>[text]</a>"
dat += "[text]<hr>"
text = "Two - In addition to account number and pin, a card is required to access this account and process transactions."
if(authenticated_account.security_level != 2)
if(authenticated_account.security_level != SECURITY_CARD_AND_MANUAL_LOGIN)
text = "<A href='?src=\ref[src];choice=change_security_level;new_security_level=2'>[text]</a>"
dat += {"[text]<hr><br>
<A href='?src=\ref[src];choice=view_screen;view_screen=0'>Back</a>"}

View File

@@ -129,9 +129,9 @@ var/station_bonus = 0 //A bonus to station allowance that gets reset after wage
var/remote_access_pin = 0
var/money = 0
var/list/transaction_log = list()
var/security_level = 1 //0 - auto-identify from worn ID, require only account number
//1 - require manual login / account number and pin
//2 - require card and manual login
var/security_level = SECURITY_MANUAL_LOGIN //0 - auto-identify from worn ID, require only account number
//1 - require manual login / account number and pin
//2 - require card and manual login
var/virtual = 0
var/virtual_wallet_wage_ratio = 50
var/wage_gain = 0 // How much an account gains per 'wage' tick.

View File

@@ -122,9 +122,9 @@ var/global/no_pin_for_debit = TRUE
to_chat(user, "[bicon(src)] <span class='warning'>Account disabled.</span>")
return CARD_CAPTURE_ACCOUNT_DISABLED
switch(account.security_level)
if (0, 1)
if (SECURITY_AUTO_LOGIN, SECURITY_MANUAL_LOGIN)
return CARD_CAPTURE_SUCCESS
if(2) // Only checking it at max level, this is too annoying otherwise...
if(SECURITY_CARD_AND_MANUAL_LOGIN) // Only checking it at max level, this is too annoying otherwise...
var/user_loc = user.loc
if(account.security_level >= 2 && !card)
// Security level is 2 and the card is not present, fail.
@@ -338,4 +338,4 @@ var/global/no_pin_for_debit = TRUE
#undef PRIMARY_NO_FUNDS
#undef SECONDARY_NO_FUNDS
#undef PRIMARY_SAME_AS_DEST
#undef SECONDARY_SAME_AS_DEST
#undef SECONDARY_SAME_AS_DEST

View File

@@ -34,6 +34,7 @@
#include "__DEFINES\component_desires.dm"
#include "__DEFINES\dates.dm"
#include "__DEFINES\disease2.dm"
#include "__DEFINES\economy.dm"
#include "__DEFINES\error_hander.dm"
#include "__DEFINES\flags.dm"
#include "__DEFINES\game.dm"