Merge remote-tracking branch 'origin/master' into hardsync-1.5
This commit is contained in:
@@ -128,10 +128,58 @@
|
||||
if(dbflags & DB_FLAG_AGE_CONFIRMATION_INCOMPLETE) //they have not completed age gate
|
||||
var/age_verification = age_gate()
|
||||
if(age_verification != 1)
|
||||
client.add_system_note("Automated-Age-Gate", "Failed automatic age gate process")
|
||||
client.add_system_note("Automated-Age-Gate", "Failed automatic age gate process.")
|
||||
//ban them and kick them
|
||||
AddBan(client.ckey, client.computer_id, "SYSTEM BAN - Inputted date during join verification was under 18 years of age. Contact administration on discord for verification.", "SYSTEM", FALSE, null, client.address)
|
||||
|
||||
//parameters used by sql line, easier to read:
|
||||
var/bantype_str = "ADMIN_PERMABAN"
|
||||
var/reason = "SYSTEM BAN - Inputted date during join verification was under 18 years of age. Contact administration on discord for verification."
|
||||
var/duration = -1
|
||||
var/sql_ckey = sanitizeSQL(client.ckey)
|
||||
var/computerid = client.computer_id
|
||||
if(!computerid)
|
||||
computerid = "0"
|
||||
var/sql_computerid = sanitizeSQL(computerid)
|
||||
var/ip = client.address
|
||||
if(!ip)
|
||||
ip = "0.0.0.0"
|
||||
var/sql_ip = sanitizeSQL(ip)
|
||||
|
||||
//parameter not used as there's no job but i want to fill out all parameters for the insert line
|
||||
var/sql_job
|
||||
|
||||
// these are typically the banning admin's, but it's the system so we leave them null, but they're still here for the sake of a full set of values
|
||||
var/sql_a_ckey
|
||||
var/sql_a_computerid
|
||||
var/sql_a_ip
|
||||
|
||||
// record all admins and non-admins online at the time
|
||||
var/who
|
||||
for(var/client/C in GLOB.clients)
|
||||
if(!who)
|
||||
who = "[C]"
|
||||
else
|
||||
who += ", [C]"
|
||||
|
||||
var/adminwho
|
||||
for(var/client/C in GLOB.admins)
|
||||
if(!adminwho)
|
||||
adminwho = "[C]"
|
||||
else
|
||||
adminwho += ", [C]"
|
||||
|
||||
var/sql = "INSERT INTO [format_table_name("ban")] (`bantime`,`server_ip`,`server_port`,`round_id`,`bantype`,`reason`,`job`,`duration`,`expiration_time`,`ckey`,`computerid`,`ip`,`a_ckey`,`a_computerid`,`a_ip`,`who`,`adminwho`) VALUES (Now(), INET_ATON(IF('[world.internet_address]' LIKE '', '0', '[world.internet_address]')), '[world.port]', '[GLOB.round_id]', '[bantype_str]', '[reason]', '[sql_job]', [(duration)?"[duration]":"0"], Now() + INTERVAL [(duration>0) ? duration : 0] MINUTE, '[sql_ckey]', '[sql_computerid]', INET_ATON('[sql_ip]'), '[sql_a_ckey]', '[sql_a_computerid]', INET_ATON('[sql_a_ip]'), '[who]', '[adminwho]')"
|
||||
var/datum/DBQuery/query_add_ban = SSdbcore.NewQuery(sql)
|
||||
qdel(query_add_ban)
|
||||
|
||||
// announce this
|
||||
message_admins("[html_encode(client.ckey)] has been banned for failing the automatic age gate.")
|
||||
send2irc("[html_encode(client.ckey)] has been banned for failing the automatic age gate.")
|
||||
|
||||
// removing the client disconnects them
|
||||
qdel(client)
|
||||
|
||||
|
||||
return FALSE
|
||||
else
|
||||
//they claim to be of age, so allow them to continue and update their flags
|
||||
|
||||
@@ -11,6 +11,8 @@
|
||||
maxHealth = 25
|
||||
health = 25
|
||||
|
||||
can_ventcrawl = TRUE
|
||||
|
||||
var/amount_grown = 0
|
||||
var/max_grown = 100
|
||||
var/time_of_birth
|
||||
|
||||
@@ -96,9 +96,10 @@
|
||||
parry_efficiency_considered_successful = 0.01
|
||||
parry_efficiency_to_counterattack = 0.01
|
||||
parry_max_attacks = 3
|
||||
parry_cooldown = 30
|
||||
parry_failed_stagger_duration = 0
|
||||
parry_failed_clickcd_duration = 0.4
|
||||
parry_cooldown = 3 SECONDS
|
||||
parry_failed_cooldown_duration = 1.5 SECONDS
|
||||
parry_failed_stagger_duration = 1 SECONDS
|
||||
parry_failed_clickcd_duration = 0.4 SECONDS
|
||||
|
||||
parry_data = list( // yeah it's snowflake
|
||||
"UNARMED_PARRY_STAGGER" = 3 SECONDS,
|
||||
@@ -136,16 +137,16 @@
|
||||
parry_imperfect_falloff_percent = 20
|
||||
parry_efficiency_perfect = 100
|
||||
parry_efficiency_perfect_override = list(
|
||||
ATTACK_TYPE_PROJECTILE_TEXT = 60,
|
||||
TEXT_ATTACK_TYPE_PROJECTILE = 60,
|
||||
)
|
||||
|
||||
parry_efficiency_considered_successful = 0.01
|
||||
parry_efficiency_to_counterattack = 0.01
|
||||
parry_max_attacks = INFINITY
|
||||
parry_failed_cooldown_duration = 1.5 SECONDS
|
||||
parry_failed_stagger_duration = 0
|
||||
parry_cooldown = 0
|
||||
parry_failed_clickcd_duration = 0.8
|
||||
parry_failed_cooldown_duration = 3 SECONDS
|
||||
parry_failed_stagger_duration = 2 SECONDS
|
||||
parry_cooldown = 3 SECONDS
|
||||
parry_failed_clickcd_duration = 0.8 SECONDS
|
||||
|
||||
parry_data = list( // yeah it's snowflake
|
||||
"UNARMED_PARRY_STAGGER" = 3 SECONDS,
|
||||
|
||||
@@ -1425,8 +1425,6 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
|
||||
var/damage = rand(user.dna.species.punchdamagelow, user.dna.species.punchdamagehigh)
|
||||
var/punchwoundbonus = user.dna.species.punchwoundbonus
|
||||
var/puncherstam = user.getStaminaLoss()
|
||||
var/puncherbrute = user.getBruteLoss()
|
||||
var/punchedstam = target.getStaminaLoss()
|
||||
var/punchedbrute = target.getBruteLoss()
|
||||
|
||||
@@ -1434,7 +1432,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(!SEND_SIGNAL(target, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
|
||||
damage *= 1.2
|
||||
if(!CHECK_MOBILITY(user, MOBILITY_STAND))
|
||||
damage *= 0.8
|
||||
damage *= 0.65
|
||||
if(SEND_SIGNAL(user, COMSIG_COMBAT_MODE_CHECK, COMBAT_MODE_INACTIVE))
|
||||
damage *= 0.8
|
||||
//END OF CITADEL CHANGES
|
||||
@@ -1446,19 +1444,7 @@ GLOBAL_LIST_EMPTY(roundstart_race_names)
|
||||
if(!affecting) //Maybe the bodypart is missing? Or things just went wrong..
|
||||
affecting = target.get_bodypart(BODY_ZONE_CHEST) //target chest instead, as failsafe. Or hugbox? You decide.
|
||||
|
||||
var/miss_chance = 100//calculate the odds that a punch misses entirely. considers stamina and brute damage of the puncher. punches miss by default to prevent weird cases
|
||||
if(attackchain_flags & ATTACK_IS_PARRY_COUNTERATTACK)
|
||||
miss_chance = 0
|
||||
else
|
||||
if(user.dna.species.punchdamagelow)
|
||||
if(atk_verb == ATTACK_EFFECT_KICK) //kicks never miss (provided your species deals more than 0 damage)
|
||||
miss_chance = 0
|
||||
else if(HAS_TRAIT(user, TRAIT_PUGILIST)) //pugilists, being good at Punching People, also never miss
|
||||
miss_chance = 0
|
||||
else
|
||||
miss_chance = min(10 + max(puncherstam * 0.5, puncherbrute * 0.5), 100) //probability of miss has a base of 10, and modified based on half brute total. Capped at max 100 to prevent weirdness in prob()
|
||||
|
||||
if(!damage || !affecting || prob(miss_chance))//future-proofing for species that have 0 damage/weird cases where no zone is targeted
|
||||
if(!damage || !affecting)//future-proofing for species that have 0 damage/weird cases where no zone is targeted
|
||||
playsound(target.loc, user.dna.species.miss_sound, 25, TRUE, -1)
|
||||
target.visible_message("<span class='danger'>[user]'s [atk_verb] misses [target]!</span>", \
|
||||
"<span class='danger'>You avoid [user]'s [atk_verb]!</span>", "<span class='hear'>You hear a swoosh!</span>", null, COMBAT_MESSAGE_RANGE, null, \
|
||||
|
||||
@@ -26,6 +26,8 @@
|
||||
update_sprint_icon()
|
||||
|
||||
/mob/living/proc/enable_sprint_mode(update_icon = TRUE)
|
||||
if(!CONFIG_GET(flag/sprint_enabled))
|
||||
return
|
||||
if(combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
|
||||
return
|
||||
ENABLE_BITFIELD(combat_flags, COMBAT_FLAG_SPRINT_ACTIVE)
|
||||
@@ -61,6 +63,8 @@
|
||||
update_sprint_icon()
|
||||
|
||||
/mob/living/proc/user_toggle_intentional_sprint_mode()
|
||||
if(!CONFIG_GET(flag/sprint_enabled))
|
||||
return
|
||||
var/old = (combat_flags & COMBAT_FLAG_SPRINT_TOGGLED)
|
||||
if(old)
|
||||
if(combat_flags & COMBAT_FLAG_SPRINT_FORCED)
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
/mob/living/silicon/robot/default_toggle_sprint(shutdown = FALSE)
|
||||
if(!CONFIG_GET(flag/sprint_enabled))
|
||||
disable_intentional_sprint_mode()
|
||||
return
|
||||
var/current = (combat_flags & COMBAT_FLAG_SPRINT_ACTIVE)
|
||||
if(current || shutdown || !cell || (cell.charge < 25) || !cansprint)
|
||||
disable_intentional_sprint_mode()
|
||||
|
||||
Reference in New Issue
Block a user