diff --git a/code/__DEFINES/language.dm b/code/__DEFINES/language.dm index add4a8e277..798ea478c2 100644 --- a/code/__DEFINES/language.dm +++ b/code/__DEFINES/language.dm @@ -24,3 +24,4 @@ #define LANGUAGE_STONER "stoner" #define LANGUAGE_VASSAL "vassal" #define LANGUAGE_VOICECHANGE "voicechange" +#define LANGUAGE_MULTILINGUAL "multilingual" diff --git a/code/__DEFINES/subsystems.dm b/code/__DEFINES/subsystems.dm index 77186cd07e..9c67a6b36c 100644 --- a/code/__DEFINES/subsystems.dm +++ b/code/__DEFINES/subsystems.dm @@ -204,7 +204,7 @@ ///Compile all the overlays for an atom from the cache lists // |= on overlays is not actually guaranteed to not add same appearances but we're optimistically using it anyway. #define COMPILE_OVERLAYS(A)\ - if (TRUE) {\ + do {\ var/list/ad = A.add_overlays;\ var/list/rm = A.remove_overlays;\ if(LAZYLEN(rm)){\ @@ -216,7 +216,7 @@ ad.Cut();\ }\ A.flags_1 &= ~OVERLAY_QUEUED_1;\ - } + } while(FALSE) /** diff --git a/code/__HELPERS/_lists.dm b/code/__HELPERS/_lists.dm index a59ee9fcb0..a554397c41 100644 --- a/code/__HELPERS/_lists.dm +++ b/code/__HELPERS/_lists.dm @@ -66,7 +66,7 @@ } while(FALSE) //Returns a list in plain english as a string -/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) +/proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "") var/total = length(input) switch(total) if (0) @@ -87,6 +87,34 @@ return "[output][and_text][input[index]]" +/** + * English_list but associative supporting. Higher overhead. + */ +/proc/english_list_assoc(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "") + var/total = length(input) + switch(total) + if (0) + return "[nothing_text]" + if (1) + var/assoc = input[input[1]] == null? "" : " = [input[input[1]]]" + return "[input[1]][assoc]" + if (2) + var/assoc = input[input[1]] == null? "" : " = [input[input[1]]]" + var/assoc2 = input[input[2]] == null? "" : " = [input[input[2]]]" + return "[input[1]][assoc][and_text][input[2]][assoc2]" + else + var/output = "" + var/index = 1 + var/assoc + while (index < total) + if (index == total - 1) + comma_text = final_comma_text + assoc = input[input[index]] == null? "" : " = [input[input[index]]]" + output += "[input[index]][assoc][comma_text]" + ++index + assoc = input[input[index]] == null? "" : " = [input[input[index]]]" + return "[output][and_text][input[index]]" + //Returns list element or null. Should prevent "index out of bounds" error. /proc/listgetindex(list/L, index) if(LAZYLEN(L)) diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index 18d02229dd..8464e373d5 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -231,10 +231,10 @@ src_object = window.locked_by.src_object // Insert src_object info if(src_object) - entry += "\nUsing: [src_object.type] [REF(src_object)]" + entry += "Using: [src_object.type] [REF(src_object)]" // Insert message if(message) - entry += "\n[message]" + entry += "[message]" WRITE_LOG(GLOB.tgui_log, entry) /* Close open log handles. This should be called as late as possible, and no logging should hapen after. */ diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 04141becf2..841a3e8303 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -118,27 +118,7 @@ action_intent.hud = src static_inventory += action_intent - using = new /obj/screen/mov_intent - using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon - using.icon_state = (mymob.m_intent == MOVE_INTENT_RUN ? "running" : "walking") - using.screen_loc = ui_movi - using.hud = src - static_inventory += using - - //CITADEL CHANGES - sprint button - using = new /obj/screen/sprintbutton - using.icon = tg_ui_icon_to_cit_ui(ui_style) - using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint") - using.screen_loc = ui_movi - using.hud = src - static_inventory += using - //END OF CITADEL CHANGES - - //same as above but buffer. - sprint_buffer = new /obj/screen/sprint_buffer - sprint_buffer.screen_loc = ui_sprintbufferloc - sprint_buffer.hud = src - static_inventory += sprint_buffer + assert_move_intent_ui(owner, TRUE) // clickdelay clickdelay = new @@ -393,6 +373,51 @@ update_locked_slots() +/datum/hud/human/proc/assert_move_intent_ui(mob/living/carbon/human/owner = mymob, on_new = FALSE) + var/obj/screen/using + // delete old ones + var/list/obj/screen/victims = list() + victims += locate(/obj/screen/mov_intent) in static_inventory + victims += locate(/obj/screen/sprintbutton) in static_inventory + victims += locate(/obj/screen/sprint_buffer) in static_inventory + if(victims) + static_inventory -= victims + if(mymob?.client) + mymob.client.screen -= victims + QDEL_LIST(victims) + + // make new ones + // walk/run + using = new /obj/screen/mov_intent + using.icon = tg_ui_icon_to_cit_ui(ui_style) // CIT CHANGE - overrides mov intent icon + using.screen_loc = ui_movi + using.hud = src + using.update_icon() + static_inventory += using + if(!on_new) + owner?.client?.screen += using + + if(!CONFIG_GET(flag/sprint_enabled)) + return + + // sprint button + using = new /obj/screen/sprintbutton + using.icon = tg_ui_icon_to_cit_ui(ui_style) + using.icon_state = ((owner.combat_flags & COMBAT_FLAG_SPRINT_ACTIVE) ? "act_sprint_on" : "act_sprint") + using.screen_loc = ui_movi + using.hud = src + static_inventory += using + if(!on_new) + owner?.client?.screen += using + + // same as above but buffer. + sprint_buffer = new /obj/screen/sprint_buffer + sprint_buffer.screen_loc = ui_sprintbufferloc + sprint_buffer.hud = src + static_inventory += sprint_buffer + if(!on_new) + owner?.client?.screen += using + /datum/hud/human/update_locked_slots() if(!mymob) return diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 53915ff42b..64515260ec 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -351,6 +351,10 @@ icon = 'icons/mob/screen_midnight.dmi' icon_state = "running" +/obj/screen/mov_intent/Initialize(mapload) + . = ..() + update_icon() + /obj/screen/mov_intent/Click() toggle(usr) @@ -359,7 +363,7 @@ if(MOVE_INTENT_WALK) icon_state = "walking" if(MOVE_INTENT_RUN) - icon_state = "running" + icon_state = CONFIG_GET(flag/sprint_enabled)? "running" : "running_nosprint" /obj/screen/mov_intent/proc/toggle(mob/user) if(isobserver(user)) diff --git a/code/controllers/configuration/entries/game_options.dm b/code/controllers/configuration/entries/game_options.dm index e9f759fd42..4034722417 100644 --- a/code/controllers/configuration/entries/game_options.dm +++ b/code/controllers/configuration/entries/game_options.dm @@ -290,6 +290,17 @@ var/datum/movespeed_modifier/config_walk_run/M = get_cached_movespeed_modifier(/datum/movespeed_modifier/config_walk_run/walk) M.sync() +/datum/config_entry/flag/sprint_enabled + config_entry_value = TRUE + +/datum/config_entry/flag/sprint_enabled/ValidateAndSet(str_val) + . = ..() + for(var/datum/hud/human/H) + H.assert_move_intent_ui() + if(!config_entry_value) // disabled + for(var/mob/living/L in world) + L.disable_intentional_sprint_mode() + /datum/config_entry/number/movedelay/sprint_speed_increase config_entry_value = 1 diff --git a/code/controllers/configuration/entries/general.dm b/code/controllers/configuration/entries/general.dm index 3c93952b65..4d985c7234 100644 --- a/code/controllers/configuration/entries/general.dm +++ b/code/controllers/configuration/entries/general.dm @@ -26,50 +26,6 @@ /datum/config_entry/flag/hub // if the game appears on the hub or not -/datum/config_entry/flag/log_ooc // log OOC channel - -/datum/config_entry/flag/log_access // log login/logout - -/datum/config_entry/flag/log_say // log client say - -/datum/config_entry/flag/log_admin // log admin actions - protection = CONFIG_ENTRY_LOCKED - -/datum/config_entry/flag/log_prayer // log prayers - -/datum/config_entry/flag/log_law // log lawchanges - -/datum/config_entry/flag/log_game // log game events - -/datum/config_entry/flag/log_virus // log virology data - -/datum/config_entry/flag/log_vote // log voting - -/datum/config_entry/flag/log_craft // log crafting - -/datum/config_entry/flag/log_whisper // log client whisper - -/datum/config_entry/flag/log_attack // log attack messages - -/datum/config_entry/flag/log_emote // log emotes - -/datum/config_entry/flag/log_adminchat // log admin chat messages - protection = CONFIG_ENTRY_LOCKED - -/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console - -/datum/config_entry/flag/log_pda // log pda messages - -/datum/config_entry/flag/log_telecomms // log telecomms messages - -/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. - -/datum/config_entry/flag/log_world_topic // log all world.Topic() calls - -/datum/config_entry/flag/log_manifest // log crew manifest to seperate file - -/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file - /datum/config_entry/flag/allow_admin_ooccolor // Allows admins with relevant permissions to have their own ooc colour /datum/config_entry/flag/allow_vote_restart // allow votes to restart @@ -472,10 +428,6 @@ /datum/config_entry/string/default_view_square config_entry_value = "15x15" -/datum/config_entry/flag/log_pictures - -/datum/config_entry/flag/picture_logging_camera - /datum/config_entry/number/max_bunker_days config_entry_value = 7 min_val = 1 diff --git a/code/controllers/configuration/entries/logging.dm b/code/controllers/configuration/entries/logging.dm new file mode 100644 index 0000000000..1cb47d6ab7 --- /dev/null +++ b/code/controllers/configuration/entries/logging.dm @@ -0,0 +1,70 @@ +/datum/config_entry/flag/log_ooc // log OOC channel + config_entry_value = TRUE + +/datum/config_entry/flag/log_access // log login/logout + config_entry_value = TRUE + +/datum/config_entry/flag/log_say // log client say + config_entry_value = TRUE + +/datum/config_entry/flag/log_admin // log admin actions + protection = CONFIG_ENTRY_LOCKED + +/datum/config_entry/flag/log_prayer // log prayers + config_entry_value = TRUE + +/datum/config_entry/flag/log_law // log lawchanges + config_entry_value = TRUE + +/datum/config_entry/flag/log_game // log game events + config_entry_value = TRUE + +/datum/config_entry/flag/log_virus // log virology data + config_entry_value = TRUE + +/datum/config_entry/flag/log_vote // log voting + config_entry_value = TRUE + +/datum/config_entry/flag/log_craft // log crafting + config_entry_value = TRUE + +/datum/config_entry/flag/log_whisper // log client whisper + config_entry_value = TRUE + +/datum/config_entry/flag/log_attack // log attack messages + config_entry_value = TRUE + +/datum/config_entry/flag/log_emote // log emotes + config_entry_value = TRUE + +/datum/config_entry/flag/log_adminchat // log admin chat messages + protection = CONFIG_ENTRY_LOCKED + +/datum/config_entry/flag/log_shuttle // log shuttle related actions, ie shuttle computers, shuttle manipulator, emergency console + config_entry_value = TRUE + +/datum/config_entry/flag/log_pda // log pda messages + config_entry_value = TRUE + +/datum/config_entry/flag/log_telecomms // log telecomms messages + config_entry_value = TRUE + +/datum/config_entry/flag/log_twitter // log certain expliotable parrots and other such fun things in a JSON file of twitter valid phrases. + config_entry_value = TRUE + +/datum/config_entry/flag/log_world_topic // log all world.Topic() calls + config_entry_value = TRUE + +/datum/config_entry/flag/log_manifest // log crew manifest to seperate file + config_entry_value = TRUE + +/datum/config_entry/flag/log_job_debug // log roundstart divide occupations debug information to a file + config_entry_value = TRUE + +/datum/config_entry/flag/log_pictures + +/datum/config_entry/flag/picture_logging_camera + +/// forces log_href for tgui +/datum/config_entry/flag/emergency_tgui_logging + config_entry_value = FALSE diff --git a/code/datums/traits/good.dm b/code/datums/traits/good.dm index 4a4108f005..659149a123 100644 --- a/code/datums/traits/good.dm +++ b/code/datums/traits/good.dm @@ -228,10 +228,10 @@ gain_text = "You've learned an extra language!" lose_text = "You've forgotten your extra language." -/datum/quirk/multilingual/add() +/datum/quirk/multilingual/post_add() var/mob/living/carbon/human/H = quirk_holder - H.grant_language(H.client.prefs.language, TRUE, TRUE, LANGUAGE_MIND) + H.grant_language(H.client.prefs.language, TRUE, TRUE, LANGUAGE_MULTILINGUAL) /datum/quirk/multilingual/remove() var/mob/living/carbon/human/H = quirk_holder - H.remove_language(H.client.prefs.language, TRUE, TRUE, LANGUAGE_MIND) + H.remove_language(H.client.prefs.language, TRUE, TRUE, LANGUAGE_MULTILINGUAL) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index 0157f4ca87..45bb9bd327 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -264,6 +264,8 @@ What a mess.*/ active1 = null if(!( GLOB.data_core.security.Find(active2) )) active2 = null + if(!authenticated && href_list["choice"] != "Log In") // logging in is the only action you can do if not logged in + return if(usr.contents.Find(src) || (in_range(src, usr) && isturf(loc)) || hasSiliconAccessInArea(usr) || IsAdminGhost(usr)) usr.set_machine(src) switch(href_list["choice"]) diff --git a/code/game/objects/items/armor_kits.dm b/code/game/objects/items/armor_kits.dm index fa88b77600..906d7c5f81 100644 --- a/code/game/objects/items/armor_kits.dm +++ b/code/game/objects/items/armor_kits.dm @@ -10,35 +10,41 @@ /obj/item/armorkit/afterattack(atom/target, mob/user, proximity_flag, click_parameters) // yeah have fun making subtypes and modifying the afterattack if you want to make variants // idiot - // - hatter var/used = FALSE if(isobj(target) && istype(target, /obj/item/clothing/under)) var/obj/item/clothing/under/C = target - if(C.armor.melee < 10) - C.armor.melee = 10 + if(C.damaged_clothes) + to_chat(user,"You should repair the damage done to [C] first.") + return + if(C.attached_accessory) + to_chat(user,"Kind of hard to sew around [C.attached_accessory].") + return + if(C.armor.getRating("melee") < 10) + C.armor = C.armor.setRating("melee" = 10) used = TRUE - if(C.armor.laser < 10) - C.armor.laser = 10 + if(C.armor.getRating("laser") < 10) + C.armor = C.armor.setRating("laser" = 10) used = TRUE - if(C.armor.fire < 40) - C.armor.fire = 40 + if(C.armor.getRating("fire") < 40) + C.armor = C.armor.setRating("fire" = 40) used = TRUE - if(C.armor.acid < 10) - C.armor.acid = 10 + if(C.armor.getRating("acid") < 10) + C.armor = C.armor.setRating("acid" = 10) used = TRUE - if(C.armor.bomb < 5) - C.armor.bomb = 5 + if(C.armor.getRating("bomb") < 5) + C.armor = C.armor.setRating("bomb" = 5) used = TRUE if(used) - user.visible_message("[user] uses [src] on [C], reinforcing it and tossing the empty case away afterwards.", \ - "You reinforce [C] with [src], making it a little more protective! You toss the empty casing away afterwards.") - C.name = "durathread [C.name]" // this disappears if it gets repaired, which is annoying + user.visible_message("[user] reinforces [C] with [src].", \ + "You reinforce [C] with [src], making it as protective as a durathread jumpsuit.") + C.name = "durathread [C.name]" + C.upgrade_prefix = "durathread" // god i hope this works qdel(src) return else - to_chat(user, "You stare at [src] and [C], coming to the conclusion that you probably don't need to reinforce it any further.") + to_chat(user, "You don't need to reinforce [C] any further.") return else return diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm index cbf3bdaa38..77dc174238 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_applications.dm @@ -8,7 +8,7 @@ descname = "Powers Nearby Structures" name = "Sigil of Transmission" desc = "Places a sigil that can drain and will store energy to power clockwork structures." - invocations = list("Divinity...", "...power our creations!") + invocations = list("Divinity...", "...power our creations.") channel_time = 70 power_cost = 200 whispered = TRUE @@ -28,7 +28,7 @@ descname = "Powered Structure, Delay Emergency Shuttles" name = "Prolonging Prism" desc = "Creates a mechanized prism which will delay the arrival of an emergency shuttle by 2 minutes at a massive power cost." - invocations = list("May this prism...", "...grant us time to enact his will!") + invocations = list("May this prism...", "...grant us time to enact his will.") channel_time = 80 power_cost = 300 object_path = /obj/structure/destructible/clockwork/powered/prolonging_prism @@ -60,7 +60,7 @@ descname = "Powered Structure, Area Denial" name = "Mania Motor" desc = "Creates a mania motor which causes minor damage and a variety of negative mental effects in nearby non-Servant humans, potentially up to and including conversion." - invocations = list("May this transmitter...", "...break the will of all who oppose us!") + invocations = list("May this transmitter...", "...break the will of all who oppose us.") channel_time = 80 power_cost = 750 object_path = /obj/structure/destructible/clockwork/powered/mania_motor @@ -83,7 +83,7 @@ descname = "Powered Structure, Teleportation Hub" name = "Clockwork Obelisk" desc = "Creates a clockwork obelisk that can broadcast messages over the Hierophant Network or open a Spatial Gateway to any living Servant or clockwork obelisk." - invocations = list("May this obelisk...", "...take us to all places!") + invocations = list("May this obelisk...", "...take us to all places.") channel_time = 80 power_cost = 300 object_path = /obj/structure/destructible/clockwork/powered/clockwork_obelisk @@ -163,7 +163,7 @@ descname = "Well-Rounded Combat Construct" name = "Clockwork Marauder" desc = "Creates a shell for a clockwork marauder, a balanced frontline construct that can deflect projectiles with its shield." - invocations = list("Arise, avatar of Arbiter!", "Defend the Ark with vengeful zeal.") + invocations = list("Arise, avatar of Arbiter!", "Defend the Ark with vengeful zeal!") channel_time = 80 power_cost = 8000 creator_message = "Your slab disgorges several chunks of replicant alloy that form into a suit of thrumming armor." diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm index 0a59656e31..b79bcfa03d 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_drivers.dm @@ -7,7 +7,7 @@ descname = "Generates Power From Starlight" name = "Stargazer" desc = "Forms a weak structure that generates power every second while within three tiles of starlight." - invocations = list("Capture their inferior light for us!") + invocations = list("Capture their inferior light for us.") channel_time = 50 power_cost = 200 object_path = /obj/structure/destructible/clockwork/stargazer @@ -16,6 +16,7 @@ usage_tip = "For obvious reasons, make sure to place this near a window or somewhere else that can see space!" tier = SCRIPTURE_DRIVER one_per_tile = TRUE + whispered = TRUE primary_component = HIEROPHANT_ANSIBLE sort_priority = 1 quickbind = TRUE @@ -34,7 +35,7 @@ descname = "Power Generation" name = "Integration Cog" desc = "Fabricates an integration cog, which can be used on an open APC to replace its innards and passively siphon its power." - invocations = list("Take that which sustains them!") + invocations = list("Take that which sustains them.") channel_time = 10 power_cost = 10 whispered = TRUE @@ -55,7 +56,7 @@ descname = "Trap, Stunning" name = "Sigil of Transgression" desc = "Wards a tile with a sigil, which will briefly stun the next non-Servant to cross it and apply Belligerent to them." - invocations = list("Divinity, smite...", "...those who trespass here!") + invocations = list("Divinity, smite...", "...those who trespass here.") channel_time = 50 power_cost = 50 whispered = TRUE @@ -75,7 +76,7 @@ descname = "Trap, Conversion" name = "Sigil of Submission" desc = "Places a luminous sigil that will convert any non-Servants that remain on it for 8 seconds." - invocations = list("Divinity, enlighten...", "...those who trespass here!") + invocations = list("Divinity, enlighten...", "...those who trespass here.") channel_time = 60 power_cost = 125 whispered = TRUE @@ -95,7 +96,7 @@ descname = "Short-Range Single-Target Stun" name = "Kindle" desc = "Charges your slab with divine energy, allowing you to overwhelm a target with Ratvar's light." - invocations = list("Divinity, show them your light!") + invocations = list("Divinity, show them your light.") whispered = TRUE channel_time = 25 //2.5 seconds should be a okay compromise between being able to use it when needed, and not being able to just pause in combat for a second and hardstunning your enemy power_cost = 125 @@ -118,7 +119,7 @@ descname = "Handcuffs" name = "Hateful Manacles" desc = "Forms replicant manacles around a target's wrists that function like handcuffs." - invocations = list("Shackle the heretic!", "Break them in body and spirit!") + invocations = list("Shackle the heretic!", "Break them in body and spirit.") channel_time = 15 power_cost = 25 whispered = TRUE @@ -269,7 +270,7 @@ descname = "New Clockwork Slab" name = "Replicant" desc = "Creates a new clockwork slab." - invocations = list("Metal, become greater!") + invocations = list("Metal, become greater.") channel_time = 10 power_cost = 25 whispered = TRUE @@ -290,7 +291,7 @@ descname = "Limited Xray Vision Glasses" name = "Wraith Spectacles" desc = "Fabricates a pair of glasses which grant true sight but cause gradual vision loss." - invocations = list("Show the truth of this world to me!") + invocations = list("Show the truth of this world to me.") channel_time = 10 power_cost = 50 whispered = TRUE @@ -310,7 +311,7 @@ name = "Spatial Gateway" desc = "Tears open a miniaturized gateway in spacetime to any conscious servant that can transport objects or creatures to its destination. \ Each servant assisting in the invocation adds one additional use and four additional seconds to the gateway's uses and duration." - invocations = list("Spatial Gateway...", "...activate!") + invocations = list("Spatial Gateway...", "...activate.") channel_time = 30 power_cost = 400 whispered = TRUE diff --git a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm index b559b34d5e..7ba4ce0936 100644 --- a/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm +++ b/code/modules/antagonists/clockcult/clock_scriptures/scripture_scripts.dm @@ -29,7 +29,7 @@ descname = "Structure, Turret" name = "Ocular Warden" desc = "Forms an automatic short-range turret which will automatically attack nearby unrestrained non-Servants that can see it." - invocations = list("Guardians of Engine...", "...judge those who would harm us!") + invocations = list("Guardians of Engine...", "...judge those who would harm us.") channel_time = 100 power_cost = 250 object_path = /obj/structure/destructible/clockwork/ocular_warden @@ -105,7 +105,7 @@ descname = "Delayed Area Knockdown Glasses" name = "Judicial Visor" desc = "Creates a visor that can smite an area, applying Belligerent and briefly stunning. The smote area will explode after 3 seconds." - invocations = list("Grant me the flames of Engine!") + invocations = list("Grant me the flames of Engine.") channel_time = 10 power_cost = 400 whispered = TRUE @@ -124,7 +124,7 @@ descname = "Shield with empowerable bashes" name = "Nezbere's shield" desc = "Creates a shield which generates charge from blocking damage, using it to empower its bashes tremendously. It is repaired with brass, and while very durable, extremely weak to lasers and, even more so, to energy weaponry." - invocations = list("Shield me...", "... from the coming dark!") + invocations = list("Shield me...", "... from the coming dark.") channel_time = 20 power_cost = 600 //Shouldn't be too spammable but not too hard to get either whispered = TRUE @@ -143,7 +143,7 @@ descname = "Summonable Armor and Weapons" name = "Clockwork Armaments" desc = "Allows the invoker to summon clockwork armor and a Ratvarian spear at will. The spear's attacks will generate Vitality, used for healing." - invocations = list("Grant me armaments...", "...from the forge of Armorer!") + invocations = list("Grant me armaments...", "...from the forge of Armorer.") channel_time = 20 power_cost = 250 whispered = TRUE diff --git a/code/modules/antagonists/clockcult/clockcult.dm b/code/modules/antagonists/clockcult/clockcult.dm index b6ed7dfe65..b935258c27 100644 --- a/code/modules/antagonists/clockcult/clockcult.dm +++ b/code/modules/antagonists/clockcult/clockcult.dm @@ -15,13 +15,16 @@ var/ignore_holy_water = FALSE /datum/antagonist/clockcult/silent + name = "Silent Clock Cultist" silent = TRUE show_in_antagpanel = FALSE //internal /datum/antagonist/clockcult/neutered + name = "Neutered Clock Cultist" neutered = TRUE /datum/antagonist/clockcult/neutered/traitor + name = "Traitor Clock Cultist" ignore_eligibility_check = TRUE ignore_holy_water = TRUE show_in_roundend = FALSE @@ -185,7 +188,7 @@ /datum/antagonist/clockcult/admin_add(datum/mind/new_owner,mob/admin) - add_servant_of_ratvar(new_owner.current, TRUE) + add_servant_of_ratvar(new_owner.current, TRUE, override_type = type) message_admins("[key_name_admin(admin)] has made [new_owner.current] into a servant of Ratvar.") log_admin("[key_name(admin)] has made [new_owner.current] into a servant of Ratvar.") diff --git a/code/modules/antagonists/cult/cult.dm b/code/modules/antagonists/cult/cult.dm index a2ec4a47a4..09d8771a62 100644 --- a/code/modules/antagonists/cult/cult.dm +++ b/code/modules/antagonists/cult/cult.dm @@ -19,9 +19,11 @@ var/ignore_holy_water = FALSE /datum/antagonist/cult/neutered + name = "Neutered Cultist" neutered = TRUE /datum/antagonist/cult/neutered/traitor + name = "Traitor Cultist" ignore_eligibility_checks = TRUE ignore_holy_water = TRUE show_in_roundend = FALSE diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index 1865ce1318..7c286c7985 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -76,9 +76,15 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( to_chat(src, "Your previous action was ignored because you've done too many in a second") return - //Logs all hrefs, except chat pings - if(!(href_list["_src_"] == "chat" && href_list["proc"] == "ping" && LAZYLEN(href_list) == 2)) - log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") + + // Tgui Topic middleware + if(tgui_Topic(href_list)) + if(CONFIG_GET(flag/emergency_tgui_logging)) + log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") + return + + //Logs all hrefs + log_href("[src] (usr:[usr]\[[COORD(usr)]\]) : [hsrc ? "[hsrc] " : ""][href]") //byond bug ID:2256651 if (asset_cache_job && (asset_cache_job in completed_asset_jobs)) @@ -105,10 +111,6 @@ GLOBAL_LIST_INIT(blacklisted_builds, list( handle_statpanel_click(href_list) return - // Tgui Topic middleware - if(tgui_Topic(href_list)) - return - // Admin PM if(href_list["priv_msg"]) cmd_admin_pm(href_list["priv_msg"],null) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index ea01b0c0ed..018c3d9a3f 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -31,6 +31,9 @@ // What items can be consumed to repair this clothing (must by an /obj/item/stack) var/repairable_by = /obj/item/stack/sheet/cloth + // has this item been upgraded by an upgrade kit (see: durathread armor kits) + var/upgrade_prefix + //Var modification - PLEASE be careful with this I know who you are and where you live var/list/user_vars_to_edit //VARNAME = VARVALUE eg: "name" = "butts" var/list/user_vars_remembered //Auto built by the above + dropped() + equipped() @@ -120,6 +123,8 @@ update_clothes_damaged_state(CLOTHING_PRISTINE) obj_integrity = max_integrity name = initial(name) // remove "tattered" or "shredded" if there's a prefix + if(upgrade_prefix) + name = upgrade_prefix + " " + initial(name) body_parts_covered = initial(body_parts_covered) slot_flags = initial(slot_flags) damage_by_parts = null diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index a558abbfe8..4728001699 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -220,8 +220,8 @@ parry_max_attacks = INFINITY parry_failed_cooldown_duration = 2.25 SECONDS parry_failed_stagger_duration = 2.25 SECONDS - parry_cooldown = 0 - parry_failed_clickcd_duration = 0 + parry_cooldown = 3 SECONDS + parry_failed_clickcd_duration = 0.5 SECONDS /obj/item/clothing/gloves/botanic_leather name = "botanist's leather gloves" diff --git a/code/modules/clothing/shoes/colour.dm b/code/modules/clothing/shoes/colour.dm index df0f03f614..9d51753c78 100644 --- a/code/modules/clothing/shoes/colour.dm +++ b/code/modules/clothing/shoes/colour.dm @@ -51,6 +51,17 @@ desc = "Very gay shoes." icon_state = "rain_bow" +/obj/item/clothing/shoes/sneakers/poly/polychromic + name = "polychromic shoes" + desc = "Every color." + icon_state = "poly" + item_state = "poly" + var/list/poly_colors = list("#FFFFFF", "#1D1D1D") + +/obj/item/clothing/shoes/sneakers/poly/polychromic/ComponentInitialize() + . = ..() + AddElement(/datum/element/polychromic, poly_colors, 2) + /obj/item/clothing/shoes/sneakers/orange name = "orange shoes" icon_state = "orange" diff --git a/code/modules/clothing/suits/cloaks.dm b/code/modules/clothing/suits/cloaks.dm index 133956e44e..f4fd844e8a 100644 --- a/code/modules/clothing/suits/cloaks.dm +++ b/code/modules/clothing/suits/cloaks.dm @@ -102,7 +102,18 @@ /obj/item/clothing/neck/cloak/polychromic/ComponentInitialize() . = ..() AddElement(/datum/element/polychromic, poly_colors, 3) - + +/obj/item/clothing/neck/cancloak/polychromic + name = "canvas cloak" + desc = "A rugged cloak made of canvas." + icon_state = "cancloak" + item_state = "cancloak" + var/list/poly_colors = list("#585858", "#373737", "#BEBEBE") + +/obj/item/clothing/neck/cancloak/polychromic/ComponentInitialize() + . = ..() + AddElement(/datum/element/polychromic, poly_colors, 3) + /obj/item/clothing/neck/cloak/alt name = "cloak" desc = "A ragged up white cloak. It reminds you of a place not far from here." diff --git a/code/modules/clothing/suits/miscellaneous.dm b/code/modules/clothing/suits/miscellaneous.dm index 0b705f7797..2a69a5d669 100644 --- a/code/modules/clothing/suits/miscellaneous.dm +++ b/code/modules/clothing/suits/miscellaneous.dm @@ -1030,6 +1030,16 @@ alternate_worn_layer = UNDER_HEAD_LAYER mutantrace_variation = STYLE_DIGITIGRADE|STYLE_NO_ANTHRO_ICON +/obj/item/clothing/suit/toggle/wbreakpoly + name = "polychromic windbreaker" + desc = "Perfect for windy days." + icon_state = "wbreakpoly" + item_state = "wbreakpoly" + +/obj/item/clothing/suit/toggle/wbreakpoly/polychromic/ComponentInitialize() + . = ..() + AddElement(/datum/element/polychromic, list("#464F65", "#916035", "#474747"), 3) + /obj/item/clothing/suit/flakjack name = "flak jacket" desc = "A dilapidated jacket made of a supposedly bullet-proof material (Hint: It isn't.). Smells faintly of napalm." diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index e617d2d57b..3207a5842f 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -32,6 +32,9 @@ /obj/item/clothing/under/attackby(obj/item/I, mob/user, params) if((has_sensor == BROKEN_SENSORS) && istype(I, /obj/item/stack/cable_coil)) + if(damaged_clothes) + to_chat(user,"You should repair the damage done to [src] first.") + return 0 var/obj/item/stack/cable_coil/C = I I.use_tool(src, user, 0, 1) has_sensor = HAS_SENSORS diff --git a/code/modules/food_and_drinks/food/snacks_pie.dm b/code/modules/food_and_drinks/food/snacks_pie.dm index a4287d3d19..5329829637 100644 --- a/code/modules/food_and_drinks/food/snacks_pie.dm +++ b/code/modules/food_and_drinks/food/snacks_pie.dm @@ -54,7 +54,7 @@ H.visible_message("[H] is creamed by [src]!", "You've been creamed by [src]!") playsound(H, "desceration", 50, TRUE) if(!H.is_mouth_covered()) - reagents.trans_to(H, 15, log = TRUE) //Cream pie combat + reagents.trans_to(H, 15, log = "creampie hit") //Cream pie combat if(!H.creamed) // one layer at a time H.add_overlay(creamoverlay) H.creamed = TRUE diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index fecc9467a1..ebde504ec0 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -79,7 +79,7 @@ God bless America. to_chat(user, "There's nothing to dissolve [I] in!") return user.visible_message("[user] drops [I] into [src].", "You dissolve [I] in [src].") - I.reagents.trans_to(src, I.reagents.total_volume) + I.reagents.trans_to(src, I.reagents.total_volume, log = "pill into deep fryer") qdel(I) return if(istype(I,/obj/item/clothing/head/mob_holder)) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 24f65756c8..e186364cff 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -527,12 +527,13 @@ else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample)) if(!myseed) if(istype(O, /obj/item/seeds/kudzu)) - investigate_log("had Kudzu planted in it by [key_name(user)] at [AREACOORD(src)]","kudzu") + investigate_log("had Kudzu planted in it by [key_name(user)] at [AREACOORD(src)]", INVESTIGATE_BOTANY) if(!user.transferItemToLoc(O, src)) return to_chat(user, "You plant [O].") dead = FALSE myseed = O + investigate_log("planting: [user] planted [O] with traits [english_list(myseed)] and reagents [english_list_assoc(myseed.reagents_add)] and potency [myseed.potency]", INVESTIGATE_BOTANY) TRAY_NAME_UPDATE age = 1 plant_health = myseed.endurance diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index d8082e667d..577635cd1c 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -188,6 +188,8 @@ ///The Number of products produced by the plant, typically the yield. var/product_count = getYield() + parent.investigate_log("manual harvest by [key_name(user)] of [getYield()] of [src], with seed traits [english_list(genes)] and reagents_add [english_list_assoc(reagents_add)] and potency [potency].", INVESTIGATE_BOTANY) + while(t_amount < product_count) var/obj/item/reagent_containers/food/snacks/grown/t_prod if(instability >= 30 && (seed_flags & MUTATE_EARLY) && LAZYLEN(mutatelist) && prob(instability/3)) diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 00c22ad96d..dbab6a558c 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -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 diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 8f0ef2b384..77c9a8c579 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -11,6 +11,8 @@ maxHealth = 25 health = 25 + can_ventcrawl = TRUE + var/amount_grown = 0 var/max_grown = 100 var/time_of_birth diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 371675ad51..85d91e992f 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -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, diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 8d473639b4..c3cdb3354f 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -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("[user]'s [atk_verb] misses [target]!", \ "You avoid [user]'s [atk_verb]!", "You hear a swoosh!", null, COMBAT_MESSAGE_RANGE, null, \ diff --git a/code/modules/mob/living/living_sprint.dm b/code/modules/mob/living/living_sprint.dm index 3ef67c9edd..728645c3eb 100644 --- a/code/modules/mob/living/living_sprint.dm +++ b/code/modules/mob/living/living_sprint.dm @@ -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) diff --git a/code/modules/mob/living/silicon/robot/robot_sprint.dm b/code/modules/mob/living/silicon/robot/robot_sprint.dm index dff0d9dd0d..80adfe80fd 100644 --- a/code/modules/mob/living/silicon/robot/robot_sprint.dm +++ b/code/modules/mob/living/silicon/robot/robot_sprint.dm @@ -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() diff --git a/code/modules/pool/pool_controller.dm b/code/modules/pool/pool_controller.dm index 17faa7a3e3..9f670de282 100644 --- a/code/modules/pool/pool_controller.dm +++ b/code/modules/pool/pool_controller.dm @@ -146,7 +146,7 @@ return reagents.clear_reagents() // This also reacts them. No nitroglycerin deathpools, sorry gamers :( - W.reagents.trans_to(reagents, max_beaker_transfer) + W.reagents.trans_to(reagents, max_beaker_transfer, log = "pool fill from reagent container") user.visible_message("[src] makes a slurping noise.", "All of the contents of [W] are quickly suctioned out by the machine![user] tries to squirt something into [target]'s eyes, but fails!", \ "[user] tries to squirt something into [target]'s eyes, but fails!") @@ -67,7 +67,7 @@ var/mob/M = target log_combat(user, M, "squirted", reagents.log_list()) - trans = src.reagents.trans_to(target, amount_per_transfer_from_this) + trans = src.reagents.trans_to(target, amount_per_transfer_from_this, log = "dropper drop") to_chat(user, "You transfer [trans] unit\s of the solution.") update_icon() @@ -81,7 +81,7 @@ to_chat(user, "[target] is empty!") return - var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this) + var/trans = target.reagents.trans_to(src, amount_per_transfer_from_this, log = "dropper fill") to_chat(user, "You fill [src] with [trans] unit\s of the solution.") diff --git a/code/modules/reagents/reagent_containers/hypospray.dm b/code/modules/reagents/reagent_containers/hypospray.dm index 1f89af420e..143025aed1 100644 --- a/code/modules/reagents/reagent_containers/hypospray.dm +++ b/code/modules/reagents/reagent_containers/hypospray.dm @@ -41,7 +41,7 @@ if(M.reagents) var/trans = 0 if(!infinite) - trans = reagents.trans_to(M, amount_per_transfer_from_this, log = TRUE) + trans = reagents.trans_to(M, amount_per_transfer_from_this, log = "hypospray injection") else trans = reagents.copy_to(M, amount_per_transfer_from_this) @@ -427,7 +427,7 @@ var/fraction = min(vial.amount_per_transfer_from_this/vial.reagents.total_volume, 1) vial.reagents.reaction(L, method, fraction) - vial.reagents.trans_to(target, vial.amount_per_transfer_from_this, log = TRUE) + vial.reagents.trans_to(target, vial.amount_per_transfer_from_this, log = "hypospray fill") var/long_sound = vial.amount_per_transfer_from_this >= 15 playsound(loc, long_sound ? 'sound/items/hypospray_long.ogg' : pick('sound/items/hypospray.ogg','sound/items/hypospray2.ogg'), 50, 1, -1) to_chat(user, "You [fp_verb] [vial.amount_per_transfer_from_this] units of the solution. The hypospray's cartridge now contains [vial.reagents.total_volume] units.") diff --git a/code/modules/reagents/reagent_containers/rags.dm b/code/modules/reagents/reagent_containers/rags.dm index 5d94e78809..8a6e2bf2e7 100644 --- a/code/modules/reagents/reagent_containers/rags.dm +++ b/code/modules/reagents/reagent_containers/rags.dm @@ -39,7 +39,7 @@ C.visible_message("[user] is trying to smother \the [C] with \the [src]!", "[user] is trying to smother you with \the [src]!", "You hear some struggling and muffled cries of surprise.") if(do_after(user, 20, target = C)) reagents.reaction(C, INGEST) - reagents.trans_to(C, 5, log = TRUE) + reagents.trans_to(C, 5, log = "rag smother") C.visible_message("[user] has smothered \the [C] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and a heavy breath taken.") log_combat(user, C, "smothered", log_object) else @@ -107,7 +107,7 @@ reagents.clear_reagents() else msg += "'s liquids into \the [target]" - reagents.trans_to(target, reagents.total_volume, log = TRUE) + reagents.trans_to(target, reagents.total_volume, log = "rag squeeze dry") to_chat(user, "[msg].") return TRUE diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index 311c886c9d..f41f299439 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -36,6 +36,6 @@ log_combat(owner, null, "swallowed an implanted pill", target) if(target.reagents.total_volume) target.reagents.reaction(owner, INGEST) - target.reagents.trans_to(owner, target.reagents.total_volume, log = TRUE) + target.reagents.trans_to(owner, target.reagents.total_volume, log = "dental pill swallow") qdel(target) return 1 diff --git a/code/modules/vending/clothesmate.dm b/code/modules/vending/clothesmate.dm index 09881da469..b68105dcf8 100644 --- a/code/modules/vending/clothesmate.dm +++ b/code/modules/vending/clothesmate.dm @@ -21,6 +21,7 @@ /obj/item/clothing/suit/jacket/puffer/vest = 4, /obj/item/clothing/suit/jacket/puffer = 4, /obj/item/clothing/suit/hooded/cloak/david = 4, + /obj/item/clothing/neck/cancloak = 4, /obj/item/clothing/suit/bomber = 5, /obj/item/clothing/under/suit/turtle/teal = 3, /obj/item/clothing/under/suit/turtle/grey = 3, @@ -212,7 +213,9 @@ /obj/item/clothing/neck/necklace/dope = 5, /obj/item/clothing/suit/jacket/letterman_nanotrasen = 5, /obj/item/clothing/under/misc/corporateuniform = 5, - /obj/item/clothing/suit/hooded/wintercoat/polychromic = 5) + /obj/item/clothing/suit/hooded/wintercoat/polychromic = 5, + /obj/item/clothing/suit/toggle/wbreakpoly/polychromic = 5, + /obj/item/clothing/shoes/sneakers/poly/polychromic = 10) refill_canister = /obj/item/vending_refill/clothing default_price = PRICE_CHEAP extra_price = PRICE_BELOW_NORMAL diff --git a/html/changelog.html b/html/changelog.html index 81b8534776..2d2d7a2eae 100644 --- a/html/changelog.html +++ b/html/changelog.html @@ -50,6 +50,68 @@ -->
+

