diff --git a/code/game/dna.dm b/code/game/dna.dm index b62df08103b..6c625ba6f6e 100644 --- a/code/game/dna.dm +++ b/code/game/dna.dm @@ -232,11 +232,12 @@ var/list/blocks = new /list(DNA_STRUC_ENZYMES_BLOCKS) //on-off status for each block for(var/i in bad_se_blocks) //bad mutations blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), BAD_MUTATION_DIFFICULTY) == BAD_MUTATION_DIFFICULTY) + blocks[RACEBLOCK] = (deconstruct_block(getblock(M.dna.struc_enzymes, RACEBLOCK), BAD_MUTATION_DIFFICULTY) == BAD_MUTATION_DIFFICULTY) for(var/i in good_se_blocks) //good mutations blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), GOOD_MUTATION_DIFFICULTY) == GOOD_MUTATION_DIFFICULTY) for(var/i in op_se_blocks) //Overpowered mutations...extra difficult to obtain blocks[i] = (deconstruct_block(getblock(M.dna.struc_enzymes, i), OP_MUTATION_DIFFICULTY) == OP_MUTATION_DIFFICULTY) - + if(blocks[NEARSIGHTEDBLOCK]) M.disabilities |= NEARSIGHTED M << "\red Your eyes feel strange." diff --git a/code/game/gamemodes/setupgame.dm b/code/game/gamemodes/setupgame.dm index ae0b63b7a8c..d830512ff66 100644 --- a/code/game/gamemodes/setupgame.dm +++ b/code/game/gamemodes/setupgame.dm @@ -25,7 +25,7 @@ NERVOUSBLOCK = pick_n_take(avnums) RACEBLOCK = pick_n_take(avnums) - bad_se_blocks = list(RACEBLOCK,NEARSIGHTEDBLOCK,EPILEPSYBLOCK,STRANGEBLOCK,COUGHBLOCK,CLUMSYBLOCK,TOURETTESBLOCK,NERVOUSBLOCK,DEAFBLOCK,BLINDBLOCK) + bad_se_blocks = list(NEARSIGHTEDBLOCK,EPILEPSYBLOCK,STRANGEBLOCK,COUGHBLOCK,CLUMSYBLOCK,TOURETTESBLOCK,NERVOUSBLOCK,DEAFBLOCK,BLINDBLOCK) good_se_blocks = list(FIREBLOCK,XRAYBLOCK) op_se_blocks = list(HULKBLOCK,TELEBLOCK) diff --git a/code/modules/admin/IsBanned.dm b/code/modules/admin/IsBanned.dm index a8f369f0d2d..73733ac4928 100644 --- a/code/modules/admin/IsBanned.dm +++ b/code/modules/admin/IsBanned.dm @@ -1,7 +1,8 @@ //Blocks an attempt to connect before even creating our client datum thing. world/IsBanned(key,address,computer_id) - if(ckey(key) in admin_datums) + var/ckey = ckey(key) + if(ckey in admin_datums) //It has proven to be a bad idea to make admins completely immune to bans, making them have to wait for someone with daemon access //to add a daemon ban to finally stop them. Admin tempbans and admin permabans are special, high-level ban types, which are there to help //deal with rogue admins quicker. If admin tempbans or admin permabans are ever needed, it should be consider a big deal. The same applies if @@ -9,14 +10,12 @@ world/IsBanned(key,address,computer_id) //computer id, set it on his computer, get himself banned, resulting in the admin getting banned aswell. - this happens to also be the reason why //admins were immune to bans in the first place. if(!config.ban_legacy_system) - var/ckeytext = ckey(key) - if(!establish_db_connection()) - world.log << "Ban database connection failure. Admin [ckeytext] not checked" - diary << "Ban database connection failure. Admin [ckeytext] not checked" + world.log << "Ban database connection failure. Admin [ckey] not checked" + diary << "Ban database connection failure. Admin [ckey] not checked" return - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckey]') AND (bantype = 'ADMIN_PERMABAN' OR (bantype = 'ADMIN_TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") query.Execute() @@ -52,14 +51,14 @@ world/IsBanned(key,address,computer_id) log_access("Failed Login: [src] - Banned: ToR") message_admins("\blue Failed Login: [src] - Banned: ToR") //ban their computer_id and ckey for posterity - AddBan(ckey(key), computer_id, "Use of ToR", "Automated Ban", 0, 0) + AddBan(ckey, computer_id, "Use of ToR", "Automated Ban", 0, 0) return list("reason"="Using ToR", "desc"="\nReason: The network you are using to connect has been banned.\nIf you believe this is a mistake, please request help at [config.banappeals]") if(config.ban_legacy_system) //Ban Checking - . = CheckBan( ckey(key), computer_id, address ) + . = CheckBan( ckey, computer_id, address ) if(.) log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]") message_admins("\blue Failed Login: [key] id:[computer_id] ip:[address] - Banned [.["reason"]]") @@ -68,12 +67,9 @@ world/IsBanned(key,address,computer_id) return ..() //default pager ban stuff else - - var/ckeytext = ckey(key) - if(!establish_db_connection()) - world.log << "Ban database connection failure. Key [ckeytext] not checked" - diary << "Ban database connection failure. Key [ckeytext] not checked" + world.log << "Ban database connection failure. Key [ckey] not checked" + diary << "Ban database connection failure. Key [ckey] not checked" return var/failedcid = 1 @@ -89,7 +85,7 @@ world/IsBanned(key,address,computer_id) failedcid = 0 cidquery = " OR computerid = '[computer_id]' " - var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckeytext]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") + var/DBQuery/query = dbcon.NewQuery("SELECT ckey, ip, computerid, a_ckey, reason, expiration_time, duration, bantime, bantype FROM erro_Ban WHERE (ckey = '[ckey]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR (bantype = 'TEMPBAN' AND expiration_time > Now())) AND isnull(unbanned)") query.Execute()