mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-02-07 23:28:10 +00:00
To heck with it here we go looks good enough
Also - Increases the number of memes in the codebase
This commit is contained in:
@@ -3,22 +3,28 @@
|
||||
var/list/preferences_datums = list()
|
||||
|
||||
var/global/list/special_role_times = list( //minimum age (in days) for accounts to play these roles
|
||||
num2text(ROLE_PAI) = 0,
|
||||
num2text(ROLE_TRAITOR) = 7,
|
||||
num2text(ROLE_CHANGELING) = 14,
|
||||
num2text(ROLE_SHADOWLING) = 14,
|
||||
num2text(ROLE_WIZARD) = 14,
|
||||
num2text(ROLE_REV) = 14,
|
||||
num2text(ROLE_VAMPIRE) = 14,
|
||||
num2text(ROLE_BLOB) = 14,
|
||||
num2text(ROLE_REVENANT) = 14,
|
||||
num2text(ROLE_OPERATIVE) = 21,
|
||||
num2text(ROLE_CULTIST) = 21,
|
||||
num2text(ROLE_RAIDER) = 21,
|
||||
num2text(ROLE_ALIEN) = 21,
|
||||
num2text(ROLE_NINJA) = 21,
|
||||
num2text(ROLE_MUTINEER) = 21,
|
||||
num2text(ROLE_MALF) = 30,
|
||||
ROLE_PAI = 0,
|
||||
ROLE_POSIBRAIN = 0,
|
||||
ROLE_GUARDIAN = 0,
|
||||
ROLE_TRAITOR = 7,
|
||||
ROLE_CHANGELING = 14,
|
||||
ROLE_SHADOWLING = 14,
|
||||
ROLE_WIZARD = 14,
|
||||
ROLE_REV = 14,
|
||||
ROLE_VAMPIRE = 14,
|
||||
ROLE_BLOB = 14,
|
||||
ROLE_REVENANT = 14,
|
||||
ROLE_OPERATIVE = 21,
|
||||
ROLE_CULTIST = 21,
|
||||
ROLE_RAIDER = 21,
|
||||
ROLE_ALIEN = 21,
|
||||
ROLE_DEMON = 21,
|
||||
ROLE_SENTIENT = 21,
|
||||
// ROLE_GANG = 21,
|
||||
ROLE_BORER = 21,
|
||||
ROLE_NINJA = 21,
|
||||
ROLE_MUTINEER = 21,
|
||||
ROLE_MALF = 30,
|
||||
)
|
||||
|
||||
/proc/player_old_enough_antag(client/C, role)
|
||||
@@ -1429,7 +1435,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
|
||||
var/cleaned_r = sql_sanitize_text(r)
|
||||
if(r != cleaned_r) // up to no good
|
||||
message_admins("[user] attempted an href exploit! (This could have possibly lead to a \"Bobby Tables\" exploit, so they're probably up to no good). String: [r] ID: [last_id] IP: [last_ip]")
|
||||
user << "<span class='userdanger'>Please don't break the server.</span>"
|
||||
user << "<span class='userdanger'>Stop right there, criminal scum</span>"
|
||||
else
|
||||
be_special ^= r
|
||||
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
// Might as well scrub out any malformed be_special list entries while we're here
|
||||
for (var/role in be_special)
|
||||
if(!(role in special_roles))
|
||||
log_to_dd("[C.key] had a malformed role entry: '[role]'. Removing!")
|
||||
be_special -= role
|
||||
|
||||
var/DBQuery/query = dbcon.NewQuery({"UPDATE [format_table_name("player")]
|
||||
@@ -392,19 +393,23 @@
|
||||
return
|
||||
return 1
|
||||
|
||||
// If you see this proc lying around and don't know why it's there, expunge it, as this is for a short-term DB update
|
||||
// If you see this proc lying around and don't know why it's there, expunge it, as this is for a short-term DB update, starting 27/12/2015
|
||||
// 0 on failed update, 1 on success
|
||||
/datum/preferences/proc/old_roles_to_new(var/client/C)
|
||||
var/DBQuery/query = dbcon.NewQuery({"
|
||||
SELECT be_special
|
||||
FROM [format_table_name("players")]
|
||||
FROM [format_table_name("player")]
|
||||
WHERE ckey='[C.ckey]'"})
|
||||
if(!query.Execute())
|
||||
var/err = query.ErrorMsg()
|
||||
log_game("SQL NOTICE: be_special has been purged from the database, bug the coders. Error : \[[err]\]\n")
|
||||
message_admins("SQL NOTICE: be_special has been purged from the database, bug the coders. Error : \[[err]\]\n")
|
||||
return 0
|
||||
var/old_be_special = query.item[1]
|
||||
var/old_be_special
|
||||
while(query.NextRow())
|
||||
old_be_special = text2num(query.item[1])
|
||||
if(isnull(old_be_special))
|
||||
message_admins("SQL NOTICE: be_special has been purged from the database, bug the coders.\n")
|
||||
return 0
|
||||
|
||||
old_be_special = sanitize_integer(old_be_special, 0, 65535)
|
||||
var/B_traitor = 1
|
||||
var/B_operative = 2
|
||||
var/B_changeling = 4
|
||||
@@ -445,6 +450,7 @@
|
||||
be_special |= ROLE_ALIEN
|
||||
be_special |= ROLE_SENTIENT
|
||||
be_special |= ROLE_DEMON
|
||||
be_special |= ROLE_BORER
|
||||
if(128)
|
||||
be_special |= ROLE_PAI
|
||||
be_special |= ROLE_POSIBRAIN
|
||||
@@ -453,7 +459,6 @@
|
||||
be_special |= ROLE_CULTIST
|
||||
if(512)
|
||||
be_special |= ROLE_NINJA
|
||||
// be_special |= ROLE_GANG since they will occupy the same ID and all
|
||||
if(1024)
|
||||
be_special |= ROLE_RAIDER
|
||||
if(2048)
|
||||
|
||||
Reference in New Issue
Block a user