16 February 2021

+

silicons updated:

+
    +
  • sprint removal entry added, UI will revert to old UI while this is active.
  • +
+ +

15 February 2021

+

Adelphon updated:

+
    +
  • polychromatic shoes
  • +
  • polychromatic windbreaker
  • +
  • polychromatic canvas cloak
  • +
  • digitigrade charismatic suit texture
  • +
+

DeltaFire15 updated:

+
    +
  • Kneecapped pugilist parries somewhat.
  • +
  • Slightly nerfed default unarmed parries.
  • +
  • Slightly nerfed traitor armwrap parries.
  • +
  • Pugilist parries now cannot perfectly defend against projectiles, as they were supposed to.
  • +
  • Some parrying numbers that one would think were in seconds didn't have the SECONDS. I added those.
  • +
  • Clock cultists now yell alot less when invoking scripture.
  • +
+

dzahlus updated:

+
    +
  • Added new emote
  • +
  • added a new emote sound
  • +
+

silicons updated:

+
    +
  • people on the ground hit less hard in unarmed combat. rng miss remove from punches.
  • +
  • chat highlighting no longer drops half your entered words.
  • +
+ +

14 February 2021

+

DeltaFire15 updated:

+
    +
  • The antag panel now correctly shows the names of cultist / clockcult datum subtypes.
  • +
  • Adding clock cultists via the admin panel now works correctly.
  • +
  • Xeno larvae should now be able to ventcrawl again.
  • +
