Merge branch 'master' of https://github.com/Citadel-Station-13/Citadel-Station-13 into tggenetics
This commit is contained in:
@@ -7,22 +7,33 @@
|
||||
#define STICKYBAN_MAX_ADMIN_MATCHES 2
|
||||
|
||||
/world/IsBanned(key,address,computer_id,type,real_bans_only=FALSE)
|
||||
var/static/key_cache = list()
|
||||
if(!real_bans_only)
|
||||
if(key_cache[key])
|
||||
return list("reason"="concurrent connection attempts", "desc"="You are attempting to connect too fast. Try again.")
|
||||
key_cache[key] = 1
|
||||
|
||||
if (!key || !address || !computer_id)
|
||||
if(real_bans_only)
|
||||
key_cache[key] = 0
|
||||
return FALSE
|
||||
log_access("Failed Login (invalid data): [key] [address]-[computer_id]")
|
||||
key_cache[key] = 0
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided invalid or blank information to the server on connection (byond username, IP, and Computer ID.) Provided information for reference: Username:'[key]' IP:'[address]' Computer ID:'[computer_id]'. (If you continue to get this error, please restart byond or contact byond support.)")
|
||||
|
||||
if (text2num(computer_id) == 2147483647) //this cid causes stickybans to go haywire
|
||||
log_access("Failed Login (invalid cid): [key] [address]-[computer_id]")
|
||||
key_cache[key] = 0
|
||||
return list("reason"="invalid login data", "desc"="Error: Could not check ban status, Please try again. Error message: Your computer provided an invalid Computer ID.)")
|
||||
|
||||
if (type == "world")
|
||||
key_cache[key] = 0
|
||||
return ..() //shunt world topic banchecks to purely to byond's internal ban system
|
||||
|
||||
var/ckey = ckey(key)
|
||||
var/client/C = GLOB.directory[ckey]
|
||||
if (C && ckey == C.ckey && computer_id == C.computer_id && address == C.address)
|
||||
key_cache[key] = 0
|
||||
return //don't recheck connected clients.
|
||||
|
||||
var/admin = FALSE
|
||||
@@ -38,21 +49,25 @@
|
||||
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass the whitelist</span>")
|
||||
else
|
||||
log_access("Failed Login: [key] - Not on whitelist")
|
||||
key_cache[key] = 0
|
||||
return list("reason"="whitelist", "desc" = "\nReason: You are not on the white list for this server")
|
||||
|
||||
//Guest Checking
|
||||
if(!real_bans_only && IsGuestKey(key))
|
||||
if (CONFIG_GET(flag/guest_ban))
|
||||
log_access("Failed Login: [key] - Guests not allowed")
|
||||
key_cache[key] = 0
|
||||
return list("reason"="guest", "desc"="\nReason: Guests not allowed. Please sign in with a byond account.")
|
||||
if (CONFIG_GET(flag/panic_bunker) && SSdbcore.Connect())
|
||||
log_access("Failed Login: [key] - Guests not allowed during panic bunker")
|
||||
key_cache[key] = 0
|
||||
return list("reason"="guest", "desc"="\nReason: Sorry but the server is currently not accepting connections from never before seen players or guests. If you have played on this server with a byond account before, please log in to the byond account you have played from.")
|
||||
|
||||
//Population Cap Checking
|
||||
var/extreme_popcap = CONFIG_GET(number/extreme_popcap)
|
||||
if(!real_bans_only && extreme_popcap && living_player_count() >= extreme_popcap && !admin)
|
||||
log_access("Failed Login: [key] - Population cap reached")
|
||||
key_cache[key] = 0
|
||||
return list("reason"="popcap", "desc"= "\nReason: [CONFIG_GET(string/extreme_popcap_message)]")
|
||||
|
||||
if(CONFIG_GET(flag/ban_legacy_system))
|
||||
@@ -66,6 +81,7 @@
|
||||
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching ban on [.["key"]]</span>")
|
||||
else
|
||||
log_access("Failed Login: [key] [computer_id] [address] - Banned [.["reason"]]")
|
||||
key_cache[key] = 0
|
||||
return .
|
||||
|
||||
else
|
||||
@@ -73,6 +89,7 @@
|
||||
var/msg = "Ban database connection failure. Key [ckey] not checked"
|
||||
log_world(msg)
|
||||
message_admins(msg)
|
||||
key_cache[key] = 0
|
||||
return
|
||||
|
||||
var/ipquery = ""
|
||||
@@ -86,6 +103,7 @@
|
||||
var/datum/DBQuery/query_ban_check = SSdbcore.NewQuery("SELECT IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].ckey), ckey), IFNULL((SELECT byond_key FROM [format_table_name("player")] WHERE [format_table_name("player")].ckey = [format_table_name("ban")].a_ckey), a_ckey), reason, expiration_time, duration, bantime, bantype, id, round_id FROM [format_table_name("ban")] WHERE (ckey = '[ckey]' [ipquery] [cidquery]) AND (bantype = 'PERMABAN' OR bantype = 'ADMIN_PERMABAN' OR ((bantype = 'TEMPBAN' OR bantype = 'ADMIN_TEMPBAN') AND expiration_time > Now())) AND isnull(unbanned)")
|
||||
if(!query_ban_check.Execute(async = TRUE))
|
||||
qdel(query_ban_check)
|
||||
key_cache[key] = 0
|
||||
return
|
||||
while(query_ban_check.NextRow())
|
||||
var/pkey = query_ban_check.item[1]
|
||||
@@ -124,6 +142,7 @@
|
||||
|
||||
log_access("Failed Login: [key] [computer_id] [address] - Banned (#[banid]) [.["reason"]]")
|
||||
qdel(query_ban_check)
|
||||
key_cache[key] = 0
|
||||
return .
|
||||
qdel(query_ban_check)
|
||||
|
||||
@@ -138,6 +157,7 @@
|
||||
|
||||
//rogue ban in the process of being reverted.
|
||||
if (cachedban && cachedban["reverting"])
|
||||
key_cache[key] = 0
|
||||
return null
|
||||
|
||||
if (cachedban && ckey != bannedckey)
|
||||
@@ -165,6 +185,7 @@
|
||||
newmatches_admin.len > STICKYBAN_MAX_ADMIN_MATCHES \
|
||||
)
|
||||
if (cachedban["reverting"])
|
||||
key_cache[key] = 0
|
||||
return null
|
||||
cachedban["reverting"] = TRUE
|
||||
|
||||
@@ -182,6 +203,7 @@
|
||||
cachedban["admin_matches_this_round"] = list()
|
||||
cachedban -= "reverting"
|
||||
world.SetConfig("ban", bannedckey, list2stickyban(cachedban))
|
||||
key_cache[key] = 0
|
||||
return null
|
||||
|
||||
//byond will not trigger isbanned() for "global" host bans,
|
||||
@@ -191,6 +213,7 @@
|
||||
log_admin("The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]")
|
||||
message_admins("<span class='adminnotice'>The admin [key] has been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
|
||||
addclientmessage(ckey,"<span class='adminnotice'>You have been allowed to bypass a matching host/sticky ban on [bannedckey]</span>")
|
||||
key_cache[key] = 0
|
||||
return null
|
||||
|
||||
if (C) //user is already connected!.
|
||||
@@ -200,6 +223,7 @@
|
||||
. = list("reason" = "Stickyban", "desc" = desc)
|
||||
log_access("Failed Login: [key] [computer_id] [address] - StickyBanned [ban["message"]] Target Username: [bannedckey] Placed by [ban["admin"]]")
|
||||
|
||||
key_cache[key] = 0
|
||||
return .
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@
|
||||
target.Stun(40) //Utterly useless without this, its okay since there are so many checks to go through
|
||||
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, 45) //So you cant rotate with combat mode, plus fancy status alert
|
||||
|
||||
if(do_mob(user, target, 40, 0, TRUE, extra_checks=CALLBACK(src, .proc/ContinueActive, user, target)))
|
||||
if(do_mob(user, target, 40, 0, TRUE, extra_checks = CALLBACK(src, .proc/ContinueActive, user, target)))
|
||||
PowerActivatedSuccessfully() // PAY COST! BEGIN COOLDOWN!
|
||||
var/power_time = 90 + level_current * 12
|
||||
target.apply_status_effect(STATUS_EFFECT_MESMERIZE, power_time + 80)
|
||||
|
||||
@@ -319,9 +319,9 @@
|
||||
L.dust()
|
||||
else
|
||||
if(!GLOB.ratvar_awakens && L.stat == CONSCIOUS)
|
||||
vitality_drained = L.adjustToxLoss(1)
|
||||
vitality_drained = L.adjustToxLoss(1, forced = TRUE)
|
||||
else
|
||||
vitality_drained = L.adjustToxLoss(1.5)
|
||||
vitality_drained = L.adjustToxLoss(1.5, forced = TRUE)
|
||||
if(vitality_drained)
|
||||
GLOB.clockwork_vitality += vitality_drained
|
||||
else
|
||||
|
||||
@@ -2,8 +2,9 @@ GLOBAL_LIST_EMPTY(clientmessages)
|
||||
|
||||
/proc/addclientmessage(var/ckey, var/message)
|
||||
ckey = ckey(ckey)
|
||||
if (!ckey || !message)
|
||||
if(!ckey || !message)
|
||||
return
|
||||
if (!(ckey in GLOB.clientmessages))
|
||||
GLOB.clientmessages[ckey] = list()
|
||||
GLOB.clientmessages[ckey] += message
|
||||
var/list/L = GLOB.clientmessages[ckey]
|
||||
if(!L)
|
||||
GLOB.clientmessages[ckey] = L = list()
|
||||
L += message
|
||||
@@ -826,6 +826,22 @@
|
||||
armor = list("melee" = 0, "bullet" = 0, "laser" = 0,"energy" = 0, "bomb" = 0, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 0)
|
||||
real = FALSE
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/durathread
|
||||
name = "durathread winter coat"
|
||||
desc = "The one coat to rule them all. Extremely durable while providing the utmost comfort."
|
||||
icon_state = "coatdurathread"
|
||||
item_state = "coatdurathread"
|
||||
armor = list("melee" = 15, "bullet" = 8, "laser" = 25, "energy" = 5, "bomb" = 12, "bio" = 0, "rad" = 0, "fire" = 0, "acid" = 50)
|
||||
hoodtype = /obj/item/clothing/head/hooded/winterhood/durathread
|
||||
|
||||
/obj/item/clothing/suit/hooded/wintercoat/durathread/Initialize()
|
||||
. = ..()
|
||||
allowed = GLOB.security_wintercoat_allowed
|
||||
|
||||
/obj/item/clothing/head/hooded/winterhood/durathread
|
||||
icon_state = "winterhood_durathread"
|
||||
armor = list("melee" = 20, "bullet" = 8, "laser" = 15, "energy" = 8, "bomb" = 25, "bio" = 10, "rad" = 15, "fire" = 75, "acid" = 37)
|
||||
|
||||
|
||||
/obj/item/clothing/suit/spookyghost
|
||||
name = "spooky ghost"
|
||||
|
||||
@@ -159,6 +159,14 @@
|
||||
always_availible = TRUE
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/durathread_wintercoat
|
||||
name = "Durathread Winter Coat"
|
||||
result = /obj/item/clothing/suit/hooded/wintercoat/durathread
|
||||
reqs = list(/obj/item/stack/sheet/durathread = 12,
|
||||
/obj/item/stack/sheet/leather = 10)
|
||||
time = 70
|
||||
category = CAT_CLOTHING
|
||||
|
||||
/datum/crafting_recipe/wintercoat_cosmic
|
||||
name = "Cosmic Winter Coat"
|
||||
result = /obj/item/clothing/suit/hooded/wintercoat/cosmic
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
else
|
||||
log_admin("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.")
|
||||
message_admins("Client [ckey] was just autokicked for flooding keysends; likely abuse but potentially lagspike.")
|
||||
QDEL_IN(src, 1)
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
///Check if the key is short enough to even be a real key
|
||||
|
||||
@@ -244,6 +244,10 @@
|
||||
name = "Shark"
|
||||
icon_state = "shark"
|
||||
|
||||
/datum/sprite_accessory/mam_snouts/hshark
|
||||
name = "hShark"
|
||||
icon_state = "hshark"
|
||||
|
||||
/datum/sprite_accessory/mam_snouts/toucan
|
||||
name = "Toucan"
|
||||
icon_state = "toucan"
|
||||
|
||||
@@ -434,11 +434,11 @@
|
||||
state = "Gas"
|
||||
var/const/P = 3 //The number of seconds between life ticks
|
||||
var/T = initial(R.metabolization_rate) * (60 / P)
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.type)
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R)
|
||||
if(Rcr && Rcr.FermiChem)
|
||||
fermianalyze = TRUE
|
||||
var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2
|
||||
var/datum/reagent/targetReagent = beaker.reagents.has_reagent(R.type)
|
||||
var/datum/reagent/targetReagent = beaker.reagents.has_reagent(R)
|
||||
|
||||
if(!targetReagent)
|
||||
CRASH("Tried to find a reagent that doesn't exist in the chem_master!")
|
||||
@@ -463,9 +463,9 @@
|
||||
var/T = initial(R.metabolization_rate) * (60 / P)
|
||||
if(istype(R, /datum/reagent/fermi))
|
||||
fermianalyze = TRUE
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R.type)
|
||||
var/datum/chemical_reaction/Rcr = get_chemical_reaction(R)
|
||||
var/pHpeakCache = (Rcr.OptimalpHMin + Rcr.OptimalpHMax)/2
|
||||
var/datum/reagent/targetReagent = reagents.has_reagent(R.type)
|
||||
var/datum/reagent/targetReagent = reagents.has_reagent(R)
|
||||
|
||||
if(!targetReagent)
|
||||
CRASH("Tried to find a reagent that doesn't exist in the chem_master!")
|
||||
@@ -483,7 +483,7 @@
|
||||
|
||||
|
||||
/obj/machinery/chem_master/proc/end_fermi_reaction()//Ends any reactions upon moving.
|
||||
if(beaker.reagents.fermiIsReacting)
|
||||
if(beaker && beaker.reagents.fermiIsReacting)
|
||||
beaker.reagents.fermiEnd()
|
||||
|
||||
/obj/machinery/chem_master/proc/isgoodnumber(num)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
B = new(T)
|
||||
if(data["blood_DNA"])
|
||||
B.blood_DNA[data["blood_DNA"]] = data["blood_type"]
|
||||
if(!B.reagents)
|
||||
if(B.reagents)
|
||||
B.reagents.add_reagent(type, reac_volume)
|
||||
B.update_icon()
|
||||
|
||||
|
||||
@@ -128,8 +128,7 @@
|
||||
target.visible_message("<span class='danger'>[M] has been splashed with something!</span>", \
|
||||
"<span class='userdanger'>[M] has been splashed with something!</span>")
|
||||
for(var/datum/reagent/A in reagents.reagent_list)
|
||||
R += A.type + " ("
|
||||
R += num2text(A.volume) + "),"
|
||||
R += "[A.type] ([A.volume]),"
|
||||
|
||||
if(thrownby)
|
||||
log_combat(thrownby, M, "splashed", R)
|
||||
|
||||
@@ -833,8 +833,8 @@ Nothing else in the console has ID requirements.
|
||||
for(var/i in 1 to length(ui))
|
||||
if(!findtextEx(ui[i], RDSCREEN_NOBREAK))
|
||||
ui[i] += "<br>"
|
||||
ui[i] = replacetextEx(ui[i], RDSCREEN_NOBREAK, "")
|
||||
return ui.Join("")
|
||||
. = ui.Join("")
|
||||
return replacetextEx(., RDSCREEN_NOBREAK, "")
|
||||
|
||||
/obj/machinery/computer/rdconsole/Topic(raw, ls)
|
||||
if(..())
|
||||
|
||||
@@ -131,6 +131,12 @@
|
||||
/obj/item/clothing/suit/drfreeze_coat = 1,
|
||||
/obj/item/clothing/suit/gothcoat = 2,
|
||||
/obj/item/clothing/under/draculass = 1,
|
||||
/obj/item/clothing/under/christmas/christmasmaler = 3,
|
||||
/obj/item/clothing/under/christmas/christmasmaleg = 3,
|
||||
/obj/item/clothing/under/christmas/christmasfemaler = 3,
|
||||
/obj/item/clothing/under/christmas/christmasfemaleg = 3,
|
||||
/obj/item/clothing/head/christmashat = 3,
|
||||
/obj/item/clothing/head/christmashatg = 3,
|
||||
/obj/item/clothing/under/drfreeze = 1) //End of Cit Changes
|
||||
refill_canister = /obj/item/vending_refill/autodrobe
|
||||
|
||||
|
||||
@@ -123,15 +123,19 @@
|
||||
/obj/item/clothing/ears/headphones = 10,
|
||||
/obj/item/clothing/suit/apron/purple_bartender = 4,
|
||||
/obj/item/clothing/under/rank/bartender/purple = 4,
|
||||
/* Commenting out until next Christmas or made automatic
|
||||
/obj/item/clothing/under/christmas/christmasmaler = 3,
|
||||
/obj/item/clothing/under/christmas/christmasmaleg = 3,
|
||||
/obj/item/clothing/under/christmas/christmasfemaler = 3,
|
||||
/obj/item/clothing/under/christmas/christmasfemaleg = 3,
|
||||
*/
|
||||
/obj/item/clothing/suit/hooded/wintercoat/christmascoatr = 3,
|
||||
/obj/item/clothing/suit/hooded/wintercoat/christmascoatg = 3,
|
||||
/obj/item/clothing/suit/hooded/wintercoat/christmascoatrg = 3,
|
||||
/*Commenting out until next Christmas or made automatic
|
||||
/obj/item/clothing/head/christmashat = 3,
|
||||
/obj/item/clothing/head/christmashatg = 3,
|
||||
*/
|
||||
/obj/item/clothing/shoes/winterboots/christmasbootsr = 3,
|
||||
/obj/item/clothing/shoes/winterboots/christmasbootsg = 3,
|
||||
/obj/item/clothing/shoes/winterboots/santaboots = 3,
|
||||
|
||||
Reference in New Issue
Block a user