diff --git a/code/game/objects/effects/spawners/masterlootdrop.dm b/code/game/objects/effects/spawners/masterlootdrop.dm index aec160c1287..f4e7fa1165b 100644 --- a/code/game/objects/effects/spawners/masterlootdrop.dm +++ b/code/game/objects/effects/spawners/masterlootdrop.dm @@ -248,6 +248,7 @@ /obj/item/gun/ballistic/rifle/repeater/volcanic = 3, /obj/item/gun/ballistic/revolver/Lemat = 2, /obj/item/gun/ballistic/automatic/pistol/vg77 = 2, + /obj/item/gun/ballistic/rifle/salvaged_eastern_rifle = 2, ) /obj/effect/spawner/lootdrop/f13/uncommon_guns diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index d48a722b222..4ceb745325e 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -206,6 +206,105 @@ icon = 'icons/fallout/clothing/helmets.dmi' +/obj/item/clothing/head/cossackgear + name = "Black bearskin hat" + desc = "A very warm and well made bearskin hat. The black fur is commonly seen across the world from Kuban cossacks to the Queen's guard. The hat is remarkable soft and very useful for the winter. Take out that sabre and charge forth!" + icon_state = "cossack" + item_state = "cossack" + name = "Base for kevlar helmets of various degrees" + desc = "Base for Kevlar helmets 2.0 electric boogaloo" + armor_tokens = list( ARMOR_MODIFIER_UP_DT_T1 , ARMOR_MODIFIER_UP_ENV_T1) + armor = ARMOR_VALUE_LIGHT + dog_fashion = null + slowdown = ARMOR_SLOWDOWN_NONE * ARMOR_SLOWDOWN_GLOBAL_MULT + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + flags_inv = HIDEEARS + +/obj/item/clothing/head/cossackgear/white + name = "White bearskin hat" + desc = "A very warm and well made bearskin hat. The white fur is uncommonly seen across the world from cossacks to other groups across the world. The hat is remarkable soft and very useful for the winter. Take out that sabre and charge forth!" + icon_state = "wcossack" + item_state = "wcossack" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + flags_inv = HIDEEARS + +/obj/item/clothing/head/cossackgear/papakhacossack + name = "Black Papahka hat" + desc = "A very warm and well made papakha hat. Made of wool, this hat was used throughout the Caucasus regions." + icon_state = "papakha" + item_state = "papakha" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + flags_inv = HIDEEARS + +/obj/item/clothing/head/cossackgear/papakhawhitecossack + name = "White bearskin hat" + desc = "A very warm and well made papakha hat. Made of wool, this hat was used throughout the Caucasus regions. This one is white" + icon_state = "papakhaw" + item_state = "papakhaw" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + flags_inv = HIDEEARS + +/obj/item/clothing/head/cossackgear/papakhakubancossack + name = "White bearskin hat" + desc = "A very warm and well made papakha hat. Made of wool, this hat was used throughout the Caucasus regions. This one is based off the hats used by the Kuban Cossacks." + icon_state = "papakhakuban" + item_state = "papakhakuban" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + flags_inv = HIDEEARS + + +/obj/item/clothing/head/kevlarhelmet/steelgerman + name = "Biker helmet" + desc = "A biker's steel helmet. Good on style and kicking ass at the bar. 'What did you say about my mother?'-some biker probably." + icon_state = "1919german" + item_state = "1919german" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + +/obj/item/clothing/head/kevlarhelmet/steelww2soviet + name = "WW2 Soviet helmet" + desc = "A outdated yet functional soviet helmet from WW2. It is a plain, cut, simple, and simple-designed helmet that offers the same protection as any else steel helmet." + icon_state = "sovhelm" + item_state = "sovhelm" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + +/obj/item/clothing/head/kevlarhelmet/pilotka + name = "Armored Pilotka hat" + desc = "A ballistic weaved pilotka hat. The hat originated during WW1 and saw extensive use by the Red Army in WW2. After the 1980s, the pilotka was used during the summer time. It still finds use in post-war and pre-war modern times." + icon_state = "pilotka" + item_state = "pilotka" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + + +/obj/item/clothing/head/armoredushanka + name = "Ballistic Soviet Union Ushanka" + desc = "A Ushanka made with ballistic weave and kevlar in mind. Now you can rock the motherland's style while having that head of yours be protected. Still comfortable if not a shy bit more comfortable than your usual ushanka." + icon_state = "newushanka" + item_state = "newushanka" + name = "Base for kevlar helmets of various degrees" + desc = "Base for Kevlar helmets 2.0 electric boogaloo" + armor_tokens = list( ARMOR_MODIFIER_UP_DT_T1 , ARMOR_MODIFIER_UP_ENV_T1) + armor = ARMOR_VALUE_LIGHT + dog_fashion = null + slowdown = ARMOR_SLOWDOWN_NONE * ARMOR_SLOWDOWN_GLOBAL_MULT + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' + flags_inv = HIDEEARS + +/obj/item/clothing/head/kevlarhelmet/steelfrench + name = "French Adrian helmet" + desc = "A French, albeit outdated, Adrian helmet. It was the first helmet used by the French military during the great war. In WW2, the helmet was used again but named the M26. Adjust that helmet and get back to the frontlines!" + icon_state = "adrian" + item_state = "adrian" + mob_overlay_icon = 'icons/fallout/onmob/clothes/helmet.dmi' + icon = 'icons/fallout/clothing/helmets.dmi' /obj/item/clothing/head/kevlarhelmet/toxtestinghelmet name = "VeturrHjalmur" diff --git a/code/modules/clothing/suits/arfsuits.dm b/code/modules/clothing/suits/arfsuits.dm index 5fe4d6ee5d6..f66757884d4 100644 --- a/code/modules/clothing/suits/arfsuits.dm +++ b/code/modules/clothing/suits/arfsuits.dm @@ -596,6 +596,23 @@ icon_state = "denison_smock" item_state = "police_chief" + +/obj/item/clothing/suit/armor/outfit/jacket/rdashjacket + name = "Dashing rainbow jacket" + desc = "A lovingly made jacket, adorn with rainbow colors and a thunderbolt symbol on the back of the jacket. If anything, this jacket makes you oh..I dunno..20% cooler?" + icon = 'icons/fallout/clothing/armored_light.dmi' + mob_overlay_icon = 'icons/fallout/onmob/clothes/armor_light.dmi' + icon_state = "rainbowdash" + item_state = "rainbowdash" + +/obj/item/clothing/suit/armor/outfit/jacket/sovietpadded + name = "Padded Soviet jacket" + desc = "A padded and well made Soviet jacket. Useful for the winter, but doesn't offer much protection against bullets or really any form of punishment. Compliments any soldier belonging to the Motherland. A wise soldier once said 'As long as Mother Russia has enemies, I will answer her call...'." + icon = 'icons/fallout/clothing/armored_light.dmi' + mob_overlay_icon = 'icons/fallout/onmob/clothes/armor_light.dmi' + icon_state = "sovjacket" + item_state = "sovjacket" + // until togglesuits are made into normal suits, treat these as jackets /obj/item/clothing/suit/toggle/labcoat @@ -1352,6 +1369,30 @@ item_state = "hostrench" body_parts_hidden = ARMS +/obj/item/clothing/suit/armor/light/duster/greatcoatgrey + name = "Grey greatcoat" + desc = "A greyed out greatcoat. This coat also comes with a furred interior for the toughest of winters" + icon_state = "gerparka" + item_state = "gerparka" + icon = 'icons/fallout/clothing/armored_light.dmi' + mob_overlay_icon = 'icons/fallout/onmob/clothes/armor_light.dmi' + +/obj/item/clothing/suit/armor/light/duster/vlongcoat + name = "Black winter greatcoat" + desc = "A black greatcoat that resembles the coats used by Kuban cossacks. A greatcoat, fitting for your cold weather needs." + icon_state = "bcossack" + item_state = "bcossack" + icon = 'icons/fallout/clothing/armored_light.dmi' + mob_overlay_icon = 'icons/fallout/onmob/clothes/armor_light.dmi' + +/obj/item/clothing/suit/armor/light/duster/vlongcoat/blue + name = "Blue winter greatcoat" + desc = "A blue greatcoat that resembles the coats used by Don cossacks. A greatcoat, fitting for your cold weather needs." + icon_state = "blcossack" + item_state = "blcossack" + icon = 'icons/fallout/clothing/armored_light.dmi' + mob_overlay_icon = 'icons/fallout/onmob/clothes/armor_light.dmi' + /obj/item/clothing/suit/armor/light/duster/town/leather name = "leather trenchcoat" desc = "A snazzy black trenchcoat, fit for a dragon." diff --git a/code/modules/clothing/under/f13.dm b/code/modules/clothing/under/f13.dm index b083e3bee3f..5defd212bd1 100644 --- a/code/modules/clothing/under/f13.dm +++ b/code/modules/clothing/under/f13.dm @@ -203,6 +203,56 @@ mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' icon = 'icons/fallout/clothing/uniforms.dmi' +/obj/item/clothing/under/f13/thegreatwaruniforms + name = "Old french uniform" + desc = "An outdated yet classy french uniform. It saw service in the great war. During this time, it was dubbed the 'sky uniform' on account of its baby blue appearance. Steel yourself and fix bayonets!" + icon_state = "frenchuniform" + item_state = "frenchuniform" + mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' + icon = 'icons/fallout/clothing/uniforms.dmi' + +/obj/item/clothing/under/f13/thegreatwaruniforms/german + name = "Old East german uniform" + desc = "An old and outdated East German uniform. It resembles the uniform used by Imperial Germany during the Great War or 'The war to end all wars'. Dull, grey, it matches perfectly with the incoming artillery smoke. Adjust those buttons and prepare to charge." + icon_state = "imperialuniform" + item_state = "imperialuniform" + mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' + icon = 'icons/fallout/clothing/uniforms.dmi' + +/obj/item/clothing/under/f13/thegreatwaruniforms/britishww1 + name = "Old British uniform" + desc = "An old and outdated British uniform. This uniform was used during the Great War, also known as 'World War 1' which was a global conflict consisting of the Triple Entente and the Central Powers. Classy, pristine, and well tailored. Prepare your bayonets and charge with elegance." + icon_state = "britishuniform" + item_state = "britishuniform" + mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' + icon = 'icons/fallout/clothing/uniforms.dmi' + +/obj/item/clothing/under/f13/thegreatwaruniforms/russianww1 + name = "Old Russian uniform" + desc = "An old and outdated Imperial Russian uniform. This uniform was used in both the Great War and the October revolution by the White army, which was Imperial Russia. This uniform is quite comfortable and made of good material. Prepare the flag and steel your nerves. " + icon_state = "ww1russian" + item_state = "ww1russian" + mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' + icon = 'icons/fallout/clothing/uniforms.dmi' + +/obj/item/clothing/under/f13/thegreatwaruniforms/russianww2 + name = "Padded Soviet uniform" + desc = "A padded and well made Soviet uniform. The padding is included to allow extra warmth for the wearer. It saw use in the very cold soviet winters and pairs nicely and warmly with other warm-esq gear like coats, great coats, and furred jackets." + icon_state = "ww2sov" + item_state = "ww2sov" + mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' + icon = 'icons/fallout/clothing/uniforms.dmi' + +/obj/item/clothing/under/f13/thegreatwaruniforms/kubancossackuniform + name = "Cossack uniform" + desc = "A cossack uniform that resembles the uniforms and garnments used by Kuban Cossacks. Quite comfortable and oh so stylish. Now you can ride on a horse into battle with regal flair, onwards!" + icon_state = "kubanc" + item_state = "kubanc" + mob_overlay_icon = 'icons/fallout/onmob/clothes/uniform.dmi' + icon = 'icons/fallout/clothing/uniforms.dmi' + + + //sci-fi or futuristic clothing /obj/item/clothing/under/f13/mechsuits diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index c84c71d988f..b4110b829e8 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -2421,6 +2421,31 @@ can_suppress = TRUE fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' +/obj/item/gun/ballistic/automatic/aksmol/aldric + name = "Ak74u Custom" + desc = "A customized AK74u assault rifle. Rechambered in 5.45x39 NATO , this assault rifle was the answer for a more lighter assault rifle. This one comes with wood furniture and has no stock, allowing much easier carry at the cost of higher recoil." + icon = 'icons/fallout/objects/guns/ballistic.dmi' + lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' + righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' + item_state = "ak74utest" + icon_state = "ak74utest" + mag_type = /obj/item/ammo_box/magazine/m556/rifle + init_mag_type = /obj/item/ammo_box/magazine/m556/rifle + weapon_class = WEAPON_CLASS_NORMAL + weapon_weight = GUN_TWO_HAND_ONLY + damage_multiplier = GUN_LESS_DAMAGE_T2 + init_recoil = AUTORIFLE_RECOIL(1.5, 1.5) + init_firemodes = list( + /datum/firemode/automatic/rpm150, + /datum/firemode/semi_auto + ) + can_flashlight = FALSE + can_bayonet = FALSE + can_scope = TRUE + can_suppress = TRUE + fire_sound = 'sound/f13weapons/assaultrifle_fire.ogg' + autofire_shot_delay = 3 + /* * * * * * * * * * * * Police Assault Rifle * Baseline 5mm autorifle @@ -2553,12 +2578,40 @@ can_suppress = FALSE can_flashlight = FALSE fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + autofire_shot_delay = 3 + + +/obj/item/gun/ballistic/automatic/fnfal/ak47/custom + name = "Engraved Zastava M70" + desc = "A custom AK platform weapon. This Zastava M70 is gold plated with faint traces of a black tigerstripe alongside the magazine and reciever. The wood furniture is made of the best and most pristine wood there is. Albeit it hits less and can not take a select few modifications. On the pistol grip is a red star in the middle." + icon_state = "goldak" + item_state = "goldak" + icon = 'icons/fallout/objects/guns/ballistic.dmi' + lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' + righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' + mag_type = /obj/item/ammo_box/magazine/m308 + init_mag_type = /obj/item/ammo_box/magazine/m308 + weapon_class = WEAPON_CLASS_RIFLE + weapon_weight = GUN_TWO_HAND_ONLY + damage_multiplier = GUN_LESS_DAMAGE_T3 + cock_delay = GUN_COCK_RIFLE_BASE + init_recoil = AUTORIFLE_RECOIL(2.5, 2.5) + init_firemodes = list( + /datum/firemode/automatic/rpm40, + /datum/firemode/semi_auto/slow + ) + can_scope = FALSE + can_suppress = TRUE + can_flashlight = FALSE + fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + autofire_shot_delay = 4 + /obj/item/gun/ballistic/automatic/fnfal/g3battlerifle name = "G3M99" - desc = "A battle rifle chambered n 7.62 NATO, this revised battle rifle was used extensively by West Germany and still in use today by wasters, wasteland PMCs, and raiders for being quite reliable. The charging handle needs to be pulled back after emptying a whole magazine. Rechambered for .308" + desc = "A battle rifle chambered in 7.62 NATO, this revised battle rifle was used extensively by West Germany and still in use today by wasters, wasteland PMCs, and raiders for being quite reliable. The charging handle needs to be pulled back after emptying a whole magazine. Rechambered for .308" icon_state = "g3" - item_state = "slr" + item_state = "g3" icon = 'icons/fallout/objects/guns/ballistic.dmi' lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' @@ -2579,6 +2632,32 @@ can_flashlight = FALSE fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' +/obj/item/gun/ballistic/automatic/fnfal/g3battlerifle/tox + name = "Custom G3 Stjarnarriffill" + desc = "A custom and refined G3 battle rifle. With proper engravings, this G3 has a scene of a moth and feline under a crescent moon on the stock of the battle rifle. Still chambered in 7.62 NATO, it's owner's name, which is a 'Tox Mckit' is engraved onto the reciever's lower end." + icon_state = "g3" + item_state = "g3" + icon = 'icons/fallout/objects/guns/ballistic.dmi' + lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' + righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' + mag_type = /obj/item/ammo_box/magazine/m308/ext + init_mag_type = /obj/item/ammo_box/magazine/m308/ext + disallowed_mags = /obj/item/ammo_box/magazine/m308 + weapon_class = WEAPON_CLASS_RIFLE + weapon_weight = GUN_TWO_HAND_ONLY + damage_multiplier = GUN_LESS_DAMAGE_T3 + cock_delay = GUN_COCK_RIFLE_BASE + init_recoil = AUTORIFLE_RECOIL(2, 2) + init_firemodes = list( + /datum/firemode/semi_auto/slower, + /datum/firemode/automatic/rpm150 + ) + can_scope = TRUE + can_suppress = TRUE + can_flashlight = FALSE + fire_sound = 'sound/f13weapons/automaticrifle_BAR.ogg' + autofire_shot_delay = 3.8 + /* * * * * * * * * * * @@ -2957,30 +3036,7 @@ can_bayonet = FALSE can_flashlight = FALSE -/obj/item/gun/ballistic/automatic/fastlmg/custom - name = "AusturrPardusdyr LMG" - desc = "A custom OstStrauss LMG, with the words 'To life, I cherish' enscribed on the reciever of the LMG. The LMG was heavily modified and while it hits less, it certainly is able to conserve ammo much better with its slow firing bursts. A LMG fit for a Latos Agent." - item_state = "mg3" - icon_state = "mg3" - icon = 'icons/fallout/objects/guns/ballistic.dmi' - lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' - righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' - mag_type = /obj/item/ammo_box/magazine/machinegundrummag - init_mag_type = /obj/item/ammo_box/magazine/machinegundrummag - weapon_class = WEAPON_CLASS_RIFLE - weapon_weight = GUN_TWO_HAND_ONLY - slowdown = GUN_SLOWDOWN_PISTOL_LIGHT * 0.6 - damage_multiplier = GUN_LESS_DAMAGE_T2 - cock_delay = GUN_COCK_RIFLE_BASE - init_recoil = LMG_RECOIL(1.8, 1.8) - init_firemodes = list( - /datum/firemode/automatic/rpm40 - ) - autofire_shot_delay = 4 - can_scope = FALSE - can_suppress = FALSE - can_bayonet = FALSE - can_flashlight = FALSE + /* * * * * * * * * * * * Browning M1919 MMG diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index d25daa7a766..98662dab354 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -131,25 +131,6 @@ reskinnable_component = /datum/component/reskinnable/volcanic -/obj/item/gun/ballistic/rifle/repeater/customvolcanictox - name = "Engraved Volcanic Pistol" - desc = "A engraved Volcanic pistol. This pistol has an ivory grip with gold plating. The lever itself was modified to allow it to be cocked by a single hand while. The gun's reciever is engraved with a baroque style portrait of a moth and feline." - icon_state = "customvolcanic" - item_state = "goldengun" - icon = 'icons/fallout/objects/guns/ballistic.dmi' - lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' - righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' - init_mag_type = /obj/item/ammo_box/magazine/internal/shot/volcanic - gun_skill_check = AFFECTED_BY_FAST_PUMP | AFFECTED_BY_AUTO_PUMP - weapon_class = WEAPON_CLASS_SMALL - weapon_weight = GUN_ONE_HAND_AKIMBO - damage_multiplier = GUN_LESS_DAMAGE_T1 - init_recoil = HANDGUN_RECOIL (1.2 , 1.2) - can_suppress = FALSE - can_scope = TRUE - init_firemodes = list( - /datum/firemode/semi_auto/slower - ) /* * * * * * * * * * * * Coyote Repeater @@ -635,14 +616,16 @@ and barrel capable of using both 5mm and 5.56mm rifle ammunition with reasonable success. \ The magazine is welded to the frame, and the loading port angled just enough to make stripper clips not work. \ Apparently these 'features' to the design, being on every instance of this gun." - icon = 'modular_coyote/icons/objects/churroguns.dmi' - icon_state = "salvaged_eastern_rifle" - item_state = "marksman" + icon = 'icons/fallout/objects/guns/ballistic.dmi' + lefthand_file = 'icons/fallout/onmob/weapons/guns_lefthand.dmi' + righthand_file = 'icons/fallout/onmob/weapons/guns_righthand.dmi' + icon_state = "salvak" + item_state = "salvak" mag_type = /obj/item/ammo_box/magazine/internal/salvaged_eastern_rifle init_mag_type = /obj/item/ammo_box/magazine/internal/salvaged_eastern_rifle weapon_class = WEAPON_CLASS_RIFLE weapon_weight = GUN_TWO_HAND_ONLY - damage_multiplier = GUN_EXTRA_DAMAGE_0 + damage_multiplier = GUN_LESS_DAMAGE_T2 init_recoil = RIFLE_RECOIL(1, 0.5) init_firemodes = list( /datum/firemode/semi_auto/slow diff --git a/icons/fallout/clothing/armored_light.dmi b/icons/fallout/clothing/armored_light.dmi index 9c987a6527c..787ad3b1dde 100644 Binary files a/icons/fallout/clothing/armored_light.dmi and b/icons/fallout/clothing/armored_light.dmi differ diff --git a/icons/fallout/clothing/helmets.dmi b/icons/fallout/clothing/helmets.dmi index a65dd45a6b4..479431bb2cc 100644 Binary files a/icons/fallout/clothing/helmets.dmi and b/icons/fallout/clothing/helmets.dmi differ diff --git a/icons/fallout/clothing/uniforms.dmi b/icons/fallout/clothing/uniforms.dmi index e5623570ee9..67807f5b482 100644 Binary files a/icons/fallout/clothing/uniforms.dmi and b/icons/fallout/clothing/uniforms.dmi differ diff --git a/icons/fallout/objects/guns/ammo.dmi b/icons/fallout/objects/guns/ammo.dmi index 2d3806fb2e3..0a0226bf0d0 100644 Binary files a/icons/fallout/objects/guns/ammo.dmi and b/icons/fallout/objects/guns/ammo.dmi differ diff --git a/icons/fallout/objects/guns/ballistic.dmi b/icons/fallout/objects/guns/ballistic.dmi index d5384b57aa2..afed4b174bd 100644 Binary files a/icons/fallout/objects/guns/ballistic.dmi and b/icons/fallout/objects/guns/ballistic.dmi differ diff --git a/icons/fallout/onmob/clothes/armor_light.dmi b/icons/fallout/onmob/clothes/armor_light.dmi index cd9781f3c04..7138c8bc3bd 100644 Binary files a/icons/fallout/onmob/clothes/armor_light.dmi and b/icons/fallout/onmob/clothes/armor_light.dmi differ diff --git a/icons/fallout/onmob/clothes/helmet.dmi b/icons/fallout/onmob/clothes/helmet.dmi index 2b246c20c16..e7f34923b74 100644 Binary files a/icons/fallout/onmob/clothes/helmet.dmi and b/icons/fallout/onmob/clothes/helmet.dmi differ diff --git a/icons/fallout/onmob/clothes/uniform.dmi b/icons/fallout/onmob/clothes/uniform.dmi index a633e1027fc..99f1af728ad 100644 Binary files a/icons/fallout/onmob/clothes/uniform.dmi and b/icons/fallout/onmob/clothes/uniform.dmi differ diff --git a/icons/fallout/onmob/weapons/guns_lefthand.dmi b/icons/fallout/onmob/weapons/guns_lefthand.dmi index def204547b9..5418bd62394 100644 Binary files a/icons/fallout/onmob/weapons/guns_lefthand.dmi and b/icons/fallout/onmob/weapons/guns_lefthand.dmi differ diff --git a/icons/fallout/onmob/weapons/guns_righthand.dmi b/icons/fallout/onmob/weapons/guns_righthand.dmi index 1c5cbc67955..898a161c85d 100644 Binary files a/icons/fallout/onmob/weapons/guns_righthand.dmi and b/icons/fallout/onmob/weapons/guns_righthand.dmi differ diff --git a/icons/mob/clothing/uniform.dmi b/icons/mob/clothing/uniform.dmi index 0cadf8e3aca..96f62815a11 100644 Binary files a/icons/mob/clothing/uniform.dmi and b/icons/mob/clothing/uniform.dmi differ diff --git a/icons/obj/clothing/uniforms.dmi b/icons/obj/clothing/uniforms.dmi index da984226aa4..14a8ff0c340 100644 Binary files a/icons/obj/clothing/uniforms.dmi and b/icons/obj/clothing/uniforms.dmi differ diff --git a/modular_citadel/code/modules/client/loadout/__donator.dm b/modular_citadel/code/modules/client/loadout/__donator.dm index 2678160aef7..9553bce8ef9 100644 --- a/modular_citadel/code/modules/client/loadout/__donator.dm +++ b/modular_citadel/code/modules/client/loadout/__donator.dm @@ -164,6 +164,7 @@ new /obj/item/clothing/glasses/welding(src) new /obj/item/gun/energy/laser/plasma/castereve(src) new /obj/item/bedsheet/zebra(src) + new /obj/item/gun/ballistic/automatic/aksmol/aldric(src) /datum/gear/donator/kits/rinpin name = "Lee's stash" @@ -1139,22 +1140,20 @@ ckeywhitelist = list("seermankhajiit00") /obj/item/storage/box/large/custom_kit/seermankhajiit00/PopulateContents() - new /obj/item/gun/ballistic/rifle/repeater/customvolcanictox(src) new /obj/item/clothing/suit/armor/outfit/jacket/cyberpunkjacket/custom(src) new /obj/item/ammo_box/c45(src) new /obj/item/gun/ballistic/automatic/g11/tox(src) - + new /obj/item/gun/ballistic/revolver/Lemat/custom(src) /datum/gear/donator/kits/seermankhajiit002 name = "Sovietcat Kit" path = /obj/item/storage/box/large/custom_kit/seermankhajiit002 ckeywhitelist = list("seermankhajiit00", "superlagg") /obj/item/storage/box/large/custom_kit/seermankhajiit002/PopulateContents() - new /obj/item/gun/ballistic/rifle/salvaged_eastern_rifle(src) new /obj/item/storage/box/hobo_tox(src) + new /obj/item/gun/ballistic/automatic/fnfal/ak47/custom(src) new /obj/item/pet_carrier/paws(src) - new /obj/item/reagent_containers/food/snacks/peanut_butter(src) - new /obj/item/gun/ballistic/revolver/Lemat/custom (src) + new /obj/item/gun/ballistic/revolver/Lemat/custom(src) /datum/gear/donator/kits/seermankhajiit003 name = "The Latos Agent" @@ -1162,8 +1161,8 @@ ckeywhitelist = list("seermankhajiit00") /obj/item/storage/box/large/custom_kit/seermankhajiit003/PopulateContents() - new /obj/item/gun/ballistic/automatic/fastlmg/custom(src) - new /obj/item/ammo_box/a556(src) + new /obj/item/gun/ballistic/automatic/fnfal/g3battlerifle/tox(src) + new /obj/item/ammo_box/a308box(src) new /obj/item/ammo_box/m14mm(src) new /obj/item/gun/ballistic/automatic/pistol/hellocutiepistol(src) new /obj/item/clothing/head/kevlarhelmet/toxtestinghelmet(src) diff --git a/modular_citadel/code/modules/client/loadout/head.dm b/modular_citadel/code/modules/client/loadout/head.dm index 6e7453ed07c..0f6ae01e23f 100644 --- a/modular_citadel/code/modules/client/loadout/head.dm +++ b/modular_citadel/code/modules/client/loadout/head.dm @@ -747,6 +747,66 @@ datum/gear/head/steelpot_bandolier subcategory = LOADOUT_SUBCATEGORY_HEAD_HELMETS cost = 2 +/datum/gear/head/armoredcossack + name = "Armored black bearskin hat" + path = /obj/item/clothing/head/cossackgear + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + +/datum/gear/head/armoredpilotka + name = "Armored pilotka hat" + path = /obj/item/clothing/head/kevlarhelmet/pilotka + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + +/datum/gear/head/armoredsoviethelmet + name = "Old Soviet helmet" + path = /obj/item/clothing/head/kevlarhelmet/steelww2soviet + subcategory = LOADOUT_SUBCATEGORY_HEAD_HELMETS + cost = 2 + +/datum/gear/head/armoredcossackwhite + name = "Armored white bearskin hat" + path = /obj/item/clothing/head/cossackgear/white + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + +/datum/gear/head/bikersteelhelmet + name = "Biker helmet" + path = /obj/item/clothing/head/kevlarhelmet/steelgerman + subcategory = LOADOUT_SUBCATEGORY_HEAD_HELMETS + cost = 2 + +/datum/gear/head/adrianfrench + name = "Adrian helmet" + path = /obj/item/clothing/head/kevlarhelmet/steelfrench + subcategory = LOADOUT_SUBCATEGORY_HEAD_HELMETS + cost = 2 + +/datum/gear/head/steelushanka + name = "Armored Soviet Ushanka hat" + path = /obj/item/clothing/head/armoredushanka + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + +/datum/gear/head/steelpapahat + name = "Armored papakha hat" + path = /obj/item/clothing/head/cossackgear/papakhacossack + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + +/datum/gear/head/steelpaphatwinter + name = "Armored white papakha hat" + path = /obj/item/clothing/head/cossackgear/papakhawhitecossack + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + +/datum/gear/head/steelpapahatkuban + name = "Armored Kuban papakha hat " + path = /obj/item/clothing/head/cossackgear/papakhakubancossack + subcategory = LOADOUT_SUBCATEGORY_HEAD_GENERAL + cost = 2 + /datum/gear/head/greekhelmet name = "Hoplite Helmet" path = /obj/item/clothing/head/coyote/greek diff --git a/modular_citadel/code/modules/client/loadout/suit.dm b/modular_citadel/code/modules/client/loadout/suit.dm index 0a5d46023d8..f1f30567e08 100644 --- a/modular_citadel/code/modules/client/loadout/suit.dm +++ b/modular_citadel/code/modules/client/loadout/suit.dm @@ -718,6 +718,36 @@ subcategory = LOADOUT_SUBCATEGORY_SUIT_GENERAL cost = 1 +/datum/gear/suit/armor/thegreatwargear + name = "Grey greatcoat" + path = /obj/item/clothing/suit/armor/light/duster/greatcoatgrey + subcategory = LOADOUT_SUBCATEGORY_SUIT_GENERAL + cost = 1 + +/datum/gear/suit/armor/kubancossack + name = "Black winter greatcoat" + path = /obj/item/clothing/suit/armor/light/duster/vlongcoat + subcategory = LOADOUT_SUBCATEGORY_SUIT_GENERAL + cost = 1 + +/datum/gear/suit/armor/doncossack + name = "Blue winter greatcoat" + path = /obj/item/clothing/suit/armor/light/duster/vlongcoat/blue + subcategory = LOADOUT_SUBCATEGORY_SUIT_GENERAL + cost = 1 + +/datum/gear/suit/armor/myponeh + name = "Dashing rainbow jacket" + path = /obj/item/clothing/suit/armor/outfit/jacket/rdashjacket + subcategory = LOADOUT_SUBCATEGORY_SUIT_GENERAL + cost = 1 + +/datum/gear/suit/armor/paddedsovietjacket + name = "Padded Soviet jacket" + path = /obj/item/clothing/suit/armor/outfit/jacket/sovietpadded + subcategory = LOADOUT_SUBCATEGORY_SUIT_GENERAL + cost = 1 + /datum/gear/suit/armor/cyberstuff/cloakmedical name = "Medical cloak" path = /obj/item/clothing/suit/armor/outfit/jacket/themedcloaks/cmo diff --git a/modular_citadel/code/modules/client/loadout/uniform.dm b/modular_citadel/code/modules/client/loadout/uniform.dm index 76932afc748..c6476c89a72 100644 --- a/modular_citadel/code/modules/client/loadout/uniform.dm +++ b/modular_citadel/code/modules/client/loadout/uniform.dm @@ -414,6 +414,31 @@ path = /obj/item/clothing/under/f13/animsuit subcategory = LOADOUT_SUBCATEGORY_UNIFORM_SUITS +/datum/gear/uniform/frenchuniform + name = "Outdated French uniform" + path = /obj/item/clothing/under/f13/thegreatwaruniforms + subcategory = LOADOUT_SUBCATEGORY_UNIFORM_UNIFORMS +/datum/gear/uniform/imperialeastuniform + name = "Outdated East German uniform" + path = /obj/item/clothing/under/f13/thegreatwaruniforms/german + subcategory = LOADOUT_SUBCATEGORY_UNIFORM_UNIFORMS +/datum/gear/uniform/britisholduniform + name = "Outdated British uniform" + path = /obj/item/clothing/under/f13/thegreatwaruniforms/britishww1 + subcategory = LOADOUT_SUBCATEGORY_UNIFORM_UNIFORMS +/datum/gear/uniform/russianolduniform + name = "Outdated Russian uniform" + path = /obj/item/clothing/under/f13/thegreatwaruniforms/russianww1 + subcategory = LOADOUT_SUBCATEGORY_UNIFORM_UNIFORMS +/datum/gear/uniform/russianpaddedww2 + name = "Padded Soviet uniform" + path = /obj/item/clothing/under/f13/thegreatwaruniforms/russianww2 + subcategory = LOADOUT_SUBCATEGORY_UNIFORM_UNIFORMS + +/datum/gear/uniform/russiancossack + name = "Cossack uniform" + path = /obj/item/clothing/under/f13/thegreatwaruniforms/kubancossackuniform + subcategory = LOADOUT_SUBCATEGORY_UNIFORM_TRADITIONAL /datum/gear/uniform/galaxyblue name = "Blue galaxy suit" path = /obj/item/clothing/under/f13/animsuit/two diff --git a/tgui/public/tgui-panel.bundle.js b/tgui/public/tgui-panel.bundle.js index 499a536334d..1d134a43359 100644 --- a/tgui/public/tgui-panel.bundle.js +++ b/tgui/public/tgui-panel.bundle.js @@ -1 +1 @@ -!function(){var e,t={75052:function(e,t){"use strict";t.__esModule=!0,t.Color=void 0;var n=1e-4,r=function(){function e(e,t,n,r){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=1),this.r=e,this.g=t,this.b=n,this.a=r}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 o=t.length;if(o<2)throw new Error("Needs at least two colors!");var i=e*(o-1);if(e=.9999)return t[o-1];var a=i%1,c=0|i;return r.lerp(t[c],t[c+1],a)}},34685:function(e,t){"use strict";t.__esModule=!0,t.createUuid=void 0;t.createUuid=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}},43996:function(e,t,n){"use strict";t.__esModule=!0,t.Notifications=void 0;var r=n(58734),o=n(50930),i=function(e){var t=e.children;return(0,r.createVNode)(1,"div","Notifications",t,0)};t.Notifications=i;i.Item=function(e){var t=e.rightSlot,n=e.children;return(0,r.createComponentVNode)(2,o.Flex,{align:"center",className:"Notification",children:[(0,r.createComponentVNode)(2,o.Flex.Item,{className:"Notification__content",grow:1,children:n}),t&&(0,r.createComponentVNode)(2,o.Flex.Item,{className:"Notification__rightSlot",children:t})]})}},56350:function(e,t,n){"use strict";t.__esModule=!0,t.Panel=void 0;var r=n(58734),o=n(50930),i=n(33677),a=n(8585),c=n(13489),s=n(80271),u=n(43996),l=n(47319),d=n(46568);t.Panel=function(e,t){if(Byond.IS_LTE_IE10)return(0,r.createComponentVNode)(2,h);var n=(0,a.useAudio)(t),g=(0,d.useSettings)(t),p=(0,s.useGame)(t);return(0,r.createComponentVNode)(2,i.Pane,{theme:g.theme,children:(0,r.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Section,{fitted:!0,children:(0,r.createComponentVNode)(2,o.Stack,{mr:1,align:"center",children:[(0,r.createComponentVNode)(2,o.Stack.Item,{grow:!0,overflowX:"auto",children:(0,r.createComponentVNode)(2,c.ChatTabs)}),(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,l.PingIndicator)}),(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Button,{color:"grey",selected:n.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-start",onClick:function(){return n.toggle()}})}),(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Button,{icon:g.visible?"times":"cog",selected:g.visible,tooltip:g.visible?"Close settings":"Open settings",tooltipPosition:"bottom-start",onClick:function(){return g.toggle()}})})]})})}),n.visible&&(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Section,{children:(0,r.createComponentVNode)(2,a.NowPlayingWidget)})}),g.visible&&(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,d.SettingsPanel)}),(0,r.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,r.createComponentVNode)(2,o.Section,{fill:!0,fitted:!0,position:"relative",children:[(0,r.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:(0,r.createComponentVNode)(2,c.ChatPanel,{lineHeight:g.lineHeight})}),(0,r.createComponentVNode)(2,u.Notifications,{children:[p.connectionLostAt&&(0,r.createComponentVNode)(2,u.Notifications.Item,{rightSlot:(0,r.createComponentVNode)(2,o.Button,{color:"white",onClick:function(){return Byond.command(".reconnect")},children:"Reconnect"}),children:"You are either AFK, experiencing lag or the connection has closed."}),p.roundRestartedAt&&(0,r.createComponentVNode)(2,u.Notifications.Item,{children:"The connection has been closed because the server is restarting. Please wait while you automatically reconnect."})]})]})})]})})};var h=function(e,t){var n=(0,d.useSettings)(t);return(0,r.createComponentVNode)(2,i.Pane,{theme:n.theme,children:(0,r.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:[(0,r.createComponentVNode)(2,o.Button,{style:{position:"fixed",top:"1em",right:"2em","z-index":1e3},selected:n.visible,onClick:function(){return n.toggle()},children:"Settings"}),n.visible&&(0,r.createComponentVNode)(2,d.SettingsPanel)||(0,r.createComponentVNode)(2,c.ChatPanel,{lineHeight:n.lineHeight})]})})}},26525:function(e,t,n){"use strict";t.__esModule=!0,t.NowPlayingWidget=void 0;var r=n(58734),o=n(5339),i=n(82544),a=n(50930),c=n(46568),s=n(36964);t.NowPlayingWidget=function(e,t){var n,u=(0,i.useSelector)(t,s.selectAudio),l=(0,i.useDispatch)(t),d=(0,c.useSettings)(t),h=null==(n=u.meta)?void 0:n.title;return(0,r.createComponentVNode)(2,a.Flex,{align:"center",children:[u.playing&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Flex.Item,{shrink:0,mx:.5,color:"label",children:"Now playing:"}),(0,r.createComponentVNode)(2,a.Flex.Item,{mx:.5,grow:1,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},children:h||"Unknown Track"})],4)||(0,r.createComponentVNode)(2,a.Flex.Item,{grow:1,color:"label",children:"Nothing to play."}),u.playing&&(0,r.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,r.createComponentVNode)(2,a.Button,{tooltip:"Stop",icon:"stop",onClick:function(){return l({type:"audio/stopMusic"})}})}),(0,r.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,r.createComponentVNode)(2,a.Knob,{minValue:0,maxValue:1,value:d.adminMusicVolume,step:.0025,stepPixelSize:1,format:function(e){return(0,o.toFixed)(100*e)+"%"},onDrag:function(e,t){return d.update({adminMusicVolume:t})}})})]})}},20158:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=void 0;var r=n(82544),o=n(36964);t.useAudio=function(e){var t=(0,r.useSelector)(e,o.selectAudio),n=(0,r.useDispatch)(e);return Object.assign({},t,{toggle:function(){return n({type:"audio/toggle"})}})}},8585:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=t.audioReducer=t.audioMiddleware=t.NowPlayingWidget=void 0;var r=n(20158);t.useAudio=r.useAudio;var o=n(64508);t.audioMiddleware=o.audioMiddleware;var i=n(26525);t.NowPlayingWidget=i.NowPlayingWidget;var a=n(4612);t.audioReducer=a.audioReducer},64508:function(e,t,n){"use strict";t.__esModule=!0,t.audioMiddleware=void 0;var r=n(26882),o=["url"];t.audioMiddleware=function(e){var t=new r.AudioPlayer;return t.onPlay((function(){e.dispatch({type:"audio/playing"})})),t.onStop((function(){e.dispatch({type:"audio/stopped"})})),function(e){return function(n){var r=n.type,i=n.payload;if("audio/playMusic"===r){var a=i.url,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(i,o);return t.play(a,c),e(n)}if("audio/stopMusic"===r)return t.stop(),e(n);if("settings/update"===r||"settings/load"===r){var s=null==i?void 0:i.adminMusicVolume;return"number"==typeof s&&t.setVolume(s),e(n)}return e(n)}}}},26882:function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=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=r(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},4612:function(e,t){"use strict";t.__esModule=!0,t.audioReducer=void 0;var n={visible:!1,playing:!1,track:null};t.audioReducer=function(e,t){void 0===e&&(e=n);var r=t.type,o=t.payload;return"audio/playing"===r?Object.assign({},e,{visible:!0,playing:!0}):"audio/stopped"===r?Object.assign({},e,{visible:!1,playing:!1}):"audio/playMusic"===r?Object.assign({},e,{meta:o}):"audio/stopMusic"===r?Object.assign({},e,{visible:!1,playing:!1,meta:null}):"audio/toggle"===r?Object.assign({},e,{visible:!e.visible}):e}},36964:function(e,t){"use strict";t.__esModule=!0,t.selectAudio=void 0;t.selectAudio=function(e){return e.audio}},54059:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPageSettings=void 0;var r=n(58734),o=n(82544),i=n(50930),a=n(8719),c=n(93156),s=n(26416);t.ChatPageSettings=function(e,t){var n=(0,o.useSelector)(t,s.selectCurrentChatPage),u=(0,o.useDispatch)(t);return(0,r.createComponentVNode)(2,i.Section,{children:[(0,r.createComponentVNode)(2,i.Stack,{align:"center",children:[(0,r.createComponentVNode)(2,i.Stack.Item,{grow:1,children:(0,r.createComponentVNode)(2,i.Input,{fluid:!0,value:n.name,onChange:function(e,t){return u((0,a.updateChatPage)({pageId:n.id,name:t}))}})}),(0,r.createComponentVNode)(2,i.Stack.Item,{children:(0,r.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return u((0,a.removeChatPage)({pageId:n.id}))},children:"Remove"})})]}),(0,r.createComponentVNode)(2,i.Divider),(0,r.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,r.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return u((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)})),(0,r.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,r.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return u((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)}))})]})]})}},15273:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPanel=void 0;var r=n(58734),o=n(59641),i=n(50930),a=n(54587);function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).ref=(0,r.createRef)(),t.state={scrollTracking:!0},t.handleScrollTrackingChange=function(e){return t.setState({scrollTracking:e})},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var u=s.prototype;return u.componentDidMount=function(){a.chatRenderer.mount(this.ref.current),a.chatRenderer.events.on("scrollTrackingChanged",this.handleScrollTrackingChange),this.componentDidUpdate()},u.componentWillUnmount=function(){a.chatRenderer.events.off("scrollTrackingChanged",this.handleScrollTrackingChange)},u.componentDidUpdate=function(e){requestAnimationFrame((function(){a.chatRenderer.ensureScrollTracking()})),(!e||(0,o.shallowDiffers)(this.props,e))&&a.chatRenderer.assignStyle({width:"100%","white-space":"pre-wrap","font-size":this.props.fontSize,"line-height":this.props.lineHeight})},u.render=function(){var e=this.state.scrollTracking;return(0,r.createFragment)([(0,r.createVNode)(1,"div","Chat",null,1,null,null,this.ref),!e&&(0,r.createComponentVNode)(2,i.Button,{className:"Chat__scrollButton",icon:"arrow-down",onClick:function(){return a.chatRenderer.scrollToBottom()},children:"Scroll to bottom"})],0)},s}(r.Component);t.ChatPanel=s},3682:function(e,t,n){"use strict";t.__esModule=!0,t.ChatTabs=void 0;var r=n(58734),o=n(82544),i=n(50930),a=n(8719),c=n(26416),s=n(93164),u=function(e){var t=e.value;return(0,r.createComponentVNode)(2,i.Box,{style:{"font-size":"0.7em","border-radius":"0.25em",width:"1.7em","line-height":"1.55em","background-color":"crimson",color:"#fff"},children:Math.min(t,99)})};t.ChatTabs=function(e,t){var n=(0,o.useSelector)(t,c.selectChatPages),l=(0,o.useSelector)(t,c.selectCurrentChatPage),d=(0,o.useDispatch)(t);return(0,r.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,r.createComponentVNode)(2,i.Flex.Item,{children:(0,r.createComponentVNode)(2,i.Tabs,{textAlign:"center",children:n.map((function(e){return(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:e===l,rightSlot:e.unreadCount>0&&(0,r.createComponentVNode)(2,u,{value:e.unreadCount}),onClick:function(){return d((0,a.changeChatPage)({pageId:e.id}))},children:e.name},e.id)}))})}),(0,r.createComponentVNode)(2,i.Flex.Item,{ml:1,children:(0,r.createComponentVNode)(2,i.Button,{color:"transparent",icon:"plus",onClick:function(){d((0,a.addChatPage)()),d((0,s.openChatSettings)())}})})]})}},8719:function(e,t,n){"use strict";t.__esModule=!0,t.updateMessageCount=t.updateChatPage=t.toggleAcceptedType=t.saveChatToDisk=t.removeChatPage=t.rebuildChat=t.loadChat=t.changeScrollTracking=t.changeChatPage=t.addChatPage=void 0;var r=n(82544),o=n(64577),i=(0,r.createAction)("chat/load");t.loadChat=i;var a=(0,r.createAction)("chat/rebuild");t.rebuildChat=a;var c=(0,r.createAction)("chat/updateMessageCount");t.updateMessageCount=c;var s=(0,r.createAction)("chat/addPage",(function(){return{payload:(0,o.createPage)()}}));t.addChatPage=s;var u=(0,r.createAction)("chat/changePage");t.changeChatPage=u;var l=(0,r.createAction)("chat/updatePage");t.updateChatPage=l;var d=(0,r.createAction)("chat/toggleAcceptedType");t.toggleAcceptedType=d;var h=(0,r.createAction)("chat/removePage");t.removeChatPage=h;var g=(0,r.createAction)("chat/changeScrollTracking");t.changeScrollTracking=g;var p=(0,r.createAction)("chat/saveToDisk");t.saveChatToDisk=p},93156:function(e,t){"use strict";t.__esModule=!0,t.MESSAGE_TYPE_WARNING=t.MESSAGE_TYPE_UNKNOWN=t.MESSAGE_TYPE_SYSTEM=t.MESSAGE_TYPE_RADIO=t.MESSAGE_TYPE_OOC=t.MESSAGE_TYPE_MODCHAT=t.MESSAGE_TYPE_LOCALCHAT=t.MESSAGE_TYPE_INTERNAL=t.MESSAGE_TYPE_INFO=t.MESSAGE_TYPE_EVENTCHAT=t.MESSAGE_TYPE_DEBUG=t.MESSAGE_TYPE_DEADCHAT=t.MESSAGE_TYPE_COMBAT=t.MESSAGE_TYPE_ATTACKLOG=t.MESSAGE_TYPE_ADMINPM=t.MESSAGE_TYPE_ADMINLOG=t.MESSAGE_TYPE_ADMINCHAT=t.MESSAGE_TYPES=t.MESSAGE_SAVE_INTERVAL=t.MESSAGE_PRUNE_INTERVAL=t.MAX_VISIBLE_MESSAGES=t.MAX_PERSISTED_MESSAGES=t.IMAGE_RETRY_MESSAGE_AGE=t.IMAGE_RETRY_LIMIT=t.IMAGE_RETRY_DELAY=t.COMBINE_MAX_TIME_WINDOW=t.COMBINE_MAX_MESSAGES=void 0;t.MAX_VISIBLE_MESSAGES=2500;t.MAX_PERSISTED_MESSAGES=1e3;t.MESSAGE_SAVE_INTERVAL=1e4;t.MESSAGE_PRUNE_INTERVAL=6e4;t.COMBINE_MAX_MESSAGES=5;t.COMBINE_MAX_TIME_WINDOW=5e3;t.IMAGE_RETRY_DELAY=250;t.IMAGE_RETRY_LIMIT=10;t.IMAGE_RETRY_MESSAGE_AGE=6e4;var n="unknown";t.MESSAGE_TYPE_UNKNOWN=n;t.MESSAGE_TYPE_INTERNAL="internal";var r="system";t.MESSAGE_TYPE_SYSTEM=r;var o="localchat";t.MESSAGE_TYPE_LOCALCHAT=o;var i="radio";t.MESSAGE_TYPE_RADIO=i;var a="info";t.MESSAGE_TYPE_INFO=a;var c="warning";t.MESSAGE_TYPE_WARNING=c;var s="deadchat";t.MESSAGE_TYPE_DEADCHAT=s;t.MESSAGE_TYPE_OOC="ooc";var u="adminpm";t.MESSAGE_TYPE_ADMINPM=u;var l="combat";t.MESSAGE_TYPE_COMBAT=l;var d="adminchat";t.MESSAGE_TYPE_ADMINCHAT=d;var h="modchat";t.MESSAGE_TYPE_MODCHAT=h;t.MESSAGE_TYPE_EVENTCHAT="eventchat";var g="adminlog";t.MESSAGE_TYPE_ADMINLOG=g;var p="attacklog";t.MESSAGE_TYPE_ATTACKLOG=p;var f="debug";t.MESSAGE_TYPE_DEBUG=f;var m=[{type:r,name:"System Messages",description:"Messages from your client, always enabled",selector:".boldannounce",important:!0},{type:o,name:"Local",description:"In-character local messages (say, emote, etc)",selector:".say, .emote, .subtle"},{type:i,name:"Radio",description:"All departments of radio messages",selector:".alert, .minorannounce, .syndradio, .centcomradio, .aiprivradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .suppradio, .servradio, .radio, .deptradio, .binarysay, .newscaster, .resonate, .vaultradio, .ncrradio, .bosradio, .enclaveradio, .denradio, .legionradio, .rangerradio, .respondersradio, .khansradio"},{type:a,name:"Info",description:"Non-urgent messages from the game and items",selector:".notice:not(.pm), .adminnotice, .info, .sinister, .cult, .infoplain, .announce, .hear, .smallnotice, .holoparasite"},{type:c,name:"Warnings",description:"Urgent messages from the game and items",selector:".warning:not(.pm), .critical, .userdanger, .italics, .alertsyndie, .warningplain"},{type:s,name:"Deadchat",description:"All of deadchat",selector:".deadsay, .ghostalert"},{type:"ooc",name:"OOC",description:"The bluewall of global OOC messages",selector:".ooc, .adminooc, .oocplain, .adminobserverooc"},{type:"looc",name:"LOOC",description:"Local Out of Character message. Important, always on.",selector:".filter_looc, .looc",important:!0},{type:u,name:"Admin PMs",description:"Messages to/from admins (adminhelp)",selector:".pm, .adminhelp"},{type:l,name:"Combat Log",description:"Urist McTraitor has stabbed you with a knife!",selector:".danger"},{type:n,name:"Unsorted",description:"Everything we could not sort, always enabled"},{type:d,name:"Admin Chat",description:"ASAY messages",selector:".admin_channel, .adminsay",admin:!0},{type:h,name:"Mod Chat",description:"MSAY messages",selector:".mod_channel",admin:!0},{type:g,name:"Admin Log",description:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",selector:".log_message",admin:!0},{type:p,name:"Attack Log",description:"Urist McTraitor has shot John Doe",admin:!0},{type:f,name:"Debug Log",description:"DEBUG: SSPlanets subsystem Recover().",admin:!0}];t.MESSAGE_TYPES=m},13489:function(e,t,n){"use strict";t.__esModule=!0,t.chatReducer=t.chatMiddleware=t.ChatTabs=t.ChatPanel=t.ChatPageSettings=void 0;var r=n(54059);t.ChatPageSettings=r.ChatPageSettings;var o=n(15273);t.ChatPanel=o.ChatPanel;var i=n(3682);t.ChatTabs=i.ChatTabs;var a=n(4165);t.chatMiddleware=a.chatMiddleware;var c=n(83547);t.chatReducer=c.chatReducer},4165:function(e,t,n){"use strict";t.__esModule=!0,t.chatMiddleware=void 0;var r,o=(r=n(37900))&&r.__esModule?r:{"default":r},i=n(22800),a=n(93164),c=n(14173),s=n(8719),u=n(93156),l=n(64577),d=n(54587),h=n(26416);function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(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 p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),d}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=undefined),d}},e}function m(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){m(i,r,o,a,c,"next",e)}function c(e){m(i,r,o,a,c,"throw",e)}a(undefined)}))}}var y=["a","iframe","link","video"],b=function(){var e=v(f().mark((function t(e){var n,r,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,h.selectChat)(e.getState()),r=Math.max(0,d.chatRenderer.messages.length-u.MAX_PERSISTED_MESSAGES),o=d.chatRenderer.messages.slice(r).map((function(e){return(0,l.serializeMessage)(e)})),i.storage.set("chat-state",n),i.storage.set("chat-messages",o);case 5:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=v(f().mark((function t(e){var n,r,a,c,u,h,p;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([i.storage.get("chat-state"),i.storage.get("chat-messages")]);case 2:if(n=t.sent,r=n[0],a=n[1],!(r&&r.version<=4)){t.next=8;break}return e.dispatch((0,s.loadChat)()),t.abrupt("return");case 8:if(a){for(c=g(a);!(u=c()).done;)(h=u.value).html&&(h.html=o["default"].sanitize(h.html,{FORBID_TAGS:y}));p=[].concat(a,[(0,l.createMessage)({type:"internal/reconnected"})]),d.chatRenderer.processBatch(p,{prepend:!0})}e.dispatch((0,s.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 d.chatRenderer.events.on("batchProcessed",(function(t){n&&e.dispatch((0,s.updateMessageCount)(t))})),d.chatRenderer.events.on("scrollTrackingChanged",(function(t){e.dispatch((0,s.changeScrollTracking)(t))})),setInterval((function(){return b(e)}),u.MESSAGE_SAVE_INTERVAL),function(r){return function(o){var i=o.type,u=o.payload;if(t||(t=!0,S(e)),"chat/message"!==i){if(i===s.loadChat.type){r(o);var l=(0,h.selectCurrentChatPage)(e.getState());return d.chatRenderer.changePage(l),d.chatRenderer.onStateLoaded(),void(n=!0)}if(i!==s.changeChatPage.type&&i!==s.addChatPage.type&&i!==s.removeChatPage.type&&i!==s.toggleAcceptedType.type){if(i===s.rebuildChat.type)return d.chatRenderer.rebuildChat(),r(o);if(i!==a.updateSettings.type&&i!==a.loadSettings.type){if("roundrestart"===i)return b(e),r(o);if(i!==s.saveChatToDisk.type)return r(o);d.chatRenderer.saveToDisk()}else{r(o);var g=(0,c.selectSettings)(e.getState());d.chatRenderer.setHighlight(g.highlightText,g.highlightColor,g.matchWord,g.matchCase)}}else{r(o);var p=(0,h.selectCurrentChatPage)(e.getState());d.chatRenderer.changePage(p)}}else{var f=Array.isArray(u)?u:[u];d.chatRenderer.processBatch(f)}}}}},64577:function(e,t,n){"use strict";t.__esModule=!0,t.serializeMessage=t.isSameMessage=t.createPage=t.createMessage=t.createMainPage=t.canPageAcceptType=void 0;var r=n(34685),o=n(93156);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(C[N.id]=Object.assign({},N,{unreadCount:N.unreadCount+A}))}return Object.assign({},e,{pageById:C})}if(r===o.addChatPage.type)return Object.assign({},e,{currentPageId:s.id,pages:[].concat(e.pages,[s.id]),pageById:Object.assign({},e.pageById,(n={},n[s.id]=s,n))});if(r===o.changeChatPage.type){var x,P=s.pageId,k=Object.assign({},e.pageById[P],{unreadCount:0});return Object.assign({},e,{currentPageId:P,pageById:Object.assign({},e.pageById,(x={},x[P]=k,x))})}if(r===o.updateChatPage.type){var O,L=s.pageId,R=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(s,a),G=Object.assign({},e.pageById[L],R);return Object.assign({},e,{pageById:Object.assign({},e.pageById,(O={},O[L]=G,O))})}if(r===o.toggleAcceptedType.type){var V,B=s.pageId,j=s.type,D=Object.assign({},e.pageById[B]);return D.acceptedTypes=Object.assign({},D.acceptedTypes),D.acceptedTypes[j]=!D.acceptedTypes[j],Object.assign({},e,{pageById:Object.assign({},e.pageById,(V={},V[B]=D,V))})}if(r===o.removeChatPage.type){var F=s.pageId,Y=Object.assign({},e,{pages:[].concat(e.pages),pageById:Object.assign({},e.pageById)});return delete Y.pageById[F],Y.pages=Y.pages.filter((function(e){return e!==F})),0===Y.pages.length&&(Y.pages.push(u.id),Y.pageById[u.id]=u,Y.currentPageId=u.id),Y.currentPageId&&Y.currentPageId!==F||(Y.currentPageId=Y.pages[0]),Y}return e}},54587:function(e,t,n){"use strict";t.__esModule=!0,t.chatRenderer=void 0;var r=n(20474),o=n(59641),i=n(17488),a=n(93156),c=n(64577),s=n(3517);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(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 l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=a.IMAGE_RETRY_LIMIT)d.error("failed to load an image after "+n+" attempts");else{var r=t.src;t.src=null,t.src=r+"#"+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 r=t.querySelector(".Chat__badge"),i=r||document.createElement("div");i.textContent=n,i.className=(0,o.classes)(["Chat__badge","Chat__badge--animate"]),requestAnimationFrame((function(){i.className="Chat__badge"})),r||t.appendChild(i)}},v=function(){function e(){var e=this;this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new r.EventEmitter,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,r=n.scrollHeight,o=n.scrollTop+n.offsetHeight,i=Math.abs(r-o)<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 t=e.prototype;return t.isReady=function(){return this.loaded&&this.rootNode&&this.page},t.mount=function(e){var t=this;this.rootNode?e.appendChild(this.rootNode):this.rootNode=e,this.scrollNode=function(e){for(var t=document.body,n=e;n&&n!==t;){if(n.scrollWidth0&&(this.processBatch(this.queue),this.queue=[])},t.assignStyle=function(e){void 0===e&&(e={});for(var t=0,n=Object.keys(e);t1}));if(0===o.length)return this.highlightRegex=null,void(this.highlightColor=null);var i=(n?"\\b":"")+"("+o.join("|")+")"+(n?"\\b":""),a="g"+(r?"":"i");this.highlightRegex=new RegExp(i,a),this.highlightColor=t},t.scrollToBottom=function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight},t.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,r=document.createDocumentFragment(),o=u(this.messages);!(n=o()).done;){var i=n.value;(0,c.canPageAcceptType)(e,i.type)&&(t=i.node,r.appendChild(t),this.visibleMessages.push(i))}t&&(this.rootNode.appendChild(r),t.scrollIntoView())},t.getCombinableMessage=function(e){for(var t=Date.now(),n=this.visibleMessages.length,r=n-1,o=Math.max(0,n-a.COMBINE_MAX_MESSAGES),i=r;i>=o;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(o),d.log("pruned "+o+" stored messages"))}else d.debug("pruning delayed")},t.rebuildChat=function(){if(this.isReady()){for(var e,t=Math.max(0,this.messages.length-a.MAX_PERSISTED_MESSAGES),n=this.messages.slice(t),r=u(n);!(e=r()).done;)e.value.node=undefined;this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(n,{notifyListeners:!1})}},t.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(l,"ss13-chatlog-"+d+".html")}},e}();window.__chatRenderer__||(window.__chatRenderer__=new v);var y=window.__chatRenderer__;t.chatRenderer=y},3517:function(e,t){"use strict";t.__esModule=!0,t.replaceInTextNode=t.linkifyNode=t.highlightNode=void 0;var n=function(e,t){return function(n){for(var r,o,i=n.textContent,a=i.length,c=0,s=0;r=e.exec(i);){s+=1,o||(o=document.createDocumentFragment());var u=r[0],l=u.length,d=r.index;c=t+a.CONNECTION_LOST_AFTER;!r.connectionLostAt&&s&&e.dispatch(c((0,o.connectionLost)())),r.connectionLostAt&&!s&&e.dispatch(c((0,o.connectionRestored)()))}}),1e3),function(e){return function(n){var i=n.type,a=(n.payload,n.meta);return i===r.pingSuccess.type?(t=a.now,e(n)):i===o.roundRestarted.type?e(c(n)):e(n)}}}},64882:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=void 0;var r=n(16163),o={roundId:null,roundTime:null,roundRestartedAt:null,connectionLostAt:null};t.gameReducer=function(e,t){void 0===e&&(e=o);var n=t.type,i=(t.payload,t.meta);return"roundrestart"===n?Object.assign({},e,{roundRestartedAt:i.now}):n===r.connectionLost.type?Object.assign({},e,{connectionLostAt:i.now}):n===r.connectionRestored.type?Object.assign({},e,{connectionLostAt:null}):e}},41641:function(e,t){"use strict";t.__esModule=!0,t.selectGame=void 0;t.selectGame=function(e){return e.game}},38437:function(e,t,n){"use strict";var r=n(58734);n(54859),n(86177);var o,i,a=n(15645),c=n(82544),s=(n(60207),n(46725)),u=n(74489),l=n(1809),d=n(82265),h=n(8585),g=n(13489),p=n(80271),f=n(53923),m=n(47319),v=n(46568),y=n(97078);a.perf.mark("inception",null==(o=window.performance)||null==(i=o.timing)?void 0:i.navigationStart),a.perf.mark("init");var b=(0,d.configureStore)({reducer:(0,c.combineReducers)({audio:h.audioReducer,chat:g.chatReducer,game:p.gameReducer,ping:m.pingReducer,settings:v.settingsReducer}),middleware:{pre:[g.chatMiddleware,m.pingMiddleware,y.telemetryMiddleware,v.settingsMiddleware,h.audioMiddleware,p.gameMiddleware]}}),S=(0,l.createRenderer)((function(){var e=n(56350).Panel;return(0,r.createComponentVNode)(2,d.StoreProvider,{store:b,children:(0,r.createComponentVNode)(2,e)})}));!function _(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)({ignoreWindowFocus:!0}),(0,f.setupPanelFocusHacks)(),(0,u.captureExternalLinks)(),b.subscribe(S),window.update=function(e){return b.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"}),Byond.winget("output").then((function(e){Byond.winset("browseroutput",{size:e.size})}))}else document.addEventListener("DOMContentLoaded",_)}()},53923:function(e,t,n){"use strict";t.__esModule=!0,t.setupPanelFocusHacks=void 0;var r=n(13212),o=n(46725),i=n(60747),a=function(){return setImmediate((function(){return(0,i.focusMap)()}))};t.setupPanelFocusHacks=function(){var e=!1,t=null;window.addEventListener("focusin",(function(t){e=(0,o.canStealFocus)(t.target)})),window.addEventListener("mousedown",(function(e){t=[e.screenX,e.screenY]})),window.addEventListener("mouseup",(function(n){if(t){var o=[n.screenX,n.screenY];(0,r.vecLength)((0,r.vecSubtract)(o,t))>=10&&(e=!0)}e||a()})),o.globalEvents.on("keydown",(function(e){e.isModifierKey()||a()}))}},55622:function(e,t,n){"use strict";t.__esModule=!0,t.PingIndicator=void 0;var r=n(58734),o=n(75052),i=n(5339),a=n(82544),c=n(50930),s=n(80482);t.PingIndicator=function(e,t){var n=(0,a.useSelector)(t,s.selectPing),u=o.Color.lookup(n.networkQuality,[new o.Color(220,40,40),new o.Color(220,200,40),new o.Color(60,220,40)]),l=n.roundtrip?(0,i.toFixed)(n.roundtrip):"--";return(0,r.createVNode)(1,"div","Ping",[(0,r.createComponentVNode)(2,c.Box,{className:"Ping__indicator",backgroundColor:u}),l],0)}},82046:function(e,t,n){"use strict";t.__esModule=!0,t.pingSuccess=t.pingReply=t.pingFail=void 0;var r=n(82544),o=(0,r.createAction)("ping/success",(function(e){var t=Date.now(),n=.5*(t-e.sentAt);return{payload:{lastId:e.id,roundtrip:n},meta:{now:t}}}));t.pingSuccess=o;var i=(0,r.createAction)("ping/fail");t.pingFail=i;var a=(0,r.createAction)("ping/reply");t.pingReply=a},67300:function(e,t){"use strict";t.__esModule=!0,t.PING_TIMEOUT=t.PING_ROUNDTRIP_WORST=t.PING_ROUNDTRIP_BEST=t.PING_QUEUE_SIZE=t.PING_MAX_FAILS=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},47319:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=t.pingMiddleware=t.PingIndicator=void 0;var r=n(52348);t.pingMiddleware=r.pingMiddleware;var o=n(55622);t.PingIndicator=o.PingIndicator;var i=n(28975);t.pingReducer=i.pingReducer},52348:function(e,t,n){"use strict";t.__esModule=!0,t.pingMiddleware=void 0;var r=n(54777),o=n(82046),i=n(67300);t.pingMiddleware=function(e){var t,n=!1,a=0,c=[],s=function(){for(var t=0;ti.PING_TIMEOUT&&(c[t]=null,e.dispatch((0,o.pingFail)()))}var s={index:a,sentAt:Date.now()};c[a]=s,(0,r.sendMessage)({type:"ping",payload:{index:a}}),a=(a+1)%i.PING_QUEUE_SIZE};return function(e){return function(r){var a=r.type,u=r.payload;if(n||(n=!0,t=setInterval(s,i.PING_INTERVAL),s()),"roundrestart"===a)return clearInterval(t),e(r);if("pingReply"===a){var l=u.index,d=c[l];if(!d)return;return c[l]=null,e((0,o.pingSuccess)(d))}return e(r)}}}},28975:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=void 0;var r=n(5339),o=n(82046),i=n(67300);t.pingReducer=function(e,t){void 0===e&&(e={});var n=t.type,a=t.payload;if(n===o.pingSuccess.type){var c=a.roundtrip,s=e.roundtripAvg||c,u=Math.round(.4*s+.6*c);return{roundtrip:c,roundtripAvg:u,failCount:0,networkQuality:1-(0,r.scale)(u,i.PING_ROUNDTRIP_BEST,i.PING_ROUNDTRIP_WORST)}}if(n===o.pingFail.type){var l=e.failCount,d=void 0===l?0:l,h=(0,r.clamp01)(e.networkQuality-d/i.PING_MAX_FAILS),g=Object.assign({},e,{failCount:d+1,networkQuality:h});return d>i.PING_MAX_FAILS&&(g.roundtrip=undefined,g.roundtripAvg=undefined),g}return e}},80482:function(e,t){"use strict";t.__esModule=!0,t.selectPing=void 0;t.selectPing=function(e){return e.ping}},45679:function(e,t,n){"use strict";t.__esModule=!0,t.SettingsPanel=t.SettingsGeneral=void 0;var r=n(58734),o=n(5339),i=n(54777),a=n(82544),c=n(50930),s=n(13489),u=n(8719),l=n(32353),d=n(93164),h=n(32112),g=n(14173);t.SettingsPanel=function(e,t){var n=(0,a.useSelector)(t,g.selectActiveTab),o=(0,a.useDispatch)(t);return(0,r.createComponentVNode)(2,c.Stack,{fill:!0,children:[(0,r.createComponentVNode)(2,c.Stack.Item,{children:(0,r.createComponentVNode)(2,c.Section,{fitted:!0,fill:!0,minHeight:"8em",children:(0,r.createComponentVNode)(2,c.Tabs,{vertical:!0,children:h.SETTINGS_TABS.map((function(e){return(0,r.createComponentVNode)(2,c.Tabs.Tab,{selected:e.id===n,onClick:function(){return o((0,d.changeSettingsTab)({tabId:e.id}))},children:e.name},e.id)}))})})}),(0,r.createComponentVNode)(2,c.Stack.Item,{grow:1,basis:0,children:["general"===n&&(0,r.createComponentVNode)(2,p),"chatPage"===n&&(0,r.createComponentVNode)(2,s.ChatPageSettings)]})]})};var p=function(e,t){var n=(0,a.useSelector)(t,g.selectSettings),s=n.theme,p=n.fontFamily,f=n.fontSize,m=n.lineHeight,v=n.highlightText,y=n.highlightColor,b=n.matchWord,S=n.matchCase,_=(0,a.useDispatch)(t),E=(0,i.useLocalState)(t,"freeFont",!1),C=E[0],w=E[1];return(0,r.createComponentVNode)(2,c.Section,{children:[(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Theme",children:(0,r.createComponentVNode)(2,c.Dropdown,{selected:s,options:l.THEMES,onSelected:function(e){return _((0,d.updateSettings)({theme:e}))}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Font style",children:(0,r.createComponentVNode)(2,c.Stack,{inline:!0,align:"baseline",children:[(0,r.createComponentVNode)(2,c.Stack.Item,{children:!C&&(0,r.createComponentVNode)(2,c.Dropdown,{selected:p,options:h.FONTS,onSelected:function(e){return _((0,d.updateSettings)({fontFamily:e}))}})||(0,r.createComponentVNode)(2,c.Input,{value:p,onChange:function(e,t){return _((0,d.updateSettings)({fontFamily:t}))}})}),(0,r.createComponentVNode)(2,c.Stack.Item,{children:(0,r.createComponentVNode)(2,c.Button,{content:"Custom font",icon:C?"lock-open":"lock",color:C?"good":"bad",ml:1,onClick:function(){w(!C)}})})]})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Font size",children:(0,r.createComponentVNode)(2,c.NumberInput,{width:"4em",step:1,stepPixelSize:10,minValue:8,maxValue:32,value:f,unit:"px",format:function(e){return(0,o.toFixed)(e)},onChange:function(e,t){return _((0,d.updateSettings)({fontSize:t}))}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Line height",children:(0,r.createComponentVNode)(2,c.NumberInput,{width:"4em",step:.01,stepPixelSize:2,minValue:.8,maxValue:5,value:m,format:function(e){return(0,o.toFixed)(e,2)},onDrag:function(e,t){return _((0,d.updateSettings)({lineHeight:t}))}})})]}),(0,r.createComponentVNode)(2,c.Divider),(0,r.createComponentVNode)(2,c.Box,{children:[(0,r.createComponentVNode)(2,c.Flex,{mb:1,color:"label",align:"baseline",children:[(0,r.createComponentVNode)(2,c.Flex.Item,{grow:1,children:"Highlight text (comma separated):"}),(0,r.createComponentVNode)(2,c.Flex.Item,{shrink:0,children:[(0,r.createComponentVNode)(2,c.ColorBox,{mr:1,color:y}),(0,r.createComponentVNode)(2,c.Input,{width:"5em",monospace:!0,placeholder:"#ffffff",value:y,onInput:function(e,t){return _((0,d.updateSettings)({highlightColor:t}))}})]})]}),(0,r.createComponentVNode)(2,c.TextArea,{height:"3em",value:v,onChange:function(e,t){return _((0,d.updateSettings)({highlightText:t}))}}),(0,r.createComponentVNode)(2,c.Button.Checkbox,{checked:b,tooltipPosition:"bottom-start",tooltip:"Not compatible with punctuation.",onClick:function(){return _((0,d.updateSettings)({matchWord:!b}))},children:"Match word"}),(0,r.createComponentVNode)(2,c.Button.Checkbox,{checked:S,onClick:function(){return _((0,d.updateSettings)({matchCase:!S}))},children:"Match case"})]}),(0,r.createComponentVNode)(2,c.Divider),(0,r.createComponentVNode)(2,c.Box,{children:[(0,r.createComponentVNode)(2,c.Button,{icon:"check",onClick:function(){return _((0,u.rebuildChat)())},children:"Apply now"}),(0,r.createComponentVNode)(2,c.Box,{inline:!0,fontSize:"0.9em",ml:1,color:"label",children:"Can freeze the chat for a while."})]}),(0,r.createComponentVNode)(2,c.Divider),(0,r.createComponentVNode)(2,c.Button,{icon:"save",onClick:function(){return _((0,u.saveChatToDisk)())},children:"Save chat log"})]})};t.SettingsGeneral=p},93164:function(e,t,n){"use strict";t.__esModule=!0,t.updateSettings=t.toggleSettings=t.openChatSettings=t.loadSettings=t.changeSettingsTab=void 0;var r=n(82544),o=(0,r.createAction)("settings/update");t.updateSettings=o;var i=(0,r.createAction)("settings/load");t.loadSettings=i;var a=(0,r.createAction)("settings/changeTab");t.changeSettingsTab=a;var c=(0,r.createAction)("settings/toggle");t.toggleSettings=c;var s=(0,r.createAction)("settings/openChatTab");t.openChatSettings=s},32112:function(e,t){"use strict";t.__esModule=!0,t.SETTINGS_TABS=t.FONTS_DISABLED=t.FONTS=void 0;t.SETTINGS_TABS=[{id:"general",name:"General"},{id:"chatPage",name:"Chat Tabs"}];var n="Default";t.FONTS_DISABLED=n;var r=[n,"Verdana","Arial","Arial Black","Comic Sans MS","Impact","Lucida Sans Unicode","Tahoma","Trebuchet MS","Courier New","Lucida Console"];t.FONTS=r},25417:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=void 0;var r=n(82544),o=n(93164),i=n(14173);t.useSettings=function(e){var t=(0,r.useSelector)(e,i.selectSettings),n=(0,r.useDispatch)(e);return Object.assign({},t,{visible:t.view.visible,toggle:function(){return n((0,o.toggleSettings)())},update:function(e){return n((0,o.updateSettings)(e))}})}},46568:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=t.settingsReducer=t.settingsMiddleware=t.SettingsPanel=void 0;var r=n(25417);t.useSettings=r.useSettings;var o=n(41725);t.settingsMiddleware=o.settingsMiddleware;var i=n(7907);t.settingsReducer=i.settingsReducer;var a=n(45679);t.SettingsPanel=a.SettingsPanel},41725:function(e,t,n){"use strict";t.__esModule=!0,t.settingsMiddleware=void 0;var r=n(22800),o=n(32353),i=n(93164),a=n(14173),c=n(32112);t.settingsMiddleware=function(e){var t=!1;return function(n){return function(s){var u,l,d=s.type,h=s.payload;if(t||(t=!0,r.storage.get("panel-settings").then((function(t){e.dispatch((0,i.loadSettings)(t))}))),d===i.updateSettings.type||d===i.loadSettings.type){var g=null==h?void 0:h.theme;g&&(0,o.setClientTheme)(g),n(s);var p=(0,a.selectSettings)(e.getState());return l=p.fontSize,document.documentElement.style.setProperty("font-size",l+"px"),document.body.style.setProperty("font-size",l+"px"),(u=p.fontFamily)===c.FONTS_DISABLED&&(u=null),document.documentElement.style.setProperty("font-family",u),document.body.style.setProperty("font-family",u),void r.storage.set("panel-settings",p)}return n(s)}}}},7907:function(e,t,n){"use strict";t.__esModule=!0,t.settingsReducer=void 0;var r=n(93164),o=n(32112),i={version:1,fontSize:13,fontFamily:o.FONTS[0],lineHeight:1.2,theme:"dark",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",matchWord:!1,matchCase:!1,view:{visible:!1,activeTab:o.SETTINGS_TABS[0].id}};t.settingsReducer=function(e,t){void 0===e&&(e=i);var n=t.type,o=t.payload;if(n===r.updateSettings.type)return Object.assign({},e,o);if(n===r.loadSettings.type)return null!=o&&o.version?(delete o.view,Object.assign({},e,o)):e;if(n===r.toggleSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!e.view.visible})});if(n===r.openChatSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!0,activeTab:"chatPage"})});if(n===r.changeSettingsTab.type){var a=o.tabId;return Object.assign({},e,{view:Object.assign({},e.view,{activeTab:a})})}return e}},14173:function(e,t){"use strict";t.__esModule=!0,t.selectSettings=t.selectActiveTab=void 0;t.selectSettings=function(e){return e.settings};t.selectActiveTab=function(e){return e.settings.view.activeTab}},97078:function(e,t,n){"use strict";t.__esModule=!0,t.telemetryMiddleware=void 0;var r=n(54777),o=n(22800);function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(I){u=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new A(o||[]);return r(a,"_invoke",{value:E(e,n,c)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(I){return{type:"throw",arg:I}}}e.wrap=l;var h={};function g(){}function p(){}function f(){}var m={};u(m,a,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(T([])));y&&y!==t&&n.call(y,a)&&(m=y);var b=f.prototype=g.prototype=Object.create(m);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(r,i,a,c){var s=d(e[r],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,r=e.iterator[n];if(undefined===r)return t.delegate=null,"throw"===n&&e.iterator["return"]&&(t.method="return",t.arg=undefined,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=undefined),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function T(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),h}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=undefined),h}},e}function a(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,o)}var c=(0,n(17488).createLogger)("telemetry");t.telemetryMiddleware=function(e){var t,n;return function(s){return function(u){var l,d=u.type,h=u.payload;if("telemetry/request"!==d)return"backend/update"===d?(s(u),void(l=i().mark((function f(){var r,a,s,u;return i().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=null==h||null==(r=h.config)?void 0:r.client){i.next=4;break}return c.error("backend/update payload is missing client data!"),i.abrupt("return");case 4:if(t){i.next=13;break}return i.next=7,o.storage.get("telemetry");case 7:if(i.t0=i.sent,i.t0){i.next=10;break}i.t0={};case 10:(t=i.t0).connections||(t.connections=[]),c.debug("retrieved telemetry from storage",t);case 13:s=!1,t.connections.find((function(e){return n=a,(t=e).ckey===n.ckey&&t.address===n.address&&t.computer_id===n.computer_id;var t,n}))||(s=!0,t.connections.unshift(a),t.connections.length>10&&t.connections.pop()),s&&(c.debug("saving telemetry to storage",t),o.storage.set("telemetry",t)),n&&(u=n,n=null,e.dispatch({type:"telemetry/request",payload:u}));case 18:case"end":return i.stop()}}),f)})),function(){var e=this,t=arguments;return new Promise((function(n,r){var o=l.apply(e,t);function i(e){a(o,n,r,i,c,"next",e)}function c(e){a(o,n,r,i,c,"throw",e)}i(undefined)}))})()):s(u);if(!t)return c.debug("deferred"),void(n=h);c.debug("sending");var g=(null==h?void 0:h.limits)||{},p=t.connections.slice(0,g.connections);(0,r.sendMessage)({type:"telemetry",payload:{connections:p}})}}}},32353:function(e,t){"use strict";t.__esModule=!0,t.setClientTheme=t.THEMES=void 0;t.THEMES=["light","dark"];var n="#202020",r="#171717",o="#a4bad6",i=null;t.setClientTheme=function(e){if(clearInterval(i),Byond.command(".output statbrowser:set_theme "+e),i=setTimeout((function(){Byond.command(".output statbrowser:set_theme "+e)}),1500),"light"===e)return Byond.winset({"infowindow.background-color":"none","infowindow.text-color":"#000000","info.background-color":"none","info.text-color":"#000000","browseroutput.background-color":"none","browseroutput.text-color":"#000000","outputwindow.background-color":"none","outputwindow.text-color":"#000000","mainwindow.background-color":"none","split.background-color":"none","changelog.background-color":"none","changelog.text-color":"#000000","rules.background-color":"none","rules.text-color":"#000000","wiki.background-color":"none","wiki.text-color":"#000000","forum.background-color":"none","forum.text-color":"#000000","github.background-color":"none","github.text-color":"#000000","report-issue.background-color":"none","report-issue.text-color":"#000000","output.background-color":"none","output.text-color":"#000000","statwindow.background-color":"none","statwindow.text-color":"#000000","stat.background-color":"#FFFFFF","stat.tab-background-color":"none","stat.text-color":"#000000","stat.tab-text-color":"#000000","stat.prefix-color":"#000000","stat.suffix-color":"#000000","saybutton.background-color":"none","saybutton.text-color":"#000000","oocbutton.background-color":"none","oocbutton.text-color":"#000000","mebutton.background-color":"none","mebutton.text-color":"#000000","asset_cache_browser.background-color":"none","asset_cache_browser.text-color":"#000000","tooltip.background-color":"none","tooltip.text-color":"#000000"});"dark"===e&&Byond.winset({"infowindow.background-color":n,"infowindow.text-color":o,"info.background-color":n,"info.text-color":o,"browseroutput.background-color":n,"browseroutput.text-color":o,"outputwindow.background-color":n,"outputwindow.text-color":o,"mainwindow.background-color":n,"split.background-color":n,"changelog.background-color":"#494949","changelog.text-color":o,"rules.background-color":"#494949","rules.text-color":o,"wiki.background-color":"#494949","wiki.text-color":o,"forum.background-color":"#494949","forum.text-color":o,"github.background-color":"#3a3a3a","github.text-color":o,"report-issue.background-color":"#492020","report-issue.text-color":o,"output.background-color":r,"output.text-color":o,"statwindow.background-color":r,"statwindow.text-color":o,"stat.background-color":r,"stat.tab-background-color":n,"stat.text-color":o,"stat.tab-text-color":o,"stat.prefix-color":o,"stat.suffix-color":o,"saybutton.background-color":n,"saybutton.text-color":o,"oocbutton.background-color":n,"oocbutton.text-color":o,"mebutton.background-color":n,"mebutton.text-color":o,"asset_cache_browser.background-color":n,"asset_cache_browser.text-color":o,"tooltip.background-color":n,"tooltip.text-color":o})}},54859:function(){},86177:function(){}},n={};function r(e){var o=n[e];if(o!==undefined)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var a=Infinity;for(l=0;l=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(c=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={"tgui-panel":0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,a=n[0],c=n[1],s=n[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(s)var l=s(r)}for(t&&t(n);u=.9999)return t[o-1];var a=i%1,c=0|i;return r.lerp(t[c],t[c+1],a)}},34685:function(e,t){"use strict";t.__esModule=!0,t.createUuid=void 0;t.createUuid=function(){var e=(new Date).getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var n=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?n:3&n|8).toString(16)}))}},43996:function(e,t,n){"use strict";t.__esModule=!0,t.Notifications=void 0;var r=n(58734),o=n(50930),i=function(e){var t=e.children;return(0,r.createVNode)(1,"div","Notifications",t,0)};t.Notifications=i;i.Item=function(e){var t=e.rightSlot,n=e.children;return(0,r.createComponentVNode)(2,o.Flex,{align:"center",className:"Notification",children:[(0,r.createComponentVNode)(2,o.Flex.Item,{className:"Notification__content",grow:1,children:n}),t&&(0,r.createComponentVNode)(2,o.Flex.Item,{className:"Notification__rightSlot",children:t})]})}},56350:function(e,t,n){"use strict";t.__esModule=!0,t.Panel=void 0;var r=n(58734),o=n(50930),i=n(33677),a=n(8585),c=n(13489),s=n(80271),u=n(43996),l=n(47319),d=n(46568);t.Panel=function(e,t){if(Byond.IS_LTE_IE10)return(0,r.createComponentVNode)(2,h);var n=(0,a.useAudio)(t),g=(0,d.useSettings)(t),p=(0,s.useGame)(t);return(0,r.createComponentVNode)(2,i.Pane,{theme:g.theme,children:(0,r.createComponentVNode)(2,o.Stack,{fill:!0,vertical:!0,children:[(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Section,{fitted:!0,children:(0,r.createComponentVNode)(2,o.Stack,{mr:1,align:"center",children:[(0,r.createComponentVNode)(2,o.Stack.Item,{grow:!0,overflowX:"auto",children:(0,r.createComponentVNode)(2,c.ChatTabs)}),(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,l.PingIndicator)}),(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Button,{color:"grey",selected:n.visible,icon:"music",tooltip:"Music player",tooltipPosition:"bottom-start",onClick:function(){return n.toggle()}})}),(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Button,{icon:g.visible?"times":"cog",selected:g.visible,tooltip:g.visible?"Close settings":"Open settings",tooltipPosition:"bottom-start",onClick:function(){return g.toggle()}})})]})})}),n.visible&&(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,o.Section,{children:(0,r.createComponentVNode)(2,a.NowPlayingWidget)})}),g.visible&&(0,r.createComponentVNode)(2,o.Stack.Item,{children:(0,r.createComponentVNode)(2,d.SettingsPanel)}),(0,r.createComponentVNode)(2,o.Stack.Item,{grow:!0,children:(0,r.createComponentVNode)(2,o.Section,{fill:!0,fitted:!0,position:"relative",children:[(0,r.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:(0,r.createComponentVNode)(2,c.ChatPanel,{lineHeight:g.lineHeight})}),(0,r.createComponentVNode)(2,u.Notifications,{children:[p.connectionLostAt&&(0,r.createComponentVNode)(2,u.Notifications.Item,{rightSlot:(0,r.createComponentVNode)(2,o.Button,{color:"white",onClick:function(){return Byond.command(".reconnect")},children:"Reconnect"}),children:"You are either AFK, experiencing lag or the connection has closed."}),p.roundRestartedAt&&(0,r.createComponentVNode)(2,u.Notifications.Item,{children:"The connection has been closed because the server is restarting. Please wait while you automatically reconnect."})]})]})})]})})};var h=function(e,t){var n=(0,d.useSettings)(t);return(0,r.createComponentVNode)(2,i.Pane,{theme:n.theme,children:(0,r.createComponentVNode)(2,i.Pane.Content,{scrollable:!0,children:[(0,r.createComponentVNode)(2,o.Button,{style:{position:"fixed",top:"1em",right:"2em","z-index":1e3},selected:n.visible,onClick:function(){return n.toggle()},children:"Settings"}),n.visible&&(0,r.createComponentVNode)(2,d.SettingsPanel)||(0,r.createComponentVNode)(2,c.ChatPanel,{lineHeight:n.lineHeight})]})})}},26525:function(e,t,n){"use strict";t.__esModule=!0,t.NowPlayingWidget=void 0;var r=n(58734),o=n(5339),i=n(82544),a=n(50930),c=n(46568),s=n(36964);t.NowPlayingWidget=function(e,t){var n,u=(0,i.useSelector)(t,s.selectAudio),l=(0,i.useDispatch)(t),d=(0,c.useSettings)(t),h=null==(n=u.meta)?void 0:n.title;return(0,r.createComponentVNode)(2,a.Flex,{align:"center",children:[u.playing&&(0,r.createFragment)([(0,r.createComponentVNode)(2,a.Flex.Item,{shrink:0,mx:.5,color:"label",children:"Now playing:"}),(0,r.createComponentVNode)(2,a.Flex.Item,{mx:.5,grow:1,style:{"white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis"},children:h||"Unknown Track"})],4)||(0,r.createComponentVNode)(2,a.Flex.Item,{grow:1,color:"label",children:"Nothing to play."}),u.playing&&(0,r.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,r.createComponentVNode)(2,a.Button,{tooltip:"Stop",icon:"stop",onClick:function(){return l({type:"audio/stopMusic"})}})}),(0,r.createComponentVNode)(2,a.Flex.Item,{mx:.5,fontSize:"0.9em",children:(0,r.createComponentVNode)(2,a.Knob,{minValue:0,maxValue:1,value:d.adminMusicVolume,step:.0025,stepPixelSize:1,format:function(e){return(0,o.toFixed)(100*e)+"%"},onDrag:function(e,t){return d.update({adminMusicVolume:t})}})})]})}},20158:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=void 0;var r=n(82544),o=n(36964);t.useAudio=function(e){var t=(0,r.useSelector)(e,o.selectAudio),n=(0,r.useDispatch)(e);return Object.assign({},t,{toggle:function(){return n({type:"audio/toggle"})}})}},8585:function(e,t,n){"use strict";t.__esModule=!0,t.useAudio=t.audioReducer=t.audioMiddleware=t.NowPlayingWidget=void 0;var r=n(20158);t.useAudio=r.useAudio;var o=n(64508);t.audioMiddleware=o.audioMiddleware;var i=n(26525);t.NowPlayingWidget=i.NowPlayingWidget;var a=n(4612);t.audioReducer=a.audioReducer},64508:function(e,t,n){"use strict";t.__esModule=!0,t.audioMiddleware=void 0;var r=n(26882),o=["url"];t.audioMiddleware=function(e){var t=new r.AudioPlayer;return t.onPlay((function(){e.dispatch({type:"audio/playing"})})),t.onStop((function(){e.dispatch({type:"audio/stopped"})})),function(e){return function(n){var r=n.type,i=n.payload;if("audio/playMusic"===r){var a=i.url,c=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(i,o);return t.play(a,c),e(n)}if("audio/stopMusic"===r)return t.stop(),e(n);if("settings/update"===r||"settings/load"===r){var s=null==i?void 0:i.adminMusicVolume;return"number"==typeof s&&t.setVolume(s),e(n)}return e(n)}}}},26882:function(e,t,n){"use strict";function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(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 o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=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=r(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},4612:function(e,t){"use strict";t.__esModule=!0,t.audioReducer=void 0;var n={visible:!1,playing:!1,track:null};t.audioReducer=function(e,t){void 0===e&&(e=n);var r=t.type,o=t.payload;return"audio/playing"===r?Object.assign({},e,{visible:!0,playing:!0}):"audio/stopped"===r?Object.assign({},e,{visible:!1,playing:!1}):"audio/playMusic"===r?Object.assign({},e,{meta:o}):"audio/stopMusic"===r?Object.assign({},e,{visible:!1,playing:!1,meta:null}):"audio/toggle"===r?Object.assign({},e,{visible:!e.visible}):e}},36964:function(e,t){"use strict";t.__esModule=!0,t.selectAudio=void 0;t.selectAudio=function(e){return e.audio}},54059:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPageSettings=void 0;var r=n(58734),o=n(82544),i=n(50930),a=n(8719),c=n(93156),s=n(26416);t.ChatPageSettings=function(e,t){var n=(0,o.useSelector)(t,s.selectCurrentChatPage),u=(0,o.useDispatch)(t);return(0,r.createComponentVNode)(2,i.Section,{children:[(0,r.createComponentVNode)(2,i.Stack,{align:"center",children:[(0,r.createComponentVNode)(2,i.Stack.Item,{grow:1,children:(0,r.createComponentVNode)(2,i.Input,{fluid:!0,value:n.name,onChange:function(e,t){return u((0,a.updateChatPage)({pageId:n.id,name:t}))}})}),(0,r.createComponentVNode)(2,i.Stack.Item,{children:(0,r.createComponentVNode)(2,i.Button,{icon:"times",color:"red",onClick:function(){return u((0,a.removeChatPage)({pageId:n.id}))},children:"Remove"})})]}),(0,r.createComponentVNode)(2,i.Divider),(0,r.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,r.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return u((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)})),(0,r.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,r.createComponentVNode)(2,i.Button.Checkbox,{checked:n.acceptedTypes[e.type],onClick:function(){return u((0,a.toggleAcceptedType)({pageId:n.id,type:e.type}))},children:e.name},e.type)}))})]})]})}},15273:function(e,t,n){"use strict";t.__esModule=!0,t.ChatPanel=void 0;var r=n(58734),o=n(59641),i=n(50930),a=n(54587);function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}var s=function(e){var t,n;function s(){var t;return(t=e.call(this)||this).ref=(0,r.createRef)(),t.state={scrollTracking:!0},t.handleScrollTrackingChange=function(e){return t.setState({scrollTracking:e})},t}n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var u=s.prototype;return u.componentDidMount=function(){a.chatRenderer.mount(this.ref.current),a.chatRenderer.events.on("scrollTrackingChanged",this.handleScrollTrackingChange),this.componentDidUpdate()},u.componentWillUnmount=function(){a.chatRenderer.events.off("scrollTrackingChanged",this.handleScrollTrackingChange)},u.componentDidUpdate=function(e){requestAnimationFrame((function(){a.chatRenderer.ensureScrollTracking()})),(!e||(0,o.shallowDiffers)(this.props,e))&&a.chatRenderer.assignStyle({width:"100%","white-space":"pre-wrap","font-size":this.props.fontSize,"line-height":this.props.lineHeight})},u.render=function(){var e=this.state.scrollTracking;return(0,r.createFragment)([(0,r.createVNode)(1,"div","Chat",null,1,null,null,this.ref),!e&&(0,r.createComponentVNode)(2,i.Button,{className:"Chat__scrollButton",icon:"arrow-down",onClick:function(){return a.chatRenderer.scrollToBottom()},children:"Scroll to bottom"})],0)},s}(r.Component);t.ChatPanel=s},3682:function(e,t,n){"use strict";t.__esModule=!0,t.ChatTabs=void 0;var r=n(58734),o=n(82544),i=n(50930),a=n(8719),c=n(26416),s=n(93164),u=function(e){var t=e.value;return(0,r.createComponentVNode)(2,i.Box,{style:{"font-size":"0.7em","border-radius":"0.25em",width:"1.7em","line-height":"1.55em","background-color":"crimson",color:"#fff"},children:Math.min(t,99)})};t.ChatTabs=function(e,t){var n=(0,o.useSelector)(t,c.selectChatPages),l=(0,o.useSelector)(t,c.selectCurrentChatPage),d=(0,o.useDispatch)(t);return(0,r.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,r.createComponentVNode)(2,i.Flex.Item,{children:(0,r.createComponentVNode)(2,i.Tabs,{textAlign:"center",children:n.map((function(e){return(0,r.createComponentVNode)(2,i.Tabs.Tab,{selected:e===l,rightSlot:e.unreadCount>0&&(0,r.createComponentVNode)(2,u,{value:e.unreadCount}),onClick:function(){return d((0,a.changeChatPage)({pageId:e.id}))},children:e.name},e.id)}))})}),(0,r.createComponentVNode)(2,i.Flex.Item,{ml:1,children:(0,r.createComponentVNode)(2,i.Button,{color:"transparent",icon:"plus",onClick:function(){d((0,a.addChatPage)()),d((0,s.openChatSettings)())}})})]})}},8719:function(e,t,n){"use strict";t.__esModule=!0,t.updateMessageCount=t.updateChatPage=t.toggleAcceptedType=t.saveChatToDisk=t.removeChatPage=t.rebuildChat=t.loadChat=t.changeScrollTracking=t.changeChatPage=t.addChatPage=void 0;var r=n(82544),o=n(64577),i=(0,r.createAction)("chat/load");t.loadChat=i;var a=(0,r.createAction)("chat/rebuild");t.rebuildChat=a;var c=(0,r.createAction)("chat/updateMessageCount");t.updateMessageCount=c;var s=(0,r.createAction)("chat/addPage",(function(){return{payload:(0,o.createPage)()}}));t.addChatPage=s;var u=(0,r.createAction)("chat/changePage");t.changeChatPage=u;var l=(0,r.createAction)("chat/updatePage");t.updateChatPage=l;var d=(0,r.createAction)("chat/toggleAcceptedType");t.toggleAcceptedType=d;var h=(0,r.createAction)("chat/removePage");t.removeChatPage=h;var g=(0,r.createAction)("chat/changeScrollTracking");t.changeScrollTracking=g;var p=(0,r.createAction)("chat/saveToDisk");t.saveChatToDisk=p},93156:function(e,t){"use strict";t.__esModule=!0,t.MESSAGE_TYPE_WARNING=t.MESSAGE_TYPE_UNKNOWN=t.MESSAGE_TYPE_SYSTEM=t.MESSAGE_TYPE_RADIO=t.MESSAGE_TYPE_OOC=t.MESSAGE_TYPE_MODCHAT=t.MESSAGE_TYPE_LOCALCHAT=t.MESSAGE_TYPE_INTERNAL=t.MESSAGE_TYPE_INFO=t.MESSAGE_TYPE_EVENTCHAT=t.MESSAGE_TYPE_DEBUG=t.MESSAGE_TYPE_DEADCHAT=t.MESSAGE_TYPE_COMBAT=t.MESSAGE_TYPE_ATTACKLOG=t.MESSAGE_TYPE_ADMINPM=t.MESSAGE_TYPE_ADMINLOG=t.MESSAGE_TYPE_ADMINCHAT=t.MESSAGE_TYPES=t.MESSAGE_SAVE_INTERVAL=t.MESSAGE_PRUNE_INTERVAL=t.MAX_VISIBLE_MESSAGES=t.MAX_PERSISTED_MESSAGES=t.IMAGE_RETRY_MESSAGE_AGE=t.IMAGE_RETRY_LIMIT=t.IMAGE_RETRY_DELAY=t.COMBINE_MAX_TIME_WINDOW=t.COMBINE_MAX_MESSAGES=void 0;t.MAX_VISIBLE_MESSAGES=2500;t.MAX_PERSISTED_MESSAGES=1e3;t.MESSAGE_SAVE_INTERVAL=1e4;t.MESSAGE_PRUNE_INTERVAL=6e4;t.COMBINE_MAX_MESSAGES=5;t.COMBINE_MAX_TIME_WINDOW=5e3;t.IMAGE_RETRY_DELAY=250;t.IMAGE_RETRY_LIMIT=10;t.IMAGE_RETRY_MESSAGE_AGE=6e4;var n="unknown";t.MESSAGE_TYPE_UNKNOWN=n;t.MESSAGE_TYPE_INTERNAL="internal";var r="system";t.MESSAGE_TYPE_SYSTEM=r;var o="localchat";t.MESSAGE_TYPE_LOCALCHAT=o;var i="radio";t.MESSAGE_TYPE_RADIO=i;var a="info";t.MESSAGE_TYPE_INFO=a;var c="warning";t.MESSAGE_TYPE_WARNING=c;var s="deadchat";t.MESSAGE_TYPE_DEADCHAT=s;t.MESSAGE_TYPE_OOC="ooc";var u="adminpm";t.MESSAGE_TYPE_ADMINPM=u;var l="combat";t.MESSAGE_TYPE_COMBAT=l;var d="adminchat";t.MESSAGE_TYPE_ADMINCHAT=d;var h="modchat";t.MESSAGE_TYPE_MODCHAT=h;t.MESSAGE_TYPE_EVENTCHAT="eventchat";var g="adminlog";t.MESSAGE_TYPE_ADMINLOG=g;var p="attacklog";t.MESSAGE_TYPE_ATTACKLOG=p;var f="debug";t.MESSAGE_TYPE_DEBUG=f;var m=[{type:r,name:"System Messages",description:"Messages from your client, always enabled",selector:".boldannounce",important:!0},{type:o,name:"Local",description:"In-character local messages (say, emote, etc)",selector:".say, .emote, .subtle"},{type:i,name:"Radio",description:"All departments of radio messages",selector:".alert, .minorannounce, .syndradio, .centcomradio, .aiprivradio, .comradio, .secradio, .engradio, .medradio, .sciradio, .suppradio, .servradio, .radio, .deptradio, .binarysay, .newscaster, .resonate, .vaultradio, .ncrradio, .bosradio, .enclaveradio, .denradio, .legionradio, .rangerradio, .townradio, .respondersradio, .khansradio"},{type:a,name:"Info",description:"Non-urgent messages from the game and items",selector:".notice:not(.pm), .adminnotice, .info, .sinister, .cult, .infoplain, .announce, .hear, .smallnotice, .holoparasite"},{type:c,name:"Warnings",description:"Urgent messages from the game and items",selector:".warning:not(.pm), .critical, .userdanger, .italics, .alertsyndie, .warningplain"},{type:s,name:"Deadchat",description:"All of deadchat",selector:".deadsay, .ghostalert"},{type:"ooc",name:"OOC",description:"The bluewall of global OOC messages",selector:".ooc, .adminooc, .oocplain, .adminobserverooc"},{type:"looc",name:"LOOC",description:"Local Out of Character message. Important, always on.",selector:".filter_looc, .looc",important:!0},{type:u,name:"Admin PMs",description:"Messages to/from admins (adminhelp)",selector:".pm, .adminhelp"},{type:l,name:"Combat Log",description:"Urist McTraitor has stabbed you with a knife!",selector:".danger"},{type:n,name:"Unsorted",description:"Everything we could not sort, always enabled"},{type:d,name:"Admin Chat",description:"ASAY messages",selector:".admin_channel, .adminsay",admin:!0},{type:h,name:"Mod Chat",description:"MSAY messages",selector:".mod_channel",admin:!0},{type:g,name:"Admin Log",description:"ADMIN LOG: Urist McAdmin has jumped to coordinates X, Y, Z",selector:".log_message",admin:!0},{type:p,name:"Attack Log",description:"Urist McTraitor has shot John Doe",admin:!0},{type:f,name:"Debug Log",description:"DEBUG: SSPlanets subsystem Recover().",admin:!0}];t.MESSAGE_TYPES=m},13489:function(e,t,n){"use strict";t.__esModule=!0,t.chatReducer=t.chatMiddleware=t.ChatTabs=t.ChatPanel=t.ChatPageSettings=void 0;var r=n(54059);t.ChatPageSettings=r.ChatPageSettings;var o=n(15273);t.ChatPanel=o.ChatPanel;var i=n(3682);t.ChatTabs=i.ChatTabs;var a=n(4165);t.chatMiddleware=a.chatMiddleware;var c=n(83547);t.chatReducer=c.chatReducer},4165:function(e,t,n){"use strict";t.__esModule=!0,t.chatMiddleware=void 0;var r,o=(r=n(37900))&&r.__esModule?r:{"default":r},i=n(22800),a=n(93164),c=n(14173),s=n(8719),u=n(93156),l=n(64577),d=n(54587),h=n(26416);function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return p(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 p(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),d}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=undefined),d}},e}function m(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){m(i,r,o,a,c,"next",e)}function c(e){m(i,r,o,a,c,"throw",e)}a(undefined)}))}}var y=["a","iframe","link","video"],b=function(){var e=v(f().mark((function t(e){var n,r,o;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=(0,h.selectChat)(e.getState()),r=Math.max(0,d.chatRenderer.messages.length-u.MAX_PERSISTED_MESSAGES),o=d.chatRenderer.messages.slice(r).map((function(e){return(0,l.serializeMessage)(e)})),i.storage.set("chat-state",n),i.storage.set("chat-messages",o);case 5:case"end":return t.stop()}}),t)})));return function(t){return e.apply(this,arguments)}}(),S=function(){var e=v(f().mark((function t(e){var n,r,a,c,u,h,p;return f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([i.storage.get("chat-state"),i.storage.get("chat-messages")]);case 2:if(n=t.sent,r=n[0],a=n[1],!(r&&r.version<=4)){t.next=8;break}return e.dispatch((0,s.loadChat)()),t.abrupt("return");case 8:if(a){for(c=g(a);!(u=c()).done;)(h=u.value).html&&(h.html=o["default"].sanitize(h.html,{FORBID_TAGS:y}));p=[].concat(a,[(0,l.createMessage)({type:"internal/reconnected"})]),d.chatRenderer.processBatch(p,{prepend:!0})}e.dispatch((0,s.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 d.chatRenderer.events.on("batchProcessed",(function(t){n&&e.dispatch((0,s.updateMessageCount)(t))})),d.chatRenderer.events.on("scrollTrackingChanged",(function(t){e.dispatch((0,s.changeScrollTracking)(t))})),setInterval((function(){return b(e)}),u.MESSAGE_SAVE_INTERVAL),function(r){return function(o){var i=o.type,u=o.payload;if(t||(t=!0,S(e)),"chat/message"!==i){if(i===s.loadChat.type){r(o);var l=(0,h.selectCurrentChatPage)(e.getState());return d.chatRenderer.changePage(l),d.chatRenderer.onStateLoaded(),void(n=!0)}if(i!==s.changeChatPage.type&&i!==s.addChatPage.type&&i!==s.removeChatPage.type&&i!==s.toggleAcceptedType.type){if(i===s.rebuildChat.type)return d.chatRenderer.rebuildChat(),r(o);if(i!==a.updateSettings.type&&i!==a.loadSettings.type){if("roundrestart"===i)return b(e),r(o);if(i!==s.saveChatToDisk.type)return r(o);d.chatRenderer.saveToDisk()}else{r(o);var g=(0,c.selectSettings)(e.getState());d.chatRenderer.setHighlight(g.highlightText,g.highlightColor,g.matchWord,g.matchCase)}}else{r(o);var p=(0,h.selectCurrentChatPage)(e.getState());d.chatRenderer.changePage(p)}}else{var f=Array.isArray(u)?u:[u];d.chatRenderer.processBatch(f)}}}}},64577:function(e,t,n){"use strict";t.__esModule=!0,t.serializeMessage=t.isSameMessage=t.createPage=t.createMessage=t.createMainPage=t.canPageAcceptType=void 0;var r=n(34685),o=n(93156);function i(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return a(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 a(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&(C[N.id]=Object.assign({},N,{unreadCount:N.unreadCount+A}))}return Object.assign({},e,{pageById:C})}if(r===o.addChatPage.type)return Object.assign({},e,{currentPageId:s.id,pages:[].concat(e.pages,[s.id]),pageById:Object.assign({},e.pageById,(n={},n[s.id]=s,n))});if(r===o.changeChatPage.type){var x,P=s.pageId,k=Object.assign({},e.pageById[P],{unreadCount:0});return Object.assign({},e,{currentPageId:P,pageById:Object.assign({},e.pageById,(x={},x[P]=k,x))})}if(r===o.updateChatPage.type){var O,L=s.pageId,R=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(s,a),G=Object.assign({},e.pageById[L],R);return Object.assign({},e,{pageById:Object.assign({},e.pageById,(O={},O[L]=G,O))})}if(r===o.toggleAcceptedType.type){var V,B=s.pageId,j=s.type,D=Object.assign({},e.pageById[B]);return D.acceptedTypes=Object.assign({},D.acceptedTypes),D.acceptedTypes[j]=!D.acceptedTypes[j],Object.assign({},e,{pageById:Object.assign({},e.pageById,(V={},V[B]=D,V))})}if(r===o.removeChatPage.type){var F=s.pageId,Y=Object.assign({},e,{pages:[].concat(e.pages),pageById:Object.assign({},e.pageById)});return delete Y.pageById[F],Y.pages=Y.pages.filter((function(e){return e!==F})),0===Y.pages.length&&(Y.pages.push(u.id),Y.pageById[u.id]=u,Y.currentPageId=u.id),Y.currentPageId&&Y.currentPageId!==F||(Y.currentPageId=Y.pages[0]),Y}return e}},54587:function(e,t,n){"use strict";t.__esModule=!0,t.chatRenderer=void 0;var r=n(20474),o=n(59641),i=n(17488),a=n(93156),c=n(64577),s=n(3517);function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return l(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 l(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=a.IMAGE_RETRY_LIMIT)d.error("failed to load an image after "+n+" attempts");else{var r=t.src;t.src=null,t.src=r+"#"+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 r=t.querySelector(".Chat__badge"),i=r||document.createElement("div");i.textContent=n,i.className=(0,o.classes)(["Chat__badge","Chat__badge--animate"]),requestAnimationFrame((function(){i.className="Chat__badge"})),r||t.appendChild(i)}},v=function(){function e(){var e=this;this.loaded=!1,this.rootNode=null,this.queue=[],this.messages=[],this.visibleMessages=[],this.page=null,this.events=new r.EventEmitter,this.scrollNode=null,this.scrollTracking=!0,this.handleScroll=function(t){var n=e.scrollNode,r=n.scrollHeight,o=n.scrollTop+n.offsetHeight,i=Math.abs(r-o)<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 t=e.prototype;return t.isReady=function(){return this.loaded&&this.rootNode&&this.page},t.mount=function(e){var t=this;this.rootNode?e.appendChild(this.rootNode):this.rootNode=e,this.scrollNode=function(e){for(var t=document.body,n=e;n&&n!==t;){if(n.scrollWidth0&&(this.processBatch(this.queue),this.queue=[])},t.assignStyle=function(e){void 0===e&&(e={});for(var t=0,n=Object.keys(e);t1}));if(0===o.length)return this.highlightRegex=null,void(this.highlightColor=null);var i=(n?"\\b":"")+"("+o.join("|")+")"+(n?"\\b":""),a="g"+(r?"":"i");this.highlightRegex=new RegExp(i,a),this.highlightColor=t},t.scrollToBottom=function(){this.scrollNode.scrollTop=this.scrollNode.scrollHeight},t.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,r=document.createDocumentFragment(),o=u(this.messages);!(n=o()).done;){var i=n.value;(0,c.canPageAcceptType)(e,i.type)&&(t=i.node,r.appendChild(t),this.visibleMessages.push(i))}t&&(this.rootNode.appendChild(r),t.scrollIntoView())},t.getCombinableMessage=function(e){for(var t=Date.now(),n=this.visibleMessages.length,r=n-1,o=Math.max(0,n-a.COMBINE_MAX_MESSAGES),i=r;i>=o;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(o),d.log("pruned "+o+" stored messages"))}else d.debug("pruning delayed")},t.rebuildChat=function(){if(this.isReady()){for(var e,t=Math.max(0,this.messages.length-a.MAX_PERSISTED_MESSAGES),n=this.messages.slice(t),r=u(n);!(e=r()).done;)e.value.node=undefined;this.rootNode.textContent="",this.messages=[],this.visibleMessages=[],this.processBatch(n,{notifyListeners:!1})}},t.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(l,"ss13-chatlog-"+d+".html")}},e}();window.__chatRenderer__||(window.__chatRenderer__=new v);var y=window.__chatRenderer__;t.chatRenderer=y},3517:function(e,t){"use strict";t.__esModule=!0,t.replaceInTextNode=t.linkifyNode=t.highlightNode=void 0;var n=function(e,t){return function(n){for(var r,o,i=n.textContent,a=i.length,c=0,s=0;r=e.exec(i);){s+=1,o||(o=document.createDocumentFragment());var u=r[0],l=u.length,d=r.index;c=t+a.CONNECTION_LOST_AFTER;!r.connectionLostAt&&s&&e.dispatch(c((0,o.connectionLost)())),r.connectionLostAt&&!s&&e.dispatch(c((0,o.connectionRestored)()))}}),1e3),function(e){return function(n){var i=n.type,a=(n.payload,n.meta);return i===r.pingSuccess.type?(t=a.now,e(n)):i===o.roundRestarted.type?e(c(n)):e(n)}}}},64882:function(e,t,n){"use strict";t.__esModule=!0,t.gameReducer=void 0;var r=n(16163),o={roundId:null,roundTime:null,roundRestartedAt:null,connectionLostAt:null};t.gameReducer=function(e,t){void 0===e&&(e=o);var n=t.type,i=(t.payload,t.meta);return"roundrestart"===n?Object.assign({},e,{roundRestartedAt:i.now}):n===r.connectionLost.type?Object.assign({},e,{connectionLostAt:i.now}):n===r.connectionRestored.type?Object.assign({},e,{connectionLostAt:null}):e}},41641:function(e,t){"use strict";t.__esModule=!0,t.selectGame=void 0;t.selectGame=function(e){return e.game}},38437:function(e,t,n){"use strict";var r=n(58734);n(54859),n(86177);var o,i,a=n(15645),c=n(82544),s=(n(60207),n(46725)),u=n(74489),l=n(1809),d=n(82265),h=n(8585),g=n(13489),p=n(80271),f=n(53923),m=n(47319),v=n(46568),y=n(97078);a.perf.mark("inception",null==(o=window.performance)||null==(i=o.timing)?void 0:i.navigationStart),a.perf.mark("init");var b=(0,d.configureStore)({reducer:(0,c.combineReducers)({audio:h.audioReducer,chat:g.chatReducer,game:p.gameReducer,ping:m.pingReducer,settings:v.settingsReducer}),middleware:{pre:[g.chatMiddleware,m.pingMiddleware,y.telemetryMiddleware,v.settingsMiddleware,h.audioMiddleware,p.gameMiddleware]}}),S=(0,l.createRenderer)((function(){var e=n(56350).Panel;return(0,r.createComponentVNode)(2,d.StoreProvider,{store:b,children:(0,r.createComponentVNode)(2,e)})}));!function _(){if("loading"!==document.readyState){for((0,s.setupGlobalEvents)({ignoreWindowFocus:!0}),(0,f.setupPanelFocusHacks)(),(0,u.captureExternalLinks)(),b.subscribe(S),window.update=function(e){return b.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"}),Byond.winget("output").then((function(e){Byond.winset("browseroutput",{size:e.size})}))}else document.addEventListener("DOMContentLoaded",_)}()},53923:function(e,t,n){"use strict";t.__esModule=!0,t.setupPanelFocusHacks=void 0;var r=n(13212),o=n(46725),i=n(60747),a=function(){return setImmediate((function(){return(0,i.focusMap)()}))};t.setupPanelFocusHacks=function(){var e=!1,t=null;window.addEventListener("focusin",(function(t){e=(0,o.canStealFocus)(t.target)})),window.addEventListener("mousedown",(function(e){t=[e.screenX,e.screenY]})),window.addEventListener("mouseup",(function(n){if(t){var o=[n.screenX,n.screenY];(0,r.vecLength)((0,r.vecSubtract)(o,t))>=10&&(e=!0)}e||a()})),o.globalEvents.on("keydown",(function(e){e.isModifierKey()||a()}))}},55622:function(e,t,n){"use strict";t.__esModule=!0,t.PingIndicator=void 0;var r=n(58734),o=n(75052),i=n(5339),a=n(82544),c=n(50930),s=n(80482);t.PingIndicator=function(e,t){var n=(0,a.useSelector)(t,s.selectPing),u=o.Color.lookup(n.networkQuality,[new o.Color(220,40,40),new o.Color(220,200,40),new o.Color(60,220,40)]),l=n.roundtrip?(0,i.toFixed)(n.roundtrip):"--";return(0,r.createVNode)(1,"div","Ping",[(0,r.createComponentVNode)(2,c.Box,{className:"Ping__indicator",backgroundColor:u}),l],0)}},82046:function(e,t,n){"use strict";t.__esModule=!0,t.pingSuccess=t.pingReply=t.pingFail=void 0;var r=n(82544),o=(0,r.createAction)("ping/success",(function(e){var t=Date.now(),n=.5*(t-e.sentAt);return{payload:{lastId:e.id,roundtrip:n},meta:{now:t}}}));t.pingSuccess=o;var i=(0,r.createAction)("ping/fail");t.pingFail=i;var a=(0,r.createAction)("ping/reply");t.pingReply=a},67300:function(e,t){"use strict";t.__esModule=!0,t.PING_TIMEOUT=t.PING_ROUNDTRIP_WORST=t.PING_ROUNDTRIP_BEST=t.PING_QUEUE_SIZE=t.PING_MAX_FAILS=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},47319:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=t.pingMiddleware=t.PingIndicator=void 0;var r=n(52348);t.pingMiddleware=r.pingMiddleware;var o=n(55622);t.PingIndicator=o.PingIndicator;var i=n(28975);t.pingReducer=i.pingReducer},52348:function(e,t,n){"use strict";t.__esModule=!0,t.pingMiddleware=void 0;var r=n(54777),o=n(82046),i=n(67300);t.pingMiddleware=function(e){var t,n=!1,a=0,c=[],s=function(){for(var t=0;ti.PING_TIMEOUT&&(c[t]=null,e.dispatch((0,o.pingFail)()))}var s={index:a,sentAt:Date.now()};c[a]=s,(0,r.sendMessage)({type:"ping",payload:{index:a}}),a=(a+1)%i.PING_QUEUE_SIZE};return function(e){return function(r){var a=r.type,u=r.payload;if(n||(n=!0,t=setInterval(s,i.PING_INTERVAL),s()),"roundrestart"===a)return clearInterval(t),e(r);if("pingReply"===a){var l=u.index,d=c[l];if(!d)return;return c[l]=null,e((0,o.pingSuccess)(d))}return e(r)}}}},28975:function(e,t,n){"use strict";t.__esModule=!0,t.pingReducer=void 0;var r=n(5339),o=n(82046),i=n(67300);t.pingReducer=function(e,t){void 0===e&&(e={});var n=t.type,a=t.payload;if(n===o.pingSuccess.type){var c=a.roundtrip,s=e.roundtripAvg||c,u=Math.round(.4*s+.6*c);return{roundtrip:c,roundtripAvg:u,failCount:0,networkQuality:1-(0,r.scale)(u,i.PING_ROUNDTRIP_BEST,i.PING_ROUNDTRIP_WORST)}}if(n===o.pingFail.type){var l=e.failCount,d=void 0===l?0:l,h=(0,r.clamp01)(e.networkQuality-d/i.PING_MAX_FAILS),g=Object.assign({},e,{failCount:d+1,networkQuality:h});return d>i.PING_MAX_FAILS&&(g.roundtrip=undefined,g.roundtripAvg=undefined),g}return e}},80482:function(e,t){"use strict";t.__esModule=!0,t.selectPing=void 0;t.selectPing=function(e){return e.ping}},45679:function(e,t,n){"use strict";t.__esModule=!0,t.SettingsPanel=t.SettingsGeneral=void 0;var r=n(58734),o=n(5339),i=n(54777),a=n(82544),c=n(50930),s=n(13489),u=n(8719),l=n(32353),d=n(93164),h=n(32112),g=n(14173);t.SettingsPanel=function(e,t){var n=(0,a.useSelector)(t,g.selectActiveTab),o=(0,a.useDispatch)(t);return(0,r.createComponentVNode)(2,c.Stack,{fill:!0,children:[(0,r.createComponentVNode)(2,c.Stack.Item,{children:(0,r.createComponentVNode)(2,c.Section,{fitted:!0,fill:!0,minHeight:"8em",children:(0,r.createComponentVNode)(2,c.Tabs,{vertical:!0,children:h.SETTINGS_TABS.map((function(e){return(0,r.createComponentVNode)(2,c.Tabs.Tab,{selected:e.id===n,onClick:function(){return o((0,d.changeSettingsTab)({tabId:e.id}))},children:e.name},e.id)}))})})}),(0,r.createComponentVNode)(2,c.Stack.Item,{grow:1,basis:0,children:["general"===n&&(0,r.createComponentVNode)(2,p),"chatPage"===n&&(0,r.createComponentVNode)(2,s.ChatPageSettings)]})]})};var p=function(e,t){var n=(0,a.useSelector)(t,g.selectSettings),s=n.theme,p=n.fontFamily,f=n.fontSize,m=n.lineHeight,v=n.highlightText,y=n.highlightColor,b=n.matchWord,S=n.matchCase,_=(0,a.useDispatch)(t),E=(0,i.useLocalState)(t,"freeFont",!1),C=E[0],w=E[1];return(0,r.createComponentVNode)(2,c.Section,{children:[(0,r.createComponentVNode)(2,c.LabeledList,{children:[(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Theme",children:(0,r.createComponentVNode)(2,c.Dropdown,{selected:s,options:l.THEMES,onSelected:function(e){return _((0,d.updateSettings)({theme:e}))}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Font style",children:(0,r.createComponentVNode)(2,c.Stack,{inline:!0,align:"baseline",children:[(0,r.createComponentVNode)(2,c.Stack.Item,{children:!C&&(0,r.createComponentVNode)(2,c.Dropdown,{selected:p,options:h.FONTS,onSelected:function(e){return _((0,d.updateSettings)({fontFamily:e}))}})||(0,r.createComponentVNode)(2,c.Input,{value:p,onChange:function(e,t){return _((0,d.updateSettings)({fontFamily:t}))}})}),(0,r.createComponentVNode)(2,c.Stack.Item,{children:(0,r.createComponentVNode)(2,c.Button,{content:"Custom font",icon:C?"lock-open":"lock",color:C?"good":"bad",ml:1,onClick:function(){w(!C)}})})]})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Font size",children:(0,r.createComponentVNode)(2,c.NumberInput,{width:"4em",step:1,stepPixelSize:10,minValue:8,maxValue:32,value:f,unit:"px",format:function(e){return(0,o.toFixed)(e)},onChange:function(e,t){return _((0,d.updateSettings)({fontSize:t}))}})}),(0,r.createComponentVNode)(2,c.LabeledList.Item,{label:"Line height",children:(0,r.createComponentVNode)(2,c.NumberInput,{width:"4em",step:.01,stepPixelSize:2,minValue:.8,maxValue:5,value:m,format:function(e){return(0,o.toFixed)(e,2)},onDrag:function(e,t){return _((0,d.updateSettings)({lineHeight:t}))}})})]}),(0,r.createComponentVNode)(2,c.Divider),(0,r.createComponentVNode)(2,c.Box,{children:[(0,r.createComponentVNode)(2,c.Flex,{mb:1,color:"label",align:"baseline",children:[(0,r.createComponentVNode)(2,c.Flex.Item,{grow:1,children:"Highlight text (comma separated):"}),(0,r.createComponentVNode)(2,c.Flex.Item,{shrink:0,children:[(0,r.createComponentVNode)(2,c.ColorBox,{mr:1,color:y}),(0,r.createComponentVNode)(2,c.Input,{width:"5em",monospace:!0,placeholder:"#ffffff",value:y,onInput:function(e,t){return _((0,d.updateSettings)({highlightColor:t}))}})]})]}),(0,r.createComponentVNode)(2,c.TextArea,{height:"3em",value:v,onChange:function(e,t){return _((0,d.updateSettings)({highlightText:t}))}}),(0,r.createComponentVNode)(2,c.Button.Checkbox,{checked:b,tooltipPosition:"bottom-start",tooltip:"Not compatible with punctuation.",onClick:function(){return _((0,d.updateSettings)({matchWord:!b}))},children:"Match word"}),(0,r.createComponentVNode)(2,c.Button.Checkbox,{checked:S,onClick:function(){return _((0,d.updateSettings)({matchCase:!S}))},children:"Match case"})]}),(0,r.createComponentVNode)(2,c.Divider),(0,r.createComponentVNode)(2,c.Box,{children:[(0,r.createComponentVNode)(2,c.Button,{icon:"check",onClick:function(){return _((0,u.rebuildChat)())},children:"Apply now"}),(0,r.createComponentVNode)(2,c.Box,{inline:!0,fontSize:"0.9em",ml:1,color:"label",children:"Can freeze the chat for a while."})]}),(0,r.createComponentVNode)(2,c.Divider),(0,r.createComponentVNode)(2,c.Button,{icon:"save",onClick:function(){return _((0,u.saveChatToDisk)())},children:"Save chat log"})]})};t.SettingsGeneral=p},93164:function(e,t,n){"use strict";t.__esModule=!0,t.updateSettings=t.toggleSettings=t.openChatSettings=t.loadSettings=t.changeSettingsTab=void 0;var r=n(82544),o=(0,r.createAction)("settings/update");t.updateSettings=o;var i=(0,r.createAction)("settings/load");t.loadSettings=i;var a=(0,r.createAction)("settings/changeTab");t.changeSettingsTab=a;var c=(0,r.createAction)("settings/toggle");t.toggleSettings=c;var s=(0,r.createAction)("settings/openChatTab");t.openChatSettings=s},32112:function(e,t){"use strict";t.__esModule=!0,t.SETTINGS_TABS=t.FONTS_DISABLED=t.FONTS=void 0;t.SETTINGS_TABS=[{id:"general",name:"General"},{id:"chatPage",name:"Chat Tabs"}];var n="Default";t.FONTS_DISABLED=n;var r=[n,"Verdana","Arial","Arial Black","Comic Sans MS","Impact","Lucida Sans Unicode","Tahoma","Trebuchet MS","Courier New","Lucida Console"];t.FONTS=r},25417:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=void 0;var r=n(82544),o=n(93164),i=n(14173);t.useSettings=function(e){var t=(0,r.useSelector)(e,i.selectSettings),n=(0,r.useDispatch)(e);return Object.assign({},t,{visible:t.view.visible,toggle:function(){return n((0,o.toggleSettings)())},update:function(e){return n((0,o.updateSettings)(e))}})}},46568:function(e,t,n){"use strict";t.__esModule=!0,t.useSettings=t.settingsReducer=t.settingsMiddleware=t.SettingsPanel=void 0;var r=n(25417);t.useSettings=r.useSettings;var o=n(41725);t.settingsMiddleware=o.settingsMiddleware;var i=n(7907);t.settingsReducer=i.settingsReducer;var a=n(45679);t.SettingsPanel=a.SettingsPanel},41725:function(e,t,n){"use strict";t.__esModule=!0,t.settingsMiddleware=void 0;var r=n(22800),o=n(32353),i=n(93164),a=n(14173),c=n(32112);t.settingsMiddleware=function(e){var t=!1;return function(n){return function(s){var u,l,d=s.type,h=s.payload;if(t||(t=!0,r.storage.get("panel-settings").then((function(t){e.dispatch((0,i.loadSettings)(t))}))),d===i.updateSettings.type||d===i.loadSettings.type){var g=null==h?void 0:h.theme;g&&(0,o.setClientTheme)(g),n(s);var p=(0,a.selectSettings)(e.getState());return l=p.fontSize,document.documentElement.style.setProperty("font-size",l+"px"),document.body.style.setProperty("font-size",l+"px"),(u=p.fontFamily)===c.FONTS_DISABLED&&(u=null),document.documentElement.style.setProperty("font-family",u),document.body.style.setProperty("font-family",u),void r.storage.set("panel-settings",p)}return n(s)}}}},7907:function(e,t,n){"use strict";t.__esModule=!0,t.settingsReducer=void 0;var r=n(93164),o=n(32112),i={version:1,fontSize:13,fontFamily:o.FONTS[0],lineHeight:1.2,theme:"dark",adminMusicVolume:.5,highlightText:"",highlightColor:"#ffdd44",matchWord:!1,matchCase:!1,view:{visible:!1,activeTab:o.SETTINGS_TABS[0].id}};t.settingsReducer=function(e,t){void 0===e&&(e=i);var n=t.type,o=t.payload;if(n===r.updateSettings.type)return Object.assign({},e,o);if(n===r.loadSettings.type)return null!=o&&o.version?(delete o.view,Object.assign({},e,o)):e;if(n===r.toggleSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!e.view.visible})});if(n===r.openChatSettings.type)return Object.assign({},e,{view:Object.assign({},e.view,{visible:!0,activeTab:"chatPage"})});if(n===r.changeSettingsTab.type){var a=o.tabId;return Object.assign({},e,{view:Object.assign({},e.view,{activeTab:a})})}return e}},14173:function(e,t){"use strict";t.__esModule=!0,t.selectSettings=t.selectActiveTab=void 0;t.selectSettings=function(e){return e.settings};t.selectActiveTab=function(e){return e.settings.view.activeTab}},97078:function(e,t,n){"use strict";t.__esModule=!0,t.telemetryMiddleware=void 0;var r=n(54777),o=n(22800);function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",s=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(I){u=function(e,t,n){return e[t]=n}}function l(e,t,n,o){var i=t&&t.prototype instanceof g?t:g,a=Object.create(i.prototype),c=new A(o||[]);return r(a,"_invoke",{value:E(e,n,c)}),a}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(I){return{type:"throw",arg:I}}}e.wrap=l;var h={};function g(){}function p(){}function f(){}var m={};u(m,a,(function(){return this}));var v=Object.getPrototypeOf,y=v&&v(v(T([])));y&&y!==t&&n.call(y,a)&&(m=y);var b=f.prototype=g.prototype=Object.create(m);function S(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function _(e,t){function o(r,i,a,c){var s=d(e[r],e,i);if("throw"!==s.type){var u=s.arg,l=u.value;return l&&"object"==typeof l&&n.call(l,"__await")?t.resolve(l.__await).then((function(e){o("next",e,a,c)}),(function(e){o("throw",e,a,c)})):t.resolve(l).then((function(e){u.value=e,a(u)}),(function(e){return o("throw",e,a,c)}))}c(s.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function E(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return M()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var c=C(a,n);if(c){if(c===h)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=d(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===h)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}function C(e,t){var n=t.method,r=e.iterator[n];if(undefined===r)return t.delegate=null,"throw"===n&&e.iterator["return"]&&(t.method="return",t.arg=undefined,C(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var o=d(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=undefined),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function N(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function A(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function T(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),s=n.call(i,"finallyLoc");if(c&&s){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),N(n),h}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;N(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:T(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=undefined),h}},e}function a(e,t,n,r,o,i,a){try{var c=e[i](a),s=c.value}catch(u){return void n(u)}c.done?t(s):Promise.resolve(s).then(r,o)}var c=(0,n(17488).createLogger)("telemetry");t.telemetryMiddleware=function(e){var t,n;return function(s){return function(u){var l,d=u.type,h=u.payload;if("telemetry/request"!==d)return"backend/update"===d?(s(u),void(l=i().mark((function f(){var r,a,s,u;return i().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(a=null==h||null==(r=h.config)?void 0:r.client){i.next=4;break}return c.error("backend/update payload is missing client data!"),i.abrupt("return");case 4:if(t){i.next=13;break}return i.next=7,o.storage.get("telemetry");case 7:if(i.t0=i.sent,i.t0){i.next=10;break}i.t0={};case 10:(t=i.t0).connections||(t.connections=[]),c.debug("retrieved telemetry from storage",t);case 13:s=!1,t.connections.find((function(e){return n=a,(t=e).ckey===n.ckey&&t.address===n.address&&t.computer_id===n.computer_id;var t,n}))||(s=!0,t.connections.unshift(a),t.connections.length>10&&t.connections.pop()),s&&(c.debug("saving telemetry to storage",t),o.storage.set("telemetry",t)),n&&(u=n,n=null,e.dispatch({type:"telemetry/request",payload:u}));case 18:case"end":return i.stop()}}),f)})),function(){var e=this,t=arguments;return new Promise((function(n,r){var o=l.apply(e,t);function i(e){a(o,n,r,i,c,"next",e)}function c(e){a(o,n,r,i,c,"throw",e)}i(undefined)}))})()):s(u);if(!t)return c.debug("deferred"),void(n=h);c.debug("sending");var g=(null==h?void 0:h.limits)||{},p=t.connections.slice(0,g.connections);(0,r.sendMessage)({type:"telemetry",payload:{connections:p}})}}}},32353:function(e,t){"use strict";t.__esModule=!0,t.setClientTheme=t.THEMES=void 0;t.THEMES=["light","dark"];var n="#202020",r="#171717",o="#a4bad6",i=null;t.setClientTheme=function(e){if(clearInterval(i),Byond.command(".output statbrowser:set_theme "+e),i=setTimeout((function(){Byond.command(".output statbrowser:set_theme "+e)}),1500),"light"===e)return Byond.winset({"infowindow.background-color":"none","infowindow.text-color":"#000000","info.background-color":"none","info.text-color":"#000000","browseroutput.background-color":"none","browseroutput.text-color":"#000000","outputwindow.background-color":"none","outputwindow.text-color":"#000000","mainwindow.background-color":"none","split.background-color":"none","changelog.background-color":"none","changelog.text-color":"#000000","rules.background-color":"none","rules.text-color":"#000000","wiki.background-color":"none","wiki.text-color":"#000000","forum.background-color":"none","forum.text-color":"#000000","github.background-color":"none","github.text-color":"#000000","report-issue.background-color":"none","report-issue.text-color":"#000000","output.background-color":"none","output.text-color":"#000000","statwindow.background-color":"none","statwindow.text-color":"#000000","stat.background-color":"#FFFFFF","stat.tab-background-color":"none","stat.text-color":"#000000","stat.tab-text-color":"#000000","stat.prefix-color":"#000000","stat.suffix-color":"#000000","saybutton.background-color":"none","saybutton.text-color":"#000000","oocbutton.background-color":"none","oocbutton.text-color":"#000000","mebutton.background-color":"none","mebutton.text-color":"#000000","asset_cache_browser.background-color":"none","asset_cache_browser.text-color":"#000000","tooltip.background-color":"none","tooltip.text-color":"#000000"});"dark"===e&&Byond.winset({"infowindow.background-color":n,"infowindow.text-color":o,"info.background-color":n,"info.text-color":o,"browseroutput.background-color":n,"browseroutput.text-color":o,"outputwindow.background-color":n,"outputwindow.text-color":o,"mainwindow.background-color":n,"split.background-color":n,"changelog.background-color":"#494949","changelog.text-color":o,"rules.background-color":"#494949","rules.text-color":o,"wiki.background-color":"#494949","wiki.text-color":o,"forum.background-color":"#494949","forum.text-color":o,"github.background-color":"#3a3a3a","github.text-color":o,"report-issue.background-color":"#492020","report-issue.text-color":o,"output.background-color":r,"output.text-color":o,"statwindow.background-color":r,"statwindow.text-color":o,"stat.background-color":r,"stat.tab-background-color":n,"stat.text-color":o,"stat.tab-text-color":o,"stat.prefix-color":o,"stat.suffix-color":o,"saybutton.background-color":n,"saybutton.text-color":o,"oocbutton.background-color":n,"oocbutton.text-color":o,"mebutton.background-color":n,"mebutton.text-color":o,"asset_cache_browser.background-color":n,"asset_cache_browser.text-color":o,"tooltip.background-color":n,"tooltip.text-color":o})}},54859:function(){},86177:function(){}},n={};function r(e){var o=n[e];if(o!==undefined)return o.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,r),i.exports}r.m=t,e=[],r.O=function(t,n,o,i){if(!n){var a=Infinity;for(l=0;l=i)&&Object.keys(r.O).every((function(e){return r.O[e](n[s])}))?n.splice(s--,1):(c=!1,i0&&e[l-1][2]>i;l--)e[l]=e[l-1];e[l]=[n,o,i]},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={"tgui-panel":0};r.O.j=function(t){return 0===e[t]};var t=function(t,n){var o,i,a=n[0],c=n[1],s=n[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(o in c)r.o(c,o)&&(r.m[o]=c[o]);if(s)var l=s(r)}for(t&&t(n);u