+

Hatterhat updated:

+
    +
  • Repairing sensors on jumpsuits now requires a fully-intact jumpsuit. Find some cloth.
  • +
  • Durathread armor kits now require you to have a fully-repaired jumpsuit, first, with no attachments.
  • +
  • Durathread armor kits now no longer weave the entirety of the jumpsuit armor universe into having armor.
  • +
+

TyrianTyrell updated:

+
    +
  • added a define for multilingual granted languages, and changed the multilingual trait to use it.
  • +
+ +

13 February 2021

+

Hatterhat updated:

+
    +
  • Energy bolas now take 2.5 seconds to remove and dissipate on removal.
  • +
+

timothyteakettle updated:

+
    +
  • migration error to version 39+ of savefiles is now logged instead of messaging all online admins in the chat
  • +
+

12 February 2021

Hatterhat updated:

    diff --git a/html/changelogs/.all_changelog.yml b/html/changelogs/.all_changelog.yml index 808eaef805..73e9e9eb37 100644 --- a/html/changelogs/.all_changelog.yml +++ b/html/changelogs/.all_changelog.yml @@ -28454,3 +28454,50 @@ DO NOT EDIT THIS FILE BY HAND! AUTOMATICALLY GENERATED BY ss13_genchangelog.py. silicons: - balance: Voice of God - sleep removed, stun staggers instead, knockdown is faster but does not do stamina damage, vomit is faster but doesn't stun +2021-02-13: + Hatterhat: + - balance: Energy bolas now take 2.5 seconds to remove and dissipate on removal. + timothyteakettle: + - admin: migration error to version 39+ of savefiles is now logged instead of messaging + all online admins in the chat +2021-02-14: + DeltaFire15: + - admin: The antag panel now correctly shows the names of cultist / clockcult datum + subtypes. + - bugfix: Adding clock cultists via the admin panel now works correctly. + - bugfix: Xeno larvae should now be able to ventcrawl again. + Hatterhat: + - tweak: Repairing sensors on jumpsuits now requires a fully-intact jumpsuit. Find + some cloth. + - tweak: Durathread armor kits now require you to have a fully-repaired jumpsuit, + first, with no attachments. + - bugfix: Durathread armor kits now no longer weave the entirety of the jumpsuit + armor universe into having armor. + TyrianTyrell: + - code_imp: added a define for multilingual granted languages, and changed the multilingual + trait to use it. +2021-02-15: + Adelphon: + - rscadd: polychromatic shoes + - rscadd: polychromatic windbreaker + - rscadd: polychromatic canvas cloak + - bugfix: digitigrade charismatic suit texture + DeltaFire15: + - balance: Kneecapped pugilist parries somewhat. + - balance: Slightly nerfed default unarmed parries. + - balance: Slightly nerfed traitor armwrap parries. + - bugfix: Pugilist parries now cannot perfectly defend against projectiles, as they + were supposed to. + - bugfix: Some parrying numbers that one would think were in seconds didn't have + the SECONDS. I added those. + - balance: Clock cultists now yell alot less when invoking scripture. + dzahlus: + - rscadd: Added new emote + - soundadd: added a new emote sound + silicons: + - balance: people on the ground hit less hard in unarmed combat. rng miss remove + from punches. + - bugfix: chat highlighting no longer drops half your entered words. +2021-02-16: + silicons: + - config: sprint removal entry added, UI will revert to old UI while this is active. diff --git a/html/changelogs/AutoChangeLog-pr-14166.yml b/html/changelogs/AutoChangeLog-pr-14166.yml deleted file mode 100644 index 5116f238fc..0000000000 --- a/html/changelogs/AutoChangeLog-pr-14166.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "Hatterhat" -delete-after: True -changes: - - balance: "Energy bolas now take 2.5 seconds to remove and dissipate on removal." diff --git a/html/changelogs/AutoChangeLog-pr-14223.yml b/html/changelogs/AutoChangeLog-pr-14223.yml deleted file mode 100644 index 268fb743a5..0000000000 --- a/html/changelogs/AutoChangeLog-pr-14223.yml +++ /dev/null @@ -1,4 +0,0 @@ -author: "timothyteakettle" -delete-after: True -changes: - - admin: "migration error to version 39+ of savefiles is now logged instead of messaging all online admins in the chat" diff --git a/icons/mob/clothing/feet.dmi b/icons/mob/clothing/feet.dmi index 227ae83166..d93543805b 100644 Binary files a/icons/mob/clothing/feet.dmi and b/icons/mob/clothing/feet.dmi differ diff --git a/icons/mob/clothing/neck.dmi b/icons/mob/clothing/neck.dmi index df1037b8fa..3214cc73ba 100644 Binary files a/icons/mob/clothing/neck.dmi and b/icons/mob/clothing/neck.dmi differ diff --git a/icons/mob/clothing/suit.dmi b/icons/mob/clothing/suit.dmi index 9b9a74e19a..5fca3059c1 100644 Binary files a/icons/mob/clothing/suit.dmi and b/icons/mob/clothing/suit.dmi differ diff --git a/icons/mob/clothing/uniform_digi.dmi b/icons/mob/clothing/uniform_digi.dmi index 61c464ef1d..0cc1506e1b 100644 Binary files a/icons/mob/clothing/uniform_digi.dmi and b/icons/mob/clothing/uniform_digi.dmi differ diff --git a/icons/obj/clothing/cloaks.dmi b/icons/obj/clothing/cloaks.dmi index 7ea22d34bc..90997bf80a 100644 Binary files a/icons/obj/clothing/cloaks.dmi and b/icons/obj/clothing/cloaks.dmi differ diff --git a/icons/obj/clothing/shoes.dmi b/icons/obj/clothing/shoes.dmi index 42ef740c4a..aee67da199 100644 Binary files a/icons/obj/clothing/shoes.dmi and b/icons/obj/clothing/shoes.dmi differ diff --git a/icons/obj/clothing/suits.dmi b/icons/obj/clothing/suits.dmi index 11d736462d..d126f31746 100644 Binary files a/icons/obj/clothing/suits.dmi and b/icons/obj/clothing/suits.dmi differ diff --git a/modular_citadel/code/modules/client/loadout/neck.dm b/modular_citadel/code/modules/client/loadout/neck.dm index 300b98fbe9..7c9bafc86d 100644 --- a/modular_citadel/code/modules/client/loadout/neck.dm +++ b/modular_citadel/code/modules/client/loadout/neck.dm @@ -98,3 +98,9 @@ path = /obj/item/clothing/neck/cloak/alt/polychromic loadout_flags = LOADOUT_CAN_COLOR_POLYCHROMIC loadout_initial_colors = list("#FFFFFF", "#676767", "#4C4C4C") + +/datum/gear/neck/cancloak + name = "Canvas Cloak" + path = /obj/item/clothing/neck/cancloak/polychromic + loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC + loadout_initial_colors = list("#585858", "#373737", "#BEBEBE") diff --git a/modular_citadel/code/modules/client/loadout/shoes.dm b/modular_citadel/code/modules/client/loadout/shoes.dm index 76d7305971..e2b3916ae0 100644 --- a/modular_citadel/code/modules/client/loadout/shoes.dm +++ b/modular_citadel/code/modules/client/loadout/shoes.dm @@ -34,6 +34,12 @@ name = "White shoes" path = /obj/item/clothing/shoes/sneakers/white +/datum/gear/shoes/poly + name = "Polychromic shoes" + path = /obj/item/clothing/shoes/sneakers/poly/polychromic + loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC + loadout_initial_colors = list("#FFFFFF", "#1D1D1D") + /datum/gear/shoes/gildedcuffs name = "Gilded leg wraps" path= /obj/item/clothing/shoes/wraps diff --git a/modular_citadel/code/modules/client/loadout/suit.dm b/modular_citadel/code/modules/client/loadout/suit.dm index 3f1b94b437..8ff7cb363e 100644 --- a/modular_citadel/code/modules/client/loadout/suit.dm +++ b/modular_citadel/code/modules/client/loadout/suit.dm @@ -104,6 +104,13 @@ loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC loadout_initial_colors = list("#6A6964", "#C4B8A6", "#0000FF") +/datum/gear/suit/coat/wbreakpoly + name = "Polychromic windbreaker" + path = /obj/item/clothing/suit/toggle/wbreakpoly/polychromic + cost = 4 + loadout_flags = LOADOUT_CAN_NAME | LOADOUT_CAN_DESCRIPTION | LOADOUT_CAN_COLOR_POLYCHROMIC + loadout_initial_colors = list("#464F65", "#916035", "#474747") + /datum/gear/suit/coat/med name = "Medical winter coat" path = /obj/item/clothing/suit/hooded/wintercoat/medical diff --git a/modular_citadel/code/modules/mob/cit_emotes.dm b/modular_citadel/code/modules/mob/cit_emotes.dm index f7911def84..3eb656f65a 100644 --- a/modular_citadel/code/modules/mob/cit_emotes.dm +++ b/modular_citadel/code/modules/mob/cit_emotes.dm @@ -300,3 +300,24 @@ user.nextsoundemote = world.time + 7 var/sound = pick('sound/voice/slime_squish.ogg') playsound(user, sound, 50, 1, -1) + +/datum/emote/living/pain + key = "pain" + key_third_person = "cries out in pain!" + message = "cries out in pain!" + emote_type = EMOTE_AUDIBLE + muzzle_ignore = FALSE + restraint_check = FALSE + +/datum/emote/living/pain/run_emote(mob/living/user, params) + if(!(. = ..())) + return + if(user.nextsoundemote >= world.time) + return + user.nextsoundemote = world.time + 7 + var/sound + if(user.gender == MALE) + sound = pick('modular_citadel/sound/voice/human_male_pain_1.ogg', 'modular_citadel/sound/voice/human_male_pain_2.ogg', 'modular_citadel/sound/voice/human_male_pain_3.ogg', 'modular_citadel/sound/voice/human_male_pain_rare.ogg') + else + sound = pick('modular_citadel/sound/voice/human_female_pain_1.ogg', 'modular_citadel/sound/voice/human_female_pain_2.ogg', 'modular_citadel/sound/voice/human_female_pain_3.ogg') + playsound(user, sound, 50, 0, 0) diff --git a/modular_citadel/icons/ui/screen_clockwork.dmi b/modular_citadel/icons/ui/screen_clockwork.dmi index 3a7ba8338f..82fd91026b 100644 Binary files a/modular_citadel/icons/ui/screen_clockwork.dmi and b/modular_citadel/icons/ui/screen_clockwork.dmi differ diff --git a/modular_citadel/icons/ui/screen_midnight.dmi b/modular_citadel/icons/ui/screen_midnight.dmi index fc446a411c..8990650347 100644 Binary files a/modular_citadel/icons/ui/screen_midnight.dmi and b/modular_citadel/icons/ui/screen_midnight.dmi differ diff --git a/modular_citadel/icons/ui/screen_operative.dmi b/modular_citadel/icons/ui/screen_operative.dmi index 9383b94718..9a784fb14a 100644 Binary files a/modular_citadel/icons/ui/screen_operative.dmi and b/modular_citadel/icons/ui/screen_operative.dmi differ diff --git a/modular_citadel/icons/ui/screen_plasmafire.dmi b/modular_citadel/icons/ui/screen_plasmafire.dmi index 97e577c7bd..9a546cad6e 100644 Binary files a/modular_citadel/icons/ui/screen_plasmafire.dmi and b/modular_citadel/icons/ui/screen_plasmafire.dmi differ diff --git a/modular_citadel/icons/ui/screen_slimecore.dmi b/modular_citadel/icons/ui/screen_slimecore.dmi index 8f45ff3f76..22f97207df 100644 Binary files a/modular_citadel/icons/ui/screen_slimecore.dmi and b/modular_citadel/icons/ui/screen_slimecore.dmi differ diff --git a/modular_citadel/sound/voice/human_female_pain_1.ogg b/modular_citadel/sound/voice/human_female_pain_1.ogg new file mode 100644 index 0000000000..f697996e56 Binary files /dev/null and b/modular_citadel/sound/voice/human_female_pain_1.ogg differ diff --git a/modular_citadel/sound/voice/human_female_pain_2.ogg b/modular_citadel/sound/voice/human_female_pain_2.ogg new file mode 100644 index 0000000000..aa2eaba352 Binary files /dev/null and b/modular_citadel/sound/voice/human_female_pain_2.ogg differ diff --git a/modular_citadel/sound/voice/human_female_pain_3.ogg b/modular_citadel/sound/voice/human_female_pain_3.ogg new file mode 100644 index 0000000000..c21d462ba5 Binary files /dev/null and b/modular_citadel/sound/voice/human_female_pain_3.ogg differ diff --git a/modular_citadel/sound/voice/human_male_pain_1.ogg b/modular_citadel/sound/voice/human_male_pain_1.ogg new file mode 100644 index 0000000000..0dbedfe7e8 Binary files /dev/null and b/modular_citadel/sound/voice/human_male_pain_1.ogg differ diff --git a/modular_citadel/sound/voice/human_male_pain_2.ogg b/modular_citadel/sound/voice/human_male_pain_2.ogg new file mode 100644 index 0000000000..6f4a314c5c Binary files /dev/null and b/modular_citadel/sound/voice/human_male_pain_2.ogg differ diff --git a/modular_citadel/sound/voice/human_male_pain_3.ogg b/modular_citadel/sound/voice/human_male_pain_3.ogg new file mode 100644 index 0000000000..7b13505345 Binary files /dev/null and b/modular_citadel/sound/voice/human_male_pain_3.ogg differ diff --git a/modular_citadel/sound/voice/human_male_pain_rare.ogg b/modular_citadel/sound/voice/human_male_pain_rare.ogg new file mode 100644 index 0000000000..73a5da2faf Binary files /dev/null and b/modular_citadel/sound/voice/human_male_pain_rare.ogg differ diff --git a/modular_citadel/sound/voice/pain emote credits.txt b/modular_citadel/sound/voice/pain emote credits.txt new file mode 100644 index 0000000000..10b0c205df --- /dev/null +++ b/modular_citadel/sound/voice/pain emote credits.txt @@ -0,0 +1 @@ +pain emote sound ported from https://gitlab.com/cmdevs/colonial-warfare \ No newline at end of file diff --git a/tgstation.dme b/tgstation.dme index fa8a01908d..9fcdbd8751 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -294,6 +294,7 @@ #include "code\controllers\configuration\entries\fail2topic.dm" #include "code\controllers\configuration\entries\game_options.dm" #include "code\controllers\configuration\entries\general.dm" +#include "code\controllers\configuration\entries\logging.dm" #include "code\controllers\configuration\entries\persistence.dm" #include "code\controllers\configuration\entries\plushies.dm" #include "code\controllers\configuration\entries\policy.dm" diff --git a/tgui/packages/tgui-panel/chat/renderer.js b/tgui/packages/tgui-panel/chat/renderer.js index cfef072d30..ceef70c56c 100644 --- a/tgui/packages/tgui-panel/chat/renderer.js +++ b/tgui/packages/tgui-panel/chat/renderer.js @@ -176,7 +176,9 @@ class ChatRenderer { this.highlightColor = null; return; } - const allowedRegex = /^[a-z0-9_\-\s]+$/ig; + // citadel update - ig changed to i for flags, + // to fix issues with highlighting only working for every other word. + const allowedRegex = /^[a-z0-9_\-\s]+$/i; const lines = String(text) .split(',') .map(str => str.trim()) diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index 3e704c2a7b..7ce520fb5b 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -1 +1 @@ -!function(e){function t(t){for(var o,a,c=t[0],s=t[1],l=t[2],d=0,g=[];d=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=a.IMAGE_RETRY_LIMIT)d.error("failed to load an image after "+n+" attempts");else{var o=t.src;t.src=null,t.src=o+"#"+n,t.setAttribute("data-reload-n",n+1)}}),a.IMAGE_RETRY_DELAY)},m=function(e){var t=e.node,n=e.times;if(t&&n){var o=t.querySelector(".Chat__badge"),i=o||document.createElement("div");i.textContent=n,i.className=(0,r.classes)(["Chat__badge","Chat__badge--animate"]),requestAnimationFrame((function(){i.className="Chat__badge"})),o||t.appendChild(i)}},v=function(){function t(){var e=this;this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new o.EventEmitter,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,o=n.scrollHeight,r=n.scrollTop+n.offsetHeight,i=Math.abs(o-r)<24;i!==e.scrollTracking&&(e.scrollTracking=i,e.events.emit("scrollTrackingChanged",i),d.debug("tracking",e.scrollTracking))},this.ensureScrollTracking=function(){e.scrollTracking&&e.scrollToBottom()},setInterval((function(){return e.pruneMessages()}),a.MESSAGE_PRUNE_INTERVAL)}var n=t.prototype;return n.isReady=function(){return this.loaded&&this.rootNode&&this.page},n.mount=function(t){var n=this;this.rootNode?t.appendChild(this.rootNode):this.rootNode=t,this.scrollNode=function(e){for(var t=document.body,n=e;n&&n!==t;){if(n.scrollWidth0&&(this.processBatch(this.queue),this.queue=[])},n.assignStyle=function(e){void 0===e&&(e={});for(var t=0,n=Object.keys(e);t1&&n.test(e)}));if(0===o.length)return this.highlightRegex=null,void(this.highlightColor=null);this.highlightRegex=new RegExp("("+o.join("|")+")","gi"),this.highlightColor=t},n.scrollToBottom=function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight},n.changePage=function(e){if(!this.isReady())return this.page=e,void this.tryFlushQueue();this.page=e,this.rootNode.textContent="",this.visibleMessages=[];for(var t,n,o=document.createDocumentFragment(),r=l(this.messages);!(n=r()).done;){var i=n.value;(0,c.canPageAcceptType)(e,i.type)&&(t=i.node,o.appendChild(t),this.visibleMessages.push(i))}t&&(this.rootNode.appendChild(o),t.scrollIntoView())},n.getCombinableMessage=function(e){for(var t=Date.now(),n=this.visibleMessages.length,o=n-1,r=Math.max(0,n-a.COMBINE_MAX_MESSAGES),i=o;i>=r;i--){var s=this.visibleMessages[i];if(!s.type.startsWith(a.MESSAGE_TYPE_INTERNAL)&&(0,c.isSameMessage)(s,e)&&t0){this.visibleMessages=e.slice(t);for(var n=0;n0&&(this.messages=this.messages.slice(r),d.log("pruned "+r+" stored messages"))}else d.debug("pruning delayed")},n.rebuildChat=function(){if(this.isReady()){for(var e,t=Math.max(0,this.messages.length-a.MAX_PERSISTED_MESSAGES),n=this.messages.slice(t),o=l(n);!(e=o()).done;)e.value.node=undefined;this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(n,{notifyListeners:!1})}},n.saveToDisk=function(){if(!Byond.IS_LTE_IE10){for(var e="",t=document.styleSheets,n=0;n\n\n\nSS13 Chat Log\n\n\n\n
    \n'+a+"
    \n\n\n"]),d=(new Date).toISOString().substring(0,19).replace(/[-:]/g,"").replace("T","-");window.navigator.msSaveBlob(u,"ss13-chatlog-"+d+".html")}},t}();window.__chatRenderer__||(window.__chatRenderer__=new v);var y=window.__chatRenderer__;t.chatRenderer=y}).call(this,n(101).setImmediate)},219:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=t.gameMiddleware=t.useGame=void 0;var o=n(707);t.useGame=o.useGame;var r=n(708);t.gameMiddleware=r.gameMiddleware;var i=n(710);t.gameReducer=i.gameReducer},220:function(e,t,n){"use strict";t.__esModule=!0,t.selectGame=void 0;t.selectGame=function(e){return e.game}},221:function(e,t,n){"use strict";t.__esModule=!0,t.connectionRestored=t.connectionLost=t.roundRestarted=void 0;var o=n(22),r=(0,o.createAction)("roundrestart");t.roundRestarted=r;var i=(0,o.createAction)("game/connectionLost");t.connectionLost=i;var a=(0,o.createAction)("game/connectionRestored");t.connectionRestored=a},222:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=t.PingIndicator=t.pingMiddleware=void 0;var o=n(712);t.pingMiddleware=o.pingMiddleware;var r=n(713);t.PingIndicator=r.PingIndicator;var i=n(716);t.pingReducer=i.pingReducer},223:function(e,t,n){"use strict";t.__esModule=!0,t.PING_ROUNDTRIP_WORST=t.PING_ROUNDTRIP_BEST=t.PING_QUEUE_SIZE=t.PING_MAX_FAILS=t.PING_TIMEOUT=t.PING_INTERVAL=void 0;t.PING_INTERVAL=2500;t.PING_TIMEOUT=2e3;t.PING_MAX_FAILS=3;t.PING_QUEUE_SIZE=8;t.PING_ROUNDTRIP_BEST=50;t.PING_ROUNDTRIP_WORST=200},66:function(e,t,n){"use strict";t.__esModule=!0,t.openChatSettings=t.toggleSettings=t.changeSettingsTab=t.loadSettings=t.updateSettings=void 0;var o=n(22),r=(0,o.createAction)("settings/update");t.updateSettings=r;var i=(0,o.createAction)("settings/load");t.loadSettings=i;var a=(0,o.createAction)("settings/changeTab");t.changeSettingsTab=a;var c=(0,o.createAction)("settings/toggle");t.toggleSettings=c;var s=(0,o.createAction)("settings/openChatTab");t.openChatSettings=s},688:function(e,t,n){n(149),e.exports=n(689)},689:function(e,t,n){"use strict";var o=n(0);n(690),n(691);var r,i,a=n(99),c=n(22),s=(n(100),n(58)),l=n(188),u=n(135),d=n(189),g=n(214),p=n(146),h=n(219),f=n(711),m=n(222),v=n(145),y=n(717);function b(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}a.perf.mark("inception",null==(r=window.performance)||null==(i=r.timing)?void 0:i.navigationStart),a.perf.mark("init");var S=(0,d.configureStore)({reducer:(0,c.combineReducers)({audio:g.audioReducer,chat:p.chatReducer,game:h.gameReducer,ping:m.pingReducer,settings:v.settingsReducer}),middleware:{pre:[p.chatMiddleware,m.pingMiddleware,y.telemetryMiddleware,v.settingsMiddleware,g.audioMiddleware,h.gameMiddleware]}}),_=(0,u.createRenderer)((function(){var e=n(718).Panel;return(0,o.createComponentVNode)(2,d.StoreProvider,{store:S,children:(0,o.createComponentVNode)(2,e)})})),C=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return void 0===e&&(e="output"),n.next=3,Byond.winget(e);case 3:t=n.sent,Byond.winset("browseroutput",{size:t.size});case 5:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){b(i,o,r,a,c,"next",e)}function c(e){b(i,o,r,a,c,"throw",e)}a(undefined)}))});return function(e){return t.apply(this,arguments)}}();!function E(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)({ignoreWindowFocus:!0}),(0,f.setupPanelFocusHacks)(),(0,l.captureExternalLinks)(),S.subscribe(_),window.update=function(e){return S.dispatch(Byond.parseJson(e))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}Byond.winset("output",{"is-visible":!1}),Byond.winset("browseroutput",{"is-visible":!0,"is-disabled":!1,pos:"0x0",size:"0x0"}),C()}else document.addEventListener("DOMContentLoaded",E)}()},690:function(e,t,n){},691:function(e,t,n){},692:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=void 0;var o=n(22),r=n(215);t.useAudio=function(e){var t=(0,o.useSelector)(e,r.selectAudio),n=(0,o.useDispatch)(e);return Object.assign({},t,{toggle:function(){return n({type:"audio/toggle"})}})}},693:function(e,t,n){"use strict";t.__esModule=!0,t.audioMiddleware=void 0;var o=n(694);t.audioMiddleware=function(e){var t=new o.AudioPlayer;return t.onPlay((function(){e.dispatch({type:"audio/playing"})})),t.onStop((function(){e.dispatch({type:"audio/stopped"})})),function(e){return function(n){var o=n.type,r=n.payload;if("audio/playMusic"===o){var i=r.url,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(r,["url"]);return t.play(i,a),e(n)}if("audio/stopMusic"===o)return t.stop(),e(n);if("settings/update"===o||"settings/load"===o){var c=null==r?void 0:r.adminMusicVolume;return"number"==typeof c&&t.setVolume(c),e(n)}return e(n)}}}},694:function(e,t,n){"use strict";function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&e.node.currentTime>=e.options.end&&e.stop())}),1e3))}var t=e.prototype;return t.destroy=function(){this.node&&(this.node.stop(),document.removeChild(this.node),clearInterval(this.playbackInterval))},t.play=function(e,t){void 0===t&&(t={}),this.node&&(i.log("playing",e,t),this.options=t,this.node.src=e)},t.stop=function(){if(this.node){if(this.playing)for(var e,t=o(this.onStopSubscribers);!(e=t()).done;)(0,e.value)();i.log("stopping"),this.playing=!1,this.node.src=""}},t.setVolume=function(e){this.node&&(this.volume=e,this.node.volume=e)},t.onPlay=function(e){this.node&&this.onPlaySubscribers.push(e)},t.onStop=function(e){this.node&&this.onStopSubscribers.push(e)},e}();t.AudioPlayer=a},695:function(e,t,n){"use strict";t.__esModule=!0,t.NowPlayingWidget=void 0;var o=n(0),r=n(8),i=n(22),a=n(1),c=n(145),s=n(215);t.NowPlayingWidget=function(e,t){var n,l=(0,i.useSelector)(t,s.selectAudio),u=(0,i.useDispatch)(t),d=(0,c.useSettings)(t),g=null==(n=l.meta)?void 0:n.title;return(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[l.playing&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,mx:.5,color:"label",children:"Now playing:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,grow:1,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},children:g||"Unknown Track"})],4)||(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,color:"label",children:"Nothing to play."}),l.playing&&(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Button,{tooltip:"Stop",icon:"stop",onClick:function(){return u({type:"audio/stopMusic"})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:0,maxValue:1,value:d.adminMusicVolume,step:.0025,stepPixelSize:1,format:function(e){return(0,r.toFixed)(100*e)+"%"},onDrag:function(e,t){return d.update({adminMusicVolume:t})}})})]})}},696:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=void 0;var o=n(22),r=n(66),i=n(104);t.useSettings=function(e){var t=(0,o.useSelector)(e,i.selectSettings),n=(0,o.useDispatch)(e);return Object.assign({},t,{visible:t.view.visible,toggle:function(){return n((0,r.toggleSettings)())},update:function(e){return n((0,r.updateSettings)(e))}})}},697:function(e,t,n){"use strict";t.__esModule=!0,t.settingsMiddleware=void 0;var o=n(79),r=n(216),i=n(66),a=n(104);t.settingsMiddleware=function(e){var t=!1;return function(n){return function(c){var s,l=c.type,u=c.payload;if(t||(t=!0,o.storage.get("panel-settings").then((function(t){e.dispatch((0,i.loadSettings)(t))}))),l===i.updateSettings.type||l===i.loadSettings.type){var d=null==u?void 0:u.theme;d&&(0,r.setClientTheme)(d),n(c);var g=(0,a.selectSettings)(e.getState());return s=g.fontSize,document.documentElement.style.setProperty("font-size",s+"px"),document.body.style.setProperty("font-size",s+"px"),void o.storage.set("panel-settings",g)}return n(c)}}}},698:function(e,t,n){"use strict";t.__esModule=!0,t.settingsReducer=void 0;var o=n(66),r={version:1,fontSize:13,lineHeight:1.2,theme:"default",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",view:{visible:!1,activeTab:n(217).SETTINGS_TABS[0].id}};t.settingsReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=t.payload;if(n===o.updateSettings.type)return Object.assign({},e,i);if(n===o.loadSettings.type)return(null==i?void 0:i.version)?(delete i.view,Object.assign({},e,i)):e;if(n===o.toggleSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!e.view.visible})});if(n===o.openChatSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!0,activeTab:"chatPage"})});if(n===o.changeSettingsTab.type){var a=i.tabId;return Object.assign({},e,{view:Object.assign({},e.view,{activeTab:a})})}return e}},699:function(e,t,n){"use strict";t.__esModule=!0,t.SettingsGeneral=t.SettingsPanel=void 0;var o=n(0),r=n(8),i=n(22),a=n(1),c=n(146),s=n(80),l=n(216),u=n(66),d=n(217),g=n(104);t.SettingsPanel=function(e,t){var n=(0,i.useSelector)(t,g.selectActiveTab),r=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{fitted:!0,fill:!0,minHeight:"8em",children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:d.SETTINGS_TABS.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e.id===n,onClick:function(){return r((0,u.changeSettingsTab)({tabId:e.id}))},children:e.name},e.id)}))})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:["general"===n&&(0,o.createComponentVNode)(2,p),"chatPage"===n&&(0,o.createComponentVNode)(2,c.ChatPageSettings)]})]})};var p=function(e,t){var n=(0,i.useSelector)(t,g.selectSettings),c=n.theme,d=n.fontSize,p=n.lineHeight,h=n.highlightText,f=n.highlightColor,m=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Theme",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:c,options:l.THEMES,onSelected:function(e){return m((0,u.updateSettings)({theme:e}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Font size",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:1,stepPixelSize:10,minValue:8,maxValue:32,value:d,unit:"px",format:function(e){return(0,r.toFixed)(e)},onChange:function(e,t){return m((0,u.updateSettings)({fontSize:t}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Line height",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:.01,stepPixelSize:2,minValue:.8,maxValue:5,value:p,format:function(e){return(0,r.toFixed)(e,2)},onDrag:function(e,t){return m((0,u.updateSettings)({lineHeight:t}))}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,color:"label",align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:"Highlight words (comma separated):"}),(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,children:[(0,o.createComponentVNode)(2,a.ColorBox,{mr:1,color:f}),(0,o.createComponentVNode)(2,a.Input,{width:"5em",monospace:!0,placeholder:"#ffffff",value:f,onInput:function(e,t){return m((0,u.updateSettings)({highlightColor:t}))}})]})]}),(0,o.createComponentVNode)(2,a.TextArea,{height:"3em",value:h,onChange:function(e,t){return m((0,u.updateSettings)({highlightText:t}))}})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"check",onClick:function(){return m((0,s.rebuildChat)())},children:"Apply now"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,fontSize:"0.9em",ml:1,color:"label",children:"Can freeze the chat for a while."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{icon:"save",onClick:function(){return m((0,s.saveChatToDisk)())},children:"Save chat log"})]})};t.SettingsGeneral=p},700:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPageSettings=void 0;var o=n(0),r=n(22),i=n(1),a=n(80),c=n(106),s=n(147);t.ChatPageSettings=function(e,t){var n=(0,r.useSelector)(t,s.selectCurrentChatPage),l=(0,r.useDispatch)(t);return(0,o.createComponentVNode)(2,i.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,i.Flex,{mx:-.5,align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,grow:1,children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:n.name,onChange:function(e,t){return l((0,a.updateChatPage)({pageId:n.id,name:t}))}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return l((0,a.removeChatPage)({pageId:n.id}))},children:"Remove"})})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Section,{title:"Messages to display",level:2,children:[c.MESSAGE_TYPES.filter((function(e){return!e.important&&!e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)})),(0,o.createComponentVNode)(2,i.Collapsible,{mt:1,color:"transparent",title:"Admin stuff",children:c.MESSAGE_TYPES.filter((function(e){return!e.important&&e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)}))})]})]})}},701:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPanel=void 0;var o=n(0),r=n(6),i=n(1),a=n(218);var c=function(e){var t,n;function c(){var t;return(t=e.call(this)||this).ref=(0,o.createRef)(),t.state={scrollTracking:!0},t.handleScrollTrackingChange=function(e){return t.setState({scrollTracking:e})},t}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=c.prototype;return s.componentDidMount=function(){a.chatRenderer.mount(this.ref.current),a.chatRenderer.events.on("scrollTrackingChanged",this.handleScrollTrackingChange),this.componentDidUpdate()},s.componentWillUnmount=function(){a.chatRenderer.events.off("scrollTrackingChanged",this.handleScrollTrackingChange)},s.componentDidUpdate=function(e){requestAnimationFrame((function(){a.chatRenderer.ensureScrollTracking()})),(!e||(0,r.shallowDiffers)(this.props,e))&&a.chatRenderer.assignStyle({width:"100%","white-space":"pre-wrap","font-size":this.props.fontSize,"line-height":this.props.lineHeight})},s.render=function(){var e=this.state.scrollTracking;return(0,o.createFragment)([(0,o.createVNode)(1,"div","Chat",null,1,null,null,this.ref),!e&&(0,o.createComponentVNode)(2,i.Button,{className:"Chat__scrollButton",icon:"arrow-down",onClick:function(){return a.chatRenderer.scrollToBottom()},children:"Scroll to bottom"})],0)},c}(o.Component);t.ChatPanel=c},702:function(e,t,n){"use strict";t.__esModule=!0,t.linkifyNode=t.highlightNode=t.replaceInTextNode=void 0;var o=function(e,t){return function(n){for(var o,r,i=n.textContent,a=i.length,c=0,s=0;o=e.exec(i);){s+=1,r||(r=document.createDocumentFragment());var l=o[0],u=l.length,d=o.index;c0&&(0,o.createComponentVNode)(2,l,{value:e.unreadCount}),onClick:function(){return d((0,a.changeChatPage)({pageId:e.id}))},children:e.name},e.id)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"plus",onClick:function(){d((0,a.addChatPage)()),d((0,s.openChatSettings)())}})})]})}},704:function(e,t,n){"use strict";t.__esModule=!0,t.chatMiddleware=void 0;var o=n(79),r=n(66),i=n(104),a=n(80),c=n(106),s=n(105),l=n(218),u=n(147);function d(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){d(i,o,r,a,c,"next",e)}function c(e){d(i,o,r,a,c,"throw",e)}a(undefined)}))}}var p=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,u.selectChat)(e.getState()),r=Math.max(0,l.chatRenderer.messages.length-c.MAX_PERSISTED_MESSAGES),i=l.chatRenderer.messages.slice(r).map((function(e){return(0,s.serializeMessage)(e)})),o.storage.set("chat-state",n),o.storage.set("chat-messages",i);case 5:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([o.storage.get("chat-state"),o.storage.get("chat-messages")]);case 2:if(n=t.sent,r=n[0],i=n[1],!(r&&r.version<=4)){t.next=8;break}return e.dispatch((0,a.loadChat)()),t.abrupt("return");case 8:i&&(c=[].concat(i,[(0,s.createMessage)({type:"internal/reconnected"})]),l.chatRenderer.processBatch(c,{prepend:!0})),e.dispatch((0,a.loadChat)(r));case 10:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}();t.chatMiddleware=function(e){var t=!1,n=!1;return l.chatRenderer.events.on("batchProcessed",(function(t){n&&e.dispatch((0,a.updateMessageCount)(t))})),l.chatRenderer.events.on("scrollTrackingChanged",(function(t){e.dispatch((0,a.changeScrollTracking)(t))})),setInterval((function(){return p(e)}),c.MESSAGE_SAVE_INTERVAL),function(o){return function(c){var s=c.type,d=c.payload;if(t||(t=!0,h(e)),"chat/message"!==s){if(s===a.loadChat.type){o(c);var g=(0,u.selectCurrentChatPage)(e.getState());return l.chatRenderer.changePage(g),l.chatRenderer.onStateLoaded(),void(n=!0)}if(s!==a.changeChatPage.type&&s!==a.addChatPage.type&&s!==a.removeChatPage.type&&s!==a.toggleAcceptedType.type){if(s===a.rebuildChat.type)return l.chatRenderer.rebuildChat(),o(c);if(s!==r.updateSettings.type&&s!==r.loadSettings.type){if("roundrestart"===s)return p(e),o(c);if(s!==a.saveChatToDisk.type)return o(c);l.chatRenderer.saveToDisk()}else{o(c);var f=(0,i.selectSettings)(e.getState());l.chatRenderer.setHighlight(f.highlightText,f.highlightColor)}}else{o(c);var m=(0,u.selectCurrentChatPage)(e.getState());l.chatRenderer.changePage(m)}}else{var v=Array.isArray(d)?d:[d];l.chatRenderer.processBatch(v)}}}}},705:function(e,t,n){"use strict";t.__esModule=!0,t.chatReducer=t.initialState=void 0;var o,r=n(80),i=n(105);function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&(C[A.id]=Object.assign({},A,{unreadCount:A.unreadCount+M}))}return Object.assign({},e,{pageById:C})}if(o===r.addChatPage.type)return Object.assign({},e,{currentPageId:c.id,pages:[].concat(e.pages,[c.id]),pageById:Object.assign({},e.pageById,(n={},n[c.id]=c,n))});if(o===r.changeChatPage.type){var I,P=c.pageId,x=Object.assign({},e.pageById[P],{unreadCount:0});return Object.assign({},e,{currentPageId:P,pageById:Object.assign({},e.pageById,(I={},I[P]=x,I))})}if(o===r.updateChatPage.type){var k,R=c.pageId,O=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(c,["pageId"]),V=Object.assign({},e.pageById[R],O);return Object.assign({},e,{pageById:Object.assign({},e.pageById,(k={},k[R]=V,k))})}if(o===r.toggleAcceptedType.type){var G,B=c.pageId,L=c.type,D=Object.assign({},e.pageById[B]);return D.acceptedTypes=Object.assign({},D.acceptedTypes),D.acceptedTypes[L]=!D.acceptedTypes[L],Object.assign({},e,{pageById:Object.assign({},e.pageById,(G={},G[B]=D,G))})}if(o===r.removeChatPage.type){var j=c.pageId,F=Object.assign({},e,{pages:[].concat(e.pages),pageById:Object.assign({},e.pageById)});return delete F.pageById[j],F.pages=F.pages.filter((function(e){return e!==j})),0===F.pages.length&&(F.pages.push(s.id),F.pageById[s.id]=s,F.currentPageId=s.id),F.currentPageId&&F.currentPageId!==j||(F.currentPageId=F.pages[0]),F}return e}},706:function(e,t,n){"use strict";t.__esModule=!0,t.audioReducer=void 0;var o={visible:!1,playing:!1,track:null};t.audioReducer=function(e,t){void 0===e&&(e=o);var n=t.type,r=t.payload;return"audio/playing"===n?Object.assign({},e,{visible:!0,playing:!0}):"audio/stopped"===n?Object.assign({},e,{visible:!1,playing:!1}):"audio/playMusic"===n?Object.assign({},e,{meta:r}):"audio/stopMusic"===n?Object.assign({},e,{visible:!1,playing:!1,meta:null}):"audio/toggle"===n?Object.assign({},e,{visible:!e.visible}):e}},707:function(e,t,n){"use strict";t.__esModule=!0,t.useGame=void 0;var o=n(22),r=n(220);t.useGame=function(e){return(0,o.useSelector)(e,r.selectGame)}},708:function(e,t,n){"use strict";t.__esModule=!0,t.gameMiddleware=void 0;var o=n(148),r=n(221),i=n(220),a=n(709),c=function(e){return Object.assign({},e,{meta:Object.assign({},e.meta,{now:Date.now()})})};t.gameMiddleware=function(e){var t;return setInterval((function(){var n=e.getState();if(n){var o=(0,i.selectGame)(n),s=t&&Date.now()>=t+a.CONNECTION_LOST_AFTER;!o.connectionLostAt&&s&&e.dispatch(c((0,r.connectionLost)())),o.connectionLostAt&&!s&&e.dispatch(c((0,r.connectionRestored)()))}}),1e3),function(e){return function(n){var i=n.type,a=(n.payload,n.meta);return i===o.pingSuccess.type?(t=a.now,e(n)):i===r.roundRestarted.type?e(c(n)):e(n)}}}},709:function(e,t,n){"use strict";t.__esModule=!0,t.CONNECTION_LOST_AFTER=void 0;t.CONNECTION_LOST_AFTER=15e3},710:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=void 0;var o=n(221),r={roundId:null,roundTime:null,roundRestartedAt:null,connectionLostAt:null};t.gameReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=(t.payload,t.meta);return"roundrestart"===n?Object.assign({},e,{roundRestartedAt:i.now}):n===o.connectionLost.type?Object.assign({},e,{connectionLostAt:i.now}):n===o.connectionRestored.type?Object.assign({},e,{connectionLostAt:null}):e}},711:function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.setupPanelFocusHacks=void 0;var o=n(136),r=n(58),i=n(191),a=function(){return e((function(){return(0,i.focusMap)()}))};t.setupPanelFocusHacks=function(){var e=!1,t=null;window.addEventListener("focusin",(function(t){e=(0,r.canStealFocus)(t.target)})),window.addEventListener("mousedown",(function(e){t=[e.screenX,e.screenY]})),window.addEventListener("mouseup",(function(n){if(t){var r=[n.screenX,n.screenY];(0,o.vecLength)((0,o.vecSubtract)(r,t))>=10&&(e=!0)}e||a()})),r.globalEvents.on("keydown",(function(e){e.isModifierKey()||a()}))}}).call(this,n(101).setImmediate)},712:function(e,t,n){"use strict";t.__esModule=!0,t.pingMiddleware=void 0;var o=n(2),r=n(148),i=n(223);t.pingMiddleware=function(e){var t=!1,n=0,a=[],c=function(){for(var t=0;ti.PING_TIMEOUT&&(a[t]=null,e.dispatch((0,r.pingFail)()))}var s={index:n,sentAt:Date.now()};a[n]=s,(0,o.sendMessage)({type:"ping",payload:{index:n}}),n=(n+1)%i.PING_QUEUE_SIZE};return function(e){return function(n){var o=n.type,s=n.payload;if(t||(t=!0,setInterval(c,i.PING_INTERVAL),c()),"pingReply"===o){var l=s.index,u=a[l];if(!u)return;return a[l]=null,e((0,r.pingSuccess)(u))}return e(n)}}}},713:function(e,t,n){"use strict";t.__esModule=!0,t.PingIndicator=void 0;var o=n(0),r=n(714),i=n(8),a=n(22),c=n(1),s=n(715);t.PingIndicator=function(e,t){var n=(0,a.useSelector)(t,s.selectPing),l=r.Color.lookup(n.networkQuality,[new r.Color(220,40,40),new r.Color(220,200,40),new r.Color(60,220,40)]),u=n.roundtrip?(0,i.toFixed)(n.roundtrip):"--";return(0,o.createVNode)(1,"div","Ping",[(0,o.createComponentVNode)(2,c.Box,{className:"Ping__indicator",backgroundColor:l}),u],0)}},714:function(e,t,n){"use strict";t.__esModule=!0,t.Color=void 0;var o=1e-4,r=function(){function e(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=1),this.r=e,this.g=t,this.b=n,this.a=o}return e.prototype.toString=function(){return"rgba("+(0|this.r)+", "+(0|this.g)+", "+(0|this.b)+", "+(0|this.a)+")"},e}();t.Color=r,r.fromHex=function(e){return new r(parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16))},r.lerp=function(e,t,n){return new r((t.r-e.r)*n+e.r,(t.g-e.g)*n+e.g,(t.b-e.b)*n+e.b,(t.a-e.a)*n+e.a)},r.lookup=function(e,t){void 0===t&&(t=[]);var n=t.length;if(n<2)throw new Error("Needs at least two colors!");var i=e*(n-1);if(e=.9999)return t[n-1];var a=i%1,c=0|i;return r.lerp(t[c],t[c+1],a)}},715:function(e,t,n){"use strict";t.__esModule=!0,t.selectPing=void 0;t.selectPing=function(e){return e.ping}},716:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=void 0;var o=n(8),r=n(148),i=n(223);t.pingReducer=function(e,t){void 0===e&&(e={});var n=t.type,a=t.payload;if(n===r.pingSuccess.type){var c=a.roundtrip,s=e.roundtripAvg||c,l=Math.round(.4*s+.6*c);return{roundtrip:c,roundtripAvg:l,failCount:0,networkQuality:1-(0,o.scale)(l,i.PING_ROUNDTRIP_BEST,i.PING_ROUNDTRIP_WORST)}}if(n===r.pingFail.type){var u=e.failCount,d=void 0===u?0:u,g=(0,o.clamp01)(e.networkQuality-d/i.PING_MAX_FAILS),p=Object.assign({},e,{failCount:d+1,networkQuality:g});return d>i.PING_MAX_FAILS&&(p.roundtrip=undefined,p.roundtripAvg=undefined),p}return e}},717:function(e,t,n){"use strict";t.__esModule=!0,t.telemetryMiddleware=void 0;var o=n(2),r=n(79);function i(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}var a=(0,n(38).createLogger)("telemetry");t.telemetryMiddleware=function(e){var t,n;return function(c){return function(s){var l,u=s.type,d=s.payload;if("telemetry/request"!==u)return"backend/update"===u?(c(s),void(l=regeneratorRuntime.mark((function h(){var o,i,c,s;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(i=null==d||null==(o=d.config)?void 0:o.client){l.next=4;break}return a.error("backend/update payload is missing client data!"),l.abrupt("return");case 4:if(t){l.next=13;break}return l.next=7,r.storage.get("telemetry");case 7:if(l.t0=l.sent,l.t0){l.next=10;break}l.t0={};case 10:(t=l.t0).connections||(t.connections=[]),a.debug("retrieved telemetry from storage",t);case 13:c=!1,t.connections.find((function(e){return n=i,(t=e).ckey===n.ckey&&t.address===n.address&&t.computer_id===n.computer_id;var t,n}))||(c=!0,t.connections.unshift(i),t.connections.length>10&&t.connections.pop()),c&&(a.debug("saving telemetry to storage",t),r.storage.set("telemetry",t)),n&&(s=n,n=null,e.dispatch({type:"telemetry/request",payload:s}));case 18:case"end":return l.stop()}}),h)})),function(){var e=this,t=arguments;return new Promise((function(n,o){var r=l.apply(e,t);function a(e){i(r,n,o,a,c,"next",e)}function c(e){i(r,n,o,a,c,"throw",e)}a(undefined)}))})()):c(s);if(!t)return a.debug("deferred"),void(n=d);a.debug("sending");var g=(null==d?void 0:d.limits)||{},p=t.connections.slice(0,g.connections);(0,o.sendMessage)({type:"telemetry",payload:{connections:p}})}}}},718:function(e,t,n){"use strict";t.__esModule=!0,t.Panel=void 0;var o=n(0),r=n(1),i=n(3),a=n(214),c=n(146),s=n(219),l=n(719),u=n(222),d=n(145);t.Panel=function(e,t){if(Byond.IS_LTE_IE10)return(0,o.createComponentVNode)(2,g);var n=(0,a.useAudio)(t),p=(0,d.useSettings)(t),h=(0,s.useGame)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===p.theme?"light":p.theme,children:(0,o.createComponentVNode)(2,r.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Section,{fitted:!0,children:(0,o.createComponentVNode)(2,r.Flex,{mx:.5,align:"center",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,grow:1,overflowX:"auto",children:(0,o.createComponentVNode)(2,c.ChatTabs)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,u.PingIndicator)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{color:"grey",selected:n.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-left",onClick:function(){return n.toggle()}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{icon:p.visible?"times":"cog",selected:p.visible,tooltip:p.visible?"Close settings":"Open settings",tooltipPosition:"bottom-left",onClick:function(){return p.toggle()}})})]})})}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,r.Section,{children:(0,o.createComponentVNode)(2,a.NowPlayingWidget)})}),p.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.SettingsPanel)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,r.Section,{fill:!0,fitted:!0,position:"relative",children:[(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:p.lineHeight})}),(0,o.createComponentVNode)(2,l.Notifications,{children:[h.connectionLostAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{rightSlot:(0,o.createComponentVNode)(2,r.Button,{color:"white",onClick:function(){return Byond.command(".reconnect")},children:"Reconnect"}),children:"You are either AFK, experiencing lag or the connection has closed."}),h.roundRestartedAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{children:"The connection has been closed because the server is restarting. Please wait while you automatically reconnect."})]})]})})]})})};var g=function(e,t){var n=(0,d.useSettings)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===n.theme?"light":n.theme,children:(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.Button,{style:{position:"fixed",top:"1em",right:"2em","z-index":1e3},selected:n.visible,onClick:function(){return n.toggle()},children:"Settings"}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.SettingsPanel)})||(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:n.lineHeight})]})})}},719:function(e,t,n){"use strict";t.__esModule=!0,t.Notifications=void 0;var o=n(0),r=n(1),i=function(e){var t=e.children;return(0,o.createVNode)(1,"div","Notifications",t,0)};t.Notifications=i;i.Item=function(e){var t=e.rightSlot,n=e.children;return(0,o.createComponentVNode)(2,r.Flex,{align:"center",className:"Notification",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__content",grow:1,children:n}),t&&(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__rightSlot",children:t})]})}},80:function(e,t,n){"use strict";t.__esModule=!0,t.saveChatToDisk=t.changeScrollTracking=t.removeChatPage=t.toggleAcceptedType=t.updateChatPage=t.changeChatPage=t.addChatPage=t.updateMessageCount=t.rebuildChat=t.loadChat=void 0;var o=n(22),r=n(105),i=(0,o.createAction)("chat/load");t.loadChat=i;var a=(0,o.createAction)("chat/rebuild");t.rebuildChat=a;var c=(0,o.createAction)("chat/updateMessageCount");t.updateMessageCount=c;var s=(0,o.createAction)("chat/addPage",(function(){return{payload:(0,r.createPage)()}}));t.addChatPage=s;var l=(0,o.createAction)("chat/changePage");t.changeChatPage=l;var u=(0,o.createAction)("chat/updatePage");t.updateChatPage=u;var d=(0,o.createAction)("chat/toggleAcceptedType");t.toggleAcceptedType=d;var g=(0,o.createAction)("chat/removePage");t.removeChatPage=g;var p=(0,o.createAction)("chat/changeScrollTracking");t.changeScrollTracking=p;var h=(0,o.createAction)("chat/saveToDisk");t.saveChatToDisk=h}}); \ No newline at end of file +!function(e){function t(t){for(var o,a,c=t[0],s=t[1],l=t[2],d=0,g=[];d=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n=a.IMAGE_RETRY_LIMIT)d.error("failed to load an image after "+n+" attempts");else{var o=t.src;t.src=null,t.src=o+"#"+n,t.setAttribute("data-reload-n",n+1)}}),a.IMAGE_RETRY_DELAY)},m=function(e){var t=e.node,n=e.times;if(t&&n){var o=t.querySelector(".Chat__badge"),i=o||document.createElement("div");i.textContent=n,i.className=(0,r.classes)(["Chat__badge","Chat__badge--animate"]),requestAnimationFrame((function(){i.className="Chat__badge"})),o||t.appendChild(i)}},v=function(){function t(){var e=this;this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new o.EventEmitter,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,o=n.scrollHeight,r=n.scrollTop+n.offsetHeight,i=Math.abs(o-r)<24;i!==e.scrollTracking&&(e.scrollTracking=i,e.events.emit("scrollTrackingChanged",i),d.debug("tracking",e.scrollTracking))},this.ensureScrollTracking=function(){e.scrollTracking&&e.scrollToBottom()},setInterval((function(){return e.pruneMessages()}),a.MESSAGE_PRUNE_INTERVAL)}var n=t.prototype;return n.isReady=function(){return this.loaded&&this.rootNode&&this.page},n.mount=function(t){var n=this;this.rootNode?t.appendChild(this.rootNode):this.rootNode=t,this.scrollNode=function(e){for(var t=document.body,n=e;n&&n!==t;){if(n.scrollWidth0&&(this.processBatch(this.queue),this.queue=[])},n.assignStyle=function(e){void 0===e&&(e={});for(var t=0,n=Object.keys(e);t1&&n.test(e)}));if(0===o.length)return this.highlightRegex=null,void(this.highlightColor=null);this.highlightRegex=new RegExp("("+o.join("|")+")","gi"),this.highlightColor=t},n.scrollToBottom=function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight},n.changePage=function(e){if(!this.isReady())return this.page=e,void this.tryFlushQueue();this.page=e,this.rootNode.textContent="",this.visibleMessages=[];for(var t,n,o=document.createDocumentFragment(),r=l(this.messages);!(n=r()).done;){var i=n.value;(0,c.canPageAcceptType)(e,i.type)&&(t=i.node,o.appendChild(t),this.visibleMessages.push(i))}t&&(this.rootNode.appendChild(o),t.scrollIntoView())},n.getCombinableMessage=function(e){for(var t=Date.now(),n=this.visibleMessages.length,o=n-1,r=Math.max(0,n-a.COMBINE_MAX_MESSAGES),i=o;i>=r;i--){var s=this.visibleMessages[i];if(!s.type.startsWith(a.MESSAGE_TYPE_INTERNAL)&&(0,c.isSameMessage)(s,e)&&t0){this.visibleMessages=e.slice(t);for(var n=0;n0&&(this.messages=this.messages.slice(r),d.log("pruned "+r+" stored messages"))}else d.debug("pruning delayed")},n.rebuildChat=function(){if(this.isReady()){for(var e,t=Math.max(0,this.messages.length-a.MAX_PERSISTED_MESSAGES),n=this.messages.slice(t),o=l(n);!(e=o()).done;)e.value.node=undefined;this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(n,{notifyListeners:!1})}},n.saveToDisk=function(){if(!Byond.IS_LTE_IE10){for(var e="",t=document.styleSheets,n=0;n\n\n\nSS13 Chat Log\n\n\n\n
    \n'+a+"
    \n\n\n"]),d=(new Date).toISOString().substring(0,19).replace(/[-:]/g,"").replace("T","-");window.navigator.msSaveBlob(u,"ss13-chatlog-"+d+".html")}},t}();window.__chatRenderer__||(window.__chatRenderer__=new v);var y=window.__chatRenderer__;t.chatRenderer=y}).call(this,n(101).setImmediate)},219:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=t.gameMiddleware=t.useGame=void 0;var o=n(707);t.useGame=o.useGame;var r=n(708);t.gameMiddleware=r.gameMiddleware;var i=n(710);t.gameReducer=i.gameReducer},220:function(e,t,n){"use strict";t.__esModule=!0,t.selectGame=void 0;t.selectGame=function(e){return e.game}},221:function(e,t,n){"use strict";t.__esModule=!0,t.connectionRestored=t.connectionLost=t.roundRestarted=void 0;var o=n(22),r=(0,o.createAction)("roundrestart");t.roundRestarted=r;var i=(0,o.createAction)("game/connectionLost");t.connectionLost=i;var a=(0,o.createAction)("game/connectionRestored");t.connectionRestored=a},222:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=t.PingIndicator=t.pingMiddleware=void 0;var o=n(712);t.pingMiddleware=o.pingMiddleware;var r=n(713);t.PingIndicator=r.PingIndicator;var i=n(716);t.pingReducer=i.pingReducer},223:function(e,t,n){"use strict";t.__esModule=!0,t.PING_ROUNDTRIP_WORST=t.PING_ROUNDTRIP_BEST=t.PING_QUEUE_SIZE=t.PING_MAX_FAILS=t.PING_TIMEOUT=t.PING_INTERVAL=void 0;t.PING_INTERVAL=2500;t.PING_TIMEOUT=2e3;t.PING_MAX_FAILS=3;t.PING_QUEUE_SIZE=8;t.PING_ROUNDTRIP_BEST=50;t.PING_ROUNDTRIP_WORST=200},66:function(e,t,n){"use strict";t.__esModule=!0,t.openChatSettings=t.toggleSettings=t.changeSettingsTab=t.loadSettings=t.updateSettings=void 0;var o=n(22),r=(0,o.createAction)("settings/update");t.updateSettings=r;var i=(0,o.createAction)("settings/load");t.loadSettings=i;var a=(0,o.createAction)("settings/changeTab");t.changeSettingsTab=a;var c=(0,o.createAction)("settings/toggle");t.toggleSettings=c;var s=(0,o.createAction)("settings/openChatTab");t.openChatSettings=s},688:function(e,t,n){n(149),e.exports=n(689)},689:function(e,t,n){"use strict";var o=n(0);n(690),n(691);var r,i,a=n(99),c=n(22),s=(n(100),n(58)),l=n(188),u=n(135),d=n(189),g=n(214),p=n(146),h=n(219),f=n(711),m=n(222),v=n(145),y=n(717);function b(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}a.perf.mark("inception",null==(r=window.performance)||null==(i=r.timing)?void 0:i.navigationStart),a.perf.mark("init");var S=(0,d.configureStore)({reducer:(0,c.combineReducers)({audio:g.audioReducer,chat:p.chatReducer,game:h.gameReducer,ping:m.pingReducer,settings:v.settingsReducer}),middleware:{pre:[p.chatMiddleware,m.pingMiddleware,y.telemetryMiddleware,v.settingsMiddleware,g.audioMiddleware,h.gameMiddleware]}}),_=(0,u.createRenderer)((function(){var e=n(718).Panel;return(0,o.createComponentVNode)(2,d.StoreProvider,{store:S,children:(0,o.createComponentVNode)(2,e)})})),C=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return void 0===e&&(e="output"),n.next=3,Byond.winget(e);case 3:t=n.sent,Byond.winset("browseroutput",{size:t.size});case 5:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){b(i,o,r,a,c,"next",e)}function c(e){b(i,o,r,a,c,"throw",e)}a(undefined)}))});return function(e){return t.apply(this,arguments)}}();!function E(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)({ignoreWindowFocus:!0}),(0,f.setupPanelFocusHacks)(),(0,l.captureExternalLinks)(),S.subscribe(_),window.update=function(e){return S.dispatch(Byond.parseJson(e))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}Byond.winset("output",{"is-visible":!1}),Byond.winset("browseroutput",{"is-visible":!0,"is-disabled":!1,pos:"0x0",size:"0x0"}),C()}else document.addEventListener("DOMContentLoaded",E)}()},690:function(e,t,n){},691:function(e,t,n){},692:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=void 0;var o=n(22),r=n(215);t.useAudio=function(e){var t=(0,o.useSelector)(e,r.selectAudio),n=(0,o.useDispatch)(e);return Object.assign({},t,{toggle:function(){return n({type:"audio/toggle"})}})}},693:function(e,t,n){"use strict";t.__esModule=!0,t.audioMiddleware=void 0;var o=n(694);t.audioMiddleware=function(e){var t=new o.AudioPlayer;return t.onPlay((function(){e.dispatch({type:"audio/playing"})})),t.onStop((function(){e.dispatch({type:"audio/stopped"})})),function(e){return function(n){var o=n.type,r=n.payload;if("audio/playMusic"===o){var i=r.url,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(r,["url"]);return t.play(i,a),e(n)}if("audio/stopMusic"===o)return t.stop(),e(n);if("settings/update"===o||"settings/load"===o){var c=null==r?void 0:r.adminMusicVolume;return"number"==typeof c&&t.setVolume(c),e(n)}return e(n)}}}},694:function(e,t,n){"use strict";function o(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return r(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&e.node.currentTime>=e.options.end&&e.stop())}),1e3))}var t=e.prototype;return t.destroy=function(){this.node&&(this.node.stop(),document.removeChild(this.node),clearInterval(this.playbackInterval))},t.play=function(e,t){void 0===t&&(t={}),this.node&&(i.log("playing",e,t),this.options=t,this.node.src=e)},t.stop=function(){if(this.node){if(this.playing)for(var e,t=o(this.onStopSubscribers);!(e=t()).done;)(0,e.value)();i.log("stopping"),this.playing=!1,this.node.src=""}},t.setVolume=function(e){this.node&&(this.volume=e,this.node.volume=e)},t.onPlay=function(e){this.node&&this.onPlaySubscribers.push(e)},t.onStop=function(e){this.node&&this.onStopSubscribers.push(e)},e}();t.AudioPlayer=a},695:function(e,t,n){"use strict";t.__esModule=!0,t.NowPlayingWidget=void 0;var o=n(0),r=n(8),i=n(22),a=n(1),c=n(145),s=n(215);t.NowPlayingWidget=function(e,t){var n,l=(0,i.useSelector)(t,s.selectAudio),u=(0,i.useDispatch)(t),d=(0,c.useSettings)(t),g=null==(n=l.meta)?void 0:n.title;return(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[l.playing&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,mx:.5,color:"label",children:"Now playing:"}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,grow:1,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},children:g||"Unknown Track"})],4)||(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,color:"label",children:"Nothing to play."}),l.playing&&(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Button,{tooltip:"Stop",icon:"stop",onClick:function(){return u({type:"audio/stopMusic"})}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,o.createComponentVNode)(2,a.Knob,{minValue:0,maxValue:1,value:d.adminMusicVolume,step:.0025,stepPixelSize:1,format:function(e){return(0,r.toFixed)(100*e)+"%"},onDrag:function(e,t){return d.update({adminMusicVolume:t})}})})]})}},696:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=void 0;var o=n(22),r=n(66),i=n(104);t.useSettings=function(e){var t=(0,o.useSelector)(e,i.selectSettings),n=(0,o.useDispatch)(e);return Object.assign({},t,{visible:t.view.visible,toggle:function(){return n((0,r.toggleSettings)())},update:function(e){return n((0,r.updateSettings)(e))}})}},697:function(e,t,n){"use strict";t.__esModule=!0,t.settingsMiddleware=void 0;var o=n(79),r=n(216),i=n(66),a=n(104);t.settingsMiddleware=function(e){var t=!1;return function(n){return function(c){var s,l=c.type,u=c.payload;if(t||(t=!0,o.storage.get("panel-settings").then((function(t){e.dispatch((0,i.loadSettings)(t))}))),l===i.updateSettings.type||l===i.loadSettings.type){var d=null==u?void 0:u.theme;d&&(0,r.setClientTheme)(d),n(c);var g=(0,a.selectSettings)(e.getState());return s=g.fontSize,document.documentElement.style.setProperty("font-size",s+"px"),document.body.style.setProperty("font-size",s+"px"),void o.storage.set("panel-settings",g)}return n(c)}}}},698:function(e,t,n){"use strict";t.__esModule=!0,t.settingsReducer=void 0;var o=n(66),r={version:1,fontSize:13,lineHeight:1.2,theme:"default",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",view:{visible:!1,activeTab:n(217).SETTINGS_TABS[0].id}};t.settingsReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=t.payload;if(n===o.updateSettings.type)return Object.assign({},e,i);if(n===o.loadSettings.type)return(null==i?void 0:i.version)?(delete i.view,Object.assign({},e,i)):e;if(n===o.toggleSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!e.view.visible})});if(n===o.openChatSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!0,activeTab:"chatPage"})});if(n===o.changeSettingsTab.type){var a=i.tabId;return Object.assign({},e,{view:Object.assign({},e.view,{activeTab:a})})}return e}},699:function(e,t,n){"use strict";t.__esModule=!0,t.SettingsGeneral=t.SettingsPanel=void 0;var o=n(0),r=n(8),i=n(22),a=n(1),c=n(146),s=n(80),l=n(216),u=n(66),d=n(217),g=n(104);t.SettingsPanel=function(e,t){var n=(0,i.useSelector)(t,g.selectActiveTab),r=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mr:1,children:(0,o.createComponentVNode)(2,a.Section,{fitted:!0,fill:!0,minHeight:"8em",children:(0,o.createComponentVNode)(2,a.Tabs,{vertical:!0,children:d.SETTINGS_TABS.map((function(e){return(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:e.id===n,onClick:function(){return r((0,u.changeSettingsTab)({tabId:e.id}))},children:e.name},e.id)}))})})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,basis:0,children:["general"===n&&(0,o.createComponentVNode)(2,p),"chatPage"===n&&(0,o.createComponentVNode)(2,c.ChatPageSettings)]})]})};var p=function(e,t){var n=(0,i.useSelector)(t,g.selectSettings),c=n.theme,d=n.fontSize,p=n.lineHeight,h=n.highlightText,f=n.highlightColor,m=(0,i.useDispatch)(t);return(0,o.createComponentVNode)(2,a.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Theme",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:c,options:l.THEMES,onSelected:function(e){return m((0,u.updateSettings)({theme:e}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Font size",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:1,stepPixelSize:10,minValue:8,maxValue:32,value:d,unit:"px",format:function(e){return(0,r.toFixed)(e)},onChange:function(e,t){return m((0,u.updateSettings)({fontSize:t}))}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Line height",children:(0,o.createComponentVNode)(2,a.NumberInput,{width:"4em",step:.01,stepPixelSize:2,minValue:.8,maxValue:5,value:p,format:function(e){return(0,r.toFixed)(e,2)},onDrag:function(e,t){return m((0,u.updateSettings)({lineHeight:t}))}})})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Flex,{mb:1,color:"label",align:"baseline",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:"Highlight words (comma separated):"}),(0,o.createComponentVNode)(2,a.Flex.Item,{shrink:0,children:[(0,o.createComponentVNode)(2,a.ColorBox,{mr:1,color:f}),(0,o.createComponentVNode)(2,a.Input,{width:"5em",monospace:!0,placeholder:"#ffffff",value:f,onInput:function(e,t){return m((0,u.updateSettings)({highlightColor:t}))}})]})]}),(0,o.createComponentVNode)(2,a.TextArea,{height:"3em",value:h,onChange:function(e,t){return m((0,u.updateSettings)({highlightText:t}))}})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"check",onClick:function(){return m((0,s.rebuildChat)())},children:"Apply now"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,fontSize:"0.9em",ml:1,color:"label",children:"Can freeze the chat for a while."})]}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,a.Button,{icon:"save",onClick:function(){return m((0,s.saveChatToDisk)())},children:"Save chat log"})]})};t.SettingsGeneral=p},700:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPageSettings=void 0;var o=n(0),r=n(22),i=n(1),a=n(80),c=n(106),s=n(147);t.ChatPageSettings=function(e,t){var n=(0,r.useSelector)(t,s.selectCurrentChatPage),l=(0,r.useDispatch)(t);return(0,o.createComponentVNode)(2,i.Section,{fill:!0,children:[(0,o.createComponentVNode)(2,i.Flex,{mx:-.5,align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,grow:1,children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,value:n.name,onChange:function(e,t){return l((0,a.updateChatPage)({pageId:n.id,name:t}))}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return l((0,a.removeChatPage)({pageId:n.id}))},children:"Remove"})})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Section,{title:"Messages to display",level:2,children:[c.MESSAGE_TYPES.filter((function(e){return!e.important&&!e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)})),(0,o.createComponentVNode)(2,i.Collapsible,{mt:1,color:"transparent",title:"Admin stuff",children:c.MESSAGE_TYPES.filter((function(e){return!e.important&&e.admin})).map((function(e){return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return l((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)}))})]})]})}},701:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPanel=void 0;var o=n(0),r=n(6),i=n(1),a=n(218);var c=function(e){var t,n;function c(){var t;return(t=e.call(this)||this).ref=(0,o.createRef)(),t.state={scrollTracking:!0},t.handleScrollTrackingChange=function(e){return t.setState({scrollTracking:e})},t}n=e,(t=c).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=c.prototype;return s.componentDidMount=function(){a.chatRenderer.mount(this.ref.current),a.chatRenderer.events.on("scrollTrackingChanged",this.handleScrollTrackingChange),this.componentDidUpdate()},s.componentWillUnmount=function(){a.chatRenderer.events.off("scrollTrackingChanged",this.handleScrollTrackingChange)},s.componentDidUpdate=function(e){requestAnimationFrame((function(){a.chatRenderer.ensureScrollTracking()})),(!e||(0,r.shallowDiffers)(this.props,e))&&a.chatRenderer.assignStyle({width:"100%","white-space":"pre-wrap","font-size":this.props.fontSize,"line-height":this.props.lineHeight})},s.render=function(){var e=this.state.scrollTracking;return(0,o.createFragment)([(0,o.createVNode)(1,"div","Chat",null,1,null,null,this.ref),!e&&(0,o.createComponentVNode)(2,i.Button,{className:"Chat__scrollButton",icon:"arrow-down",onClick:function(){return a.chatRenderer.scrollToBottom()},children:"Scroll to bottom"})],0)},c}(o.Component);t.ChatPanel=c},702:function(e,t,n){"use strict";t.__esModule=!0,t.linkifyNode=t.highlightNode=t.replaceInTextNode=void 0;var o=function(e,t){return function(n){for(var o,r,i=n.textContent,a=i.length,c=0,s=0;o=e.exec(i);){s+=1,r||(r=document.createDocumentFragment());var l=o[0],u=l.length,d=o.index;c0&&(0,o.createComponentVNode)(2,l,{value:e.unreadCount}),onClick:function(){return d((0,a.changeChatPage)({pageId:e.id}))},children:e.name},e.id)}))})}),(0,o.createComponentVNode)(2,i.Flex.Item,{ml:1,children:(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"plus",onClick:function(){d((0,a.addChatPage)()),d((0,s.openChatSettings)())}})})]})}},704:function(e,t,n){"use strict";t.__esModule=!0,t.chatMiddleware=void 0;var o=n(79),r=n(66),i=n(104),a=n(80),c=n(106),s=n(105),l=n(218),u=n(147);function d(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}function g(e){return function(){var t=this,n=arguments;return new Promise((function(o,r){var i=e.apply(t,n);function a(e){d(i,o,r,a,c,"next",e)}function c(e){d(i,o,r,a,c,"throw",e)}a(undefined)}))}}var p=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,u.selectChat)(e.getState()),r=Math.max(0,l.chatRenderer.messages.length-c.MAX_PERSISTED_MESSAGES),i=l.chatRenderer.messages.slice(r).map((function(e){return(0,s.serializeMessage)(e)})),o.storage.set("chat-state",n),o.storage.set("chat-messages",i);case 5:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}(),h=function(){var e=g(regeneratorRuntime.mark((function t(e){var n,r,i,c;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([o.storage.get("chat-state"),o.storage.get("chat-messages")]);case 2:if(n=t.sent,r=n[0],i=n[1],!(r&&r.version<=4)){t.next=8;break}return e.dispatch((0,a.loadChat)()),t.abrupt("return");case 8:i&&(c=[].concat(i,[(0,s.createMessage)({type:"internal/reconnected"})]),l.chatRenderer.processBatch(c,{prepend:!0})),e.dispatch((0,a.loadChat)(r));case 10:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}();t.chatMiddleware=function(e){var t=!1,n=!1;return l.chatRenderer.events.on("batchProcessed",(function(t){n&&e.dispatch((0,a.updateMessageCount)(t))})),l.chatRenderer.events.on("scrollTrackingChanged",(function(t){e.dispatch((0,a.changeScrollTracking)(t))})),setInterval((function(){return p(e)}),c.MESSAGE_SAVE_INTERVAL),function(o){return function(c){var s=c.type,d=c.payload;if(t||(t=!0,h(e)),"chat/message"!==s){if(s===a.loadChat.type){o(c);var g=(0,u.selectCurrentChatPage)(e.getState());return l.chatRenderer.changePage(g),l.chatRenderer.onStateLoaded(),void(n=!0)}if(s!==a.changeChatPage.type&&s!==a.addChatPage.type&&s!==a.removeChatPage.type&&s!==a.toggleAcceptedType.type){if(s===a.rebuildChat.type)return l.chatRenderer.rebuildChat(),o(c);if(s!==r.updateSettings.type&&s!==r.loadSettings.type){if("roundrestart"===s)return p(e),o(c);if(s!==a.saveChatToDisk.type)return o(c);l.chatRenderer.saveToDisk()}else{o(c);var f=(0,i.selectSettings)(e.getState());l.chatRenderer.setHighlight(f.highlightText,f.highlightColor)}}else{o(c);var m=(0,u.selectCurrentChatPage)(e.getState());l.chatRenderer.changePage(m)}}else{var v=Array.isArray(d)?d:[d];l.chatRenderer.processBatch(v)}}}}},705:function(e,t,n){"use strict";t.__esModule=!0,t.chatReducer=t.initialState=void 0;var o,r=n(80),i=n(105);function a(e,t){var n;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0;return function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(n=e[Symbol.iterator]()).next.bind(n)}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n0&&(C[A.id]=Object.assign({},A,{unreadCount:A.unreadCount+M}))}return Object.assign({},e,{pageById:C})}if(o===r.addChatPage.type)return Object.assign({},e,{currentPageId:c.id,pages:[].concat(e.pages,[c.id]),pageById:Object.assign({},e.pageById,(n={},n[c.id]=c,n))});if(o===r.changeChatPage.type){var I,P=c.pageId,x=Object.assign({},e.pageById[P],{unreadCount:0});return Object.assign({},e,{currentPageId:P,pageById:Object.assign({},e.pageById,(I={},I[P]=x,I))})}if(o===r.updateChatPage.type){var k,R=c.pageId,O=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(c,["pageId"]),V=Object.assign({},e.pageById[R],O);return Object.assign({},e,{pageById:Object.assign({},e.pageById,(k={},k[R]=V,k))})}if(o===r.toggleAcceptedType.type){var G,B=c.pageId,L=c.type,D=Object.assign({},e.pageById[B]);return D.acceptedTypes=Object.assign({},D.acceptedTypes),D.acceptedTypes[L]=!D.acceptedTypes[L],Object.assign({},e,{pageById:Object.assign({},e.pageById,(G={},G[B]=D,G))})}if(o===r.removeChatPage.type){var j=c.pageId,F=Object.assign({},e,{pages:[].concat(e.pages),pageById:Object.assign({},e.pageById)});return delete F.pageById[j],F.pages=F.pages.filter((function(e){return e!==j})),0===F.pages.length&&(F.pages.push(s.id),F.pageById[s.id]=s,F.currentPageId=s.id),F.currentPageId&&F.currentPageId!==j||(F.currentPageId=F.pages[0]),F}return e}},706:function(e,t,n){"use strict";t.__esModule=!0,t.audioReducer=void 0;var o={visible:!1,playing:!1,track:null};t.audioReducer=function(e,t){void 0===e&&(e=o);var n=t.type,r=t.payload;return"audio/playing"===n?Object.assign({},e,{visible:!0,playing:!0}):"audio/stopped"===n?Object.assign({},e,{visible:!1,playing:!1}):"audio/playMusic"===n?Object.assign({},e,{meta:r}):"audio/stopMusic"===n?Object.assign({},e,{visible:!1,playing:!1,meta:null}):"audio/toggle"===n?Object.assign({},e,{visible:!e.visible}):e}},707:function(e,t,n){"use strict";t.__esModule=!0,t.useGame=void 0;var o=n(22),r=n(220);t.useGame=function(e){return(0,o.useSelector)(e,r.selectGame)}},708:function(e,t,n){"use strict";t.__esModule=!0,t.gameMiddleware=void 0;var o=n(148),r=n(221),i=n(220),a=n(709),c=function(e){return Object.assign({},e,{meta:Object.assign({},e.meta,{now:Date.now()})})};t.gameMiddleware=function(e){var t;return setInterval((function(){var n=e.getState();if(n){var o=(0,i.selectGame)(n),s=t&&Date.now()>=t+a.CONNECTION_LOST_AFTER;!o.connectionLostAt&&s&&e.dispatch(c((0,r.connectionLost)())),o.connectionLostAt&&!s&&e.dispatch(c((0,r.connectionRestored)()))}}),1e3),function(e){return function(n){var i=n.type,a=(n.payload,n.meta);return i===o.pingSuccess.type?(t=a.now,e(n)):i===r.roundRestarted.type?e(c(n)):e(n)}}}},709:function(e,t,n){"use strict";t.__esModule=!0,t.CONNECTION_LOST_AFTER=void 0;t.CONNECTION_LOST_AFTER=15e3},710:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=void 0;var o=n(221),r={roundId:null,roundTime:null,roundRestartedAt:null,connectionLostAt:null};t.gameReducer=function(e,t){void 0===e&&(e=r);var n=t.type,i=(t.payload,t.meta);return"roundrestart"===n?Object.assign({},e,{roundRestartedAt:i.now}):n===o.connectionLost.type?Object.assign({},e,{connectionLostAt:i.now}):n===o.connectionRestored.type?Object.assign({},e,{connectionLostAt:null}):e}},711:function(e,t,n){"use strict";(function(e){t.__esModule=!0,t.setupPanelFocusHacks=void 0;var o=n(136),r=n(58),i=n(191),a=function(){return e((function(){return(0,i.focusMap)()}))};t.setupPanelFocusHacks=function(){var e=!1,t=null;window.addEventListener("focusin",(function(t){e=(0,r.canStealFocus)(t.target)})),window.addEventListener("mousedown",(function(e){t=[e.screenX,e.screenY]})),window.addEventListener("mouseup",(function(n){if(t){var r=[n.screenX,n.screenY];(0,o.vecLength)((0,o.vecSubtract)(r,t))>=10&&(e=!0)}e||a()})),r.globalEvents.on("keydown",(function(e){e.isModifierKey()||a()}))}}).call(this,n(101).setImmediate)},712:function(e,t,n){"use strict";t.__esModule=!0,t.pingMiddleware=void 0;var o=n(2),r=n(148),i=n(223);t.pingMiddleware=function(e){var t=!1,n=0,a=[],c=function(){for(var t=0;ti.PING_TIMEOUT&&(a[t]=null,e.dispatch((0,r.pingFail)()))}var s={index:n,sentAt:Date.now()};a[n]=s,(0,o.sendMessage)({type:"ping",payload:{index:n}}),n=(n+1)%i.PING_QUEUE_SIZE};return function(e){return function(n){var o=n.type,s=n.payload;if(t||(t=!0,setInterval(c,i.PING_INTERVAL),c()),"pingReply"===o){var l=s.index,u=a[l];if(!u)return;return a[l]=null,e((0,r.pingSuccess)(u))}return e(n)}}}},713:function(e,t,n){"use strict";t.__esModule=!0,t.PingIndicator=void 0;var o=n(0),r=n(714),i=n(8),a=n(22),c=n(1),s=n(715);t.PingIndicator=function(e,t){var n=(0,a.useSelector)(t,s.selectPing),l=r.Color.lookup(n.networkQuality,[new r.Color(220,40,40),new r.Color(220,200,40),new r.Color(60,220,40)]),u=n.roundtrip?(0,i.toFixed)(n.roundtrip):"--";return(0,o.createVNode)(1,"div","Ping",[(0,o.createComponentVNode)(2,c.Box,{className:"Ping__indicator",backgroundColor:l}),u],0)}},714:function(e,t,n){"use strict";t.__esModule=!0,t.Color=void 0;var o=1e-4,r=function(){function e(e,t,n,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===o&&(o=1),this.r=e,this.g=t,this.b=n,this.a=o}return e.prototype.toString=function(){return"rgba("+(0|this.r)+", "+(0|this.g)+", "+(0|this.b)+", "+(0|this.a)+")"},e}();t.Color=r,r.fromHex=function(e){return new r(parseInt(e.substr(1,2),16),parseInt(e.substr(3,2),16),parseInt(e.substr(5,2),16))},r.lerp=function(e,t,n){return new r((t.r-e.r)*n+e.r,(t.g-e.g)*n+e.g,(t.b-e.b)*n+e.b,(t.a-e.a)*n+e.a)},r.lookup=function(e,t){void 0===t&&(t=[]);var n=t.length;if(n<2)throw new Error("Needs at least two colors!");var i=e*(n-1);if(e=.9999)return t[n-1];var a=i%1,c=0|i;return r.lerp(t[c],t[c+1],a)}},715:function(e,t,n){"use strict";t.__esModule=!0,t.selectPing=void 0;t.selectPing=function(e){return e.ping}},716:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=void 0;var o=n(8),r=n(148),i=n(223);t.pingReducer=function(e,t){void 0===e&&(e={});var n=t.type,a=t.payload;if(n===r.pingSuccess.type){var c=a.roundtrip,s=e.roundtripAvg||c,l=Math.round(.4*s+.6*c);return{roundtrip:c,roundtripAvg:l,failCount:0,networkQuality:1-(0,o.scale)(l,i.PING_ROUNDTRIP_BEST,i.PING_ROUNDTRIP_WORST)}}if(n===r.pingFail.type){var u=e.failCount,d=void 0===u?0:u,g=(0,o.clamp01)(e.networkQuality-d/i.PING_MAX_FAILS),p=Object.assign({},e,{failCount:d+1,networkQuality:g});return d>i.PING_MAX_FAILS&&(p.roundtrip=undefined,p.roundtripAvg=undefined),p}return e}},717:function(e,t,n){"use strict";t.__esModule=!0,t.telemetryMiddleware=void 0;var o=n(2),r=n(79);function i(e,t,n,o,r,i,a){try{var c=e[i](a),s=c.value}catch(l){return void n(l)}c.done?t(s):Promise.resolve(s).then(o,r)}var a=(0,n(38).createLogger)("telemetry");t.telemetryMiddleware=function(e){var t,n;return function(c){return function(s){var l,u=s.type,d=s.payload;if("telemetry/request"!==u)return"backend/update"===u?(c(s),void(l=regeneratorRuntime.mark((function h(){var o,i,c,s;return regeneratorRuntime.wrap((function(l){for(;;)switch(l.prev=l.next){case 0:if(i=null==d||null==(o=d.config)?void 0:o.client){l.next=4;break}return a.error("backend/update payload is missing client data!"),l.abrupt("return");case 4:if(t){l.next=13;break}return l.next=7,r.storage.get("telemetry");case 7:if(l.t0=l.sent,l.t0){l.next=10;break}l.t0={};case 10:(t=l.t0).connections||(t.connections=[]),a.debug("retrieved telemetry from storage",t);case 13:c=!1,t.connections.find((function(e){return n=i,(t=e).ckey===n.ckey&&t.address===n.address&&t.computer_id===n.computer_id;var t,n}))||(c=!0,t.connections.unshift(i),t.connections.length>10&&t.connections.pop()),c&&(a.debug("saving telemetry to storage",t),r.storage.set("telemetry",t)),n&&(s=n,n=null,e.dispatch({type:"telemetry/request",payload:s}));case 18:case"end":return l.stop()}}),h)})),function(){var e=this,t=arguments;return new Promise((function(n,o){var r=l.apply(e,t);function a(e){i(r,n,o,a,c,"next",e)}function c(e){i(r,n,o,a,c,"throw",e)}a(undefined)}))})()):c(s);if(!t)return a.debug("deferred"),void(n=d);a.debug("sending");var g=(null==d?void 0:d.limits)||{},p=t.connections.slice(0,g.connections);(0,o.sendMessage)({type:"telemetry",payload:{connections:p}})}}}},718:function(e,t,n){"use strict";t.__esModule=!0,t.Panel=void 0;var o=n(0),r=n(1),i=n(3),a=n(214),c=n(146),s=n(219),l=n(719),u=n(222),d=n(145);t.Panel=function(e,t){if(Byond.IS_LTE_IE10)return(0,o.createComponentVNode)(2,g);var n=(0,a.useAudio)(t),p=(0,d.useSettings)(t),h=(0,s.useGame)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===p.theme?"light":p.theme,children:(0,o.createComponentVNode)(2,r.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{children:(0,o.createComponentVNode)(2,r.Section,{fitted:!0,children:(0,o.createComponentVNode)(2,r.Flex,{mx:.5,align:"center",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,grow:1,overflowX:"auto",children:(0,o.createComponentVNode)(2,c.ChatTabs)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,u.PingIndicator)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{color:"grey",selected:n.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-left",onClick:function(){return n.toggle()}})}),(0,o.createComponentVNode)(2,r.Flex.Item,{mx:.5,children:(0,o.createComponentVNode)(2,r.Button,{icon:p.visible?"times":"cog",selected:p.visible,tooltip:p.visible?"Close settings":"Open settings",tooltipPosition:"bottom-left",onClick:function(){return p.toggle()}})})]})})}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,r.Section,{children:(0,o.createComponentVNode)(2,a.NowPlayingWidget)})}),p.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.SettingsPanel)}),(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,grow:1,children:(0,o.createComponentVNode)(2,r.Section,{fill:!0,fitted:!0,position:"relative",children:[(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:p.lineHeight})}),(0,o.createComponentVNode)(2,l.Notifications,{children:[h.connectionLostAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{rightSlot:(0,o.createComponentVNode)(2,r.Button,{color:"white",onClick:function(){return Byond.command(".reconnect")},children:"Reconnect"}),children:"You are either AFK, experiencing lag or the connection has closed."}),h.roundRestartedAt&&(0,o.createComponentVNode)(2,l.Notifications.Item,{children:"The connection has been closed because the server is restarting. Please wait while you automatically reconnect."})]})]})})]})})};var g=function(e,t){var n=(0,d.useSettings)(t);return(0,o.createComponentVNode)(2,i.Pane,{theme:"default"===n.theme?"light":n.theme,children:(0,o.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,r.Button,{style:{position:"fixed",top:"1em",right:"2em","z-index":1e3},selected:n.visible,onClick:function(){return n.toggle()},children:"Settings"}),n.visible&&(0,o.createComponentVNode)(2,r.Flex.Item,{mt:1,children:(0,o.createComponentVNode)(2,d.SettingsPanel)})||(0,o.createComponentVNode)(2,c.ChatPanel,{lineHeight:n.lineHeight})]})})}},719:function(e,t,n){"use strict";t.__esModule=!0,t.Notifications=void 0;var o=n(0),r=n(1),i=function(e){var t=e.children;return(0,o.createVNode)(1,"div","Notifications",t,0)};t.Notifications=i;i.Item=function(e){var t=e.rightSlot,n=e.children;return(0,o.createComponentVNode)(2,r.Flex,{align:"center",className:"Notification",children:[(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__content",grow:1,children:n}),t&&(0,o.createComponentVNode)(2,r.Flex.Item,{className:"Notification__rightSlot",children:t})]})}},80:function(e,t,n){"use strict";t.__esModule=!0,t.saveChatToDisk=t.changeScrollTracking=t.removeChatPage=t.toggleAcceptedType=t.updateChatPage=t.changeChatPage=t.addChatPage=t.updateMessageCount=t.rebuildChat=t.loadChat=void 0;var o=n(22),r=n(105),i=(0,o.createAction)("chat/load");t.loadChat=i;var a=(0,o.createAction)("chat/rebuild");t.rebuildChat=a;var c=(0,o.createAction)("chat/updateMessageCount");t.updateMessageCount=c;var s=(0,o.createAction)("chat/addPage",(function(){return{payload:(0,r.createPage)()}}));t.addChatPage=s;var l=(0,o.createAction)("chat/changePage");t.changeChatPage=l;var u=(0,o.createAction)("chat/updatePage");t.updateChatPage=u;var d=(0,o.createAction)("chat/toggleAcceptedType");t.toggleAcceptedType=d;var g=(0,o.createAction)("chat/removePage");t.removeChatPage=g;var p=(0,o.createAction)("chat/changeScrollTracking");t.changeScrollTracking=p;var h=(0,o.createAction)("chat/saveToDisk");t.saveChatToDisk=h}}); \ No newline at end of file