diff --git a/_maps/map_files/RandomZLevels/terrorspiders.dmm b/_maps/map_files/RandomZLevels/terrorspiders.dmm index b052f57a840..39040cc69ee 100644 --- a/_maps/map_files/RandomZLevels/terrorspiders.dmm +++ b/_maps/map_files/RandomZLevels/terrorspiders.dmm @@ -11288,7 +11288,7 @@ /obj/item/paper/terrorspiders3, /obj/item/pen/edagger, /obj/item/stack/telecrystal{ - amount = 10 + amount = 50 }, /obj/item/chameleon, /obj/item/reagent_containers/glass/bottle/traitor, diff --git a/_maps/map_files/generic/CentComm.dmm b/_maps/map_files/generic/CentComm.dmm index ae6ab95ac11..59c79dfe27a 100644 --- a/_maps/map_files/generic/CentComm.dmm +++ b/_maps/map_files/generic/CentComm.dmm @@ -2673,11 +2673,11 @@ desc = "Баксоны максона. Возможно кто-то приобретет пропуск."; name = "100.000 �������� �������" }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ amount = 115; desc = null }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ amount = 115; desc = null }, @@ -12047,18 +12047,18 @@ /area/centcom/zone1) "fQg" = ( /obj/structure/table/wood, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ pixel_x = 3 }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ pixel_x = -3; pixel_y = 4 }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ pixel_x = -4; pixel_y = -2 }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ pixel_x = 3; pixel_y = 9 }, diff --git a/_maps/map_files/generic/syndicatebase.dmm b/_maps/map_files/generic/syndicatebase.dmm index af7a8ba6778..8fad62fadaf 100644 --- a/_maps/map_files/generic/syndicatebase.dmm +++ b/_maps/map_files/generic/syndicatebase.dmm @@ -191,7 +191,7 @@ /obj/item/stack/sheet/mineral/gold{ amount = 50 }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ amount = 20; desc = null }, diff --git a/_maps/map_files/generic/z2_old.dmm b/_maps/map_files/generic/z2_old.dmm index ce97a2f4467..6b640366a7e 100644 --- a/_maps/map_files/generic/z2_old.dmm +++ b/_maps/map_files/generic/z2_old.dmm @@ -10998,19 +10998,19 @@ /obj/item/gun/projectile/shotgun/boltaction, /obj/item/gun/projectile/shotgun/boltaction, /obj/item/gun/projectile/shotgun/boltaction, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, /obj/item/gun/projectile/shotgun/boltaction, -/obj/item/ammo_box/speedloader/shotgun/a762, -/obj/item/ammo_box/speedloader/shotgun/a762, +/obj/item/ammo_box/speedloader/a762, +/obj/item/ammo_box/speedloader/a762, /obj/machinery/light/small{ brightness_range = 10; light_range = 10; @@ -13202,11 +13202,11 @@ desc = "Баксоны максона. Возможно кто-то приобретет пропуск."; name = "100.000 �������� �������" }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ amount = 115; desc = null }, -/obj/item/stack/telecrystal/fifty{ +/obj/item/stack/telecrystal/twohundread_fifty{ amount = 115; desc = null }, diff --git a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm index 9e3f2494cd2..c8d3c4eb7ce 100644 --- a/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm +++ b/code/ATMOSPHERICS/pipes/simple/pipe_simple_he.dm @@ -58,7 +58,7 @@ if(pipe_air.temperature > heat_limit + 1) for(var/m in buckled_mobs) var/mob/living/buckled_mob = m - buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, "chest") + buckled_mob.apply_damage(4 * log(pipe_air.temperature - heat_limit), BURN, BODY_ZONE_CHEST) /obj/machinery/atmospherics/pipe/simple/heat_exchanging/New() diff --git a/code/__DEFINES/combat.dm b/code/__DEFINES/combat.dm index 4ee09ae5809..c3a336e2629 100644 --- a/code/__DEFINES/combat.dm +++ b/code/__DEFINES/combat.dm @@ -96,7 +96,7 @@ #define EMBEDDED_UNSAFE_REMOVAL_PAIN_MULTIPLIER 8 //Coefficient of multiplication for the damage the item does when removed without a surgery (this*item.w_class) #define EMBEDDED_UNSAFE_REMOVAL_TIME 30 //A Time in ticks, total removal time = (this*item.w_class) -// Body Parts +// Body Part Zones #define BODY_ZONE_HEAD "head" #define BODY_ZONE_CHEST "chest" #define BODY_ZONE_L_ARM "l_arm" @@ -114,6 +114,7 @@ #define BODY_ZONE_PRECISE_L_FOOT "l_foot" #define BODY_ZONE_PRECISE_R_FOOT "r_foot" + //We will round to this value in damage calculations. #define DAMAGE_PRECISION 0.1 diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 07a68148a17..a2d36f7b128 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -301,6 +301,7 @@ ///from base of mob/key_down(): (_key, client/user) #define COMSIG_MOB_KEY_DROP_ITEM_DOWN "mob_key_drop_item_down" + #define COMPONENT_CANCEL_DROP (1<<0) ///from base of obj/allowed(mob/M): (/obj) returns bool, if TRUE the mob has id access to the obj #define COMSIG_MOB_ALLOWED "mob_allowed" @@ -655,9 +656,10 @@ #define COMSIG_HUMAN_CHANGE_HEAD_ACCESSORY "human_change_head_accessory" //from /mob/living/carbon/human/proc/apply_overlay #define COMSIG_HUMAN_APPLY_OVERLAY "living_apply_overlay" +///From mob/living/carbon/human/do_suicide() +#define COMSIG_HUMAN_SUICIDE_ACT "human_suicide_act" // /datum/species signals - ///from datum/species/on_species_gain(): (datum/species/new_species, datum/species/old_species) #define COMSIG_SPECIES_GAIN "species_gain" ///from datum/species/on_species_loss(): (datum/species/lost_species) diff --git a/code/__DEFINES/implants_defines.dm b/code/__DEFINES/implants_defines.dm new file mode 100644 index 00000000000..c01d2db4718 --- /dev/null +++ b/code/__DEFINES/implants_defines.dm @@ -0,0 +1,35 @@ +/// If used, an implant will trigger when an emote is intentionally used. +#define BIOCHIP_EMOTE_TRIGGER_INTENTIONAL (1<<0) +/// If used, an implant will trigger when an emote is forced/unintentionally used. +#define BIOCHIP_EMOTE_TRIGGER_UNINTENTIONAL (1<<1) +/// If used, an implant will always trigger when the user makes an emote. +#define BIOCHIP_EMOTE_TRIGGER_ALWAYS (BIOCHIP_EMOTE_TRIGGER_UNINTENTIONAL|BIOCHIP_EMOTE_TRIGGER_INTENTIONAL) +/// If used, an implant will trigger on the user's first death. +#define BIOCHIP_TRIGGER_DEATH_ONCE (1<<2) +/// If used, an implant will trigger any time a user dies. +#define BIOCHIP_TRIGGER_DEATH_ANY (1<<3) +/// If used, an implant will NOT trigger on death when a user is gibbed. +#define BIOCHIP_TRIGGER_NOT_WHEN_GIBBED (1<<4) + +// Defines related to the way that the implant is activated. This is the value for implant.activated +/// The implant is passively active (like a mindshield) +#define BIOCHIP_ACTIVATED_PASSIVE 0 +/// The implant is activated manually by a trigger +#define BIOCHIP_ACTIVATED_ACTIVE 1 + +// Defines related to biochip current status +/// The implant is currently inside the body +#define BIOCHIP_IMPLANTED 1 +/// The implant was once implanted into someone +#define BIOCHIP_USED 0 +/// The implant is new and intact +#define BIOCHIP_NEW null + +// Defines implanting results of proc [/obj/item/implant/proc/implant()] +/// Implant is successfully installed +#define BIOCHIP_IMPLANT_SUCCESS 1 +/// Implant fails to inject +#define BIOCHIP_IMPLANT_FAIL -1 +/// Return this if there's no room for the implant +#define BIOCHIP_IMPLANT_NOROOM 0 + diff --git a/code/__DEFINES/is_helpers.dm b/code/__DEFINES/is_helpers.dm index ffc637b21bc..8fb5232099e 100644 --- a/code/__DEFINES/is_helpers.dm +++ b/code/__DEFINES/is_helpers.dm @@ -36,8 +36,6 @@ #define isprojectile(A) (istype(A, /obj/item/projectile)) -#define is_cleanable(A) (istype(A, /obj/effect/decal/cleanable) || istype(A, /obj/effect/rune)) //if something is cleanable - #define is_pen(W) (istype(W, /obj/item/pen)) #define is_pda(W) (istype(W, /obj/item/pda)) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 067da4146ec..286f1d04aad 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -89,6 +89,8 @@ #define HIGH_LANDMARK_LAYER 9.2 #define AREA_LAYER 10 #define MASSIVE_OBJ_LAYER 11 + +#define POINT_PLANE 14 #define POINT_LAYER 12 #define CHAT_LAYER 12.0001 // Do not insert layers between these two values diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index bdd5c8c71ba..20827522339 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -1,11 +1,12 @@ ///////////////////ORGAN DEFINES/////////////////// // Organ defines. -#define ORGAN_BROKEN 1 -#define ORGAN_ROBOT 2 -#define ORGAN_SPLINTED 4 -#define ORGAN_DEAD 8 -#define ORGAN_MUTATED 16 +#define ORGAN_BROKEN 1 +#define ORGAN_ROBOT 2 +#define ORGAN_SPLINTED 4 +#define ORGAN_DEAD 8 +#define ORGAN_MUTATED 16 +#define ORGAN_INT_BLEED 32 #define PROCESS_ACCURACY 10 @@ -271,7 +272,8 @@ #define isnewplayer(A) (istype((A), /mob/new_player)) -#define isorgan(A) (istype((A), /obj/item/organ/external)) +#define isexternalorgan(A) (istype((A), /obj/item/organ/external)) + #define hasorgans(A) (ishuman(A)) #define is_admin(user) (check_rights(R_ADMIN, 0, (user)) != 0) diff --git a/code/__DEFINES/organ_defines.dm b/code/__DEFINES/organ_defines.dm new file mode 100644 index 00000000000..06300d2d299 --- /dev/null +++ b/code/__DEFINES/organ_defines.dm @@ -0,0 +1,56 @@ +// Internal organs + +#define INTERNAL_ORGAN_HEART "heart" +#define INTERNAL_ORGAN_LUNGS "lungs" +#define INTERNAL_ORGAN_LIVER "liver" +#define INTERNAL_ORGAN_KIDNEYS "kidneys" +#define INTERNAL_ORGAN_APPENDIX "appendix" +#define INTERNAL_ORGAN_EYES "eyes" +#define INTERNAL_ORGAN_EARS "ears" +#define INTERNAL_ORGAN_BRAIN "brain" + +#define INTERNAL_ORGAN_RESONANT_CRYSTAL "resonant_crystal" +#define INTERNAL_ORGAN_STRANGE_CRYSTAL "strange_crystal" +#define INTERNAL_ORGAN_WAX_GLANDS "wax_glands" +#define INTERNAL_ORGAN_HEADPOCKET "headpocket" +#define INTERNAL_ORGAN_LANTERN "lantern" +#define INTERNAL_ORGAN_RESONATOR "adamantine_resonator" + +#define INTERNAL_ORGAN_PLASMAVESSEL "plasmavessel" +#define INTERNAL_ORGAN_ACIDGLAND "acidgland" +#define INTERNAL_ORGAN_HIVENODE "hivenode" +#define INTERNAL_ORGAN_NEUROTOXIN_GLAND "neurotoxin_gland" +#define INTERNAL_ORGAN_RESIN_SPINNER "resin_spinner" +#define INTERNAL_ORGAN_EGGSAC "eggsac" + +#define INTERNAL_ORGAN_L_ARM_DEVICE "l_arm_device" +#define INTERNAL_ORGAN_R_ARM_DEVICE "r_arm_device" +#define INTERNAL_ORGAN_L_LEG_DEVICE "l_leg_device" +#define INTERNAL_ORGAN_R_LEG_DEVICE "r_leg_device" +#define INTERNAL_ORGAN_EYE_SIGHT_DEVICE "eye_sight" +#define INTERNAL_ORGAN_EYE_HUD_DEVICE "eye_hud" +#define INTERNAL_ORGAN_EYE_SHIELD_DEVICE "eye_shield" +#define INTERNAL_ORGAN_EYE_LING "eye_ling" +#define INTERNAL_ORGAN_BREATHING_TUBE "breathing_tube" +#define INTERNAL_ORGAN_STOMACH "stomach" +#define INTERNAL_ORGAN_HEART_DRIVE "heartdrive" +#define INTERNAL_ORGAN_BRAIN_ANTIDROP "brain_antidrop" +#define INTERNAL_ORGAN_BRAIN_ANTISTUN "brain_antistun" +#define INTERNAL_ORGAN_BRAIN_ANTISLEEP "brain_antisleep" +#define INTERNAL_ORGAN_BRAIN_CLOWNVOICE "brain_clownvoice" +#define INTERNAL_ORGAN_BRAIN_SPEECHTRANSLATOR "brain_speechtranslator" + +#define INTERNAL_ORGAN_VOCALCORDS "vocal_cords" +#define INTERNAL_ORGAN_HIVECORE "hivecore" +#define INTERNAL_ORGAN_PARASITE_EGG "parasite_egg" + +#define INTERNAL_ORGAN_HAIR "hair_organ" // yeah thats a thing +#define INTERNAL_ORGAN_HONK_BLADDER "honk_bladder" +#define INTERNAL_ORGAN_BRAIN_TUMOR "brain_tumor" + + +// insert/remove organ special defines +#define ORGAN_MANIPULATION_DEFAULT 0 +#define ORGAN_MANIPULATION_NOEFFECT 1 +#define ORGAN_MANIPULATION_ABDUCTOR 2 + diff --git a/code/__DEFINES/uplink_types.dm b/code/__DEFINES/uplink_types.dm index 6d5ca1c6557..25f5c8925bc 100644 --- a/code/__DEFINES/uplink_types.dm +++ b/code/__DEFINES/uplink_types.dm @@ -2,3 +2,5 @@ #define UPLINK_TYPE_NUCLEAR 1 #define UPLINK_TYPE_SST 2 #define UPLINK_TYPE_ADMIN 3 +#define UPLINK_TYPE_SIT 4 + diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 214a9ec5294..53e8d69dd86 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -118,7 +118,7 @@ var/datum/robolimb/R = new limb_type() GLOB.all_robolimbs[R.company] = R if(!R.unavailable_at_chargen) - if(R != "head" && R != "chest" && R != "groin" ) //Part of the method that ensures only IPCs can access head, chest and groin prosthetics. + if(R != BODY_ZONE_HEAD && R != BODY_ZONE_CHEST && R != BODY_ZONE_PRECISE_GROIN ) //Part of the method that ensures only IPCs can access head, chest and groin prosthetics. if(R.has_subtypes) //Ensures solos get added to the list as well be incorporating has_subtypes == 1 and has_subtypes == 2. GLOB.chargen_robolimbs[R.company] = R //List only main brands and solo parts. if(R.selectable) diff --git a/code/__HELPERS/matrices.dm b/code/__HELPERS/matrices.dm index 0520ab6b077..414a16636ec 100644 --- a/code/__HELPERS/matrices.dm +++ b/code/__HELPERS/matrices.dm @@ -3,7 +3,7 @@ Turn(.) //BYOND handles cases such as -270, 360, 540 etc. DOES NOT HANDLE 180 TURNS WELL, THEY TWEEN AND LOOK LIKE SHIT -/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3) +/atom/proc/SpinAnimation(speed = 10, loops = -1, clockwise = 1, segments = 3, parallel = TRUE) if(!segments) return var/segment = 360/segments @@ -19,7 +19,10 @@ speed /= segments - animate(src, transform = matrices[1], time = speed, loops) + if(parallel) + animate(src, transform = matrices[1], time = speed, loops , flags = ANIMATION_PARALLEL) + else + animate(src, transform = matrices[1], time = speed, loops) for(var/i in 2 to segments) //2 because 1 is covered above animate(transform = matrices[i], time = speed) //doesn't have an object argument because this is "Stacking" with the animate call above diff --git a/code/__HELPERS/pronouns.dm b/code/__HELPERS/pronouns.dm index 921156fad75..733413961b7 100644 --- a/code/__HELPERS/pronouns.dm +++ b/code/__HELPERS/pronouns.dm @@ -19,7 +19,7 @@ /** * Replaces the `%(SINGLE,PLURAL)%` or `%(MALE,FEMALE,NEUTER,PLURAL)%` message piece accordingly to user gender. - * Use `*` to deliberatly skip one genderize word. + * Use `*` to deliberatly skip one genderize word: `%(*,FEMALE,*,PLURAL)%`. * * Arguments: * * user - Person which pronouns will be used. diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index 652f586b3a0..0da8dbf45b3 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -536,6 +536,7 @@ text = replacetext(text, "\[logo\]", "​") text = replacetext(text, "\[slogo\]", "​") text = replacetext(text, "\[ussplogo\]", "​") + text = replacetext(text, "\[solgov\]", "​") text = replacetext(text, "\[time\]", "[station_time_timestamp()]") // TO DO text = replacetext(text, "\[date\]", "[GLOB.current_date_string]") text = replacetext(text, "\[station\]", "[station_name()]") diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 5eb1cd82231..0f65c67141a 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -640,7 +640,7 @@ Returns 1 if the chain up to the area contains the given typepath var/list/turfs = new/list() for(var/area/N in world) - if(istype(N, areatype)) + if(N.type == areatype) for(var/turf/T in N) turfs += T return turfs @@ -959,19 +959,40 @@ Returns 1 if the chain up to the area contains the given typepath /proc/parse_zone(zone) - if(zone == "r_hand") return "right hand" - else if(zone == "l_hand") return "left hand" - else if(zone == "l_arm") return "left arm" - else if(zone == "r_arm") return "right arm" - else if(zone == "l_leg") return "left leg" - else if(zone == "r_leg") return "right leg" - else if(zone == "l_foot") return "left foot" - else if(zone == "r_foot") return "right foot" - else if(zone == "l_hand") return "left hand" - else if(zone == "r_hand") return "right hand" - else if(zone == "l_foot") return "left foot" - else if(zone == "r_foot") return "right foot" - else return zone + switch(zone) + if(BODY_ZONE_HEAD) + return "head" + if(BODY_ZONE_CHEST) + return "chest" + if(BODY_ZONE_L_ARM) + return "left arm" + if(BODY_ZONE_R_ARM) + return "right arm" + if(BODY_ZONE_L_LEG) + return "left leg" + if(BODY_ZONE_R_LEG) + return "right leg" + if(BODY_ZONE_TAIL) + return "tail" + if(BODY_ZONE_WING) + return "wings" + if(BODY_ZONE_PRECISE_EYES) + return "eyes" + if(BODY_ZONE_PRECISE_MOUTH) + return "mouth" + if(BODY_ZONE_PRECISE_GROIN) + return "groin" + if(BODY_ZONE_PRECISE_L_HAND) + return "left hand" + if(BODY_ZONE_PRECISE_R_HAND) + return "right hand" + if(BODY_ZONE_PRECISE_L_FOOT) + return "left foot" + if(BODY_ZONE_PRECISE_R_FOOT) + return "right foot" + else + stack_trace("Wrong zone input.") + /* @@ -1216,47 +1237,47 @@ Standard way to write links -Sayu // HIDEGLASSES(formerly known as HIDEEYES) flag was made, ironically, to check if it hides our GLASSES // not to check if it makes using the fucking mouth/eyes impossible!!! switch(location) - if("head") + if(BODY_ZONE_HEAD) if(covered_locations & HEAD) - return 0 - if("eyes") + return FALSE + if(BODY_ZONE_PRECISE_EYES) if(eyesmouth_covered & MASKCOVERSEYES || eyesmouth_covered & GLASSESCOVERSEYES || eyesmouth_covered & HEADCOVERSEYES) - return 0 - if("mouth") + return FALSE + if(BODY_ZONE_PRECISE_MOUTH) if(eyesmouth_covered & HEADCOVERSMOUTH || eyesmouth_covered & MASKCOVERSMOUTH) - return 0 - if("chest") + return FALSE + if(BODY_ZONE_CHEST) if(covered_locations & UPPER_TORSO) - return 0 - if("groin") + return FALSE + if(BODY_ZONE_PRECISE_GROIN) if(covered_locations & LOWER_TORSO) - return 0 - if("l_arm") + return FALSE + if(BODY_ZONE_L_ARM) if(covered_locations & ARM_LEFT) - return 0 - if("r_arm") + return FALSE + if(BODY_ZONE_R_ARM) if(covered_locations & ARM_RIGHT) - return 0 - if("l_leg") + return FALSE + if(BODY_ZONE_L_LEG) if(covered_locations & LEG_LEFT) - return 0 - if("r_leg") + return FALSE + if(BODY_ZONE_R_LEG) if(covered_locations & LEG_RIGHT) - return 0 - if("l_hand") + return FALSE + if(BODY_ZONE_PRECISE_L_HAND) if(covered_locations & HAND_LEFT) - return 0 - if("r_hand") + return FALSE + if(BODY_ZONE_PRECISE_R_HAND) if(covered_locations & HAND_RIGHT) - return 0 - if("l_foot") + return FALSE + if(BODY_ZONE_PRECISE_L_FOOT) if(covered_locations & FOOT_LEFT) - return 0 - if("r_foot") + return FALSE + if(BODY_ZONE_PRECISE_R_FOOT) if(covered_locations & FOOT_RIGHT) - return 0 + return FALSE - return 1 + return TRUE /proc/check_target_facings(mob/living/initator, mob/living/target) /*This can be used to add additional effects on interactions between mobs depending on how the mobs are facing each other, such as adding a crit damage to blows to the back of a guy's head. @@ -1473,7 +1494,7 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) shift.Translate(0,radius) transform = shift - SpinAnimation(rotation_speed, -1, clockwise, rotation_segments) + SpinAnimation(rotation_speed, -1, clockwise, rotation_segments, parallel = FALSE) while(orbiting && orbiting == A && A.loc) var/targetloc = get_turf(A) @@ -1491,14 +1512,15 @@ GLOBAL_DATUM_INIT(dview_mob, /mob/dview, new) if(orbiting == A) //make sure we haven't started orbiting something else. orbiting = null - SpinAnimation(0, 0) transform = cached_transform - + SpinAnimation(0, 0, parallel = FALSE) /atom/movable/proc/stop_orbit() orbiting = null transform = cached_transform + SpinAnimation(0, 0, parallel = FALSE) + //Centers an image. //Requires: diff --git a/code/_globalvars/misc.dm b/code/_globalvars/misc.dm index 8cc5256ed9e..ee90616c29f 100644 --- a/code/_globalvars/misc.dm +++ b/code/_globalvars/misc.dm @@ -62,3 +62,4 @@ GLOBAL_VAR(genname) //Nanotrasen officer name for fax send via fax panel, random GLOBAL_VAR_INIT(pacifism_after_gt, FALSE) GLOBAL_VAR_INIT(communications_blackout, FALSE) + diff --git a/code/_onclick/hud/action_button.dm b/code/_onclick/hud/action_button.dm index 90ebdfabc94..f550e35f6dc 100644 --- a/code/_onclick/hud/action_button.dm +++ b/code/_onclick/hud/action_button.dm @@ -44,8 +44,13 @@ if(modifiers["alt"]) AltClick(usr) return TRUE - linked_action.Trigger() - linked_action.UpdateButtonIcon() //redraw button + if(modifiers["middle"]) + linked_action.Trigger(left_click = FALSE) + return TRUE + linked_action.Trigger(left_click = TRUE) + transform = transform.Scale(0.8, 0.8) + alpha = 200 + animate(src, transform = matrix(), time = 0.3 SECONDS, alpha = 255) return TRUE /obj/screen/movable/action_button/AltClick(mob/user) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d4521b6cc03..ed6868f5949 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -242,7 +242,7 @@ name = "damage zone" icon_state = "zone_sel" screen_loc = ui_zonesel - var/selecting = "chest" + var/selecting = BODY_ZONE_CHEST var/static/list/hover_overlays_cache = list() var/hovering @@ -302,54 +302,54 @@ if(1 to 3) //Feet switch(icon_x) if(10 to 15) - return "r_foot" + return BODY_ZONE_PRECISE_R_FOOT if(17 to 22) - return "l_foot" + return BODY_ZONE_PRECISE_L_FOOT if(4 to 9) //Legs switch(icon_x) if(10 to 15) - return "r_leg" + return BODY_ZONE_R_LEG if(17 to 22) - return "l_leg" + return BODY_ZONE_L_LEG if(24 to 29) - return "tail" + return BODY_ZONE_TAIL if(10 to 13) //Hands,groin and wings switch(icon_x) if(8 to 11) - return "r_hand" + return BODY_ZONE_PRECISE_R_HAND if(12 to 20) - return "groin" + return BODY_ZONE_PRECISE_GROIN if(21 to 24) - return "l_hand" + return BODY_ZONE_PRECISE_L_HAND if(3 to 7) - return "wing" + return BODY_ZONE_WING if(25 to 28) - return "wing" + return BODY_ZONE_WING if(14 to 22) //Chest and arms to shoulders and wings switch(icon_x) if (3 to 7) - return "wing" + return BODY_ZONE_WING if(8 to 11) - return "r_arm" + return BODY_ZONE_R_ARM if(12 to 20) - return "chest" + return BODY_ZONE_CHEST if(21 to 24) - return "l_arm" + return BODY_ZONE_L_ARM if(24 to 28) - return "wing" + return BODY_ZONE_WING if(23 to 30) //Head, but we need to check for eye or mouth if(icon_x in 12 to 20) switch(icon_y) if(23 to 24) if(icon_x in 15 to 17) - return "mouth" + return BODY_ZONE_PRECISE_MOUTH if(26) //Eyeline, eyes are on 15 and 17 if(icon_x in 14 to 18) - return "eyes" + return BODY_ZONE_PRECISE_EYES if(25 to 27) if(icon_x in 15 to 17) - return "eyes" - return "head" + return BODY_ZONE_PRECISE_EYES + return BODY_ZONE_HEAD /obj/screen/zone_sel/proc/set_selected_zone(choice, mob/user) if(isobserver(user)) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index f167dbf0d89..9079fb77430 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -20,16 +20,16 @@ A.attack_hand(src) + /mob/living/carbon/human/beforeAdjacentClick(atom/A, params) if(prob(dna.species.fragile_bones_chance * 3)) var/zone = "[hand ? "l" : "r"]_[pick("hand", "arm")]" var/obj/item/organ/external/active_hand = get_organ(zone) - if(!(active_hand.status & ORGAN_BROKEN)) + if(!active_hand.has_fracture()) var/used_item_name = get_active_hand() - var/message = "[used_item_name? "You try to use [used_item_name], but y": "Y"]our [active_hand] don't withstand the load!" - to_chat(src, "[message]") + to_chat(src, span_danger("[used_item_name? "You try to use [used_item_name], but y": "Y"]our [active_hand] don't withstand the load!")) active_hand.fracture() - return + /atom/proc/attack_hand(mob/user) SEND_SIGNAL(src, COMSIG_ATOM_ATTACK_HAND, user) diff --git a/code/controllers/configuration/configuration.dm b/code/controllers/configuration/configuration.dm index c09b26c808c..8acfbb73427 100644 --- a/code/controllers/configuration/configuration.dm +++ b/code/controllers/configuration/configuration.dm @@ -52,7 +52,7 @@ GLOBAL_LIST_EMPTY(overflow_whitelist) InitEntries() //Note: `$include`s are supported. Feel free to use them. - var/list/configs = list("game_options.txt", "dbconfig.txt", "config.txt") + var/list/configs = list("game_options.txt", "dbconfig.txt", "config.txt", "emojis.txt") for(var/I in configs) if(fexists("[directory]/[I]")) for(var/J in configs) diff --git a/code/controllers/configuration/entries/config.dm b/code/controllers/configuration/entries/config.dm index fdb59a2fcba..1d3c82073df 100644 --- a/code/controllers/configuration/entries/config.dm +++ b/code/controllers/configuration/entries/config.dm @@ -659,6 +659,11 @@ key_mode = KEY_MODE_TEXT value_mode = VALUE_MODE_NUM +//Needs proper testing +/datum/config_entry/keyed_list/emoji + key_mode = KEY_MODE_TEXT + value_mode = VALUE_MODE_TEXT + /datum/config_entry/number/shadowling_max_age /datum/config_entry/flag/guest_ban diff --git a/code/controllers/subsystem/acid.dm b/code/controllers/subsystem/acid.dm index 667610e8bec..7ff7b726fe3 100644 --- a/code/controllers/subsystem/acid.dm +++ b/code/controllers/subsystem/acid.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(acid) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME cpu_display = SS_CPUDISPLAY_LOW offline_implications = "Objects will no longer react to acid. No immediate action is needed." + ss_id = "acid" var/list/currentrun = list() var/list/processing = list() diff --git a/code/controllers/subsystem/afk.dm b/code/controllers/subsystem/afk.dm index 6967565d36e..9e1c8273117 100644 --- a/code/controllers/subsystem/afk.dm +++ b/code/controllers/subsystem/afk.dm @@ -8,6 +8,7 @@ SUBSYSTEM_DEF(afk) flags = SS_BACKGROUND cpu_display = SS_CPUDISPLAY_LOW offline_implications = "Players will no longer be marked as AFK. No immediate action is needed." + ss_id = "afk_watcher" var/list/afk_players = list() // Associative list. ckey as key and AFK state as value var/list/non_cryo_antags diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 96773c81145..cff12b94d90 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -16,6 +16,7 @@ SUBSYSTEM_DEF(air) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME offline_implications = "Turfs will no longer process atmos, and all atmospheric machines (including cryotubes) will no longer function. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "atmospherics" var/cost_turfs = 0 var/cost_groups = 0 var/cost_highpressure = 0 diff --git a/code/controllers/subsystem/ambience.dm b/code/controllers/subsystem/ambience.dm index dd8b896aa8d..4c56720b557 100644 --- a/code/controllers/subsystem/ambience.dm +++ b/code/controllers/subsystem/ambience.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(ambience) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME wait = 1 SECONDS cpu_display = SS_CPUDISPLAY_LOW + ss_id = "ambience" ///Assoc list of listening client - next ambience time var/list/ambience_listening_clients = list() diff --git a/code/controllers/subsystem/cleanup.dm b/code/controllers/subsystem/cleanup.dm index 0ef83af8dfc..839d788d143 100644 --- a/code/controllers/subsystem/cleanup.dm +++ b/code/controllers/subsystem/cleanup.dm @@ -19,6 +19,7 @@ SUBSYSTEM_DEF(cleanup) runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT offline_implications = "Certain global lists will no longer be cleared of nulls, which may result in runtimes. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "null_cleanup" /// A list of global lists we want the subsystem to clean. var/list/lists_to_clean diff --git a/code/controllers/subsystem/dbcore.dm b/code/controllers/subsystem/dbcore.dm index e71c8730e2a..3065cce915a 100644 --- a/code/controllers/subsystem/dbcore.dm +++ b/code/controllers/subsystem/dbcore.dm @@ -4,6 +4,7 @@ SUBSYSTEM_DEF(dbcore) wait = 1 MINUTES init_order = INIT_ORDER_DBCORE cpu_display = SS_CPUDISPLAY_LOW + ss_id = "database_core" /// Is the DB schema valid var/schema_valid = TRUE diff --git a/code/controllers/subsystem/debugview.dm b/code/controllers/subsystem/debugview.dm index 5d2a5506472..5d31b69c897 100644 --- a/code/controllers/subsystem/debugview.dm +++ b/code/controllers/subsystem/debugview.dm @@ -4,6 +4,7 @@ SUBSYSTEM_DEF(debugview) flags = SS_TICKER|SS_NO_INIT offline_implications = "Shift+F3 will no longer show a debug view. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "debug_view" /// List of clients currently processing var/list/client/processing = list() diff --git a/code/controllers/subsystem/events.dm b/code/controllers/subsystem/events.dm index d5a43c80d95..3546785a2cf 100644 --- a/code/controllers/subsystem/events.dm +++ b/code/controllers/subsystem/events.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(events) flags = SS_KEEP_TIMING offline_implications = "Random events will no longer happen. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "events" // Report events at the end of the rouund var/report_at_round_end = 0 diff --git a/code/controllers/subsystem/fires.dm b/code/controllers/subsystem/fires.dm index 3f20b68aafc..52850f84688 100644 --- a/code/controllers/subsystem/fires.dm +++ b/code/controllers/subsystem/fires.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(fires) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME cpu_display = SS_CPUDISPLAY_LOW // Trust me, this isnt atmos fires, this is paper and stuff being lit with lighters and stuff offline_implications = "Objects will no longer react to fires. No immediate action is needed." + ss_id = "fire_processing" var/list/currentrun = list() var/list/processing = list() diff --git a/code/controllers/subsystem/garbage.dm b/code/controllers/subsystem/garbage.dm index 38a2f75e835..c98cce36058 100644 --- a/code/controllers/subsystem/garbage.dm +++ b/code/controllers/subsystem/garbage.dm @@ -9,6 +9,7 @@ SUBSYSTEM_DEF(garbage) init_order = INIT_ORDER_GARBAGE // Why does this have an init order if it has SS_NO_INIT? offline_implications = "Garbage statistics collection is no longer functional, not a big deal actually. No futher actions required." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "garbage_collector" //Stat tracking var/delslasttick = 0 // number of del()'s we've done this tick diff --git a/code/controllers/subsystem/ghost_spawns.dm b/code/controllers/subsystem/ghost_spawns.dm index f6b0a83bc9e..34a511d849d 100644 --- a/code/controllers/subsystem/ghost_spawns.dm +++ b/code/controllers/subsystem/ghost_spawns.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(ghost_spawns) runlevels = RUNLEVEL_GAME offline_implications = "Ghosts will no longer be able to respawn as event mobs (Blob, etc..). Shuttle call recommended." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "ghost_spawns" /// List of polls currently ongoing, to be checked on next fire() var/list/datum/candidate_poll/currently_polling diff --git a/code/controllers/subsystem/http.dm b/code/controllers/subsystem/http.dm index 83245a64a43..8fd890423e3 100644 --- a/code/controllers/subsystem/http.dm +++ b/code/controllers/subsystem/http.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(http) // Assuming for the worst, since only discord is hooked into this for now, but that may change offline_implications = "The server is no longer capable of making async HTTP requests. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "http_requests" /// List of all async HTTP requests in the processing chain var/list/datum/http_request/active_async_requests = list() /// Variable to define if logging is enabled or not. Disabled by default since we know the requests the server is making. Enable with VV if you need to debug requests diff --git a/code/controllers/subsystem/icon_smooth.dm b/code/controllers/subsystem/icon_smooth.dm index 3228b80ec77..70accf76fc0 100644 --- a/code/controllers/subsystem/icon_smooth.dm +++ b/code/controllers/subsystem/icon_smooth.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(icon_smooth) flags = SS_TICKER offline_implications = "Objects will no longer smooth together properly. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "icon_smooth" var/list/smooth_queue = list() diff --git a/code/controllers/subsystem/idlenpcpool.dm b/code/controllers/subsystem/idlenpcpool.dm index 9ce9c206be2..cade9828161 100644 --- a/code/controllers/subsystem/idlenpcpool.dm +++ b/code/controllers/subsystem/idlenpcpool.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(idlenpcpool) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME init_order = INIT_ORDER_IDLENPCS // MUST be after SSmapping since it tracks max Zs offline_implications = "Idle simple animals will no longer process. Shuttle call recommended." + ss_id = "idle_npc_pool" var/list/currentrun = list() var/static/list/idle_mobs_by_zlevel[][] diff --git a/code/controllers/subsystem/input.dm b/code/controllers/subsystem/input.dm index f37ee295601..43b2d0b3d1e 100644 --- a/code/controllers/subsystem/input.dm +++ b/code/controllers/subsystem/input.dm @@ -11,6 +11,7 @@ SUBSYSTEM_DEF(input) runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY offline_implications = "Player input will no longer be recognised. Immediate server restart recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "input" /// List of clients whose input to process in loop. var/list/client/processing = list() diff --git a/code/controllers/subsystem/jobs.dm b/code/controllers/subsystem/jobs.dm index 4d36315ea91..bb73352b9a4 100644 --- a/code/controllers/subsystem/jobs.dm +++ b/code/controllers/subsystem/jobs.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(jobs) runlevels = RUNLEVEL_GAME offline_implications = "Время игры на профессиях больше не будет сохраняться. Немедленных действий не требуется." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "jobs" //List of all jobs var/list/occupations = list() @@ -220,10 +221,9 @@ SUBSYSTEM_DEF(jobs) if(player?.mind) player.mind.assigned_role = null player.mind.special_role = null - SetupOccupations() - unassigned = list() - return - + player.mind.offstation_role = FALSE + for(var/datum/job/job in occupations) + job.current_positions = initial(job.current_positions) ///This proc is called before the level loop of DivideOccupations() and will try to select a head, ignoring ALL non-head preferences for every level until it locates a head or runs out of levels to check /datum/controller/subsystem/jobs/proc/FillHeadPosition() @@ -295,6 +295,7 @@ SUBSYSTEM_DEF(jobs) for(var/datum/job/ai/A in occupations) A.spawn_positions = 3 + unassigned = list() //Get the players who are ready for(var/mob/new_player/player in GLOB.player_list) if(player.ready && player.mind && !player.mind.assigned_role) diff --git a/code/controllers/subsystem/lighting.dm b/code/controllers/subsystem/lighting.dm index 3e659ba5f8d..55bfcb648ab 100644 --- a/code/controllers/subsystem/lighting.dm +++ b/code/controllers/subsystem/lighting.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(lighting) flags = SS_TICKER offline_implications = "Lighting will no longer update. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "lighting" var/static/list/sources_queue = list() // List of lighting sources queued for update. var/static/list/corners_queue = list() // List of lighting corners queued for update. var/static/list/objects_queue = list() // List of lighting objects queued for update. diff --git a/code/controllers/subsystem/machinery.dm b/code/controllers/subsystem/machinery.dm index e981075b83f..0f9fdd56342 100644 --- a/code/controllers/subsystem/machinery.dm +++ b/code/controllers/subsystem/machinery.dm @@ -8,6 +8,7 @@ SUBSYSTEM_DEF(machines) flags = SS_KEEP_TIMING offline_implications = "Machinery will no longer process. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "machines" var/list/processing = list() var/list/currentrun = list() diff --git a/code/controllers/subsystem/mobs.dm b/code/controllers/subsystem/mobs.dm index 5b3bb4ae905..2e4257a5dda 100644 --- a/code/controllers/subsystem/mobs.dm +++ b/code/controllers/subsystem/mobs.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(mobs) init_order = INIT_ORDER_MOBS offline_implications = "Mobs will no longer process. Immediate server restart recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "mobs" var/list/currentrun = list() var/static/list/clients_by_zlevel[][] diff --git a/code/controllers/subsystem/nano_mob_hunter.dm b/code/controllers/subsystem/nano_mob_hunter.dm index 64f5d1c30ed..52b3c63bf73 100644 --- a/code/controllers/subsystem/nano_mob_hunter.dm +++ b/code/controllers/subsystem/nano_mob_hunter.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(mob_hunt) flags = SS_NO_INIT offline_implications = "Nano-Mob Hunter will no longer spawn mobs. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "mob_hunt" var/max_normal_spawns = 15 //change this to adjust the number of normal spawns that can exist at one time. trapped spawns (from traitors) don't count towards this var/list/normal_spawns = list() var/max_trap_spawns = 15 //change this to adjust the number of trap spawns that can exist at one time. traps spawned beyond this point clear the oldest traps diff --git a/code/controllers/subsystem/nightshift.dm b/code/controllers/subsystem/nightshift.dm index 8420d257f68..f4d942cd36f 100644 --- a/code/controllers/subsystem/nightshift.dm +++ b/code/controllers/subsystem/nightshift.dm @@ -6,7 +6,7 @@ SUBSYSTEM_DEF(nightshift) flags = SS_NO_TICK_CHECK offline_implications = "The game will no longer shift between day and night lighting. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW - + ss_id = "night_shift" var/nightshift_active = FALSE var/nightshift_start_time = 702000 //7:30 PM, station time var/nightshift_end_time = 270000 //7:30 AM, station time diff --git a/code/controllers/subsystem/non-firing/alarm.dm b/code/controllers/subsystem/non-firing/alarm.dm index 3d91d763be3..098c004c270 100644 --- a/code/controllers/subsystem/non-firing/alarm.dm +++ b/code/controllers/subsystem/non-firing/alarm.dm @@ -1,6 +1,7 @@ SUBSYSTEM_DEF(alarm) name = "Alarm" flags = SS_NO_INIT | SS_NO_FIRE + ss_id = "alarm" var/list/alarms = list("Motion" = list(), "Fire" = list(), "Atmosphere" = list(), "Power" = list(), "Camera" = list(), "Burglar" = list()) /datum/controller/subsystem/alarm/proc/triggerAlarm(class, area/A, list/O, obj/alarmsource) diff --git a/code/controllers/subsystem/non-firing/assets.dm b/code/controllers/subsystem/non-firing/assets.dm index 42608557473..9a39118efef 100644 --- a/code/controllers/subsystem/non-firing/assets.dm +++ b/code/controllers/subsystem/non-firing/assets.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(assets) name = "Assets" init_order = INIT_ORDER_ASSETS flags = SS_NO_FIRE + ss_id = "assets" var/list/cache = list() var/list/preload = list() diff --git a/code/controllers/subsystem/non-firing/atoms.dm b/code/controllers/subsystem/non-firing/atoms.dm index eab354e37c4..9115a2d2a93 100644 --- a/code/controllers/subsystem/non-firing/atoms.dm +++ b/code/controllers/subsystem/non-firing/atoms.dm @@ -7,6 +7,7 @@ SUBSYSTEM_DEF(atoms) name = "Atoms" init_order = INIT_ORDER_ATOMS flags = SS_NO_FIRE + ss_id = "atoms" var/old_initialized diff --git a/code/controllers/subsystem/non-firing/blackbox.dm b/code/controllers/subsystem/non-firing/blackbox.dm index bfa3c78a43c..e713085c498 100644 --- a/code/controllers/subsystem/non-firing/blackbox.dm +++ b/code/controllers/subsystem/non-firing/blackbox.dm @@ -8,6 +8,7 @@ SUBSYSTEM_DEF(blackbox) // The database SS has INIT_ORDER_DBCORE=16, and this SS has INIT_ORDER_BLACKBOX=15 // So putting this ensures it shuts down in the right order init_order = INIT_ORDER_BLACKBOX + ss_id = "blackbox" /// List of all recorded feedback var/list/datum/feedback_variable/feedback = list() diff --git a/code/controllers/subsystem/non-firing/discord.dm b/code/controllers/subsystem/non-firing/discord.dm index 7c09b224577..dcf7ecc9846 100644 --- a/code/controllers/subsystem/non-firing/discord.dm +++ b/code/controllers/subsystem/non-firing/discord.dm @@ -1,6 +1,7 @@ SUBSYSTEM_DEF(discord) name = "Discord" flags = SS_NO_FIRE + ss_id = "discord" /// Is the SS enabled var/enabled = FALSE /// Last time the administrator ping was dropped. This ensures administrators cannot be mass pinged if a large chunk of ahelps go off at once (IE: tesloose) diff --git a/code/controllers/subsystem/non-firing/holiday.dm b/code/controllers/subsystem/non-firing/holiday.dm index 2ae219fa50c..85f6c4e10e4 100644 --- a/code/controllers/subsystem/non-firing/holiday.dm +++ b/code/controllers/subsystem/non-firing/holiday.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(holiday) name = "Holiday" init_order = INIT_ORDER_HOLIDAY // 4 flags = SS_NO_FIRE + ss_id = "holiday" var/list/holidays /datum/controller/subsystem/holiday/Initialize() diff --git a/code/controllers/subsystem/non-firing/ipintel.dm b/code/controllers/subsystem/non-firing/ipintel.dm index 00c997b2ef0..f94459950f7 100644 --- a/code/controllers/subsystem/non-firing/ipintel.dm +++ b/code/controllers/subsystem/non-firing/ipintel.dm @@ -3,6 +3,7 @@ SUBSYSTEM_DEF(ipintel) wait = 1 flags = SS_NO_FIRE init_order = INIT_ORDER_XKEYSCORE // 10 + ss_id = "ipintel" var/enabled = 0 //disable at round start to avoid checking reconnects var/throttle = 0 var/errors = 0 diff --git a/code/controllers/subsystem/non-firing/mapping.dm b/code/controllers/subsystem/non-firing/mapping.dm index 72d4ed44318..5a7d9e49cdc 100644 --- a/code/controllers/subsystem/non-firing/mapping.dm +++ b/code/controllers/subsystem/non-firing/mapping.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(mapping) name = "Mapping" init_order = INIT_ORDER_MAPPING // 7 flags = SS_NO_FIRE + ss_id = "mapping" /// What map datum are we using var/datum/map/map_datum /// What map will be used next round diff --git a/code/controllers/subsystem/non-firing/medals.dm b/code/controllers/subsystem/non-firing/medals.dm index d9061ab13bb..a719f0d1d87 100644 --- a/code/controllers/subsystem/non-firing/medals.dm +++ b/code/controllers/subsystem/non-firing/medals.dm @@ -1,6 +1,7 @@ SUBSYSTEM_DEF(medals) name = "Medals" flags = SS_NO_FIRE + ss_id = "medals" var/hub_enabled = FALSE diff --git a/code/controllers/subsystem/non-firing/pathfinder.dm b/code/controllers/subsystem/non-firing/pathfinder.dm index 2ce0630fecb..1393ddf3dfa 100644 --- a/code/controllers/subsystem/non-firing/pathfinder.dm +++ b/code/controllers/subsystem/non-firing/pathfinder.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(pathfinder) name = "Pathfinder" init_order = INIT_ORDER_PATH flags = SS_NO_FIRE + ss_id = "pathfinder" var/datum/flowcache/mobs var/static/space_type_cache diff --git a/code/controllers/subsystem/non-firing/persistent_data.dm b/code/controllers/subsystem/non-firing/persistent_data.dm index 3035337340a..a8c662744ae 100644 --- a/code/controllers/subsystem/non-firing/persistent_data.dm +++ b/code/controllers/subsystem/non-firing/persistent_data.dm @@ -11,6 +11,7 @@ SUBSYSTEM_DEF(persistent_data) name = "Persistent Data" init_order = INIT_ORDER_PERSISTENCE // -95 | Loads after EVERYTHING else flags = SS_NO_FIRE + ss_id = "persistent_data" /// List of atoms registered into the subsystem for persistent data storage. Can be anything at all var/list/registered_atoms = list() diff --git a/code/controllers/subsystem/non-firing/ping.dm b/code/controllers/subsystem/non-firing/ping.dm index a5435d094ef..f0f36daefa3 100644 --- a/code/controllers/subsystem/non-firing/ping.dm +++ b/code/controllers/subsystem/non-firing/ping.dm @@ -11,6 +11,7 @@ SUBSYSTEM_DEF(ping) flags = SS_NO_INIT | SS_NO_FIRE runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME | RUNLEVEL_POSTGAME cpu_display = SS_CPUDISPLAY_LOW + ss_id = "ping" var/list/currentrun = list() diff --git a/code/controllers/subsystem/non-firing/radio.dm b/code/controllers/subsystem/non-firing/radio.dm index ca964a2d982..d23dfe4b524 100644 --- a/code/controllers/subsystem/non-firing/radio.dm +++ b/code/controllers/subsystem/non-firing/radio.dm @@ -1,6 +1,7 @@ SUBSYSTEM_DEF(radio) name = "Radio" flags = SS_NO_INIT | SS_NO_FIRE + ss_id = "radio" var/list/radiochannels = list( "Common" = PUB_FREQ, diff --git a/code/controllers/subsystem/non-firing/sounds.dm b/code/controllers/subsystem/non-firing/sounds.dm index c4a0c645af0..66c24d2730c 100644 --- a/code/controllers/subsystem/non-firing/sounds.dm +++ b/code/controllers/subsystem/non-firing/sounds.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(sounds) init_order = INIT_ORDER_SOUNDS flags = SS_NO_FIRE offline_implications = "Sounds may not play correctly. Shuttle call recommended." + ss_id = "sounds" var/using_channels_max = CHANNEL_HIGHEST_AVAILABLE // BYOND max channels /// Amount of channels to reserve for random usage rather than reservations being allowed to reserve all channels. Also a nice safeguard for when someone screws up. diff --git a/code/controllers/subsystem/non-firing/titlescreen.dm b/code/controllers/subsystem/non-firing/titlescreen.dm index d6956eac656..aae8b40053a 100644 --- a/code/controllers/subsystem/non-firing/titlescreen.dm +++ b/code/controllers/subsystem/non-firing/titlescreen.dm @@ -2,6 +2,7 @@ SUBSYSTEM_DEF(title) name = "Title Screen" flags = SS_NO_FIRE init_order = INIT_ORDER_TITLE + ss_id = "title_screen" /datum/controller/subsystem/title/Initialize() diff --git a/code/controllers/subsystem/npcpool.dm b/code/controllers/subsystem/npcpool.dm index ca9c3befbee..83b7fd773e8 100644 --- a/code/controllers/subsystem/npcpool.dm +++ b/code/controllers/subsystem/npcpool.dm @@ -4,7 +4,7 @@ SUBSYSTEM_DEF(npcpool) priority = FIRE_PRIORITY_NPC runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME offline_implications = "Simple animals will no longer process. Shuttle call recommended." - + ss_id = "npc_pool" var/list/currentrun = list() /datum/controller/subsystem/npcpool/get_stat_details() diff --git a/code/controllers/subsystem/overlays.dm b/code/controllers/subsystem/overlays.dm index 67433db8a8e..558cd7dcb9b 100644 --- a/code/controllers/subsystem/overlays.dm +++ b/code/controllers/subsystem/overlays.dm @@ -5,7 +5,7 @@ SUBSYSTEM_DEF(overlays) priority = FIRE_PRIORITY_OVERLAYS init_order = INIT_ORDER_OVERLAY offline_implications = "Overlays may look strange. No immediate action is needed." - + ss_id = "overlays" var/list/queue var/list/stats var/list/overlay_icon_state_caches diff --git a/code/controllers/subsystem/parallax.dm b/code/controllers/subsystem/parallax.dm index c0beb503d66..78c188f758d 100644 --- a/code/controllers/subsystem/parallax.dm +++ b/code/controllers/subsystem/parallax.dm @@ -6,6 +6,7 @@ SUBSYSTEM_DEF(parallax) runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT offline_implications = "Space parallax will no longer move around. No immediate action is needed." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "parallax" var/list/currentrun var/planet_x_offset = 128 var/planet_y_offset = 128 diff --git a/code/controllers/subsystem/processing/aura_healing.dm b/code/controllers/subsystem/processing/aura_healing.dm index ad3fa6f4278..0df8924938b 100644 --- a/code/controllers/subsystem/processing/aura_healing.dm +++ b/code/controllers/subsystem/processing/aura_healing.dm @@ -3,3 +3,4 @@ PROCESSING_SUBSYSTEM_DEF(aura_healing) name = "Aura Healing" flags = SS_NO_INIT | SS_BACKGROUND | SS_KEEP_TIMING wait = 0.3 SECONDS + ss_id = "aura_healing" diff --git a/code/controllers/subsystem/processing/dcs.dm b/code/controllers/subsystem/processing/dcs.dm index a223f4676f6..1d0c12f1ece 100644 --- a/code/controllers/subsystem/processing/dcs.dm +++ b/code/controllers/subsystem/processing/dcs.dm @@ -1,6 +1,7 @@ PROCESSING_SUBSYSTEM_DEF(dcs) name = "Datum Component System" flags = SS_NO_INIT + ss_id = "datum_component_system" var/list/elements_by_type = list() // Update this if you add in components which actually use this as a processor diff --git a/code/controllers/subsystem/processing/fastprocess.dm b/code/controllers/subsystem/processing/fastprocess.dm index 37761ca8d60..cf0ed7e43ed 100644 --- a/code/controllers/subsystem/processing/fastprocess.dm +++ b/code/controllers/subsystem/processing/fastprocess.dm @@ -5,3 +5,4 @@ PROCESSING_SUBSYSTEM_DEF(fastprocess) wait = 2 stat_tag = "FP" offline_implications = "Objects using the 'Fast Processing' processor will no longer process. Shuttle call recommended." + ss_id = "fast_processing" diff --git a/code/controllers/subsystem/processing/instruments.dm b/code/controllers/subsystem/processing/instruments.dm index 5aa6757a428..1415f52e307 100644 --- a/code/controllers/subsystem/processing/instruments.dm +++ b/code/controllers/subsystem/processing/instruments.dm @@ -4,6 +4,7 @@ PROCESSING_SUBSYSTEM_DEF(instruments) wait = 1 flags = SS_TICKER|SS_BACKGROUND|SS_KEEP_TIMING offline_implications = "Instruments will no longer play. No immediate action is needed." + ss_id = "instruments" /// List of all instrument data, associative id = datum var/list/datum/instrument/instrument_data diff --git a/code/controllers/subsystem/processing/obj.dm b/code/controllers/subsystem/processing/obj.dm index 2a05c04af58..c437b1aa60b 100644 --- a/code/controllers/subsystem/processing/obj.dm +++ b/code/controllers/subsystem/processing/obj.dm @@ -4,3 +4,4 @@ PROCESSING_SUBSYSTEM_DEF(obj) flags = SS_NO_INIT wait = 20 offline_implications = "Objects using the 'Objects' processor will no longer process. Shuttle call recommended." + ss_id = "objects" diff --git a/code/controllers/subsystem/processing/processing.dm b/code/controllers/subsystem/processing/processing.dm index ccf771575d9..6b2d6cb8112 100644 --- a/code/controllers/subsystem/processing/processing.dm +++ b/code/controllers/subsystem/processing/processing.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(processing) priority = FIRE_PRIORITY_PROCESS flags = SS_BACKGROUND|SS_POST_FIRE_TIMING|SS_NO_INIT wait = 10 + ss_id = "processing" var/stat_tag = "P" //Used for logging var/list/processing = list() diff --git a/code/controllers/subsystem/processing/projectiles.dm b/code/controllers/subsystem/processing/projectiles.dm index 679c61083c7..bad9a7dfb7c 100644 --- a/code/controllers/subsystem/processing/projectiles.dm +++ b/code/controllers/subsystem/processing/projectiles.dm @@ -4,6 +4,7 @@ PROCESSING_SUBSYSTEM_DEF(projectiles) flags = SS_NO_INIT|SS_TICKER offline_implications = "Projectiles will no longer move. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "projectiles" /// Maximum moves a projectile can make per tick. var/global_max_tick_moves = 10 diff --git a/code/controllers/subsystem/runechat.dm b/code/controllers/subsystem/runechat.dm index bb0e6fc1721..34363a9f1e9 100644 --- a/code/controllers/subsystem/runechat.dm +++ b/code/controllers/subsystem/runechat.dm @@ -3,7 +3,7 @@ TIMER_SUBSYSTEM_DEF(runechat) priority = FIRE_PRIORITY_RUNECHAT offline_implications = "Runechat messages will no longer clear. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_HIGH - + ss_id = "runechat" var/list/datum/callback/message_queue = list() diff --git a/code/controllers/subsystem/shuttles.dm b/code/controllers/subsystem/shuttles.dm index 89de3c793c2..7825894a118 100644 --- a/code/controllers/subsystem/shuttles.dm +++ b/code/controllers/subsystem/shuttles.dm @@ -8,6 +8,7 @@ SUBSYSTEM_DEF(shuttle) runlevels = RUNLEVEL_SETUP | RUNLEVEL_GAME offline_implications = "Shuttles will no longer function and cargo will not generate points. Immediate server restart recommended." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "shuttle" var/list/mobile = list() var/list/stationary = list() var/list/transit = list() diff --git a/code/controllers/subsystem/spacedrift.dm b/code/controllers/subsystem/spacedrift.dm index c3e3f5c5b47..af8d9c4e464 100644 --- a/code/controllers/subsystem/spacedrift.dm +++ b/code/controllers/subsystem/spacedrift.dm @@ -6,7 +6,7 @@ SUBSYSTEM_DEF(spacedrift) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME offline_implications = "Mobs will no longer respect a lack of gravity. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW - + ss_id = "space_drift" var/list/currentrun = list() var/list/processing = list() diff --git a/code/controllers/subsystem/speech_controller.dm b/code/controllers/subsystem/speech_controller.dm index 48d05ce44b1..e1489e9c0bd 100644 --- a/code/controllers/subsystem/speech_controller.dm +++ b/code/controllers/subsystem/speech_controller.dm @@ -5,7 +5,7 @@ SUBSYSTEM_DEF(speech_controller) priority = FIRE_PRIORITY_SPEECH_CONTROLLER//has to be high priority, second in priority ONLY to SSinput init_order = INIT_ORDER_SPEECH_CONTROLLER runlevels = RUNLEVELS_DEFAULT | RUNLEVEL_LOBBY - + ss_id = "speech_controller" ///used so that an admin can force all speech verbs to execute immediately instead of queueing var/FOR_ADMINS_IF_BROKE_immediately_execute_all_speech = FALSE diff --git a/code/controllers/subsystem/statistics.dm b/code/controllers/subsystem/statistics.dm index 5facdc325b9..c526501d5f1 100644 --- a/code/controllers/subsystem/statistics.dm +++ b/code/controllers/subsystem/statistics.dm @@ -3,7 +3,7 @@ SUBSYSTEM_DEF(statistics) wait = 6000 // 10 minute delay between fires runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME // Only count time actually ingame to avoid logging pre-round dips offline_implications = "Player count and admin count statistics will no longer be logged to the database. No immediate action is needed." - + ss_id = "statistics" /datum/controller/subsystem/statistics/Initialize() if(!CONFIG_GET(flag/sql_enabled)) diff --git a/code/controllers/subsystem/sun.dm b/code/controllers/subsystem/sun.dm index f0ec1516016..d8054968b73 100644 --- a/code/controllers/subsystem/sun.dm +++ b/code/controllers/subsystem/sun.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(sun) init_order = INIT_ORDER_SUN offline_implications = "Solar panels will no longer rotate. No immediate action is needed." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "sun" var/angle var/dx var/dy diff --git a/code/controllers/subsystem/text_to_speech.dm b/code/controllers/subsystem/text_to_speech.dm index 664881311f7..b9dccd3320a 100644 --- a/code/controllers/subsystem/text_to_speech.dm +++ b/code/controllers/subsystem/text_to_speech.dm @@ -8,6 +8,7 @@ SUBSYSTEM_DEF(tts) wait = 1 SECONDS runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "text_to_speech" var/tts_wanted = 0 var/tts_request_failed = 0 diff --git a/code/controllers/subsystem/tgui.dm b/code/controllers/subsystem/tgui.dm index 5be0dbe3ce6..155617d0a5a 100644 --- a/code/controllers/subsystem/tgui.dm +++ b/code/controllers/subsystem/tgui.dm @@ -10,6 +10,7 @@ SUBSYSTEM_DEF(tgui) priority = FIRE_PRIORITY_TGUI runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT offline_implications = "All TGUIs will no longer process. Shuttle call recommended." + ss_id = "tgui" var/list/currentrun = list() var/list/open_uis = list() // A list of open UIs, grouped by src_object and ui_key. diff --git a/code/controllers/subsystem/throwing.dm b/code/controllers/subsystem/throwing.dm index 758fcaabda1..1ae1f090d4d 100644 --- a/code/controllers/subsystem/throwing.dm +++ b/code/controllers/subsystem/throwing.dm @@ -9,6 +9,7 @@ SUBSYSTEM_DEF(throwing) runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME offline_implications = "Thrown objects may not react properly. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "throwing" var/list/currentrun var/list/processing = list() diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index def4f1d08b4..f2cb8443bb7 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -7,6 +7,7 @@ SUBSYSTEM_DEF(ticker) runlevels = RUNLEVEL_LOBBY | RUNLEVEL_SETUP | RUNLEVEL_GAME offline_implications = "The game is no longer aware of when the round ends. Immediate server restart recommended." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "ticker" /// Time the world started, relative to world.time var/round_start_time = 0 @@ -201,7 +202,6 @@ SUBSYSTEM_DEF(ticker) var/datum/game_mode/M = config.pick_mode(GLOB.secret_force_mode) if(M.can_start()) mode = config.pick_mode(GLOB.secret_force_mode) - SSjobs.ResetOccupations() if(!mode) mode = pickweight(runnable_modes) if(mode) @@ -215,7 +215,6 @@ SUBSYSTEM_DEF(ticker) mode = null current_state = GAME_STATE_PREGAME force_start = FALSE - SSjobs.ResetOccupations() Master.SetRunLevel(RUNLEVEL_LOBBY) world.check_for_lowpop() @@ -248,8 +247,6 @@ SUBSYSTEM_DEF(ticker) P.ready = FALSE - //Configure mode and assign player to special mode stuff - mode.pre_pre_setup() var/can_continue = FALSE can_continue = mode.pre_setup() //Setup special modes SSjobs.DivideOccupations() //Distribute jobs diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index 3dd87e5c616..58935eb35e6 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -20,7 +20,7 @@ SUBSYSTEM_DEF(tickets) priority = FIRE_PRIORITY_TICKETS offline_implications = "Admin tickets will no longer be marked as stale. No immediate action is needed." flags = SS_BACKGROUND - + ss_id = "admin_tickets" var/span_class = "adminticket" var/ticket_system_name = "Admin Tickets" var/ticket_name = "Admin Ticket" diff --git a/code/controllers/subsystem/time_track.dm b/code/controllers/subsystem/time_track.dm index b4f312bfe29..08930eb5a8c 100644 --- a/code/controllers/subsystem/time_track.dm +++ b/code/controllers/subsystem/time_track.dm @@ -3,6 +3,7 @@ SUBSYSTEM_DEF(time_track) wait = 10 SECONDS runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT flags = SS_NO_INIT + ss_id = "time_track" var/time_dilation_current = 0 var/time_dilation_avg_fast = 0 diff --git a/code/controllers/subsystem/timer.dm b/code/controllers/subsystem/timer.dm index 524f45e5387..96db6c84c6d 100644 --- a/code/controllers/subsystem/timer.dm +++ b/code/controllers/subsystem/timer.dm @@ -24,6 +24,7 @@ SUBSYSTEM_DEF(timer) flags = SS_TICKER|SS_NO_INIT offline_implications = "The game will no longer process timers. Immediate server restart recommended." cpu_display = SS_CPUDISPLAY_HIGH + ss_id = "timer" /// Queue used for storing timers that do not fit into the current buckets var/list/datum/timedevent/second_queue = list() diff --git a/code/controllers/subsystem/verb_manager.dm b/code/controllers/subsystem/verb_manager.dm index a3400ea4a6f..a7e5a37adb5 100644 --- a/code/controllers/subsystem/verb_manager.dm +++ b/code/controllers/subsystem/verb_manager.dm @@ -25,6 +25,7 @@ SUBSYSTEM_DEF(verb_manager) flags = SS_TICKER | SS_NO_INIT priority = FIRE_PRIORITY_DELAYED_VERBS runlevels = RUNLEVEL_INIT | RUNLEVELS_DEFAULT + ss_id = "verb_manager" ///list of callbacks to procs called from verbs or verblike procs that were executed when the server was overloaded and had to delay to the next tick. ///this list is ran through every tick, and the subsystem does not yield until this queue is finished. diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index 2c2160a621a..0a437d8b318 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -5,6 +5,7 @@ SUBSYSTEM_DEF(vote) runlevels = RUNLEVEL_LOBBY | RUNLEVELS_DEFAULT offline_implications = "Votes (Endround shuttle) will no longer function. Shuttle call recommended." cpu_display = SS_CPUDISPLAY_LOW + ss_id = "vote" /// Active vote, if any var/datum/vote/active_vote diff --git a/code/controllers/subsystem/weather.dm b/code/controllers/subsystem/weather.dm index 00256564fb0..d9a37cc3f2d 100644 --- a/code/controllers/subsystem/weather.dm +++ b/code/controllers/subsystem/weather.dm @@ -10,6 +10,7 @@ SUBSYSTEM_DEF(weather) wait = 10 runlevels = RUNLEVEL_GAME offline_implications = "Ash storms will no longer trigger. No immediate action is needed." + ss_id = "weather" var/list/processing = list() var/list/eligible_zlevels = list() var/list/next_hit_by_zlevel = list() //Used by barometers to know when the next storm is coming diff --git a/code/datums/action.dm b/code/datums/action.dm index 51d2c91af12..d41509e51c6 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -63,7 +63,7 @@ return TRUE -/datum/action/proc/Trigger() +/datum/action/proc/Trigger(left_click = TRUE) if(!IsAvailable()) return FALSE return TRUE @@ -172,6 +172,8 @@ //Presets for item actions /datum/action/item_action check_flags = AB_CHECK_RESTRAINED|AB_CHECK_STUNNED|AB_CHECK_LYING|AB_CHECK_CONSCIOUS + /// Whether action trigger should call attack self proc. + var/attack_self = TRUE var/use_itemicon = TRUE var/action_initialisation_text = null //Space ninja abilities only @@ -189,12 +191,12 @@ I.actions -= src return ..() -/datum/action/item_action/Trigger(attack_self = TRUE) //Maybe we don't want to click the thing itself +/datum/action/item_action/Trigger(left_click = TRUE) if(!..()) return FALSE if(target && attack_self) var/obj/item/I = target - I.ui_action_click(owner, type) + I.ui_action_click(owner, type, left_click) return TRUE /datum/action/item_action/ApplyIcon(obj/screen/movable/action_button/current_button) @@ -290,7 +292,7 @@ /datum/action/item_action/toggle_welding_screen/plasmaman name = "Toggle Welding Screen" -/datum/action/item_action/toggle_welding_screen/plasmaman/Trigger() +/datum/action/item_action/toggle_welding_screen/plasmaman/Trigger(left_click = TRUE) var/obj/item/clothing/head/helmet/space/plasmaman/H = target if(istype(H)) H.toggle_welding_screen(owner) @@ -306,7 +308,7 @@ desc = "Toggles if the club's blasts cause friendly fire." button_icon_state = "vortex_ff_on" -/datum/action/item_action/toggle_unfriendly_fire/Trigger() +/datum/action/item_action/toggle_unfriendly_fire/Trigger(left_click = TRUE) if(..()) UpdateButtonIcon() @@ -432,8 +434,9 @@ /datum/action/item_action/remove_tape name = "Remove Duct Tape" + attack_self = FALSE -/datum/action/item_action/remove_tape/Trigger(attack_self = FALSE) +/datum/action/item_action/remove_tape/Trigger(left_click = TRUE) if(..()) var/datum/component/ducttape/DT = target.GetComponent(/datum/component/ducttape) DT.remove_tape(target, usr) @@ -482,17 +485,14 @@ /datum/action/item_action/hands_free/activate name = "Activate" -/datum/action/item_action/bomb_imp - check_flags = null - -/datum/action/item_action/bomb_imp/activate - name = "Activate Bomb Implant" +/datum/action/item_action/hands_free/activate/always + check_flags = NONE /datum/action/item_action/toggle_research_scanner name = "Toggle Research Scanner" button_icon_state = "scan_mode" -/datum/action/item_action/toggle_research_scanner/Trigger() +/datum/action/item_action/toggle_research_scanner/Trigger(left_click = TRUE) if(IsAvailable()) owner.research_scanner = !owner.research_scanner to_chat(owner, "Research analyzer is now [owner.research_scanner ? "active" : "deactivated"].") @@ -514,7 +514,7 @@ name = "Use Instrument" desc = "Use the instrument specified" -/datum/action/item_action/instrument/Trigger() +/datum/action/item_action/instrument/Trigger(left_click = TRUE) if(istype(target, /obj/item/instrument)) var/obj/item/instrument/I = target I.interact(usr) @@ -541,8 +541,9 @@ /datum/action/item_action/gravity_jump name = "Gravity jump" desc = "Directs a pulse of gravity in front of the user, pulling them forward rapidly." + attack_self = FALSE -/datum/action/item_action/gravity_jump/Trigger(attack_self = FALSE) +/datum/action/item_action/gravity_jump/Trigger(left_click = TRUE) . = ..() if(!.) return FALSE @@ -578,7 +579,7 @@ /datum/action/item_action/voice_changer/voice name = "Set Voice" -/datum/action/item_action/voice_changer/voice/Trigger() +/datum/action/item_action/voice_changer/voice/Trigger(left_click = TRUE) if(!IsAvailable()) return FALSE @@ -638,7 +639,7 @@ S.action = null return ..() -/datum/action/spell_action/Trigger() +/datum/action/spell_action/Trigger(left_click = TRUE) if(!IsAvailable(TRUE)) return FALSE @@ -721,7 +722,7 @@ check_flags = 0 var/active = FALSE -/datum/action/innate/Trigger() +/datum/action/innate/Trigger(left_click = TRUE) if(!..()) return FALSE if(!active) @@ -740,7 +741,7 @@ name = "Toggle Research Scanner" button_icon_state = "scan_mode" -/datum/action/innate/research_scanner/Trigger() +/datum/action/innate/research_scanner/Trigger(left_click = TRUE) if(IsAvailable()) owner.research_scanner = !owner.research_scanner to_chat(owner, "Research analyzer is now [owner.research_scanner ? "active" : "deactivated"].") @@ -763,7 +764,7 @@ check_flags = 0 var/procname -/datum/action/generic/Trigger() +/datum/action/generic/Trigger(left_click = TRUE) if(!..()) return FALSE if(target && procname) diff --git a/code/datums/components/aura_healing.dm b/code/datums/components/aura_healing.dm index 3bc46390dff..b57609c523f 100644 --- a/code/datums/components/aura_healing.dm +++ b/code/datums/components/aura_healing.dm @@ -187,7 +187,7 @@ for(var/index in external_organ_fracture_healing) body_part = human.bodyparts_by_name[index] - if(QDELETED(body_part) || !(body_part.status & ORGAN_BROKEN) || (body_part.is_robotic() && !robot_heal)) + if(QDELETED(body_part) || !body_part.has_fracture() || (body_part.is_robotic() && !robot_heal)) continue if(prob(mend_fractures_chance)) @@ -196,8 +196,8 @@ break else - for(var/obj/item/organ/external/body_part in human.bodyparts) - if(QDELETED(body_part) || !(body_part.status & ORGAN_BROKEN) || (body_part.is_robotic() && !robot_heal)) + for(var/obj/item/organ/external/body_part as anything in human.bodyparts) + if(QDELETED(body_part) || !body_part.has_fracture() || (body_part.is_robotic() && !robot_heal)) continue if(prob(mend_fractures_chance)) @@ -211,22 +211,22 @@ for(var/index in external_organ_bleeding_healing) body_part = human.bodyparts_by_name[index] - if(QDELETED(body_part) || !body_part.internal_bleeding) + if(QDELETED(body_part) || !body_part.has_internal_bleeding()) continue if(prob(stop_internal_bleeding_chance)) external_organ_heal_done = TRUE - body_part.internal_bleeding = FALSE + body_part.stop_internal_bleeding() break else - for(var/obj/item/organ/external/body_part in human.bodyparts) - if(QDELETED(body_part) || !body_part.internal_bleeding) + for(var/obj/item/organ/external/body_part as anything in human.bodyparts) + if(QDELETED(body_part) || !body_part.has_internal_bleeding()) continue if(prob(stop_internal_bleeding_chance)) external_organ_heal_done = TRUE - body_part.internal_bleeding = FALSE + body_part.stop_internal_bleeding() break if(should_show_effect && (external_organ_heal_done || old_health < candidate.maxHealth)) diff --git a/code/datums/datacore.dm b/code/datums/datacore.dm index d1738db3cc4..e62d5d35c30 100644 --- a/code/datums/datacore.dm +++ b/code/datums/datacore.dm @@ -222,7 +222,7 @@ GLOBAL_VAR_INIT(record_id_num, 1001) /proc/get_id_photo(mob/living/carbon/human/H, var/custom_job = null) var/icon/preview_icon = null - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) var/obj/item/organ/internal/eyes/eyes_organ = H.get_int_organ(/obj/item/organ/internal/eyes) var/g = "m" @@ -255,12 +255,12 @@ GLOBAL_VAR_INIT(record_id_num, 1001) temp.Blend(H.skin_colour, ICON_ADD) preview_icon.Blend(temp, ICON_OVERLAY) - for(var/obj/item/organ/external/E in H.bodyparts) - if(istype(E,/obj/item/organ/external/tail)) + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + if(istype(bodypart, /obj/item/organ/external/tail)) continue - if(istype(E, /obj/item/organ/external/wing)) + if(istype(bodypart, /obj/item/organ/external/wing)) continue - preview_icon.Blend(E.get_icon(), ICON_OVERLAY) + preview_icon.Blend(bodypart.get_icon(), ICON_OVERLAY) /* At this point all bodyparts already colored! // Skin tone diff --git a/code/datums/diseases/_MobProcs.dm b/code/datums/diseases/_MobProcs.dm index 5ba9244f2e8..f6fcca700c2 100644 --- a/code/datums/diseases/_MobProcs.dm +++ b/code/datums/diseases/_MobProcs.dm @@ -78,27 +78,27 @@ var/zone_text if(!zone) - zone_text = pick(40; "head", 40; "chest", 10; "l_arm", 10; "l_leg") + zone_text = pick(40; BODY_ZONE_HEAD, 40; BODY_ZONE_CHEST, 10; BODY_ZONE_L_ARM, 10; BODY_ZONE_L_LEG) else if(istype(zone, /obj/item/organ/external)) var/obj/item/organ/external/E = zone - zone_text = E.limb_name + zone_text = E.limb_zone else zone_text = zone switch(zone_text) - if("head", "eyes", "mouth") + if(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH) if(ClothingVirusProtection(head) || ClothingVirusProtection(wear_mask)) return TRUE - if("chest", "groin", "tail", "wing") + if(BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN, BODY_ZONE_TAIL, BODY_ZONE_WING) if(ClothingVirusProtection(wear_suit) || ClothingVirusProtection(w_uniform)) return TRUE - if("l_arm", "r_arm", "l_hand", "r_hand") + if(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND) if(istype(wear_suit) && (wear_suit.body_parts_covered & HANDS) && ClothingVirusProtection(wear_suit)) return TRUE if(ClothingVirusProtection(gloves)) return TRUE - if("l_leg", "r_leg", "l_foot", "r_foot") + if(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT) if(istype(wear_suit) && (wear_suit.body_parts_covered & FEET) && ClothingVirusProtection(wear_suit)) return TRUE if(ClothingVirusProtection(shoes)) diff --git a/code/datums/diseases/appendicitis.dm b/code/datums/diseases/appendicitis.dm index 4fa7169b8fd..ce215ad0e5a 100644 --- a/code/datums/diseases/appendicitis.dm +++ b/code/datums/diseases/appendicitis.dm @@ -31,7 +31,7 @@ A.inflamed = TRUE A.update_icon() - if(!ruptured && (A.germ_level >= INFECTION_LEVEL_THREE || A.status & ORGAN_DEAD)) + if(!ruptured && (A.germ_level >= INFECTION_LEVEL_THREE || A.is_dead())) rupture(H, A) switch(stage) @@ -120,15 +120,15 @@ A.necrotize() stage = 5 - var/obj/item/organ/external/parent = H.get_organ(check_zone(A.parent_organ)) + var/obj/item/organ/external/parent = H.get_organ(check_zone(A.parent_organ_zone)) if(istype(parent)) parent.receive_damage(25, used_weapon = "appendix rupture") if(parent.germ_level < INFECTION_LEVEL_TWO) parent.germ_level = INFECTION_LEVEL_TWO - for(var/obj/item/organ/internal/O in parent.internal_organs) - if(O.germ_level < INFECTION_LEVEL_TWO) - O.germ_level = INFECTION_LEVEL_TWO - O.receive_damage(10) + for(var/obj/item/organ/internal/organ as anything in parent.internal_organs) + if(organ.germ_level < INFECTION_LEVEL_TWO) + organ.germ_level = INFECTION_LEVEL_TWO + organ.receive_damage(10) to_chat(H, span_userdanger("You feel a hellish pain in your abdomen, as if something is torn!")) H.Stun(20 SECONDS) diff --git a/code/datums/diseases/viruses/advance/symptoms/beard.dm b/code/datums/diseases/viruses/advance/symptoms/beard.dm index 16e0113bdfe..14cf3398b56 100644 --- a/code/datums/diseases/viruses/advance/symptoms/beard.dm +++ b/code/datums/diseases/viruses/advance/symptoms/beard.dm @@ -31,7 +31,7 @@ BONUS var/mob/living/M = A.affected_mob if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) switch(A.stage) if(1, 2) to_chat(H, span_warning("Your chin itches.")) diff --git a/code/datums/diseases/viruses/advance/symptoms/damage_converter.dm b/code/datums/diseases/viruses/advance/symptoms/damage_converter.dm index cf713948ffe..e847402e2e2 100644 --- a/code/datums/diseases/viruses/advance/symptoms/damage_converter.dm +++ b/code/datums/diseases/viruses/advance/symptoms/damage_converter.dm @@ -46,7 +46,7 @@ Bonus if(!parts.len) return var/healed = 0 - for(var/obj/item/organ/external/E in parts) + for(var/obj/item/organ/external/E as anything in parts) healed += min(E.brute_dam, get_damage) + min(E.burn_dam, get_damage) E.heal_damage(get_damage, get_damage, updating_health = TRUE) M.adjustToxLoss(healed) diff --git a/code/datums/diseases/viruses/advance/symptoms/limb_throw.dm b/code/datums/diseases/viruses/advance/symptoms/limb_throw.dm index 30673fd07d6..f95d126df75 100644 --- a/code/datums/diseases/viruses/advance/symptoms/limb_throw.dm +++ b/code/datums/diseases/viruses/advance/symptoms/limb_throw.dm @@ -69,7 +69,7 @@ Limb Rejection to_chat(H, span_alert("You still need [limb]!")) return FALSE - for(var/obj/item/organ/internal/organ in limb.internal_organs) + for(var/obj/item/organ/internal/organ as anything in limb.internal_organs) if(organ.vital) to_chat(H, span_alert("You still need [organ]!")) return FALSE diff --git a/code/datums/diseases/viruses/advance/symptoms/shedding.dm b/code/datums/diseases/viruses/advance/symptoms/shedding.dm index eadaab577b8..efa5950d4c7 100644 --- a/code/datums/diseases/viruses/advance/symptoms/shedding.dm +++ b/code/datums/diseases/viruses/advance/symptoms/shedding.dm @@ -32,7 +32,7 @@ BONUS to_chat(M, span_warning(pick("Your scalp itches.", "Your skin feels flakey."))) if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) switch(A.stage) if(3, 4) if(!(head_organ.h_style == "Bald") && !(head_organ.h_style == "Balding Hair")) diff --git a/code/datums/diseases/viruses/advance/symptoms/toxification.dm b/code/datums/diseases/viruses/advance/symptoms/toxification.dm index 0c1d0116189..01ee19bdb42 100644 --- a/code/datums/diseases/viruses/advance/symptoms/toxification.dm +++ b/code/datums/diseases/viruses/advance/symptoms/toxification.dm @@ -38,10 +38,10 @@ Toxification syndrome ))) if(prob(10)) M.emote("groan", "pale") - if(prob((A.stage - 2) - M.count_of_infected_organs()/4)) - var/obj/item/organ/O = pick(M.internal_organs + M.bodyparts) - if(O.germ_level < INFECTION_LEVEL_ONE) - O.germ_level = INFECTION_LEVEL_ONE + if(prob((A.stage - 2) - M.count_infected_organs() / 4)) + var/obj/item/organ/organ = safepick(M.internal_organs + M.bodyparts) + if(organ && organ.germ_level < INFECTION_LEVEL_ONE) + organ.germ_level = INFECTION_LEVEL_ONE return /datum/symptom/infection/End(datum/disease/virus/advance/A) diff --git a/code/datums/emote/emote.dm b/code/datums/emote/emote.dm index fb710ef2dce..0652f2a7054 100644 --- a/code/datums/emote/emote.dm +++ b/code/datums/emote/emote.dm @@ -310,11 +310,12 @@ * Arguments: * * user - Person that is trying to send the emote. * * intentional - Bool that says whether the emote was forced (FALSE) or not (TRUE). + * * ignore_cooldowns - If `TRUE` all cooldowns will be skipped. * * Returns FALSE if the cooldown is not over, TRUE if the cooldown is over. */ -/datum/emote/proc/check_cooldown(mob/user, intentional) - if(!intentional && bypass_unintentional_cooldown) +/datum/emote/proc/check_cooldown(mob/user, intentional, ignore_cooldowns) + if((!intentional && bypass_unintentional_cooldown) || ignore_cooldowns) return TRUE // if our emote would play sound but another audio emote is on cooldown, prevent this emote from being used. // Note that this only applies to intentional emotes diff --git a/code/datums/keybindings/mob.dm b/code/datums/keybindings/mob.dm index 97723b8ea3e..a20da4b3fab 100644 --- a/code/datums/keybindings/mob.dm +++ b/code/datums/keybindings/mob.dm @@ -28,11 +28,16 @@ /datum/keybinding/mob/drop_held_object/down(client/C) . = ..() var/obj/item/I = C.mob.get_active_hand() + if(!I && C.mob.special_hands_drop_action()) + SEND_SIGNAL(C.mob, COMSIG_MOB_KEY_DROP_ITEM_DOWN) + return + if(I) + if(SEND_SIGNAL(C.mob, COMSIG_MOB_KEY_DROP_ITEM_DOWN) & COMPONENT_CANCEL_DROP) + return I.run_drop_held_item(C.mob) - SEND_SIGNAL(C.mob, COMSIG_MOB_KEY_DROP_ITEM_DOWN) else - to_chat(C, SPAN_WARNING("Вы ничего не держите в руке!")) + to_chat(C, span_warning("Вы ничего не держите в руке!")) /datum/keybinding/mob/swap_hands name = "Поменять руки" diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 0192d85d29a..e852f808a24 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -440,12 +440,12 @@ if(has_subclass) . += " | Force full power: [vamp.subclass.full_power_override ? "Yes" : "No"]" if(istype(vamp.subclass, /datum/vampire_subclass/bestia) || istype(vamp.subclass, /datum/vampire_subclass/ancient)) - . += "
Trophies:
Hearts: [vamp.subclass.trophies["hearts"]]" - . += " | Lungs: [vamp.subclass.trophies["lungs"]]" - . += " | Livers: [vamp.subclass.trophies["livers"]]" - . += "
Kidneys: [vamp.subclass.trophies["kidneys"]]" - . += " | Eyes: [vamp.subclass.trophies["eyes"]]" - . += " | Ears: [vamp.subclass.trophies["ears"]]" + . += "
Trophies:
Hearts: [vamp.subclass.trophies[INTERNAL_ORGAN_HEART]]" + . += " | Lungs: [vamp.subclass.trophies[INTERNAL_ORGAN_LUNGS]]" + . += " | Livers: [vamp.subclass.trophies[INTERNAL_ORGAN_LIVER]]" + . += "
Kidneys: [vamp.subclass.trophies[INTERNAL_ORGAN_KIDNEYS]]" + . += " | Eyes: [vamp.subclass.trophies[INTERNAL_ORGAN_EYES]]" + . += " | Ears: [vamp.subclass.trophies[INTERNAL_ORGAN_EARS]]" if(!length(vamp.objectives)) . += "
Objectives are empty! Randomize!" else @@ -1756,7 +1756,7 @@ if(isnull(new_total)) return - vamp.adjust_trophies("hearts", new_total) + vamp.adjust_trophies(INTERNAL_ORGAN_HEART, new_total) log_admin("[key_name(usr)] has adjusted [key_name(current)]'s hearts trophies by [new_total].") message_admins("[key_name_admin(usr)] has adjusted [key_name_admin(current)]'s hearts trophies by [new_total].") @@ -1769,7 +1769,7 @@ if(isnull(new_total)) return - vamp.adjust_trophies("lungs", new_total) + vamp.adjust_trophies(INTERNAL_ORGAN_LUNGS, new_total) log_admin("[key_name(usr)] has adjusted [key_name(current)]'s lungs trophies by [new_total].") message_admins("[key_name_admin(usr)] has adjusted [key_name_admin(current)]'s lungs trophies by [new_total].") @@ -1782,7 +1782,7 @@ if(isnull(new_total)) return - vamp.adjust_trophies("livers", new_total) + vamp.adjust_trophies(INTERNAL_ORGAN_LIVER, new_total) log_admin("[key_name(usr)] has adjusted [key_name(current)]'s livers trophies by [new_total].") message_admins("[key_name_admin(usr)] has adjusted [key_name_admin(current)]'s livers trophies by [new_total].") @@ -1795,7 +1795,7 @@ if(isnull(new_total)) return - vamp.adjust_trophies("kidneys", new_total) + vamp.adjust_trophies(INTERNAL_ORGAN_KIDNEYS, new_total) log_admin("[key_name(usr)] has adjusted [key_name(current)]'s kidneys trophies by [new_total].") message_admins("[key_name_admin(usr)] has adjusted [key_name_admin(current)]'s kidneys trophies by [new_total].") @@ -1808,7 +1808,7 @@ if(isnull(new_total)) return - vamp.adjust_trophies("eyes", new_total) + vamp.adjust_trophies(INTERNAL_ORGAN_EYES, new_total) log_admin("[key_name(usr)] has adjusted [key_name(current)]'s eyes trophies by [new_total].") message_admins("[key_name_admin(usr)] has adjusted [key_name_admin(current)]'s eyes trophies by [new_total].") @@ -1821,7 +1821,7 @@ if(isnull(new_total)) return - vamp.adjust_trophies("ears", new_total) + vamp.adjust_trophies(INTERNAL_ORGAN_EARS, new_total) log_admin("[key_name(usr)] has adjusted [key_name(current)]'s ears trophies by [new_total].") message_admins("[key_name_admin(usr)] has adjusted [key_name_admin(current)]'s ears trophies by [new_total].") diff --git a/code/datums/mutable_appearance.dm b/code/datums/mutable_appearance.dm index 4d870e1296c..f4b27c97069 100644 --- a/code/datums/mutable_appearance.dm +++ b/code/datums/mutable_appearance.dm @@ -9,13 +9,18 @@ plane = FLOAT_PLANE // No clue why this is 0 by default yet images are on FLOAT_PLANE // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var + // Helper similar to image() -/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE) +/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color) var/mutable_appearance/MA = new() MA.icon = icon MA.icon_state = icon_state MA.layer = layer MA.plane = plane + MA.alpha = alpha + MA.appearance_flags |= appearance_flags + if(color) + MA.color = color return MA @@ -23,3 +28,4 @@ . = ..() alpha = 255 transform = null + diff --git a/code/datums/outfits/outfit_admin.dm b/code/datums/outfits/outfit_admin.dm index 1c03bc950ff..0b209f5b649 100644 --- a/code/datums/outfits/outfit_admin.dm +++ b/code/datums/outfits/outfit_admin.dm @@ -43,7 +43,7 @@ ) var/id_access = "Syndicate Operative" - var/uplink_uses = 20 + var/uplink_uses = 100 /datum/outfit/admin/syndicate/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() @@ -173,7 +173,7 @@ name = "Syndicate Spy" uniform = /obj/item/clothing/under/suit_jacket/really_black shoes = /obj/item/clothing/shoes/chameleon/noslip - uplink_uses = 40 + uplink_uses = 200 id_access = "Syndicate Agent" implants = list( @@ -738,7 +738,7 @@ belt = /obj/item/gun/projectile/revolver/nagant backpack_contents = list( - /obj/item/ammo_box/speedloader/shotgun/a762 = 4 + /obj/item/ammo_box/speedloader/a762 = 4 ) /datum/outfit/admin/soviet/soldier @@ -837,6 +837,7 @@ /obj/item/storage/box/responseteam = 1, /obj/item/implanter/dust = 1, /obj/item/implanter/death_alarm = 1, + /obj/item/stamp/solgov = 1, ) /datum/outfit/admin/solgov_rep/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) diff --git a/code/datums/spells/cluwne.dm b/code/datums/spells/cluwne.dm index 6e4aec12ed8..213fb3e7b94 100644 --- a/code/datums/spells/cluwne.dm +++ b/code/datums/spells/cluwne.dm @@ -16,7 +16,7 @@ if(!get_int_organ(/obj/item/organ/internal/brain/cluwne)) var/obj/item/organ/internal/brain/cluwne/idiot_brain = new internal_organs |= idiot_brain //Well, everything's for recursion prevention. - idiot_brain.insert(src, make_cluwne = 0) + idiot_brain.insert(src, make_cluwne = FALSE) idiot_brain.dna = dna.Clone() else return diff --git a/code/datums/spells/high_rp.dm b/code/datums/spells/high_rp.dm index 1a0c28e3cc2..0b8ac2e140f 100644 --- a/code/datums/spells/high_rp.dm +++ b/code/datums/spells/high_rp.dm @@ -7,8 +7,8 @@ var/warned = 0 unremovable = TRUE -/obj/item/organ/internal/high_rp_tumor/insert(mob/living/target, special = 0) - ..(target, special = special) +/obj/item/organ/internal/high_rp_tumor/insert(mob/living/target, special = ORGAN_MANIPULATION_DEFAULT) + ..(target, special) if(target) to_chat(target, "Я должен дышать, иначе просто задохнусь!") @@ -41,7 +41,7 @@ button_icon_state = "lungs" check_flags = null -/datum/action/item_action/organ_action/manual_breath/Trigger() +/datum/action/item_action/organ_action/manual_breath/Trigger(left_click = TRUE) . = ..() if(. && istype(target, /obj/item/organ/internal/high_rp_tumor)) var/obj/item/organ/internal/high_rp_tumor/hrp_tumor = target diff --git a/code/datums/spells/mime.dm b/code/datums/spells/mime.dm index 669074bc139..061a420851d 100644 --- a/code/datums/spells/mime.dm +++ b/code/datums/spells/mime.dm @@ -138,7 +138,7 @@ /obj/effect/proc_holder/spell/mime/fingergun/cast(list/targets, mob/user = usr) for(var/mob/living/carbon/human/target in targets) if(!current_gun) - to_chat(user, "You draw your fingers!") + to_chat(user, span_notice("You draw your fingers!")) current_gun = new gun(get_turf(user), src) target.drop_from_active_hand() target.put_in_hands(current_gun) @@ -152,8 +152,9 @@ SIGNAL_HANDLER if(!current_gun || action.owner.get_active_hand() != current_gun) return - to_chat(action.owner, "You holster your fingers. Another time perhaps...") + to_chat(action.owner, span_notice("You holster your fingers. Another time perhaps...")) QDEL_NULL(current_gun) + return COMPONENT_CANCEL_DROP // Mime Spellbooks diff --git a/code/datums/spells/rathens.dm b/code/datums/spells/rathens.dm index ad751dc8711..561c6886033 100644 --- a/code/datums/spells/rathens.dm +++ b/code/datums/spells/rathens.dm @@ -33,10 +33,10 @@ var/obj/effect/decal/cleanable/blood/gibs/G = new/obj/effect/decal/cleanable/blood/gibs(get_turf(H)) spawn() G.throw_at(get_edge_target_turf(H, pick(GLOB.alldirs)), rand(1, 10), 5) - H.apply_damage(10, BRUTE, "chest") + H.apply_damage(10, BRUTE, BODY_ZONE_CHEST) to_chat(H, "You have no appendix, but something had to give! Holy shit, what was that?") H.Weaken(6 SECONDS) - for(var/obj/item/organ/external/E in H.bodyparts) + for(var/obj/item/organ/external/E as anything in H.bodyparts) if(istype(E, /obj/item/organ/external/head)) continue if(istype(E, /obj/item/organ/external/chest)) diff --git a/code/datums/spells/summonitem.dm b/code/datums/spells/summonitem.dm index 261196af883..d58073d0040 100644 --- a/code/datums/spells/summonitem.dm +++ b/code/datums/spells/summonitem.dm @@ -74,22 +74,9 @@ break if(ishuman(M)) //Edge case housekeeping - var/mob/living/carbon/human/C = M - /*if(C.internal_bodyparts_by_name && item_to_retrieve in C.internal_bodyparts_by_name ) //This won't work, as we use organ datums instead of objects. --DZD - C.internal_bodyparts_by_name -= item_to_retrieve - if(istype(marked_item, /obj/item/brain)) //If this code ever runs I will be happy - var/obj/item/brain/B = new /obj/item/brain(target.loc) - B.transfer_identity(C) - C.death() - add_attack_logs(target, C, "Magically debrained INTENT: [uppertext(target.a_intent)]")*/ - for(var/X in C.bodyparts) - var/obj/item/organ/external/part = X - if(item_to_retrieve in part.embedded_objects) - part.embedded_objects -= item_to_retrieve - to_chat(C, span_warning("The [item_to_retrieve] that was embedded in your [part] has mysteriously vanished. How fortunate!")) - if(!C.has_embedded_objects()) - C.clear_alert("embeddedobject") - break + var/mob/living/carbon/human/human = M + if(human.remove_embedded_object(item_to_retrieve)) + to_chat(human, span_warning("The [item_to_retrieve] that was embedded into you has mysteriously vanished. How fortunate!")) else if(istype(item_to_retrieve.loc,/obj/machinery/portable_atmospherics/)) //Edge cases for moved machinery diff --git a/code/datums/spells/touch_attacks.dm b/code/datums/spells/touch_attacks.dm index af20a1dcdd6..8560b457ddd 100644 --- a/code/datums/spells/touch_attacks.dm +++ b/code/datums/spells/touch_attacks.dm @@ -51,6 +51,7 @@ attached_hand.is_withdraw = TRUE QDEL_NULL(attached_hand) + return COMPONENT_CANCEL_DROP /obj/effect/proc_holder/spell/touch/disintegrate diff --git a/code/datums/status_effects/buffs.dm b/code/datums/status_effects/buffs.dm index 7fe6aa94214..bcf96f443f0 100644 --- a/code/datums/status_effects/buffs.dm +++ b/code/datums/status_effects/buffs.dm @@ -57,10 +57,9 @@ if(ishuman(owner)) owner.status_flags |= IGNORESLOWDOWN var/mob/living/carbon/human/H = owner - for(var/X in H.bodyparts) - var/obj/item/organ/external/BP = X - BP.brute_mod *= 0.1 - BP.burn_mod *= 0.1 + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + bodypart.brute_mod *= 0.1 + bodypart.burn_mod *= 0.1 H.dna.species.tox_mod *= 0.1 H.dna.species.oxy_mod *= 0.1 H.dna.species.clone_mod *= 0.1 @@ -73,10 +72,9 @@ /datum/status_effect/blooddrunk/on_remove() if(ishuman(owner)) var/mob/living/carbon/human/H = owner - for(var/X in H.bodyparts) - var/obj/item/organ/external/BP = X - BP.brute_mod *= 10 - BP.burn_mod *= 10 + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + bodypart.brute_mod *= 10 + bodypart.burn_mod *= 10 H.dna.species.tox_mod *= 10 H.dna.species.oxy_mod *= 10 H.dna.species.clone_mod *= 10 @@ -175,7 +173,7 @@ if(itemUser.put_in_l_hand(newRod, TRUE)) to_chat(itemUser, "The Rod of Asclepius suddenly grows back out of your arm!") else - if(!itemUser.has_organ("l_arm")) + if(!itemUser.get_organ(BODY_ZONE_L_ARM)) new /obj/item/organ/external/arm(itemUser) new /obj/item/organ/external/hand(itemUser) itemUser.update_body() @@ -186,7 +184,7 @@ if(itemUser.put_in_r_hand(newRod, TRUE)) to_chat(itemUser, "The Rod of Asclepius suddenly grows back out of your arm!") else - if(!itemUser.has_organ("r_arm")) + if(!itemUser.get_organ(BODY_ZONE_R_ARM)) new /obj/item/organ/external/arm/right(itemUser) new /obj/item/organ/external/hand/right(itemUser) itemUser.update_body() @@ -225,10 +223,9 @@ var/mob/living/carbon/human/H = owner H.bodytemperature = H.dna.species.body_temperature if(is_mining_level(H.z) || istype(get_area(H), /area/ruin/space/bubblegum_arena)) - for(var/thing in H.bodyparts) - var/obj/item/organ/external/E = thing - E.internal_bleeding = FALSE - E.mend_fracture() + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + bodypart.stop_internal_bleeding() + bodypart.mend_fracture() else to_chat(owner, "...But the core was weakened, it is not close enough to the rest of the legions of the necropolis.") else diff --git a/code/datums/status_effects/debuffs.dm b/code/datums/status_effects/debuffs.dm index 1a110ddc6fe..f48726ad9f7 100644 --- a/code/datums/status_effects/debuffs.dm +++ b/code/datums/status_effects/debuffs.dm @@ -199,10 +199,10 @@ /datum/status_effect/mark_prey/on_creation(mob/living/new_owner, datum/antagonist/vampire/antag_datum) if(antag_datum) vamp = antag_datum - var/t_kidneys = vamp.get_trophies("kidneys") + var/t_kidneys = vamp.get_trophies(INTERNAL_ORGAN_KIDNEYS) duration += t_kidneys SECONDS // 15s. MAX - t_eyes = vamp.get_trophies("eyes") - t_hearts = vamp.get_trophies("hearts") + t_eyes = vamp.get_trophies(INTERNAL_ORGAN_EYES) + t_hearts = vamp.get_trophies(INTERNAL_ORGAN_HEART) return ..() @@ -732,7 +732,7 @@ var/obj/item/organ/vision = H.get_int_organ(H.dna.species.vision_organ) - if(!vision || vision.is_bruised() || vision.is_broken()) // doesn't decay if you have damaged eyesight. + if(!vision || vision.is_bruised() || vision.is_traumatized()) // doesn't decay if you have damaged eyesight. return 0 if(istype(H.glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) // decays faster if you rest your eyes with a blindfold. @@ -761,7 +761,7 @@ var/obj/item/organ/vision = H.get_int_organ(H.dna.species.vision_organ) - if(!vision || vision.is_broken() || vision.is_bruised()) //got no eyes or broken eyes + if(!vision || vision.is_traumatized() || vision.is_bruised()) //got no eyes or broken eyes return 0 return ..() //default decay rate diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm index 3d9f649f9fe..74aab06ce2f 100644 --- a/code/datums/supplypacks.dm +++ b/code/datums/supplypacks.dm @@ -470,7 +470,7 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY /datum/supply_packs/security/armory/slugammo name = "Slug Ammo Crate" - contains = list(/obj/item/ammo_box/speedloader/shotgun, + contains = list(/obj/item/ammo_box/speedloader/shotgun/slug, /obj/item/ammo_box/shotgun, /obj/item/ammo_box/shotgun, /obj/item/ammo_box/shotgun, @@ -594,12 +594,12 @@ GLOBAL_LIST_INIT(all_supply_groups, list(SUPPLY_EMERGENCY,SUPPLY_SECURITY,SUPPLY name = "Mosin Nagant crate" contains = list(/obj/item/gun/projectile/shotgun/boltaction, /obj/item/gun/projectile/shotgun/boltaction, - /obj/item/ammo_box/speedloader/shotgun/a762, - /obj/item/ammo_box/speedloader/shotgun/a762, - /obj/item/ammo_box/speedloader/shotgun/a762, - /obj/item/ammo_box/speedloader/shotgun/a762, - /obj/item/ammo_box/speedloader/shotgun/a762, - /obj/item/ammo_box/speedloader/shotgun/a762) + /obj/item/ammo_box/speedloader/a762, + /obj/item/ammo_box/speedloader/a762, + /obj/item/ammo_box/speedloader/a762, + /obj/item/ammo_box/speedloader/a762, + /obj/item/ammo_box/speedloader/a762, + /obj/item/ammo_box/speedloader/a762) cost = 80 containername = "Mosin Nagant rifle crate" contraband = 1 diff --git a/code/datums/uplink_item.dm b/code/datums/uplink_item.dm index c1e9018c8fa..ba40d92a635 100644 --- a/code/datums/uplink_item.dm +++ b/code/datums/uplink_item.dm @@ -24,7 +24,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) uplink_items[I.category] = list() uplink_items[I.category] += I - if(I.limited_stock < 0 && !I.cant_discount && I.item && I.cost > 1) + if(I.limited_stock < 0 && !I.cant_discount && I.item && I.cost > 5) sales_items += I for(var/datum/uplink_item/I in last) @@ -40,7 +40,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) A.limited_stock = 1 I.refundable = FALSE A.refundable = FALSE - if(A.cost >= 20) + if(A.cost >= 100) discount *= 0.5 // If the item costs 20TC or more, it's only 25% off. A.cost = max(round(A.cost * (1-discount)),1) A.category = "Discounted Gear" @@ -171,7 +171,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A grenade that explodes into HONK! brand banana peels that are genetically modified to be extra slippery and extrude caustic acid when stepped on" reference = "BG" item = /obj/item/grenade/clown_grenade - cost = 2 + cost = 10 job = list("Clown") /datum/uplink_item/jobspecific/cmag @@ -179,7 +179,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The jestographic sequencer, also known as a cmag, is a small card that inverts the access on any door it's used on. Perfect for locking command out of their own departments. Honk!" reference = "CMG" item = /obj/item/card/cmag - cost = 4 + cost = 20 surplus = 50 job = list("Clown") @@ -188,7 +188,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A pair of modified clown shoes fitted with an advanced magnetic traction system. Look and sound exactly like regular clown shoes unless closely inspected." reference = "CM" item = /obj/item/clothing/shoes/magboots/clown - cost = 3 + cost = 15 job = list("Clown") /datum/uplink_item/jobspecific/acrobatic_shoes @@ -196,7 +196,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A pair of modified clown shoes are power-up with a special jumping mechanism that works on the honk-space, allowing you to do excellent acrobatic tricks!" reference = "AS" item = /obj/item/clothing/shoes/bhop/clown - cost = 3 + cost = 15 job = list("Clown") /datum/uplink_item/jobspecific/trick_revolver @@ -204,7 +204,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A revolver that will fire backwards and kill whoever attempts to use it. Perfect for those pesky vigilante or just a good laugh." reference = "CTR" item = /obj/item/storage/box/syndie_kit/fake_revolver - cost = 1 + cost = 5 job = list("Clown") //Mime @@ -213,7 +213,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A specialised, one shell shotgun with a built-in cloaking device to mimic a cane. The shotgun is capable of hiding it's contents and the pin alongside being supressed. Comes boxed with 6 specialised shrapnel rounds laced with a silencing toxin and 1 preloaded in the shotgun's chamber." reference = "MCS" item = /obj/item/storage/box/syndie_kit/caneshotgun - cost = 5 + cost = 25 job = list("Mime") /datum/uplink_item/jobspecific/mimery @@ -221,7 +221,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Contains two manuals to teach you advanced Mime skills. You will be able to shoot stunning bullets out of your fingers, and create large walls that can block an entire hallway!" reference = "AM" item = /obj/item/storage/box/syndie_kit/mimery - cost = 6 + cost = 30 job = list("Mime") /datum/uplink_item/jobspecific/mimejutsu @@ -229,7 +229,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An old manual of the martial art of mimes." reference = "MJ" item = /obj/item/mimejutsu_scroll - cost = 8 + cost = 40 job = list("Mime") //Miner @@ -238,7 +238,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A modification kit which allows Kinetic Accelerators to do greatly increased damage while indoors. Occupies 35% mod capacity." reference = "KPM" item = /obj/item/borg/upgrade/modkit/indoors - cost = 4 //you need two for full damage, so total of 8 for maximum damage + cost = 20 //you need two for full damage, so total of 8 for maximum damage job = list("Shaft Miner", "Quartermaster") /datum/uplink_item/jobspecific/mining_charge_hacker @@ -247,7 +247,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Use it on a mining charge to override its safeties. Reduces explosive power of mining charges due to the modification of their internals." reference = "MCH" item = /obj/item/t_scanner/adv_mining_scanner/syndicate - cost = 4 + cost = 20 job = list("Shaft Miner", "Quartermaster") //Chef @@ -256,7 +256,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A custom sauce made from the highly poisonous fly amanita mushrooms. Anyone who ingests it will take variable toxin damage depending on how long it has been in their system, with a higher dosage taking longer to metabolize." reference = "CESS" item = /obj/item/reagent_containers/food/condiment/syndisauce - cost = 1 + cost = 5 job = list("Chef") /datum/uplink_item/jobspecific/meatcleaver @@ -264,7 +264,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A mean looking meat cleaver that does damage comparable to an Energy Sword but with the added benefit of chopping your victim into hunks of meat after they've died." reference = "MC" item = /obj/item/kitchen/knife/butcher/meatcleaver - cost = 4 + cost = 20 job = list("Chef") /datum/uplink_item/jobspecific/syndidonk @@ -272,7 +272,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box of highly specialized Donk pockets with a number of regenerative and stimulating chemicals inside of them; the box comes equipped with a self-heating mechanism." reference = "SDP" item = /obj/item/storage/box/syndidonkpockets - cost = 2 + cost = 10 job = list("Chef") /datum/uplink_item/jobspecific/CQC_upgrade @@ -280,7 +280,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Contain special implant for chefs, which destroy safety check their innate CQC implant, allow them to use martial art outside the kitchen. Use in hand." reference = "CUI" item = /obj/item/CQC_manual/chef - cost = 6 + cost = 30 job = list("Chef") surplus = 0 //because it's useless for all non-chefs @@ -289,7 +289,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Contains a set of three sharp metal trays capable of cutting off limbs. " reference = "DT" item = /obj/item/storage/box/syndie_kit/dangertray - cost = 3 + cost = 15 job = list("Chef") //Chaplain @@ -298,7 +298,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A doll created by Syndicate Witch Doctors. Ingredients: Something of the Thread, Something of the Head, Something of the Body, Something of the Dead, Secret Voodoo herbs, and Monosodium glutamate." reference = "VD" item = /obj/item/voodoo - cost = 4 + cost = 20 job = list("Chaplain") /datum/uplink_item/jobspecific/missionary_kit @@ -306,7 +306,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box containing a missionary staff, missionary robes, and bible. The robes and staff can be linked to allow you to convert victims at range for a short time to do your bidding. The bible is for bible stuff." reference = "MK" item = /obj/item/storage/box/syndie_kit/missionary_set - cost = 15 + cost = 75 job = list("Chaplain") /datum/uplink_item/jobspecific/artistic_toolbox @@ -314,7 +314,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An accursed toolbox that grants its followers extreme power at the cost of requiring repeated sacrifices to it. If sacrifices are not provided, it will turn on its follower." reference = "HGAT" item = /obj/item/storage/toolbox/green/memetic - cost = 20 + cost = 100 job = list("Chaplain", "Civilian") surplus = 0 //No lucky chances from the crate; if you get this, this is ALL you're getting hijack_only = TRUE //This is a murderbone weapon, as such, it should only be available in those scenarios. @@ -324,7 +324,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An ancient tome written in countless tongues. Despite this fact, you can read this book effortlessly, to learn all the existing languages. Don't ask questions." reference = "BOB" item = /obj/item/book_of_babel - cost = 1 + cost = 5 job = list("Chaplain", "Librarian") surplus = 0 cant_discount = TRUE @@ -335,7 +335,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An Anti-Personnel proximity mine cleverly disguised as a wet floor caution sign that is triggered by running past it, activate it to start the 15 second timer and activate again to disarm." reference = "PM" item = /obj/item/caution/proximity_sign - cost = 3 + cost = 15 job = list("Janitor") surplus = 0 @@ -344,7 +344,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Projector that can set up to 5 stun mines with additional EMP effect." reference = "HM" item = /obj/item/holosign_creator/janitor/syndie - cost = 8 + cost = 40 job = list("Janitor") surplus = 0 @@ -354,7 +354,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A radiation laser concealed inside of a Health Analyzer. After a moderate delay, causes temporary collapse and radiation. Has adjustable controls, but will not function as a regular health analyzer, only appears like one. May not function correctly on radiation resistant humanoids!" reference = "RL" item = /obj/item/rad_laser - cost = 5 + cost = 25 job = list("Chief Medical Officer", "Medical Doctor", "Intern", "Geneticist", "Psychiatrist", "Chemist", "Paramedic", "Coroner", "Virologist") /datum/uplink_item/jobspecific/batterer @@ -362,15 +362,15 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A device that has a chance of knocking down people around you for a long amount of time or slowing them down. The user is unaffected. Each charge takes 2 minutes to recharge." reference = "BTR" item = /obj/item/batterer - cost = 10 + cost = 50 job = list("Chief Medical Officer", "Psychiatrist") -/datum/uplink_item/jobspecific/genekit - name = "Genetic Superiority Bundle" - desc = "A set of injectors containing extremely powerful mutations brought to you by recently established Syndicate research station. This set is designed for teamwork" +/datum/uplink_item/jobspecific/dna_upgrader + name = "Genetic Superiority Injector" + desc = "Experemental DNA injector whick will give you one advanced gene modification and increase your gene stability." reference = "GS" - item = /obj/item/storage/box/syndie_kit/genes - cost = 15 + item = /obj/item/dna_upgrader + cost = 75 job = list("Chief Medical Officer", "Geneticist") surplus = 0 @@ -380,7 +380,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A modified hypospray disguised as a functional pipette. The pipette can infect victims with viruses upon injection." reference = "VI" item = /obj/item/reagent_containers/dropper/precision/viral_injector - cost = 3 + cost = 15 job = list("Virologist") /datum/uplink_item/jobspecific/cat_grenade @@ -388,7 +388,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The feral cat delivery grenade contains 5 dehydrated feral cats in a similar manner to dehydrated monkeys, which, upon detonation, will be rehydrated by a small reservoir of water contained within the grenade. These cats will then attack anything in sight." item = /obj/item/grenade/spawnergrenade/feral_cats reference = "CCLG" - cost = 2 + cost = 10 job = list("Psychiatrist")//why? Becuase its funny that a person in charge of your mental wellbeing has a cat granade.. /datum/uplink_item/jobspecific/gbs @@ -396,7 +396,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A bottle containing Gravitokinetic Bipotential SADS culture. Also known as GBS, extremely deadly virus." reference = "GBS" item = /obj/item/reagent_containers/glass/bottle/gbs - cost = 12 + cost = 60 job = list("Virologist") surplus = 0 hijack_only = TRUE @@ -407,7 +407,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A pair of sleek gloves to aid in pickpocketing. While wearing these, you can loot your target without them knowing. Pickpocketing puts the item directly into your hand." reference = "PG" item = /obj/item/clothing/gloves/color/black/thief - cost = 6 + cost = 30 job = list("Civilian") /datum/uplink_item/jobspecific/lockermech @@ -415,7 +415,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A massive and incredibly deadly Syndicate exosuit(Not realy)." reference = "SLM" item = /obj/mecha/combat/lockersyndie/loaded - cost = 6 + cost = 30 job = list("Civilian", "Roboticist") surplus = 0 @@ -424,7 +424,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A pair of sturdy shock gloves with insulated layer. Protects user from electric shock and allows to shock enemies." reference = "SG" item = /obj/item/storage/box/syndie_kit/stungloves - cost = 2 + cost = 10 job = list("Civilian", "Mechanic", "Station Engineer", "Trainee Engineer", "Chief Engineer") //Bartender @@ -433,7 +433,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box containing 6 shotgun shells that simulate the effects of extreme drunkenness on the target, more effective for each type of alcohol in the target's system." reference = "BSS" item = /obj/item/storage/belt/bandolier/booze - cost = 3 + cost = 15 job = list("Bartender") //Barber @@ -442,7 +442,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A pair of scissors that are anything but what their name implies; can easily cut right into someone's throat." reference = "CTS" item = /obj/item/scissors/safety - cost = 2 + cost = 10 job = list("Barber") //Botanist @@ -451,7 +451,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A seemingly innocent briefcase full of not-so-innocent Syndicate-bred bees. Inject the case with blood to train the bees to ignore the donor(s). It also wirelessly taps into station intercomms to broadcast a message of TERROR." reference = "BEE" item = /obj/item/bee_briefcase - cost = 6 + cost = 30 job = list("Botanist") //Engineer @@ -460,7 +460,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Insulated gloves that can utilize the power of the station to deliver a short arc of electricity at a target. Must be standing on a powered cable to use." reference = "PG" item = /obj/item/clothing/gloves/color/yellow/power - cost = 8 + cost = 40 job = list("Station Engineer", "Trainee Engineer", "Chief Engineer") /datum/uplink_item/jobspecific/supertoolbox @@ -468,7 +468,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Ultimate version of all toolboxes, this one more robust and more useful than his cheaper version. Comes with experimental type tools, combat gloves and cool sunglasses." item = /obj/item/storage/toolbox/syndisuper reference = "CSSTB" - cost = 2 + cost = 10 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) job = list("Station Engineer", "Trainee Engineer", "Chief Engineer", "Mechanic", "Roboticist", "Paramedic") @@ -478,7 +478,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An extremely high-tech energy gun that utilizes bluespace technology to teleport away living targets. Select the target beacon on the telegun itself; projectiles will send targets to the beacon locked onto." reference = "TG" item = /obj/item/gun/energy/telegun - cost = 12 + cost = 60 job = list("Research Director") //Roboticist @@ -487,7 +487,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A syndicate developed man-machine-interface which will make any cyborg it is inserted into follow the standard syndicate lawset." reference = "SMMI" item = /obj/item/mmi/syndie - cost = 2 + cost = 10 job = list("Roboticist") surplus = 0 @@ -497,7 +497,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A seemingly innocent die, those who are not afraid to roll for attack will find it's effects quite explosive. Has a four second timer." reference = "ETW" item = /obj/item/dice/d20/e20 - cost = 3 + cost = 15 job = list("Librarian") surplus = 0 hijack_only = TRUE @@ -507,7 +507,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Everything or nothing; that is my motto." reference = "DOF" item = /obj/item/dice/d20/fate/one_use - cost = 20 + cost = 100 job = list("Librarian") surplus = 0 cant_discount = TRUE @@ -518,7 +518,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Part of the notorious Ambrosia family, this species is nearly indistinguishable from Ambrosia Vulgaris- but its' branches contain a revolting toxin. Eight units are enough to drive victims insane." reference = "BRO" item = /obj/item/seeds/ambrosia/cruciatus - cost = 1 + cost = 5 job = list("Botanist") //Atmos Tech @@ -527,7 +527,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A highly flexible jumpsuit that will help you navigate the ventilation loops of the station internally. Comes with pockets and ID slot, but can't be used without stripping off most gear, including backpack, belt, helmet, and exosuit. Free hands are also necessary to crawl around inside." reference = "AIRJ" item = /obj/item/clothing/under/contortionist - cost = 10 + cost = 50 job = list("Life Support Specialist", "Chief Engineer") /datum/uplink_item/jobspecific/energizedfireaxe @@ -535,7 +535,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A fire axe with a massive energy charge built into it. Upon striking someone while charged it will throw them backwards while stunning them briefly, but will take some time to charge up again. It is also much sharper than a regular axe and can pierce light armor." reference = "EFA" item = /obj/item/twohanded/fireaxe/energized - cost = 4 + cost = 20 job = list("Life Support Specialist", "Chief Engineer") //CE @@ -544,7 +544,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Special RCD capable to destroy reinforced walls and have 500 matter units instead of 100." reference = "SRCD" item = /obj/item/rcd/combat - cost = 5 + cost = 25 job = list("Station Engineer", "Trainee Engineer", "Mechanic", "Life Support Specialist", "Chief Engineer") surplus = 0 @@ -555,7 +555,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The Syndicate will ship a bottle containing 40 units of a randomly selected poison. The poison can range from highly irritating to incredibly lethal." reference = "TPB" item = /obj/item/reagent_containers/glass/bottle/traitor - cost = 2 + cost = 10 job = list("Research Director", "Chief Medical Officer", "Medical Doctor", "Intern", "Psychiatrist", "Chemist", "Paramedic", "Virologist", "Bartender", "Chef") // Paper contact poison pen @@ -565,7 +565,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Cutting edge of deadly writing implements technology, this gadget will infuse any piece of paper with delayed contact poison." reference = "PP" item = /obj/item/pen/poison - cost = 1 + cost = 5 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) job = list("Head of Personnel", "Quartermaster", "Cargo Technician", "Librarian") @@ -585,7 +585,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Advanced data storage designed to be compatible with positronic systems.This one include melee algorithms along with overwritten microbattery safety protocols." reference = "ICU" item = /obj/item/ipc_combat_upgrade - cost = 3 + cost = 15 race = list("Machine") /datum/uplink_item/racial/supercharge @@ -593,7 +593,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An implant injected into the body, and later activated manually to inject a chemical cocktail, which has the effect of removing and reducing the time of all stuns and increasing movement speed. Can be activated up to 3 times." reference = "SSI" item = /obj/item/implanter/supercharge - cost = 8 + cost = 40 race = list("Machine") @@ -604,7 +604,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The result of the work of scientists on mixing an experimental stable mutagen with the core of a pyroclastic anomaly. Gives the user the opportunity to become a slime and heat himself up." reference = "AEXT" item = /obj/item/anomaly_extract - cost = 10 + cost = 50 race = list("Slime People") //Plasmaman @@ -615,7 +615,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Due to budget cuts, the shoes don't provide protection against slipping. The set comes with a complementary chameleon stamp. Only for Plasmamen." reference = "PCK" item = /obj/item/storage/box/syndie_kit/plasma_chameleon - cost = 4 + cost = 20 race = list("Plasmaman") // DANGEROUS WEAPONS @@ -628,7 +628,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A modern, burst firing, mag-fed combat shotgun, that uses 12g ammo. Holds a 12/24 round drums, perfect for cleaning out crowds of people in narrow corridors. Welcome to the Minotaur's labyrinth!" reference = "AS12" item = /obj/item/gun/projectile/automatic/shotgun/minotaur - cost = 16 + cost = 80 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -637,14 +637,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "SPI" desc = "A small, easily concealable handgun that uses 10mm auto rounds in 8-round magazines and is compatible with suppressors." item = /obj/item/gun/projectile/automatic/pistol - cost = 4 + cost = 20 /datum/uplink_item/dangerous/revolver name = "Syndicate .357 Revolver" reference = "SR" desc = "A brutally simple syndicate revolver that fires .357 Magnum cartridges and has 7 chambers." item = /obj/item/gun/projectile/revolver - cost = 10 + cost = 50 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 50 @@ -653,7 +653,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "DEA" desc = "A legendary high power pistol that uses 7 rounds .50AE magazines." item = /obj/item/gun/projectile/automatic/pistol/deagle - cost = 10 + cost = 50 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/dangerous/uzi @@ -661,7 +661,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "UZ" desc = "A fully-loaded lightweight blowback-operated submachine gun that uses 30-rounds 9mm magazines." item = /obj/item/gun/projectile/automatic/mini_uzi - cost = 12 + cost = 60 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/dangerous/smg @@ -669,7 +669,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "SMG" desc = "A fully-loaded Scarborough Arms bullpup submachine gun that fires .45 rounds with a 20-round magazine and is compatible with suppressors." item = /obj/item/gun/projectile/automatic/c20r - cost = 14 + cost = 70 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 40 @@ -678,7 +678,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A fully-loaded three-round burst carbine that uses 30-round 5.56mm magazines with a togglable underslung 40mm grenade launcher." reference = "AR" item = /obj/item/gun/projectile/automatic/m90 - cost = 16 + cost = 80 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 50 @@ -687,7 +687,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A fully-loaded Aussec Armory belt-fed machine gun. This deadly weapon has a massive 50-round magazine of devastating 7.62x51mm ammunition." reference = "LMG" item = /obj/item/gun/projectile/automatic/l6_saw - cost = 35 + cost = 175 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -696,14 +696,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "These gloves let the user punch people very fast. Does not improve weapon attack speed." reference = "RPGD" item = /obj/item/clothing/gloves/fingerless/rapid - cost = 4 + cost = 20 /datum/uplink_item/dangerous/sniper name = "Sniper Rifle" desc = "Ranged fury, Syndicate style. guaranteed to cause shock and awe or your TC back!" reference = "SSR" item = /obj/item/gun/projectile/automatic/sniper_rifle/syndicate - cost = 20 + cost = 100 surplus = 25 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -712,7 +712,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A compact, unscoped version of the operative sniper rifle. Packs a powerful punch, but ammo is limited." reference = "CSR" item = /obj/item/gun/projectile/automatic/sniper_rifle/compact - cost = 8 + cost = 40 surplus = 0 cant_discount = TRUE excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -722,7 +722,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A miniature energy crossbow that is small enough both to fit into a pocket and to slip into a backpack unnoticed by observers. Fires bolts tipped with toxin, a poisonous substance that is the product of a living organism. Stuns enemies for a short period of time. Recharges automatically." reference = "EC" item = /obj/item/gun/energy/kinetic_accelerator/crossbow - cost = 9 + cost = 45 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 50 @@ -731,7 +731,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A flamethrower, fuelled by a portion of highly flammable bio-toxins stolen previously from Nanotrasen stations. Make a statement by roasting the filth in their own greed. Use with caution." reference = "FT" item = /obj/item/flamethrower/full/tank - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 40 @@ -740,7 +740,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The energy sword is an edged weapon with a blade of pure energy. The sword is small enough to be pocketed when inactive. Activating it produces a loud, distinctive noise." reference = "ES" item = /obj/item/melee/energy/sword/saber - cost = 8 + cost = 40 /datum/uplink_item/dangerous/powerfist name = "Power Fist" @@ -750,21 +750,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) deal extra damage and hit targets further. Use a screwdriver to take out any attached tanks." reference = "PF" item = /obj/item/melee/powerfist - cost = 4 + cost = 20 /datum/uplink_item/dangerous/chainsaw name = "Chainsaw" desc = "A high powered chainsaw for cutting up ...you know...." reference = "CH" item = /obj/item/twohanded/chainsaw - cost = 12 + cost = 60 /datum/uplink_item/dangerous/commando_kit name = "Commandos knife operation kit" desc = "A box that smells like a mix of gunpowder, napalm and cheap whiskey. Contains everything you need to survive in such places." reference = "CK" item = /obj/item/storage/box/syndie_kit/commando_kit - cost = 7 + cost = 35 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) // SUPPORT AND MECHAS @@ -780,21 +780,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) This model lacks a method of space propulsion, and therefore it is advised to repair the mothership's teleporter if you wish to make use of it." reference = "GE" item = /obj/mecha/combat/gygax/dark/loaded - cost = 80 + cost = 400 /datum/uplink_item/support/rover name = "Rover Exosuit" desc = "A syndicate version of durand designed for teamwork. Has an abillity to create a forcewalls that only syndicate members can pass through." reference = "RV" item = /obj/mecha/combat/durand/rover/loaded - cost = 100 + cost = 500 /datum/uplink_item/support/mauler name = "Mauler Exosuit" desc = "A massive and incredibly deadly Syndicate exosuit. Features long-range targeting, thrust vectoring, and deployable smoke." reference = "ME" item = /obj/mecha/combat/marauder/mauler/loaded - cost = 140 + cost = 700 /datum/uplink_item/support/reinforcement name = "Reinforcement" @@ -803,7 +803,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "REINF" item = /obj/item/antag_spawner/nuke_ops refund_path = /obj/item/antag_spawner/nuke_ops - cost = 20 + cost = 100 refundable = TRUE cant_discount = TRUE @@ -814,7 +814,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "SAC" item = /obj/item/antag_spawner/nuke_ops/borg_tele/assault refund_path = /obj/item/antag_spawner/nuke_ops/borg_tele/assault - cost = 65 + cost = 325 /datum/uplink_item/support/reinforcement/medical_borg name = "Syndicate Medical Cyborg" @@ -824,7 +824,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "SMC" item = /obj/item/antag_spawner/nuke_ops/borg_tele/medical refund_path = /obj/item/antag_spawner/nuke_ops/borg_tele/medical - cost = 35 + cost = 175 /datum/uplink_item/support/reinforcement/saboteur_borg name = "Syndicate Saboteur Cyborg" @@ -839,7 +839,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A fully-loaded Donksoft bullpup submachine gun that fires riot grade rounds with a 20-round magazine." reference = "FSMG" item = /obj/item/gun/projectile/automatic/c20r/toy - cost = 5 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -848,7 +848,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A fully-loaded Donksoft belt-fed machine gun. This weapon has a massive 50-round magazine of devastating riot grade darts, that can briefly incapacitate someone in just one volley." reference = "FLMG" item = /obj/item/gun/projectile/automatic/l6_saw/toy - cost = 10 + cost = 50 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -859,7 +859,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) The holoparasites are unable to incoporate themselves to changeling and vampire agents." item = /obj/item/storage/box/syndie_kit/guardian excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) - cost = 14 + cost = 70 refund_path = /obj/item/guardiancreator/tech/choose refundable = TRUE cant_discount = TRUE @@ -875,35 +875,35 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A 2 additional 8-round 10mm magazines for use in the syndicate pistol, loaded with rounds that are cheap but around half as effective as .357" reference = "10MM" item = /obj/item/storage/box/syndie_kit/pistol_ammo - cost = 1 + cost = 5 /datum/uplink_item/ammo/pistolap name = "Stechkin - 10mm Armour Piercing Magazine" desc = "An additional 8-round 10mm magazine for use in the syndicate pistol, loaded with rounds that are less effective at injuring the target but penetrate protective gear." reference = "10MMAP" item = /obj/item/ammo_box/magazine/m10mm/ap - cost = 1 + cost = 5 /datum/uplink_item/ammo/pistolfire name = "Stechkin - 10mm Incendiary Magazine" desc = "An additional 8-round 10mm magazine for use in the syndicate pistol, loaded with incendiary rounds which ignite the target." reference = "10MMFIRE" item = /obj/item/ammo_box/magazine/m10mm/fire - cost = 1 + cost = 5 /datum/uplink_item/ammo/pistolhp name = "Stechkin - 10mm Hollow Point Magazine" desc = "An additional 8-round 10mm magazine for use in the syndicate pistol, loaded with rounds which are more damaging but ineffective against armour." reference = "10MMHP" item = /obj/item/ammo_box/magazine/m10mm/hp - cost = 1 + cost = 5 /datum/uplink_item/ammo/bullbuck name = "Drum - 12g Buckshot" desc = "An additional 12-round buckshot magazine for use in the auto shotguns. Front towards enemy." reference = "12BS" item = /obj/item/ammo_box/magazine/m12g - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bulldragon @@ -911,7 +911,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An alternative 12-round dragon's breath magazine for use in the auto shotguns. I'm a fire starter, twisted fire starter!" reference = "12DB" item = /obj/item/ammo_box/magazine/m12g/dragon - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bullflechette @@ -919,7 +919,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 12-round flechette magazine for use in the auto shotguns. Works well against armour." reference = "12FL" item = /obj/item/ammo_box/magazine/m12g/flechette - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bullterror @@ -927,7 +927,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An alternative 12-round bioterror magazine for use in the auto shotguns. Extremely toxic!" reference = "12BT" item = /obj/item/ammo_box/magazine/m12g/bioterror - cost = 3 + cost = 15 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bullmeteor @@ -935,7 +935,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An alternative 12-round breaching magazine for use in the auto shotguns. This ammo should be illegal!" reference = "12BRE" item = /obj/item/ammo_box/magazine/m12g/breach - cost = 5 + cost = 25 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bull_XLbuck @@ -943,7 +943,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 24-round buckshot magazine for use in the auto shotguns. Front towards enemy." reference = "12BSXL" item = /obj/item/ammo_box/magazine/m12g/XtrLrg - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bull_XLflechette @@ -951,7 +951,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 24-round flechette magazine for use in the auto shotguns. Works well against armour." reference = "12FLXL" item = /obj/item/ammo_box/magazine/m12g/XtrLrg/flechette - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bull_XLdragon @@ -959,7 +959,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 24-round dragon's breath magazine for use in the auto shotguns. I'm a fire starter, twisted fire starter!" reference = "12DBXL" item = /obj/item/ammo_box/magazine/m12g/XtrLrg/dragon - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bulldog_ammobag @@ -967,7 +967,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A duffel bag filled with enough 12g ammo to supply an entire team, at a discounted price." reference = "12ADB" item = /obj/item/storage/backpack/duffel/syndie/ammo/shotgun - cost = 12 // normally 18 + cost = 60 // normally 90 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/bulldog_XLmagsbag @@ -975,7 +975,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A duffel bag containing three 24 round drum magazines(Buckshot, Flechette, Dragon's Breath)." reference = "12XLDB" item = /obj/item/storage/backpack/duffel/syndie/ammo/shotgunXLmags - cost = 9 // normally 18 + cost = 45 // normally 90 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/uzi @@ -983,7 +983,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 30 round 9mm magazine for use in Type-U3 Uzi." reference = "UZA" item = /obj/item/ammo_box/magazine/uzim9mm - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/uzi_ammobag @@ -991,7 +991,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A duffel bag filled with enough 9mm ammo to supply an entire gang. Groove street forever." reference = "UZADB" item = /obj/item/storage/backpack/duffel/syndie/ammo/uzi - cost = 14 // normally 20 + cost = 70 // normally 100 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/smg @@ -999,7 +999,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 20-round .45 magazine for use in the C-20r submachine gun. These bullets pack a lot of punch that can knock most targets down, but do limited overall damage." reference = "45" item = /obj/item/ammo_box/magazine/smgm45 - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/smg_ammobag @@ -1007,7 +1007,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A duffel bag filled with enough .45 ammo to supply an entire team, at a discounted price." reference = "45ADB" item = /obj/item/storage/backpack/duffel/syndie/ammo/smg - cost = 14 // normally 20 + cost = 70 // normally 100 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/carbine @@ -1015,7 +1015,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional 30-round 5.56 magazine for use in the M-90gl carbine. These bullets don't have the punch to knock most targets down, but dish out higher overall damage." reference = "556" item = /obj/item/ammo_box/magazine/m556 - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/a40mm @@ -1023,7 +1023,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box of 4 additional 40mm HE grenades for use the C-90gl's underbarrel grenade launcher. Your teammates will thank you to not shoot these down small hallways." reference = "40MM" item = /obj/item/ammo_box/a40mm - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/carbine_ammobag @@ -1031,7 +1031,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A duffel bag filled with 9 5.56 Toploader magazines, and a 40 mm Grenade Ammo Box. Pew pew." reference = "556ADB" item = /obj/item/storage/backpack/duffel/syndie/ammo/carbine - cost = 18 // normally 24 + cost = 90 // normally 120 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/machinegun @@ -1039,7 +1039,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A 50-round magazine of 5.56x45mm ammunition for use in the L6 SAW machine gun. By the time you need to use this, you'll already be on a pile of corpses." reference = "762" item = /obj/item/ammo_box/magazine/mm556x45 - cost = 10 + cost = 50 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -1048,11 +1048,11 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A Duffel Bag filled with 5 mm556x45 box magazines. Remember, no Russian." reference = "762ADB" item = /obj/item/storage/backpack/duffel/syndie/ammo/lmg - cost = 40 // normally 50 + cost = 200 // normally 250 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/sniper - cost = 5 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/sniper/basic @@ -1060,21 +1060,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An additional standard 5-round magazine for use with .50 sniper rifles." reference = "50M" item = /obj/item/ammo_box/magazine/sniper_rounds - cost = 5 + cost = 20 /datum/uplink_item/ammo/sniper/soporific name = "Sniper - .50 Soporific Magazine" desc = "A 3-round magazine of soporific ammo designed for use with .50 sniper rifles. Put your enemies to sleep today!" reference = "50S" item = /obj/item/ammo_box/magazine/sniper_rounds/soporific - cost = 3 + cost = 15 /datum/uplink_item/ammo/sniper/explosive name = "Sniper - .50 Explosive Magazine" desc = "A 5-round magazine of explosive ammo designed for use with .50 sniper rifles. Human rights? What?" reference = "50HE" item = /obj/item/ammo_box/magazine/sniper_rounds/explosive - cost = 6 + cost = 30 /datum/uplink_item/ammo/sniper/penetrator name = "Sniper - .50 Penetrator Magazine" @@ -1082,14 +1082,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Can pierce walls and multiple enemies." reference = "50P" item = /obj/item/ammo_box/magazine/sniper_rounds/penetrator - cost = 5 + cost = 25 /datum/uplink_item/ammo/bioterror name = "Box of Bioterror Syringes" desc = "A box full of preloaded syringes, containing various chemicals that seize up the victim's motor and broca system , making it impossible for them to move or speak while in their system." reference = "BTS" item = /obj/item/storage/box/syndie_kit/bioterror - cost = 5 + cost = 25 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/toydarts @@ -1097,7 +1097,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box of 40 Donksoft foam riot darts, for reloading any compatible foam dart gun. Don't forget to share!" reference = "FOAM" item = /obj/item/ammo_box/foambox/riot - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -1106,7 +1106,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box of 50. cal sniper ammo." reference = "50L" item = /obj/item/ammo_box/magazine/sniper_rounds/compact - cost = 2 + cost = 10 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/revolver @@ -1114,7 +1114,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box with 2 speed loaders that contains fourteen additional .357 Magnum rounds for the syndicate revolver. For when you really need a lot of things dead." reference = "357" item = /obj/item/storage/box/syndie_kit/revolver_ammo - cost = 1 + cost = 5 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/deagle @@ -1122,7 +1122,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A magazine that contains seven additional .50AE round for Desert Eagle. Kill them all." reference = ".50AE" item = /obj/item/ammo_box/magazine/m50 - cost = 1 + cost = 5 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/rocketHE @@ -1130,7 +1130,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A rocket from a rocketlauncher. This one deals a devastating explosion, enough to tear the station and civillian apart." reference = "RHE" item = /obj/item/ammo_casing/caseless/rocket - cost = 8 + cost = 40 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/rocketHEDP @@ -1138,7 +1138,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A rocket from a rocketlauncher. This one emits shrapnel and incendiary ammunition. The rocket itself is strong enough to destroy station mechs and robots with one shot." reference = "RHEDP" item = /obj/item/ammo_casing/caseless/rocket/hedp - cost = 6 + cost = 30 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/ammo/knives_kit @@ -1146,7 +1146,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box containing 7 throwing knives" reference = "THR" item = /obj/item/storage/box/syndie_kit/knives_kit - cost = 1 + cost = 5 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) // STEALTHY WEAPONS @@ -1160,7 +1160,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) will instantly put them in your grasp and silence them, as well as causing rapid suffocation. Does not work on those who do not need to breathe." reference = "GAR" item = /obj/item/twohanded/garrote - cost = 4 + cost = 20 /datum/uplink_item/stealthy_weapons/martialarts name = "Martial Arts Scroll" @@ -1169,7 +1169,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Unable to be understood by vampire and changeling agents." reference = "SCS" item = /obj/item/sleeping_carp_scroll - cost = 13 + cost = 65 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) refundable = TRUE @@ -1180,7 +1180,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A manual that teaches a single user tactical Close-Quarters Combat before self-destructing. Does not restrict weapon usage, but cannot be used alongside Gloves of the North Star." reference = "CQC" item = /obj/item/CQC_manual - cost = 10 + cost = 50 cant_discount = TRUE /datum/uplink_item/stealthy_weapons/mr_chang @@ -1188,7 +1188,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "This package was kindly provided to us by Mr. Cheng's corporation. It contains a wide range of implements for the most effective promotion of products in a free market environment." reference = "MRCH" item = /obj/item/storage/box/syndie_kit/mr_chang_technique - cost = 3 + cost = 15 cant_discount = FALSE /datum/uplink_item/stealthy_weapons/cameraflash @@ -1198,7 +1198,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Useful for stunning borgs and individuals without eye protection or blinding a crowd for a get away." reference = "CF" item = /obj/item/flash/cameraflash - cost = 2 + cost = 10 /datum/uplink_item/stealthy_weapons/throwingweapons name = "Box of Throwing Weapons" @@ -1206,21 +1206,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) throwing weapons. The bolas can knock a target down and the shurikens will embed into limbs." reference = "STK" item = /obj/item/storage/box/syndie_kit/throwing_weapons - cost = 1 + cost = 5 /datum/uplink_item/stealthy_weapons/edagger name = "Energy Dagger" desc = "A dagger made of energy that looks and functions as a pen when off." reference = "EDP" item = /obj/item/pen/edagger - cost = 2 + cost = 10 /datum/uplink_item/stealthy_weapons/sleepy_pen name = "Sleepy Pen" desc = "A syringe disguised as a functional pen. It's filled with a potent anaesthetic. \ The pen holds two doses of the mixture. The pen can be refilled." reference = "SP" item = /obj/item/pen/sleepy - cost = 8 + cost = 40 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_weapons/foampistol @@ -1228,7 +1228,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An innocent looking toy pistol designed to fire foam darts. Comes loaded with riot grade darts, to incapacitate a target." reference = "FSPI" item = /obj/item/gun/projectile/automatic/toy/pistol/riot - cost = 3 + cost = 15 surplus = 10 /datum/uplink_item/stealthy_weapons/false_briefcase @@ -1236,14 +1236,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A modified briefcase capable of storing and firing a gun under a false bottom. Use a screwdriver to pry away the false bottom and make modifications. Distinguishable upon close examination due to the added weight." reference = "FBBC" item = /obj/item/storage/briefcase/false_bottomed - cost = 2 + cost = 10 /datum/uplink_item/stealthy_weapons/soap name = "Syndicate Soap" desc = "A sinister-looking surfactant used to clean blood stains to hide murders and prevent DNA analysis. You can also drop it underfoot to slip people." reference = "SOAP" item = /obj/item/soap/syndie - cost = 1 + cost = 5 surplus = 50 /datum/uplink_item/stealthy_weapons/dart_pistol @@ -1251,7 +1251,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A miniaturized version of a normal syringe gun. It is very quiet when fired and can fit into any space a small item can. Comes with 3 syringes, a knockout poison, a silencing agent and a deadly neurotoxin." reference = "DART" item = /obj/item/storage/box/syndie_kit/dart_gun - cost = 4 + cost = 20 surplus = 50 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1260,7 +1260,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A rapid syringe gun able to hold six shot and fire them rapidly. Great together with the bioterror syringe" reference = "RSG" item = /obj/item/gun/syringe/rapidsyringe - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_weapons/silencer @@ -1268,7 +1268,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Fitted for use on any small caliber weapon with a threaded barrel, this suppressor will silence the shots of the weapon for increased stealth and superior ambushing capability." reference = "US" item = /obj/item/suppressor - cost = 1 + cost = 5 surplus = 10 /datum/uplink_item/stealthy_weapons/dehy_carp @@ -1276,7 +1276,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Just add water to make your very own hostile to everything space carp. It looks just like a plushie. The first person to squeeze it will be registered as its owner, who it will not attack. If no owner is registered, it'll just attack everyone." reference = "DSC" item = /obj/item/toy/carpplushie/dehy_carp - cost = 2 + cost = 10 // GRENADES AND EXPLOSIVES @@ -1288,21 +1288,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "C-4 is plastic explosive of the common variety Composition C. You can use it to breach walls or connect an assembly to its wiring to make it remotely detonable. It has a modifiable timer with a minimum setting of 10 seconds." reference = "C4" item = /obj/item/grenade/plastic/c4 - cost = 1 + cost = 5 /datum/uplink_item/explosives/plastic_explosives_pack name = "Pack of 5 C-4 Explosives" desc = "A package containing 5 C-4 Explosives at a discounted price. For when you need that little bit extra for your sabotaging needs." reference = "C4P" item = /obj/item/storage/box/syndie_kit/c4 - cost = 4 + cost = 20 /datum/uplink_item/explosives/c4bag name = "Bag of C-4 explosives" desc = "Because sometimes quantity is quality. Contains 10 C-4 plastic explosives." reference = "C4B" item = /obj/item/storage/backpack/duffel/syndie/c4 - cost = 8 //20% discount! + cost = 40 //20% discount! cant_discount = TRUE uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1311,7 +1311,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "X-4 is a shaped charge designed to be safe to the user while causing maximum damage to the occupants of the room beach breached. It has a modifiable timer with a minimum setting of 10 seconds." reference = "X4" item = /obj/item/grenade/plastic/x4 - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/explosives/x4bag @@ -1321,7 +1321,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) For when you want a controlled explosion that leaves a wider, deeper, hole." reference = "X4B" item = /obj/item/storage/backpack/duffel/syndie/x4 - cost = 4 + cost = 20 cant_discount = TRUE uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1330,7 +1330,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Thermite-charged breaching explosive. Effective to destroy wall, but not to destroy airlocks." reference = "T4" item = /obj/item/grenade/plastic/x4/thermite - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/explosives/t4_pack @@ -1338,7 +1338,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A package containing 3 T-4." reference = "T4P" item = /obj/item/storage/box/syndie_kit/t4P - cost = 5 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/explosives/syndicate_bomb @@ -1347,7 +1347,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) You can wrench the bomb down to prevent removal. The crew may attempt to defuse the bomb." reference = "SB" item = /obj/item/radio/beacon/syndicate/bomb - cost = 8 + cost = 40 surplus = 0 cant_discount = TRUE hijack_only = TRUE @@ -1356,7 +1356,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/explosives/syndicate_bomb/nuke reference = "SB" item = /obj/item/radio/beacon/syndicate/bomb - cost = 11 + cost = 55 excludefrom = list() uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) hijack_only = FALSE @@ -1367,7 +1367,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) You can wrench the bomb down to prevent removal. The crew may attempt to defuse the bomb." reference = "SBEMP" item = /obj/item/radio/beacon/syndicate/bomb/emp - cost = 8 + cost = 40 surplus = 0 cant_discount = TRUE hijack_only = TRUE @@ -1376,7 +1376,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) /datum/uplink_item/explosives/emp_bomb/nuke reference = "SBEMP" item = /obj/item/radio/beacon/syndicate/bomb/emp - cost = 10 + cost = 50 excludefrom = list() uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) hijack_only = FALSE @@ -1387,14 +1387,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The minibomb is a grenade with a five-second fuse." reference = "SMB" item = /obj/item/grenade/syndieminibomb - cost = 6 + cost = 30 /datum/uplink_item/explosives/rocketlauncher name = "84mm Rocket Propelled Grenade Launcher" desc = "A reusable rocket propelled grenade launcher preloaded with a low-yield 84mm HE round. Guaranteed to send your target out with a bang or your money back!" reference = "PML9" item = /obj/item/gun/projectile/revolver/rocketlauncher - cost = 10 + cost = 50 surplus = 0 // no way uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1403,7 +1403,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A belt full of rockets for a rocket propelled grenade launcher. Guaranteed to eliminate most of your targets. Just don't blow up your mates!" reference = "PMLB" item = /obj/item/storage/belt/rocketman - cost = 35 + cost = 175 surplus = 0 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1412,14 +1412,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "When inserted into a personal digital assistant, this cartridge gives you five opportunities to detonate PDAs of crewmembers who have their message feature enabled. The concussive effect from the explosion will knock the recipient out for a short period, and deafen them for longer. It has a chance to detonate your PDA." reference = "DEPC" item = /obj/item/cartridge/syndicate - cost = 6 + cost = 30 /datum/uplink_item/explosives/pizza_bomb name = "Pizza Bomb" desc = "A pizza box with a bomb taped inside of it. The timer needs to be set by opening the box; afterwards, opening the box again will trigger the detonation." reference = "PB" item = /obj/item/pizza_bomb - cost = 3 + cost = 15 surplus = 80 /datum/uplink_item/explosives/fraggrenade @@ -1427,13 +1427,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "FRAG" desc = "A belt containing 4 lethally dangerous and destructive grenades." item = /obj/item/storage/belt/grenade/frag - cost = 4 + cost = 20 /datum/uplink_item/explosives/grenadier name = "Grenadier's belt" desc = "A belt containing 26 lethally dangerous and destructive grenades." item = /obj/item/storage/belt/grenade/full - cost = 25 + cost = 125 surplus = 0 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1442,7 +1442,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A unique grenade that deploys a swarm of viscerators upon activation, which will chase down and shred any non-operatives in the area." reference = "VDG" item = /obj/item/grenade/spawnergrenade/manhacks - cost = 6 + cost = 30 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 35 @@ -1451,7 +1451,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box of two (2) grenades that spread knockout gas over a large area. Equip internals before using one of these." reference = "ANG" item = /obj/item/storage/box/syndie_kit/atmosn2ogrenades - cost = 4 + cost = 20 /datum/uplink_item/explosives/atmosfiregrenades name = "Plasma Fire Grenades" @@ -1459,7 +1459,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) reference = "APG" item = /obj/item/storage/box/syndie_kit/atmosfiregrenades hijack_only = TRUE - cost = 10 + cost = 50 surplus = 0 cant_discount = TRUE @@ -1469,7 +1469,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) security's energy weapons, and silicon lifeforms when you're in a tight spot." reference = "EMPK" item = /obj/item/storage/box/syndie_kit/emp - cost = 2 + cost = 10 // STEALTHY TOOLS @@ -1480,7 +1480,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Syndicate Counterfeiter Bundle" desc = "A cleverly implemented bundle designed to document counterfeiting. Comes with a chameleon stamp, capable of imitating any NanoTrasen issued stamps and a fakesign pen to alter the world through the sheer force of paperwork. While making the user capable of faking almost any document, this Syndicate technology has been rumored to cause a huge upheaval on NT objects. " reference = "CHST" - cost = 1 + cost = 5 surplus = 35 item = /obj/item/storage/box/syndie_kit/counterfeiter_bundle @@ -1489,7 +1489,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A flag that can be disguised as any other known flag. There is a hidden spot in the pole to boobytrap the flag with a grenade or minibomb, which will detonate some time after the flag is set on fire." reference = "CHFLAG" item = /obj/item/flag/chameleon - cost = 1 + cost = 5 surplus = 35 /datum/uplink_item/stealthy_tools/chamsechud @@ -1497,21 +1497,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A stolen Nanotrasen Security HUD with Syndicate chameleon technology implemented into it. Similarly to a chameleon jumpsuit, the HUD can be morphed into various other eyewear, while retaining the HUD qualities when worn." reference = "CHHUD" item = /obj/item/clothing/glasses/hud/security/chameleon - cost = 2 + cost = 10 /datum/uplink_item/stealthy_tools/thermal name = "Thermal Chameleon Glasses" desc = "These glasses are thermals with Syndicate chameleon technology built into them. They allow you to see organisms through walls by capturing the upper portion of the infra-red light spectrum, emitted as heat and light by objects. Hotter objects, such as warm bodies, cybernetic organisms and artificial intelligence cores emit more of this light than cooler objects like walls and airlocks." reference = "THIG" item = /obj/item/clothing/glasses/chameleon/thermal - cost = 4 + cost = 20 /datum/uplink_item/stealthy_tools/traitor_belt name = "Traitor's Toolbelt" desc = "A robust seven-slot belt made for carrying a broad variety of weapons, ammunition and explosives. It's modelled after the standard NT toolbelt so as to avoid suspicion while wearing it." reference = "SBM" item = /obj/item/storage/belt/military/traitor - cost = 1 + cost = 5 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_tools/frame @@ -1522,7 +1522,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) telecrystals normally." reference = "FRAME" item = /obj/item/cartridge/frame - cost = 4 + cost = 20 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_tools/agent_card @@ -1530,7 +1530,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Agent cards prevent artificial intelligences from tracking the wearer, and can copy access from other identification cards. The access is cumulative, so scanning one card does not erase the access gained from another." reference = "AIDC" item = /obj/item/card/id/syndicate - cost = 2 + cost = 10 /datum/uplink_item/stealthy_tools/chameleon name = "Chameleon Kit" @@ -1538,7 +1538,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Due to budget cuts, the shoes don't provide protection against slipping. The set comes with a complementary chameleon stamp." reference = "CHAM" item = /obj/item/storage/box/syndie_kit/chameleon - cost = 4 + cost = 20 /datum/uplink_item/stealthy_tools/syndigaloshes name = "No-Slip Chameleon Shoes" @@ -1546,12 +1546,12 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) They do not work on heavily lubricated surfaces." reference = "NSSS" item = /obj/item/clothing/shoes/chameleon/noslip - cost = 2 + cost = 10 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_tools/syndigaloshes/nuke reference = "NNSSS" - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_tools/chameleon_proj @@ -1559,14 +1559,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Projects an image across a user, disguising them as an object scanned with it, as long as they don't move the projector from their hand. The disguised user cannot run and projectiles pass over them." reference = "CP" item = /obj/item/chameleon - cost = 5 + cost = 25 /datum/uplink_item/stealthy_tools/camera_bug name = "Camera Bug" desc = "Enables you to view all cameras on the network to track a target." reference = "CB" item = /obj/item/camera_bug - cost = 1 + cost = 5 surplus = 90 /datum/uplink_item/stealthy_tools/dnascrambler @@ -1574,14 +1574,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A syringe with one injection that randomizes appearance and name upon use. A cheaper but less versatile alternative to an agent card and voice changer." reference = "DNAS" item = /obj/item/dnascrambler - cost = 2 + cost = 10 /datum/uplink_item/stealthy_tools/smugglersatchel name = "Smuggler's Satchel" desc = "This satchel is thin enough to be hidden in the gap between plating and tiling, great for stashing your stolen goods. Comes with a crowbar and a floor tile inside." reference = "SMSA" item = /obj/item/storage/backpack/satchel_flat - cost = 2 + cost = 10 surplus = 30 /datum/uplink_item/stealthy_tools/emplight @@ -1590,7 +1590,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Useful for disrupting headsets, cameras, and borgs during stealth operations." reference = "EMPL" item = /obj/item/flashlight/emp - cost = 4 + cost = 20 surplus = 30 /datum/uplink_item/stealthy_tools/syndigaloshes @@ -1598,13 +1598,13 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "These shoes will allow the wearer to run on wet floors and slippery objects without falling down. They do not work on heavily lubricated surfaces." reference = "NOCS" item = /obj/item/clothing/shoes/chameleon/noslip - cost = 2 + cost = 10 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/stealthy_tools/syndigaloshes/nuke reference = "NOCSN" item = /obj/item/clothing/shoes/chameleon/noslip - cost = 4 + cost = 20 excludefrom = list() uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1614,7 +1614,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) spraycan for changing their appearances." reference = "ADCC" item = /obj/item/storage/box/syndie_kit/cutouts - cost = 1 + cost = 5 surplus = 20 /datum/uplink_item/stealthy_tools/clownkit @@ -1622,7 +1622,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "All the tools you need to play the best prank Nanotrasen has ever seen. Includes a voice changer mask, magnetic clown shoes, and standard clown outfit, tools, and backpack." reference = "HBIK" item = /obj/item/storage/backpack/clown/syndie - cost = 6 + cost = 30 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -1631,7 +1631,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "This device disguises itself as any object scanned by it. It's unstable and disguise will be disabled in about 30 minutes. The box contains three counterfeiters." reference = "CC" item = /obj/item/storage/box/syndie_kit/chameleon_counter - cost = 2 + cost = 10 // DEVICE AND TOOLS /datum/uplink_item/device_tools @@ -1643,28 +1643,28 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "The cryptographic sequencer, also known as an emag, is a small card that unlocks hidden functions in electronic devices, subverts intended functions and characteristically breaks security mechanisms." reference = "EMAG" item = /obj/item/card/emag - cost = 10 // No brainrot allowed + cost = 50 // No brainrot allowed /datum/uplink_item/device_tools/access_tuner name = "Access Tuner" desc = "The access tuner is a small device that can interface with airlocks from range. It takes a few seconds to connect and can change the bolt state, open the door, or toggle emergency access." reference = "HACK" item = /obj/item/door_remote/omni/access_tuner - cost = 6 + cost = 30 /datum/uplink_item/device_tools/toolbox name = "Fully Loaded Toolbox" desc = "The syndicate toolbox is a suspicious black and red. Aside from tools, it comes with insulated gloves and a multitool." reference = "FLTB" item = /obj/item/storage/toolbox/syndicate - cost = 1 + cost = 5 /datum/uplink_item/device_tools/supertoolbox name = "Superior Suspicious Toolbox" desc = "Ultimate version of all toolboxes, this one more robust and more useful than his cheaper version. Comes with experimental type tools, combat gloves and cool sunglasses." item = /obj/item/storage/toolbox/syndisuper reference = "SSTB" - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/holster @@ -1672,14 +1672,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "For holding your favourite gun close and always being ready for a cowboy duel with clown." reference = "SHL" item = /obj/item/clothing/accessory/holster - cost = 1 + cost = 5 /datum/uplink_item/device_tools/holster/knives name = "Knife holster" desc = "A bunch of straps connected into one holster. Has 7 special slots for holding knives." reference = "KH" item = /obj/item/clothing/accessory/holster/knives - cost = 2 + cost = 10 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/webbing @@ -1687,35 +1687,35 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Sturdy mess of synthcotton belts and buckles, ready to share your burden." reference = "WBNG" item = /obj/item/clothing/accessory/storage/webbing - cost = 1 + cost = 5 /datum/uplink_item/device_tools/black_vest name = "Black Vest" desc = "Robust black synthcotton vest with lots of pockets to hold whatever you need, but cannot hold in hands." reference = "BLCKVST" item = /obj/item/clothing/accessory/storage/black_vest - cost = 1 + cost = 5 /datum/uplink_item/device_tools/brown_vest name = "Brown Vest" desc = "Worn brownish synthcotton vest with lots of pockets to unload your hands." reference = "BRWNVST" item = /obj/item/clothing/accessory/storage/brown_vest - cost = 1 + cost = 5 /datum/uplink_item/device_tools/surgerybag name = "Syndicate Surgery Duffelbag" desc = "The Syndicate Surgical Bag comes with a complete set of everything you need for quality surgery, including a straitjacket and muzzle. The bag itself is unprecedentedly light, doesn't slow you down, and is completely silent." reference = "SSDB" item = /obj/item/storage/backpack/duffel/syndie/surgery - cost = 2 + cost = 10 /datum/uplink_item/device_tools/bonerepair name = "Prototype Nanite Autoinjector Kit" desc = "Stolen prototype full body repair nanites. Contains one prototype nanite autoinjector and guide." reference = "NCAI" item = /obj/item/storage/box/syndie_kit/bonerepair - cost = 2 + cost = 10 /datum/uplink_item/device_tools/syndicate_teleporter name = "Experimental Syndicate Teleporter" @@ -1725,14 +1725,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Has 4 charges, recharges, warranty voided if exposed to EMP." reference = "TELE" item = /obj/item/storage/box/syndie_kit/teleporter - cost = 8 + cost = 40 /datum/uplink_item/device_tools/spai name = "Syndicate Personal AI Device (SPAI)" desc = "You will have your personal assistant. It comes with an increased amount of memory and special programs." reference = "SPAI" item = /obj/item/storage/box/syndie_kit/pai - cost = 4 + cost = 35 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) refundable = TRUE refund_path = /obj/item/paicard_upgrade/unused @@ -1743,7 +1743,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A diamond tipped thermal drill with magnetic clamps for the purpose of quickly drilling hardened objects. Guaranteed 100% jam proof." reference = "DDRL" item = /obj/item/thermal_drill/diamond_drill - cost = 1 + cost = 5 + +/datum/uplink_item/device_tools/jackhammer + name = "Jackhammer" + desc = "A jackhammer for breaking stone. Or walls. Or skulls" + reference = "JCKH" + item = /obj/item/pickaxe/drill/jackhammer + cost = 15 /datum/uplink_item/device_tools/medkit name = "Syndicate Combat Medic Kit" @@ -1751,7 +1758,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) and other medical supplies helpful for a medical field operative." reference = "SCMK" item = /obj/item/storage/firstaid/syndie - cost = 7 + cost = 35 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/vtec @@ -1759,7 +1766,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Increases the movement speed of a Cyborg. Install into any Borg, Syndicate or subverted" reference = "VTEC" item = /obj/item/borg/upgrade/vtec - cost = 6 + cost = 30 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/cyborg_magboots @@ -1767,7 +1774,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Позволяет киборгу частично примагничиваться к корпусу, что позволяет игнорировать некоторые условия отсутсвия гравитации." reference = "FMAG" item = /obj/item/borg/upgrade/magboots - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/autoimplanter @@ -1775,7 +1782,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Cheaper version of nuclear operatives autoimplanter, this model allows you to install three cybernetic implants on the field." reference = "SAI" item = /obj/item/autoimplanter/traitor - cost = 6 + cost = 30 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) //Space Suits and Hardsuits @@ -1790,7 +1797,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) sightings, however. " reference = "SS" item = /obj/item/storage/box/syndie_kit/space - cost = 4 + cost = 20 /datum/uplink_item/suits/hardsuit name = "Syndicate Hardsuit" @@ -1801,7 +1808,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Nanotrasen crew who spot these suits are known to panic." reference = "BRHS" item = /obj/item/storage/box/syndie_kit/hardsuit - cost = 6 + cost = 30 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/suits/chameleon_hardsuit @@ -1810,14 +1817,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) In addition, it has an in-built chameleon system, allowing you to disguise your hardsuit to the most common variations on your mission area. \ This one disquised as engineering hardsuit." reference = "CHS" - cost = 10 //reskinned blood-red hardsuit with chameleon + cost = 50 //reskinned blood-red hardsuit with chameleon item = /obj/item/storage/box/syndie_kit/chameleon_hardsuit /datum/uplink_item/suits/hardsuit/elite name = "Elite Syndicate Hardsuit" desc = "An advanced hardsuit with superior armor and mobility to the standard Syndicate Hardsuit." item = /obj/item/clothing/suit/space/hardsuit/syndi/elite - cost = 10 + cost = 50 reference = "ESHS" excludefrom = list() uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1826,7 +1833,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) name = "Shielded Hardsuit" desc = "An advanced hardsuit with built-in energy shielding. The shields will rapidly recharge when not under fire." item = /obj/item/clothing/suit/space/hardsuit/syndi/shielded - cost = 30 + cost = 150 reference = "SHS" excludefrom = list() uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) @@ -1836,7 +1843,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A key, that when inserted into a radio headset, allows you to listen to and talk with artificial intelligences and cybernetic organisms in binary. To talk on the binary channel, type :+ before your radio message." reference = "BITK" item = /obj/item/encryptionkey/binary - cost = 5 + cost = 25 surplus = 75 /datum/uplink_item/device_tools/bowman_kit @@ -1845,7 +1852,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) A key, that when inserted into a radio headset, allows you to listen to all station department channels as well as talk on an encrypted Syndicate channel." reference = "SEK" item = /obj/item/storage/box/syndie_kit/bowman_conversion_kit - cost = 1 + cost = 5 surplus = 75 /datum/uplink_item/device_tools/hacked_module @@ -1853,7 +1860,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "When used with an upload console, this module allows you to upload priority laws to an artificial intelligence. Be careful with their wording, as artificial intelligences may look for loopholes to exploit." reference = "HAI" item = /obj/item/aiModule/syndicate - cost = 8 + cost = 40 /datum/uplink_item/device_tools/magboots name = "Blood-Red Magboots" @@ -1861,7 +1868,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) These reverse-engineered knockoffs of Nanotrasen's 'Advanced Magboots' slow you down in simulated-gravity environments much like the standard issue variety." reference = "BRMB" item = /obj/item/clothing/shoes/magboots/syndie - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/magboots/advance @@ -1870,7 +1877,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) These reverse-engineered knockoffs of Nanotrasen's 'Advanced Magboots' not slow you down in simulated-gravity environments and provide protection against slipping on the space lube." reference = "ABRMB" item = /obj/item/clothing/shoes/magboots/syndie/advance - cost = 8 + cost = 40 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/powersink @@ -1878,7 +1885,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "When screwed to wiring attached to an electric grid, then activated, this large device places excessive load on the grid, causing a stationwide blackout. The sink cannot be carried because of its excessive size. Ordering this sends you a small beacon that will teleport the power sink to your location on activation." reference = "PS" item = /obj/item/powersink - cost = 8 + cost = 40 /datum/uplink_item/device_tools/singularity_beacon name = "Power Beacon" @@ -1888,7 +1895,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) sends you a small beacon that will teleport the larger beacon to your location upon activation." reference = "SNGB" item = /obj/item/radio/beacon/syndicate - cost = 6 + cost = 30 surplus = 0 hijack_only = TRUE //This is an item only useful for a hijack traitor, as such, it should only be available in those scenarios. cant_discount = TRUE @@ -1899,7 +1906,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Useful for when speed matters or you wish to synchronize multiple bomb blasts. Be sure to stand clear of the blast radius before using the detonator." reference = "SD" item = /obj/item/syndicatedetonator - cost = 3 + cost = 15 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/device_tools/advpinpointer @@ -1907,28 +1914,28 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A pinpointer that tracks any specified coordinates, DNA string, high value item or the nuclear authentication disk." reference = "ADVP" item = /obj/item/pinpointer/advpinpointer - cost = 4 + cost = 20 /datum/uplink_item/device_tools/ai_detector name = "Artificial Intelligence Detector" // changed name in case newfriends thought it detected disguised ai's desc = "A functional multitool that turns red when it detects an artificial intelligence watching it or its holder. Knowing when an artificial intelligence is watching you is useful for knowing when to maintain cover." reference = "AID" item = /obj/item/multitool/ai_detect - cost = 1 + cost = 5 /datum/uplink_item/device_tools/jammer name = "Radio Jammer" desc = "This device will disrupt any nearby outgoing radio communication when activated." reference = "RJ" item = /obj/item/jammer - cost = 2 + cost = 10 /datum/uplink_item/device_tools/teleporter name = "Teleporter Circuit Board" desc = "A printed circuit board that completes the teleporter onboard the mothership. Advise you test fire the teleporter before entering it, as malfunctions can occur." item = /obj/item/circuitboard/teleporter reference = "TP" - cost = 20 + cost = 100 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -1937,7 +1944,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Use to select the landing zone of your assault pod." item = /obj/item/assault_pod reference = "APT" - cost = 25 + cost = 125 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 @@ -1946,7 +1953,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An incredibly useful personal shield projector, capable of reflecting energy projectiles, but it cannot block other attacks. Pair with an Energy Sword for a killer combination." item = /obj/item/shield/energy/syndie reference = "ESD" - cost = 12 + cost = 60 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 20 @@ -1955,7 +1962,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Medical Beam Gun, useful in prolonged firefights. DO NOT CROSS THE BEAMS. Crossing beams with another medbeam or attaching two beams to one target will have explosive consequences." item = /obj/item/gun/medbeam reference = "MBG" - cost = 15 + cost = 75 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) //Stimulants @@ -1964,7 +1971,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A highly illegal compound contained within a compact auto-injector; when injected it makes the user extremely resistant to incapacitation and greatly enhances the body's ability to repair itself." reference = "ST" item = /obj/item/reagent_containers/hypospray/autoinjector/stimulants - cost = 5 + cost = 25 excludefrom = list(UPLINK_TYPE_NUCLEAR) // IMPLANTS @@ -1977,14 +1984,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An implant injected into the body and later activated manually to break out of any restraints. Can be activated up to 4 times." reference = "FI" item = /obj/item/implanter/freedom - cost = 4 + cost = 20 /datum/uplink_item/implants/uplink name = "Uplink Implant" desc = "An implant injected into the body, and later activated manually to open an uplink with 10 telecrystals. The ability for an agent to open an uplink after their possessions have been stripped from them makes this implant excellent for escaping confinement." reference = "UI" item = /obj/item/implanter/uplink - cost = 12 + cost = 60 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 0 cant_discount = TRUE @@ -1994,21 +2001,21 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An implant injected into the body, and later activated at the user's will. It will open a small subspace pocket capable of storing two items." reference = "SI" item = /obj/item/implanter/storage - cost = 6 + cost = 30 /datum/uplink_item/implants/mindslave name = "Mindslave Implant" desc = "A box containing an implanter filled with a mindslave implant that when injected into another person makes them loyal to you and your cause, unless of course they're already implanted by someone else. Loyalty ends if the implant is no longer in their system." reference = "MI" item = /obj/item/implanter/traitor - cost = 10 + cost = 50 /datum/uplink_item/implants/adrenal name = "Adrenal Implant" desc = "An implant injected into the body, and later activated manually to inject a chemical cocktail, which has a mild healing effect along with removing and reducing the time of all stuns and increasing movement speed. Can be activated up to 3 times." reference = "AI" item = /obj/item/implanter/adrenalin - cost = 8 + cost = 40 cant_discount = TRUE surplus = 0 @@ -2018,7 +2025,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) This will permanently destroy your body, however." reference = "MBI" item = /obj/item/implanter/explosive - cost = 2 + cost = 10 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/implants/mantisblade @@ -2026,7 +2033,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box containing a set of two Gorlex Hidden Blade Implants comes with self-destructing auto-implanters. After the EMP, they return to service to show that it's too early to write you off." reference = "MABI" item = /obj/item/storage/box/syndie_kit/mantisblade - cost = 12 + cost = 60 surplus = 90 /datum/uplink_item/implants/stealthbox @@ -2034,7 +2041,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An implant injected into the body, and later activated manually to deploy a box, fully hiding you in the surroundings. Can be used indefinitely" reference = "BI" item = /obj/item/implanter/stealth - cost = 8 + cost = 40 // Cybernetics /datum/uplink_item/cyber_implants @@ -2047,14 +2054,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "These cybernetic eyes will give you thermal vision. Comes with an automated implanting tool." reference = "CIT" item = /obj/item/storage/box/cyber_implants/thermals - cost = 8 + cost = 40 /datum/uplink_item/cyber_implants/xray name = "X-Ray Vision Implant" desc = "These cybernetic eyes will give you X-ray vision. Comes with an automated implanting tool." reference = "CIX" item = /obj/item/storage/box/cyber_implants/xray - cost = 10 + cost = 50 /datum/uplink_item/cyber_implants/antistun name = "Hardened CNS Rebooter Implant" @@ -2062,7 +2069,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Comes with an automated implanting tool." reference = "CIAS" item = /obj/item/storage/box/cyber_implants/anti_stun_hardened - cost = 12 + cost = 60 /datum/uplink_item/cyber_implants/antisleep name = "Hardened Neural Jumpstarter Implant" @@ -2070,14 +2077,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Comes with an automated implanting tool." reference = "NJ" item = /obj/item/storage/box/cyber_implants/anti_sleep_hardened - cost = 15 + cost = 75 /datum/uplink_item/cyber_implants/reviver name = "Hardened Reviver Implant" desc = "This implant will attempt to revive you if you lose consciousness. It is invulnerable to EMPs. Comes with an automated implanting tool." reference = "CIR" item = /obj/item/storage/box/cyber_implants/reviver_hardened - cost = 8 + cost = 40 // POINTLESS BADASSERY @@ -2090,7 +2097,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Strong flavor, dense smoke, infused with omnizine." reference = "SYSM" item = /obj/item/storage/fancy/cigarettes/cigpack_syndicate - cost = 1 + cost = 5 /datum/uplink_item/badass/syndiecards name = "Syndicate Playing Cards" @@ -2098,7 +2105,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) You can also play card games with them." reference = "SPC" item = /obj/item/toy/cards/deck/syndicate - cost = 1 + cost = 5 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) surplus = 40 @@ -2108,14 +2115,14 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) The briefcase also feels a little heavier to hold; it has been manufactured to pack a little bit more of a punch if your client needs some convincing." reference = "CASH" item = /obj/item/storage/secure/briefcase/syndie - cost = 1 + cost = 5 /datum/uplink_item/badass/plasticbag name = "Plastic Bag" desc = "A simple, plastic bag. Keep out of reach of small children, do not apply to head." reference = "PBAG" item = /obj/item/storage/bag/plasticbag - cost = 1 + cost = 5 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/badass/balloon @@ -2123,7 +2130,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A useless red balloon with the syndicate logo on it, which can blow the deepest of covers." reference = "BABA" item = /obj/item/toy/syndicateballoon - cost = 20 + cost = 100 cant_discount = TRUE /datum/uplink_item/implants/macrobomb @@ -2131,7 +2138,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "An implant injected into the body, and later activated either manually or automatically upon death. Upon death, releases a massive explosion that will wipe out everything nearby." reference = "HAB" item = /obj/item/implanter/explosive_macro - cost = 20 + cost = 100 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC @@ -2145,7 +2152,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Bulldog shotgun, two 12g buckshot drums, and a pair of Thermal imaging goggles." reference = "BULB" item = /obj/item/storage/backpack/duffel/syndie/bulldogbundle - cost = 9 // normally 12 + cost = 45 // normally 60 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/c20r @@ -2153,7 +2160,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Old Faithful: The classic C-20r, bundled with three magazines and a (surplus) suppressor at discount price." reference = "C20B" item = /obj/item/storage/backpack/duffel/syndie/c20rbundle - cost = 18 // normally 21 + cost = 90 // normally 105 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/cyber_implants @@ -2162,7 +2169,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) Comes with an automated implanting tool." reference = "CIB" item = /obj/item/storage/box/cyber_implants/bundle - cost = 40 + cost = 200 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/medical @@ -2171,7 +2178,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) a medical beam gun implant, a surgery implant, a handheld defibrillator, autoimplanter, health analyzers, and a medical hardsuit." reference = "MEDB" item = /obj/item/storage/backpack/duffel/syndie/med/medicalbundle - cost = 35 // normally 40 + cost = 175 // normally 200 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/sniper @@ -2181,7 +2188,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) We'll throw in a free red tie if you order NOW." reference = "SNPB" item = /obj/item/storage/briefcase/sniperbundle - cost = 22 // normally 27 + cost = 110 // normally 135 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/cyborg_maint @@ -2189,7 +2196,7 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "A box containing all internal parts of cyborg for repair." reference = "CYMT" item = /obj/item/storage/box/syndie_kit/cyborg_maint - cost = 4 + cost = 20 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/badass @@ -2197,24 +2204,24 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) desc = "Syndicate Bundles are specialised groups of items that arrive in a plain box. These items are collectively worth more than 20 telecrystals, but you do not know which specialisation you will receive." reference = "SYB" item = /obj/item/storage/box/syndicate - cost = 20 + cost = 100 excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) /datum/uplink_item/bundles_TC/surplus_crate name = "Syndicate Surplus Crate" - desc = "A crate containing 50 telecrystals worth of random syndicate leftovers." + desc = "A crate containing 250 telecrystals worth of random syndicate leftovers." reference = "SYSC" - cost = 20 + cost = 100 item = /obj/item/storage/box/syndicate excludefrom = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) - var/crate_value = 50 + var/crate_value = 250 /datum/uplink_item/bundles_TC/surplus_crate/super name = "Syndicate Super Surplus Crate" - desc = "A crate containing 125 telecrystals worth of random syndicate leftovers." + desc = "A crate containing 625 telecrystals worth of random syndicate leftovers." reference = "SYSS" - cost = 40 - crate_value = 125 + cost = 200 + crate_value = 625 /datum/uplink_item/bundles_TC/surplus_crate/spawn_item(turf/loc, obj/item/uplink/U) var/obj/structure/closet/crate/C = new(loc) @@ -2254,24 +2261,24 @@ GLOBAL_LIST_INIT(uplink_items, subtypesof(/datum/uplink_item)) item = /obj/item/stack/telecrystal cost = 1 -/datum/uplink_item/bundles_TC/telecrystal/five - name = "5 Raw Telecrystals" - desc = "Five telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." +/datum/uplink_item/bundles_TC/telecrystal/twenty_five + name = "25 Raw Telecrystals" + desc = "Twenty five telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." reference = "RTCF" - item = /obj/item/stack/telecrystal/five - cost = 5 + item = /obj/item/stack/telecrystal/twenty_five + cost = 25 -/datum/uplink_item/bundles_TC/telecrystal/twenty - name = "20 Raw Telecrystals" - desc = "Twenty telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." +/datum/uplink_item/bundles_TC/telecrystal/hundread + name = "100 Raw Telecrystals" + desc = "Hundread telecrystals in their rawest and purest form; can be utilized on active uplinks to increase their telecrystal count." reference = "RTCT" - item = /obj/item/stack/telecrystal/twenty - cost = 20 + item = /obj/item/stack/telecrystal/hundread + cost = 100 -/datum/uplink_item/bundles_TC/telecrystal/fifty - name = "50 Raw Telecrystals" - desc = "Fifty telecrystals in their rawest and purest form. You know you want that Mauler." +/datum/uplink_item/bundles_TC/telecrystal/twohundread_fifty + name = "250 Raw Telecrystals" + desc = "Two hundread fifty telecrystals in their rawest and purest form. You know you want that Mauler." reference = "RTCB" - item = /obj/item/stack/telecrystal/fifty - cost = 50 + item = /obj/item/stack/telecrystal/twohundread_fifty + cost = 250 uplinktypes = list(UPLINK_TYPE_NUCLEAR, UPLINK_TYPE_SST) diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 1e458347a2f..1d29cbdb9e1 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -709,12 +709,13 @@ GLOBAL_LIST_EMPTY(blood_splatter_icons) //to add blood dna info to the object's blood_DNA list /atom/proc/transfer_blood_dna(list/blood_dna) - if(!blood_DNA) - blood_DNA = list() - var/old_length = blood_DNA.len + if(!blood_dna || !length(blood_dna)) + return FALSE + LAZYINITLIST(blood_DNA) + var/old_length = length(blood_DNA) blood_DNA |= blood_dna - if(blood_DNA.len > old_length) - return TRUE//some new blood DNA was added + return length(blood_DNA) > old_length //some new blood DNA was added + //to add blood from a mob onto something, and transfer their dna info /atom/proc/add_mob_blood(mob/living/M) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index 297cfc90270..acb44796abc 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -31,6 +31,10 @@ var/moving_diagonally = 0 //0: not doing a diagonal move. 1 and 2: doing the first/second step of the diagonal move var/list/client_mobs_in_contents + /// Icon state for thought bubbles. Normally set by mobs. + var/thought_bubble_image = "thought_bubble" + + /atom/movable/attempt_init(loc, ...) var/turf/T = get_turf(src) if(T && SSatoms.initialized != INITIALIZATION_INSSATOMS && GLOB.space_manager.is_zlevel_dirty(T.z)) @@ -61,41 +65,43 @@ /atom/movable/proc/on_teleported() return -/atom/movable/proc/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) - var/mob/M = AM - if(ismob(M) && M.buckled) - AM = M.buckled - if(QDELETED(AM)) +/atom/movable/proc/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) + var/mob/mob_target = AM + if(ismob(mob_target) && mob_target.buckled) + AM = mob_target.buckled + + if(QDELETED(AM) || QDELETED(src)) return FALSE - if(!(AM.can_be_pulled(src, state, force))) + if(!(AM.can_be_pulled(src, force, show_message))) return FALSE - // if we're pulling something then drop what we're currently pulling and pull this instead. - if(pulling) - if(state == 0) - stop_pulling() - return FALSE - // Are we trying to pull something we are already pulling? Then enter grab cycle and end. - if(AM == pulling) - if(isliving(AM)) - var/mob/living/AMob = AM - AMob.grabbedby(src) - return TRUE - stop_pulling() + if(pulling && AM == pulling && src == AM.pulledby) // are we trying to pull something we are already pulling? + return FALSE + + var/atom/movable/previous_puller = null if(AM.pulledby) - add_attack_logs(AM, AM.pulledby, "pulled from", ATKLOG_ALMOSTALL) - AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once. + previous_puller = AM.pulledby + previous_puller.stop_pulling() // an object can't be pulled by two mobs at once. + pulling = AM AM.pulledby = src - var/mob/pulled_mob = ismob(AM) ? AM : buckled_mobs[1] - if(ismob(pulled_mob)) - add_attack_logs(src, pulled_mob, "passively grabbed", ATKLOG_ALMOSTALL) - if(show_message) - visible_message("[src] схватил[genderize_ru(src.gender,"","а","о","и")] [pulled_mob]!") + mob_target = ismob(AM) ? AM : (AM.buckled_mobs && length(AM.buckled_mobs)) ? AM.buckled_mobs[1] : null + if(mob_target) + if(previous_puller) + add_attack_logs(AM, previous_puller, "pulled from", ATKLOG_ALMOSTALL) + if(show_message) + visible_message(span_danger("[src] перехватил[genderize_ru(gender,"","а","о","и")] [mob_target] у [previous_puller].")) + else + add_attack_logs(src, mob_target, "pulls", ATKLOG_ALMOSTALL) + if(show_message) + visible_message(span_warning("[src] схватил[genderize_ru(gender,"","а","о","и")] [mob_target]!")) + mob_target.LAssailant = iscarbon(src) ? src : null + return TRUE + /atom/movable/proc/stop_pulling() if(pulling) pulling.pulledby = null @@ -125,18 +131,18 @@ if(pulledby && moving_diagonally != FIRST_DIAG_STEP && get_dist(src, pulledby) > 1) //separated from our puller and not in the middle of a diagonal move. pulledby.stop_pulling() -/atom/movable/proc/can_be_pulled(user, grab_state, force, show_message = FALSE) +/atom/movable/proc/can_be_pulled(atom/movable/user, force, show_message = FALSE) if(src == user || !isturf(loc)) return FALSE if(anchored || move_resist == INFINITY) - if(show_message) //Это разве не проверка таскания прикрученных объектов? Оно точно может получить пол ящика? - to_chat(user, "Похоже, [src.name] прикрепл[genderize_ru(src.gender,"ён","ена","ено","ены")] к полу!") + if(show_message) + to_chat(user, span_warning("Похоже, [src.name] прикрепл[genderize_ru(src.gender,"ён","ена","ено","ены")] к полу!")) return FALSE if(throwing) return FALSE if(force < (move_resist * MOVE_FORCE_PULL_RATIO)) if(show_message) - to_chat(user, "[src.name] слишком тяжелый!") + to_chat(user, span_warning("[src.name] слишком тяжелый!")) return FALSE return TRUE diff --git a/code/game/dna/dna2.dm b/code/game/dna/dna2.dm index a796ca71286..033130a27a0 100644 --- a/code/game/dna/dna2.dm +++ b/code/game/dna/dna2.dm @@ -90,7 +90,7 @@ GLOBAL_LIST_EMPTY(bad_blocks) ResetUI(1) // Hair // FIXME: Species-specific defaults pls - var/obj/item/organ/external/head/H = character.get_organ("head") + var/obj/item/organ/external/head/H = character.get_organ(BODY_ZONE_HEAD) var/obj/item/organ/internal/eyes/eyes_organ = character.get_int_organ(/obj/item/organ/internal/eyes) // Body Accessory diff --git a/code/game/dna/dna2_helpers.dm b/code/game/dna/dna2_helpers.dm index 9dceb2a5aed..c6769fdae49 100644 --- a/code/game/dna/dna2_helpers.dm +++ b/code/game/dna/dna2_helpers.dm @@ -134,7 +134,7 @@ dna.UpdateUI() dna.check_integrity() var/mob/living/carbon/human/H = src - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) var/obj/item/organ/internal/eyes/eye_organ = H.get_int_organ(/obj/item/organ/internal/eyes) if(istype(head_organ)) dna.write_head_attributes(head_organ) @@ -170,14 +170,16 @@ var/bodyacc = dna.GetUIValueRange(DNA_UI_BACC_STYLE, GLOB.body_accessory_by_name.len) if((bodyacc > 0) && (bodyacc <= GLOB.body_accessory_by_name.len)) var/datum/body_accessory/body_acc = GLOB.body_accessory_by_name[GLOB.body_accessory_by_name[bodyacc]] + var/obj/item/organ/external/tail/bodypart_tail = H.get_organ(BODY_ZONE_TAIL) + var/obj/item/organ/external/wing/bodypart_wing = H.get_organ(BODY_ZONE_WING) if(!body_acc) H.body_accessory = null - H.bodypart_tail?.body_accessory = null - H.bodypart_wing?.body_accessory = null + bodypart_tail?.body_accessory = null + bodypart_wing?.body_accessory = null else if(H.dna.species.name in body_acc.allowed_species) H.body_accessory = body_acc - H.bodypart_tail?.body_accessory = body_acc - H.bodypart_wing?.body_accessory = body_acc + bodypart_tail?.body_accessory = body_acc + bodypart_wing?.body_accessory = body_acc //Tail Markings var/tail_marks = dna.GetUIValueRange(DNA_UI_TAIL_MARK_STYLE, GLOB.marking_styles_list.len) if((tail_marks > 0) && (tail_marks <= GLOB.marking_styles_list.len)) diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index 20bea46e7e4..f1cba274123 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -256,7 +256,7 @@ if(!H.bodyparts_by_name[name]) continue affecting = H.bodyparts_by_name[name] - if(!isorgan(affecting)) + if(!isexternalorgan(affecting)) continue affecting.heal_damage(4, 0, updating_health = FALSE) H.UpdateDamageIcon() diff --git a/code/game/dna/genes/vg_powers.dm b/code/game/dna/genes/vg_powers.dm index 8cf802ff82f..9cfc931b9bc 100644 --- a/code/game/dna/genes/vg_powers.dm +++ b/code/game/dna/genes/vg_powers.dm @@ -37,7 +37,7 @@ to_chat(user, "You can't change your appearance right now!") return var/mob/living/carbon/human/M = user - var/obj/item/organ/external/head/head_organ = M.get_organ("head") + var/obj/item/organ/external/head/head_organ = M.get_organ(BODY_ZONE_HEAD) var/obj/item/organ/internal/eyes/eyes_organ = M.get_int_organ(/obj/item/organ/internal/eyes) var/new_gender = alert(user, "Please select gender.", "Character Generation", "Male", "Female") diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 5d52d43a580..37691e30755 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -83,7 +83,7 @@ /mob/living/simple_animal/hostile/blob/blobspore/proc/Zombify(mob/living/carbon/human/H) if(!H.check_death_method()) H.death() - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) is_zombie = TRUE if(H.wear_suit) var/obj/item/clothing/suit/armor/A = H.wear_suit diff --git a/code/game/gamemodes/clockwork/clockwork.dm b/code/game/gamemodes/clockwork/clockwork.dm index aa47af54908..53081356a78 100644 --- a/code/game/gamemodes/clockwork/clockwork.dm +++ b/code/game/gamemodes/clockwork/clockwork.dm @@ -80,7 +80,6 @@ GLOBAL_LIST_EMPTY(all_clockers) return (length(clockwork_cult) > 0) /datum/game_mode/clockwork/post_setup() - modePlayer += clockwork_cult clocker_objs.setup() for(var/datum/mind/clockwork_mind in clockwork_cult) diff --git a/code/game/gamemodes/clockwork/clockwork_items.dm b/code/game/gamemodes/clockwork/clockwork_items.dm index 872a6d07cc3..8afd0b3c9a6 100644 --- a/code/game/gamemodes/clockwork/clockwork_items.dm +++ b/code/game/gamemodes/clockwork/clockwork_items.dm @@ -411,7 +411,7 @@ var/wforce = rand(force_unwielded, force_wielded) if(ishuman(user)) var/mob/living/carbon/human/human = user - human.apply_damage(wforce, BRUTE, "head") + human.apply_damage(wforce, BRUTE, BODY_ZONE_HEAD) else user.adjustBruteLoss(wforce) return @@ -546,14 +546,12 @@ return if(isclocker(target)) return - if(ishuman(target)) + if(ishuman(target) && enchant_type == BLOODSHED_SPELL) var/mob/living/carbon/human/human = target - if(enchant_type == BLOODSHED_SPELL && human.dna && !(NO_BLOOD in human.dna.species.species_traits)) - var/obj/item/organ/external/BP = pick(human.bodyparts) - to_chat(user, " You tear through [human]'s skin releasing the blood from [human.p_their()] [BP.name]!") - human.custom_pain("Your skin tears in [BP.name] from [src]!") + var/obj/item/organ/external/bodypart = pick(human.bodyparts) + if(bodypart.internal_bleeding()) + to_chat(user, span_warning("You tear through [human]'s skin releasing the blood from [human.p_their()] [bodypart.name]!")) playsound(get_turf(human), 'sound/effects/pierce.ogg', 30, TRUE) - BP.internal_bleeding = TRUE human.blood_volume = max(human.blood_volume - 100, 0) var/splatter_dir = get_dir(user, human) blood_color = human.dna.species.blood_color @@ -631,7 +629,7 @@ to_chat(user, "\"Did you like having head?\"") to_chat(user, "The buckler suddenly hits you in the head!") user.emote("scream") - user.apply_damage(10, BRUTE, "head") + user.apply_damage(10, BRUTE, BODY_ZONE_HEAD) user.drop_item_ground(src) // Clockwork robe. Basic robe from clockwork slab. @@ -764,7 +762,7 @@ else to_chat(user, "\"I think this armor is too hot for you to handle.\"") user.emote("scream") - user.apply_damage(7, BURN, "chest") + user.apply_damage(7, BURN, BODY_ZONE_CHEST) user.IgniteMob() user.drop_item_ground(src) @@ -910,7 +908,7 @@ else to_chat(user, "\"I think this armor is too hot for you to handle.\"") user.emote("scream") - user.apply_damage(15, BURN, "chest") + user.apply_damage(15, BURN, BODY_ZONE_CHEST) user.adjust_fire_stacks(2) user.IgniteMob() user.drop_item_ground(src) @@ -1028,8 +1026,8 @@ to_chat(user, "\"Did you like having arms?\"") to_chat(user, "The gauntlets suddenly squeeze tight, crushing your arms before you manage to get them off!") user.emote("scream") - user.apply_damage(7, BRUTE, "l_arm") - user.apply_damage(7, BRUTE, "r_arm") + user.apply_damage(7, BRUTE, BODY_ZONE_L_ARM) + user.apply_damage(7, BRUTE, BODY_ZONE_R_ARM) user.drop_item_ground(src) // Shoes @@ -1068,8 +1066,8 @@ to_chat(user, "\"Let's see if you can dance with these.\"") to_chat(user, "The treads turn searing hot as you scramble to get them off!") user.emote("scream") - user.apply_damage(7, BURN, "l_leg") - user.apply_damage(7, BURN, "r_leg") + user.apply_damage(7, BURN, BODY_ZONE_L_LEG) + user.apply_damage(7, BURN, BODY_ZONE_R_LEG) user.drop_item_ground(src) // Helmet @@ -1115,7 +1113,7 @@ to_chat(user, "\"Do you have a hole in your head? You're about to.\"") to_chat(user, "The helmet tries to drive a spike through your head as you scramble to remove it!") user.emote("scream") - user.apply_damage(30, BRUTE, "head") + user.apply_damage(30, BRUTE, BODY_ZONE_HEAD) user.adjustBrainLoss(30) user.drop_item_ground(src) @@ -1423,10 +1421,9 @@ living.heal_overall_damage(60, 60, TRUE, FALSE, TRUE) living.reagents?.add_reagent("epinephrine", 5) var/mob/living/carbon/human/H = living - for(var/thing in H.bodyparts) - var/obj/item/organ/external/E = thing - E.internal_bleeding = FALSE - E.mend_fracture() + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + bodypart.stop_internal_bleeding() + bodypart.mend_fracture() else affected.ratvar_act() animate(src, transform = matrix() * 0.1, time = 2 SECONDS) diff --git a/code/game/gamemodes/clockwork/cogscarab.dm b/code/game/gamemodes/clockwork/cogscarab.dm index e63a0771375..4f9f4f8253f 100644 --- a/code/game/gamemodes/clockwork/cogscarab.dm +++ b/code/game/gamemodes/clockwork/cogscarab.dm @@ -204,7 +204,7 @@ if(is_type_in_list(AM, allowed_bumpable_objects)) return ..() -/mob/living/silicon/robot/cogscarab/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) +/mob/living/silicon/robot/cogscarab/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) if(is_type_in_list(AM, pullable_items)) ..(AM, force = INFINITY) // Drone power! Makes them able to drag pipes and such @@ -213,13 +213,13 @@ var/obj/item/O = AM if(O.w_class > WEIGHT_CLASS_SMALL) if(show_message) - to_chat(src, "You are too small to pull that.") + to_chat(src, span_warning("You are too small to pull that.")) return else ..() else if(show_message) - to_chat(src, "You are too small to pull that.") + to_chat(src, span_warning("You are too small to pull that.")) /mob/living/silicon/robot/cogscarab/add_robot_verbs() src.verbs |= silicon_subsystems diff --git a/code/game/gamemodes/cult/blood_magic.dm b/code/game/gamemodes/cult/blood_magic.dm index 5d456df973a..e4c4e3ef793 100644 --- a/code/game/gamemodes/cult/blood_magic.dm +++ b/code/game/gamemodes/cult/blood_magic.dm @@ -164,13 +164,13 @@ if(ishuman(owner)) var/mob/living/carbon/human/H = owner var/oof = FALSE - for(var/obj/item/organ/external/E in H.bodyparts) + for(var/obj/item/organ/external/E as anything in H.bodyparts) if(E.is_robotic()) oof = TRUE break if(!oof) - for(var/obj/item/organ/internal/I in H.internal_organs) - if(I.is_robotic()) + for(var/obj/item/organ/internal/organ as anything in H.internal_organs) + if(organ.is_robotic()) oof = TRUE break if(oof) @@ -523,7 +523,7 @@ /obj/item/melee/blood_magic/shackles/afterattack(atom/target, mob/living/carbon/user, proximity) if(iscarbon(target) && proximity) var/mob/living/carbon/C = target - if(C.canBeHandcuffed() || C.get_arm_ignore()) + if(C.canBeHandcuffed()) if(C.getStaminaLoss() > 90 || C.health <= HEALTH_THRESHOLD_CRIT || C.IsSleeping()) CuffAttack(C, user) else diff --git a/code/game/gamemodes/cult/cult.dm b/code/game/gamemodes/cult/cult.dm index fd7338366b5..0a6c5763f3b 100644 --- a/code/game/gamemodes/cult/cult.dm +++ b/code/game/gamemodes/cult/cult.dm @@ -78,7 +78,6 @@ GLOBAL_LIST_EMPTY(all_cults) return (length(cult) > 0) /datum/game_mode/cult/post_setup() - modePlayer += cult cult_objs.setup() for(var/datum/mind/cult_mind in cult) @@ -340,3 +339,8 @@ GLOBAL_LIST_EMPTY(all_cults) to_chat(world, endtext) ..() + + +/proc/is_cultist(mob/living/user) + return istype(user) && user.mind && SSticker && SSticker.mode && (user.mind in SSticker.mode.cult) + diff --git a/code/game/gamemodes/cult/cult_items.dm b/code/game/gamemodes/cult/cult_items.dm index 49531b099ca..966cf5d63ca 100644 --- a/code/game/gamemodes/cult/cult_items.dm +++ b/code/game/gamemodes/cult/cult_items.dm @@ -39,7 +39,7 @@ "\"You shouldn't play with sharp things. You'll poke someone's eye out.\"") if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm")) + H.apply_damage(rand(force/2, force), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) else user.adjustBruteLoss(rand(force/2, force)) return diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 20d4a6ab77c..e6fff3140b9 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -181,7 +181,7 @@ to_chat(user, "[G.affecting] is dead!") return FALSE var/mob/living/carbon/human/C = G.affecting - var/obj/item/organ/external/head/head = C.get_organ("head") + var/obj/item/organ/external/head/head = C.get_organ(BODY_ZONE_HEAD) if(!head) to_chat(user, "[C] has no head!") return FALSE @@ -190,7 +190,7 @@ C.visible_message("[user] dunks [C]'s face into [src]'s lava!", "[user] dunks your face into [src]'s lava!") C.emote("scream") - C.apply_damage(30, BURN, "head") // 30 fire damage because it's FUCKING LAVA + C.apply_damage(30, BURN, BODY_ZONE_HEAD) // 30 fire damage because it's FUCKING LAVA head.disfigure() // Your face is unrecognizable because it's FUCKING LAVA C.UpdateDamageIcon() add_attack_logs(user, C, "Lava-dunked into [src]") diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index c8815ab03d4..02f3c47f824 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -130,6 +130,8 @@ To draw a rune, use a ritual dagger. visible_message("[src] suddenly appears!") alpha = initial(alpha) +/obj/effect/rune/is_cleanable() + return TRUE /* There are a few different procs each rune runs through when a cultist activates it. @@ -343,9 +345,9 @@ structure_check() searches for nearby cultist structures required for the invoca else H.visible_message("[convertee]'s wounds heal and close!", "Your wounds have been healed. Now spread the blood to others.") - for(var/obj/item/organ/external/E in H.bodyparts) - E.mend_fracture() - E.internal_bleeding = FALSE + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + bodypart.mend_fracture() + bodypart.stop_internal_bleeding() for(var/datum/disease/critical/crit in H.diseases) // cure all crit conditions crit.cure() diff --git a/code/game/gamemodes/devil/devil_game_mode.dm b/code/game/gamemodes/devil/devil_game_mode.dm index 4a6beb91733..645dbc493d1 100644 --- a/code/game/gamemodes/devil/devil_game_mode.dm +++ b/code/game/gamemodes/devil/devil_game_mode.dm @@ -62,6 +62,5 @@ for(var/datum/objective/objective in devil.objectives) to_chat(devil.current, "Objective #[obj_count]: [objective.explanation_text]") obj_count++ - modePlayer += devils ..() return 1 diff --git a/code/game/gamemodes/devil/true_devil/_true_devil.dm b/code/game/gamemodes/devil/true_devil/_true_devil.dm index 5881857a828..75ee05e54e9 100644 --- a/code/game/gamemodes/devil/true_devil/_true_devil.dm +++ b/code/game/gamemodes/devil/true_devil/_true_devil.dm @@ -25,11 +25,11 @@ /mob/living/carbon/true_devil/New(loc, mob/living/carbon/dna_source) if(dna_source) dna = dna_source.dna.Clone() + else + dna = new - var/obj/item/organ/internal/brain/B = new(src) - var/obj/item/organ/internal/ears/E = new(src) - B.insert() - E.insert() + new /obj/item/organ/internal/brain(src) + new /obj/item/organ/internal/ears(src) ..() // Determines if mob has and can use his hands like a human diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index 441970c8dce..6bca90497ad 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -24,8 +24,6 @@ /// See nuclearbomb.dm and malfunction.dm var/explosion_in_progress = FALSE //sit back and relax var/false_report_weight = 0 //How often will this show up incorrectly in a centcom report? --Not used-- - var/maximum_players = 0 // --Not used-- - var/list/datum/mind/modePlayer = new // Jobs it doesn't make sense to be antags. I.E chaplain or AI cultist var/list/restricted_jobs = list() /// Jobs that can't be antags. @@ -41,8 +39,6 @@ /// Whether ERT call is even allowed in this mode. var/ert_disabled = FALSE var/newscaster_announcements = null - var/uplink_welcome = "Syndicate Uplink Console:" - var/uplink_uses = 20 /// Lower bound on time before intercept arrives. var/const/waittime_l = 60 SECONDS @@ -78,13 +74,6 @@ return FALSE -/** - * For when you really don't want certain jobs ingame. - */ -/datum/game_mode/proc/pre_pre_setup() - return TRUE - - /** * Attempts to select players for special roles the mode might have. */ diff --git a/code/game/gamemodes/heist/heist.dm b/code/game/gamemodes/heist/heist.dm index 2ebcd1f1516..896d17f0462 100644 --- a/code/game/gamemodes/heist/heist.dm +++ b/code/game/gamemodes/heist/heist.dm @@ -4,7 +4,7 @@ VOX HEIST ROUNDTYPE GLOBAL_LIST_EMPTY(raider_spawn) GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. Clumsy, rewrite sometime. -/datum/game_mode/ +/datum/game_mode var/list/datum/mind/raiders = list() //Antags. var/list/raid_objectives = list() //Raid objectives @@ -27,16 +27,14 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. to_chat(world, "Personnel: Trade with the raiders, or repel them and their low, low prices and/or crossbows.") /datum/game_mode/heist/can_start() - if(!..()) - return 0 - + return FALSE var/list/candidates = get_players_for_role(ROLE_RAIDER) var/raider_num = 0 //Check that we have enough vox. if(candidates.len < required_enemies) - return 0 + return FALSE else if(candidates.len < recommended_enemies) raider_num = candidates.len else @@ -44,20 +42,18 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. //Grab candidates randomly until we have enough. while(raider_num > 0) - var/datum/mind/new_raider = pick(candidates) + var/datum/mind/new_raider = pick_n_take(candidates) raiders += new_raider - candidates -= new_raider raider_num-- + return TRUE + +/datum/game_mode/heist/pre_setup() for(var/datum/mind/raider in raiders) raider.assigned_role = SPECIAL_ROLE_RAIDER raider.special_role = SPECIAL_ROLE_RAIDER raider.offstation_role = TRUE - ..() - return 1 - -/datum/game_mode/heist/pre_setup() - return 1 + return TRUE /datum/game_mode/heist/post_setup() @@ -94,7 +90,7 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. newname += pick(list("ti","hi","ki","ya","ta","ha","ka","ya","chi","cha","kah")) var/mob/living/carbon/human/vox = newraider.current - var/obj/item/organ/external/head/head_organ = vox.get_organ("head") + var/obj/item/organ/external/head/head_organ = vox.get_organ(BODY_ZONE_HEAD) vox.real_name = capitalize(newname) vox.dna.real_name = vox.real_name @@ -121,7 +117,7 @@ GLOBAL_LIST_EMPTY(cortical_stacks) //Stacks for 'leave nobody behind' objective. vox.update_dna() vox.update_eyes() - for(var/obj/item/organ/external/limb in vox.bodyparts) + for(var/obj/item/organ/external/limb as anything in vox.bodyparts) limb.status &= ~ORGAN_ROBOT //Now apply cortical stack. diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm index 3fe1e73788f..246fcfc500d 100644 --- a/code/game/gamemodes/malfunction/Malf_Modules.dm +++ b/code/game/gamemodes/malfunction/Malf_Modules.dm @@ -21,7 +21,7 @@ if(owner_AI && owner_AI.malf_cooldown > world.time) return -/datum/action/innate/ai/Trigger() +/datum/action/innate/ai/Trigger(left_click = TRUE) . = ..() if(auto_use_uses) adjust_uses(-1) @@ -93,7 +93,7 @@ . = ..() owner_AI.malf_picker = new /datum/module_picker -/datum/action/innate/ai/choose_modules/Trigger() +/datum/action/innate/ai/choose_modules/Trigger(left_click = TRUE) . = ..() owner_AI.malf_picker.use(owner_AI) @@ -104,7 +104,7 @@ button_icon_state = "apcemag" auto_use_uses = FALSE // Here just to prevent the "You have X uses remaining" from popping up. -/datum/action/innate/ai/return_to_core/Trigger() +/datum/action/innate/ai/return_to_core/Trigger(left_click = TRUE) . = ..() var/obj/machinery/power/apc/apc = owner_AI.loc if(!istype(apc)) // This shouldn't happen but here for safety. diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index 4bb77b0e26f..4951975a8d6 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -308,7 +308,7 @@ /obj/item/abductor/mind_device/proc/mind_control(atom/target, mob/living/user) if(iscarbon(target)) var/mob/living/carbon/C = target - var/obj/item/organ/internal/heart/gland/G = C.get_organ_slot("heart") + var/obj/item/organ/internal/heart/gland/G = C.get_organ_slot(INTERNAL_ORGAN_HEART) if(!istype(G)) to_chat(user, "Your target does not have an experimental gland!") return diff --git a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm index 2ba7bdd7b40..c979faa7f7e 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_surgery.dm @@ -1,7 +1,7 @@ /datum/surgery/organ_extraction name = "Experimental Dissection" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/extract_organ, /datum/surgery_step/internal/gland_insert, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone, /datum/surgery_step/finish_bone, /datum/surgery_step/generic/cauterize) - possible_locs = list("chest") + possible_locs = list(BODY_ZONE_CHEST) /datum/surgery/organ_extraction/can_start(mob/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) if(!ishuman(user)) @@ -26,10 +26,10 @@ var/obj/item/organ/internal/IC = null /datum/surgery_step/internal/extract_organ/begin_step(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) - for(var/obj/item/I in target.internal_organs) + for(var/obj/item/organ/internal/organ as anything in target.internal_organs) // Allows for multiple subtypes of heart. - if(istype(I, /obj/item/organ/internal/heart)) - IC = I + if(istype(organ, /obj/item/organ/internal/heart)) + IC = organ break user.visible_message("[user] starts to remove [target]'s organs.", "You start to remove [target]'s organs...") ..() @@ -40,7 +40,7 @@ user.visible_message("[user] pulls [IC] out of [target]'s [target_zone]!", "You pull [IC] out of [target]'s [target_zone].") IC.forceMove_turf() user.put_in_hands(IC, ignore_anim = FALSE) - IC.remove(target, special = 1) + IC.remove(target, ORGAN_MANIPULATION_NOEFFECT) return TRUE if(NO_INTORGANS in AB.dna.species.species_traits) user.visible_message("[user] prepares [target]'s [target_zone] for further dissection!", "You prepare [target]'s [target_zone] for further dissection.") @@ -66,7 +66,7 @@ user.visible_message("[user] inserts [tool] into [target].", "You insert [tool] into [target].") user.drop_from_active_hand() var/obj/item/organ/internal/heart/gland/gland = tool - gland.insert(target, 2) + gland.insert(target, ORGAN_MANIPULATION_ABDUCTOR) return TRUE /datum/surgery_step/internal/gland_insert/fail_step(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) @@ -78,7 +78,7 @@ /datum/surgery/organ_extraction/synth name = "Experimental Robotic Dissection" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/internal/extract_organ/synth,/datum/surgery_step/internal/gland_insert,/datum/surgery_step/robotics/external/close_hatch) - possible_locs = list("chest") + possible_locs = list(BODY_ZONE_CHEST) requires_organic_bodypart = 0 /datum/surgery/organ_extraction/synth/can_start(mob/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) diff --git a/code/game/gamemodes/miniantags/abduction/gland.dm b/code/game/gamemodes/miniantags/abduction/gland.dm index a65b5ed98c4..008b584ef96 100644 --- a/code/game/gamemodes/miniantags/abduction/gland.dm +++ b/code/game/gamemodes/miniantags/abduction/gland.dm @@ -67,8 +67,8 @@ active_mind_control = FALSE update_gland_hud() -/obj/item/organ/internal/heart/gland/remove(var/mob/living/carbon/M, special = 0) - active = 0 +/obj/item/organ/internal/heart/gland/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + active = FALSE if(initial(uses) == 1) uses = initial(uses) var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR] @@ -76,9 +76,9 @@ clear_mind_control() . = ..() -/obj/item/organ/internal/heart/gland/insert(var/mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/gland/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() - if(special != 2 && uses) // Special 2 means abductor surgery + if(special != ORGAN_MANIPULATION_ABDUCTOR && uses) Start() var/datum/atom_hud/abductor/hud = GLOB.huds[DATA_HUD_ABDUCTOR] hud.add_to_hud(owner) @@ -126,7 +126,7 @@ mind_control_uses = 1 mind_control_duration = 2400 -/obj/item/organ/internal/heart/gland/slime/insert(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/gland/slime/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() owner.faction |= "slime" owner.add_language("Bubblish") @@ -274,14 +274,14 @@ mind_control_uses = 2 mind_control_duration = 900 -/obj/item/organ/internal/heart/gland/electric/insert(mob/living/carbon/M, special = 0) - ..() +/obj/item/organ/internal/heart/gland/electric/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() if(ishuman(owner)) owner.gene_stability += GENE_INSTABILITY_MODERATE // give them this gene for free owner.dna.SetSEState(GLOB.shockimmunityblock, TRUE) genemutcheck(owner, GLOB.shockimmunityblock, null, MUTCHK_FORCED) -/obj/item/organ/internal/heart/gland/electric/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/gland/electric/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) if(ishuman(owner)) owner.gene_stability -= GENE_INSTABILITY_MODERATE // but return it to normal once it's removed owner.dna.SetSEState(GLOB.shockimmunityblock, FALSE) diff --git a/code/game/gamemodes/miniantags/borer/borer.dm b/code/game/gamemodes/miniantags/borer/borer.dm index f125b95061a..bce2ceb4b62 100644 --- a/code/game/gamemodes/miniantags/borer/borer.dm +++ b/code/game/gamemodes/miniantags/borer/borer.dm @@ -318,7 +318,7 @@ var/list/choices = list() for(var/mob/living/carbon/human/H in view(1,src)) - var/obj/item/organ/external/head/head = H.get_organ("head") + var/obj/item/organ/external/head/head = H.get_organ(BODY_ZONE_HEAD) if(head.is_robotic()) continue if(H.stat != DEAD && Adjacent(H) && !H.has_brain_worms()) diff --git a/code/game/gamemodes/miniantags/demons/pulse_demon/pulse_demon.dm b/code/game/gamemodes/miniantags/demons/pulse_demon/pulse_demon.dm index 9cc22273760..dc9a3ee8719 100644 --- a/code/game/gamemodes/miniantags/demons/pulse_demon/pulse_demon.dm +++ b/code/game/gamemodes/miniantags/demons/pulse_demon/pulse_demon.dm @@ -815,16 +815,16 @@ user.drop_from_active_hand() insert(user) -/obj/item/organ/internal/heart/demon/pulse/insert(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/demon/pulse/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() M.AddComponent(/datum/component/cross_shock, 30, 500, 2 SECONDS) ADD_TRAIT(M, TRAIT_SHOCKIMMUNE, UNIQUE_TRAIT_SOURCE(src)) M.set_light(3, 2, "#bbbb00") -/obj/item/organ/internal/heart/demon/pulse/remove(mob/living/carbon/M, special = 0) - . = ..() +/obj/item/organ/internal/heart/demon/pulse/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) REMOVE_TRAIT(M, TRAIT_SHOCKIMMUNE, UNIQUE_TRAIT_SOURCE(src)) M.remove_light() + . = ..() /obj/item/organ/internal/heart/demon/pulse/on_life() if(!owner) diff --git a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm index 37d1176cb86..4b0c5a23d66 100644 --- a/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm +++ b/code/game/gamemodes/miniantags/demons/shadow_demon/shadow_demon.dm @@ -238,16 +238,14 @@ insert(user) -/obj/item/organ/internal/heart/demon/shadow/insert(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/demon/shadow/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() - if(M.mind) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/fireball/shadow_grapple) + M?.mind?.AddSpell(new /obj/effect/proc_holder/spell/fireball/shadow_grapple) -/obj/item/organ/internal/heart/demon/shadow/remove(mob/living/carbon/M, special = 0) - ..() - if(M.mind) - M.mind.RemoveSpell(/obj/effect/proc_holder/spell/fireball/shadow_grapple) +/obj/item/organ/internal/heart/demon/shadow/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + M?.mind?.RemoveSpell(/obj/effect/proc_holder/spell/fireball/shadow_grapple) + . = ..() /mob/living/simple_animal/demon/shadow/attempt_objectives() diff --git a/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter_demon.dm b/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter_demon.dm index ed50e384156..4e17864bf58 100644 --- a/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter_demon.dm +++ b/code/game/gamemodes/miniantags/demons/slaughter_demon/slaughter_demon.dm @@ -193,18 +193,17 @@ qdel(src) -/obj/item/organ/internal/heart/demon/slaughter/insert(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/demon/slaughter/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() - if(M.mind) - M.mind.AddSpell(new /obj/effect/proc_holder/spell/bloodcrawl(null)) + M?.mind?.AddSpell(new /obj/effect/proc_holder/spell/bloodcrawl(null)) -/obj/item/organ/internal/heart/demon/slaughter/remove(mob/living/carbon/M, special = 0) - ..() +/obj/item/organ/internal/heart/demon/slaughter/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) if(M.mind) REMOVE_TRAIT(M, TRAIT_BLOODCRAWL, TRAIT_BLOODCRAWL) REMOVE_TRAIT(M, TRAIT_BLOODCRAWL_EAT, TRAIT_BLOODCRAWL_EAT) M.mind.RemoveSpell(/obj/effect/proc_holder/spell/bloodcrawl) + . = ..() /** diff --git a/code/game/gamemodes/miniantags/guardian/host_actions.dm b/code/game/gamemodes/miniantags/guardian/host_actions.dm index 48a32370ed2..a992447f1e4 100644 --- a/code/game/gamemodes/miniantags/guardian/host_actions.dm +++ b/code/game/gamemodes/miniantags/guardian/host_actions.dm @@ -26,7 +26,7 @@ desc = "Communicate telepathically with your guardian." button_icon_state = "communicate" -/datum/action/guardian/communicate/Trigger() +/datum/action/guardian/communicate/Trigger(left_click = TRUE) var/input = stripped_input(owner, "Enter a message to tell your guardian:", "Message", "") if(!input) return @@ -51,7 +51,7 @@ desc = "Forcibly recall your guardian." button_icon_state = "recall" -/datum/action/guardian/recall/Trigger() +/datum/action/guardian/recall/Trigger(left_click = TRUE) guardian.Recall() /** @@ -70,7 +70,7 @@ return FALSE return TRUE -/datum/action/guardian/reset_guardian/Trigger() +/datum/action/guardian/reset_guardian/Trigger(left_click = TRUE) if(cooldown_timer) to_chat(owner, "This ability is still recharging.") return diff --git a/code/game/gamemodes/miniantags/guardian/types/healer.dm b/code/game/gamemodes/miniantags/guardian/types/healer.dm index 9e6e3a6d122..4b33300dca9 100644 --- a/code/game/gamemodes/miniantags/guardian/types/healer.dm +++ b/code/game/gamemodes/miniantags/guardian/types/healer.dm @@ -209,7 +209,7 @@ switch(random_cure) if("bleedings") var/obj/item/organ/external/limb = pick(injures["bleedings"]) - limb.internal_bleeding = FALSE + limb.stop_internal_bleeding() to_chat(user, "Внутреннее кровотечение остановлено.") return 1 if("fractures") @@ -223,11 +223,9 @@ to_chat(user, "Очищено тело хозяина от инфекции.") return 1 if("embedded") - var/obj/item/organ/external/limb = pick(injures["embedded"]) - var/turf/T = get_turf(summoner) - var/obj/item/item = pick(limb.embedded_objects) - limb.embedded_objects -= item - item.forceMove(T) + var/obj/item/organ/external/limb = safepick(injures["embedded"]) + var/obj/item/item = safepick(limb?.embedded_objects) + limb?.remove_embedded_object(item) to_chat(user, "Удалось вытащить застрявший предмет.") return 1 if("damaged_organs") diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 5184b9b7d64..aebb7b0f431 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -113,8 +113,12 @@ /mob/living/simple_animal/hostile/morph/wizard/New() . = ..() - AddSpell(new /obj/effect/proc_holder/spell/smoke) - AddSpell(new /obj/effect/proc_holder/spell/forcewall) + var/obj/effect/proc_holder/spell/smoke/smoke = new + var/obj/effect/proc_holder/spell/forcewall/forcewall = new + smoke.human_req = FALSE + forcewall.human_req = FALSE + AddSpell(smoke) + AddSpell(forcewall) /mob/living/simple_animal/hostile/morph/proc/try_eat(atom/movable/item) @@ -240,7 +244,7 @@ return TRUE else if (!morphed) to_chat(attacker, "Touching [src] with your hands hurts you!") - var/obj/item/organ/external/affecting = attacker.get_organ("[attacker.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = attacker.get_organ(attacker.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) affecting.receive_damage(20) add_food(5) diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm index 8a5205120bb..2c0817cc5d5 100644 --- a/code/game/gamemodes/nuclear/nuclear.dm +++ b/code/game/gamemodes/nuclear/nuclear.dm @@ -1,11 +1,8 @@ -#define NUKESCALINGMODIFIER 1.2 +#define NUKESCALINGMODIFIER 6 /datum/game_mode var/list/datum/mind/syndicates = list() -/proc/issyndicate(mob/living/M as mob) - return istype(M) && M.mind && SSticker && SSticker.mode && (M.mind in SSticker.mode.syndicates) - /datum/game_mode/nuclear name = "nuclear emergency" config_tag = "nuclear" @@ -25,40 +22,34 @@ to_chat(world, "A [syndicate_name()] Strike Force is approaching [station_name()]!") to_chat(world, "A nuclear explosive was being transported by Nanotrasen to a military base. The transport ship mysteriously lost contact with Space Traffic Control (STC). About that time a strange disk was discovered around [station_name()]. It was identified by Nanotrasen as a nuclear authentication disk and now Syndicate Operatives have arrived to retake the disk and detonate SS13! There are most likely Syndicate starships are in the vicinity, so take care not to lose the disk!\nSyndicate: Reclaim the disk and detonate the nuclear bomb anywhere on SS13.\nPersonnel: Hold the disk and escape with the disk on the shuttle!") -/datum/game_mode/nuclear/can_start()//This could be better, will likely have to recode it later +/datum/game_mode/nuclear/can_start() if(!..()) - return 0 - + return FALSE var/list/possible_syndicates = get_players_for_role(ROLE_OPERATIVE) var/agent_number = 0 - if(possible_syndicates.len < 1) - return 0 + if(!length(possible_syndicates)) + return FALSE - if(LAZYLEN(possible_syndicates) > agents_possible) + if(possible_syndicates.len > agents_possible) agent_number = agents_possible else agent_number = possible_syndicates.len var/n_players = num_players() if(agent_number > n_players) - agent_number = n_players/2 + agent_number = n_players / 2 while(agent_number > 0) - var/datum/mind/new_syndicate = pick(possible_syndicates) + var/datum/mind/new_syndicate = pick_n_take(possible_syndicates) syndicates += new_syndicate - possible_syndicates -= new_syndicate //So it doesn't pick the same guy each time. agent_number-- +/datum/game_mode/nuclear/pre_setup() for(var/datum/mind/synd_mind in syndicates) synd_mind.assigned_role = SPECIAL_ROLE_NUKEOPS //So they aren't chosen for other jobs. synd_mind.special_role = SPECIAL_ROLE_NUKEOPS - return 1 - - -/datum/game_mode/nuclear/pre_setup() - ..() - return 1 + return TRUE /datum/game_mode/proc/remove_operative(datum/mind/operative_mind) if(operative_mind in syndicates) @@ -169,7 +160,7 @@ M.overeatduration = 0 M.flavor_text = null - var/obj/item/organ/external/head/head_organ = M.get_organ("head") + var/obj/item/organ/external/head/head_organ = M.get_organ(BODY_ZONE_HEAD) var/hair_c = pick("#8B4513","#000000","#FF4500","#FFD700") // Brown, black, red, blonde var/eye_c = pick("#000000","#8B4513","1E90FF") // Black, brown, blue var/skin_tone = pick(-50, -30, -10, 0, 0, 0, 10) // Caucasian/black @@ -251,7 +242,7 @@ return 1337 // WHY??? -- Doohl -/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob, uplink_uses = 20) +/datum/game_mode/proc/equip_syndicate(mob/living/carbon/human/synd_mob, uplink_uses = 100) var/radio_freq = SYND_FREQ var/obj/item/radio/R = new /obj/item/radio/headset/syndicate/alt(synd_mob) diff --git a/code/game/gamemodes/nuclear/nuclear_challenge.dm b/code/game/gamemodes/nuclear/nuclear_challenge.dm index afa56a1e7d3..202effadd56 100644 --- a/code/game/gamemodes/nuclear/nuclear_challenge.dm +++ b/code/game/gamemodes/nuclear/nuclear_challenge.dm @@ -1,7 +1,7 @@ -#define CHALLENGE_TELECRYSTALS 280 +#define CHALLENGE_TELECRYSTALS 1400 #define CHALLENGE_TIME_LIMIT 6000 #define CHALLENGE_SCALE_PLAYER 1 // How many player per scaling bonus -#define CHALLENGE_SCALE_BONUS 2 // How many TC per scaling bonus +#define CHALLENGE_SCALE_BONUS 10 // How many TC per scaling bonus #define CHALLENGE_MIN_PLAYERS 50 #define CHALLENGE_SHUTTLE_DELAY 18000 //30 minutes, so the ops have at least 10 minutes before the shuttle is callable. Gives the nuke ops at least 15 minutes before shuttle arrive. diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 4636e9cd449..9521f1d4c92 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -108,7 +108,7 @@ if(!the_s_bomb) the_s_bomb = locate() -/obj/item/pinpointer/proc/point_at(atom/target) +/obj/item/pinpointer/proc/pinpoint_at(atom/target) if(!target) icon_state = icon_null return @@ -132,15 +132,15 @@ /obj/item/pinpointer/proc/workdisk() scandisk() - point_at(the_disk) + pinpoint_at(the_disk) /obj/item/pinpointer/proc/workbomb() if(!syndicate) scanbomb() - point_at(the_bomb) + pinpoint_at(the_bomb) else scanbomb() - point_at(the_s_bomb) + pinpoint_at(the_s_bomb) /obj/item/pinpointer/examine(mob/user) . = ..() @@ -163,13 +163,13 @@ if(SETTING_DISK) workdisk() if(SETTING_LOCATION) - point_at(location) + pinpoint_at(location) if(SETTING_OBJECT) - point_at(target) + pinpoint_at(target) /obj/item/pinpointer/advpinpointer/workdisk() //since mode works diffrently for advpinpointer scandisk() - point_at(the_disk) + pinpoint_at(the_disk) /obj/item/pinpointer/advpinpointer/AltClick(mob/user) . = ..() @@ -280,7 +280,7 @@ visible_message("Shuttle Locator mode actived.") //Lets the mob holding it know that the mode has changed return //Get outta here scandisk() - point_at(the_disk) + pinpoint_at(the_disk) /obj/item/pinpointer/nukeop/workbomb() if(GLOB.bomb_set) //If the bomb is set, lead to the shuttle @@ -290,7 +290,7 @@ visible_message("Shuttle Locator mode actived.") //Lets the mob holding it know that the mode has changed return //Get outta here scanbomb() - point_at(the_s_bomb) + pinpoint_at(the_s_bomb) /obj/item/pinpointer/nukeop/proc/worklocation() if(!GLOB.bomb_set) @@ -307,7 +307,7 @@ if(loc.z != home.z) //If you are on a different z-level from the shuttle icon_state = icon_null else - point_at(home) + pinpoint_at(home) /obj/item/pinpointer/operative name = "operative pinpointer" @@ -340,7 +340,7 @@ /obj/item/pinpointer/operative/proc/workop() if(mode == MODE_OPERATIVE) scan_for_ops() - point_at(nearest_op, FALSE) + pinpoint_at(nearest_op, FALSE) else return FALSE @@ -375,7 +375,7 @@ /obj/item/pinpointer/ninja/proc/workninja() scan_for_ninja() - point_at(nearest_ninja, FALSE) + pinpoint_at(nearest_ninja, FALSE) /obj/item/pinpointer/ninja/examine(mob/user) . = ..() @@ -413,9 +413,9 @@ /obj/item/pinpointer/crew/process() if(mode == MODE_CREW && target_set) - point_at(target) + pinpoint_at(target) -/obj/item/pinpointer/crew/point_at(atom/target) +/obj/item/pinpointer/crew/pinpoint_at(atom/target) if(!target || !trackable(target)) icon_state = icon_null return @@ -490,9 +490,9 @@ /obj/item/pinpointer/thief/process() switch(setting) if(SETTING_LOCATION) - point_at(location) + pinpoint_at(location) if(SETTING_OBJECT) - point_at(target) + pinpoint_at(target) /obj/item/pinpointer/thief/cycle(mob/user) @@ -699,14 +699,14 @@ /obj/item/pinpointer/tendril/process() if(mode == MODE_TENDRIL) find_tendril() - point_at(target, FALSE) + pinpoint_at(target, FALSE) else icon_state = icon_off /obj/item/pinpointer/tendril/proc/find_tendril() if(mode == MODE_TENDRIL) scan_for_tendrils() - point_at(target) + pinpoint_at(target) else return FALSE diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm index 4c39245b1f2..f0abfe9c3b3 100644 --- a/code/game/gamemodes/revolution/revolution.dm +++ b/code/game/gamemodes/revolution/revolution.dm @@ -122,7 +122,6 @@ for(var/datum/mind/rev_mind in head_revolutionaries) greet_revolutionary(rev_mind) - modePlayer += head_revolutionaries ..() @@ -401,3 +400,12 @@ dat += "
" return dat + + +/proc/is_revolutionary(mob/living/user) + return istype(user) && user.mind && SSticker && SSticker.mode && (user.mind in SSticker.mode.revolutionaries) + + +/proc/is_head_revolutionary(mob/living/user) + return istype(user) && user.mind && SSticker && SSticker.mode && (user.mind in SSticker.mode.head_revolutionaries) + diff --git a/code/game/gamemodes/shadowling/shadowling.dm b/code/game/gamemodes/shadowling/shadowling.dm index dcb767a34a4..cc6916e7efd 100644 --- a/code/game/gamemodes/shadowling/shadowling.dm +++ b/code/game/gamemodes/shadowling/shadowling.dm @@ -95,7 +95,6 @@ Made by Xhuis var/datum/mind/shadow = pick(possible_shadowlings) shadows += shadow possible_shadowlings -= shadow - modePlayer += shadow shadow.special_role = SPECIAL_ROLE_SHADOWLING shadow.restricted_roles = restricted_jobs shadowlings-- diff --git a/code/game/gamemodes/spaceninja/space_ninja.dm b/code/game/gamemodes/spaceninja/space_ninja.dm index 2e993790fbc..ad5445b8b2e 100644 --- a/code/game/gamemodes/spaceninja/space_ninja.dm +++ b/code/game/gamemodes/spaceninja/space_ninja.dm @@ -20,23 +20,22 @@ /datum/game_mode/space_ninja/can_start() if(!..()) return FALSE + if(!length(GLOB.ninjastart)) + stack_trace("A starting location for ninja could not be found, please report this bug!") + return FALSE var/list/datum/mind/possible_ninjas = get_players_for_role(ROLE_NINJA) if(!length(possible_ninjas)) return FALSE pre_ninja = pick(possible_ninjas) + return TRUE + +/datum/game_mode/space_ninja/pre_setup() space_ninjas |= pre_ninja pre_ninja.assigned_role = SPECIAL_ROLE_SPACE_NINJA //So they aren't chosen for other jobs. pre_ninja.special_role = SPECIAL_ROLE_SPACE_NINJA pre_ninja.offstation_role = TRUE //ninja can't be targeted as a victim for some pity traitors pre_ninja.set_original_mob(pre_ninja.current) - if(!length(GLOB.ninjastart)) - to_chat(pre_ninja.current, span_danger("A starting location for you could not be found, please report this bug!")) - return FALSE - return TRUE - - -/datum/game_mode/space_ninja/pre_setup() pre_ninja?.current.loc = pick(GLOB.ninjastart) ..() return TRUE diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 22170504bc2..116ed8aa721 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -361,8 +361,8 @@ GLOBAL_LIST_EMPTY(multiverse) if("cyborg") if(!ismachineperson(M)) - for(var/obj/item/organ/O in M.bodyparts) - O.robotize(make_tough = 1) + for(var/obj/item/organ/external/bodypart as anything in M.bodyparts) + bodypart.robotize(make_tough = TRUE) M.equip_to_slot_or_del(new /obj/item/clothing/glasses/thermal/eyepatch(M), slot_glasses) M.equip_to_slot_or_del(sword, slot_r_hand) @@ -708,7 +708,7 @@ GLOBAL_LIST_EMPTY(multiverse) target = input(user, "Select your victim!", "Voodoo") as null|anything in possible return - if(user.zone_selected == "chest") + if(user.zone_selected == BODY_ZONE_CHEST) if(link) target = null link.loc = get_turf(src) @@ -719,22 +719,22 @@ GLOBAL_LIST_EMPTY(multiverse) if(target && cooldown < world.time) switch(user.zone_selected) - if("mouth") + if(BODY_ZONE_PRECISE_MOUTH) var/wgw = sanitize(input(user, "What would you like the victim to say", "Voodoo", null) as text) target.say(wgw) add_attack_logs(user, target, "force say ([wgw]) with a voodoo doll.") add_say_logs(target, wgw, src) - if("eyes") + if(BODY_ZONE_PRECISE_EYES) user.set_machine(src) user.reset_perspective(target) spawn(100) user.reset_perspective(null) user.unset_machine() - if("r_leg","l_leg") + if(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) to_chat(user, "You move the doll's legs around.") var/turf/T = get_step(target,pick(GLOB.cardinal)) target.Move(T) - if("r_arm","l_arm") + if(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM) //use active hand on random nearby mob var/list/nearby_mobs = list() for(var/mob/living/L in range(1,target)) @@ -745,7 +745,7 @@ GLOBAL_LIST_EMPTY(multiverse) add_attack_logs(user, target, "force click on [T] with a voodoo doll.") target.ClickOn(T) GiveHint(target) - if("head") + if(BODY_ZONE_HEAD) to_chat(user, "You smack the doll's head with your hand.") target.Dizzy(20 SECONDS) to_chat(target, "You suddenly feel as if your head was hit with a hammer!") diff --git a/code/game/gamemodes/wizard/wizard.dm b/code/game/gamemodes/wizard/wizard.dm index 4978675c081..7b7b11a57db 100644 --- a/code/game/gamemodes/wizard/wizard.dm +++ b/code/game/gamemodes/wizard/wizard.dm @@ -19,49 +19,43 @@ to_chat(world, "The current game mode is - Wizard!") to_chat(world, "There is a SPACE WIZARD on the station. You can't let him achieve his objective!") -/datum/game_mode/wizard/can_start()//This could be better, will likely have to recode it later +/datum/game_mode/wizard/can_start() if(!..()) - return 0 + return FALSE + if(!length(GLOB.wizardstart)) + stack_trace("A starting location for wizard could not be found, please report this bug!") + return FALSE var/list/datum/mind/possible_wizards = get_players_for_role(ROLE_WIZARD) if(!length(possible_wizards)) - return 0 - var/datum/mind/wizard = pick(possible_wizards) + return FALSE + var/datum/mind/wizard = pick_n_take(possible_wizards) wizards += wizard - modePlayer += wizard - wizard.assigned_role = SPECIAL_ROLE_WIZARD //So they aren't chosen for other jobs. - wizard.special_role = SPECIAL_ROLE_WIZARD - wizard.set_original_mob(wizard.current) - if(GLOB.wizardstart.len == 0) - to_chat(wizard.current, "A starting location for you could not be found, please report this bug!") - return 0 - - var/playerC = num_players() - possible_wizards.Remove(wizard) if(playerC >= required_players) for(var/i in 1 to round((playerC - required_players) / required_num_players_for_apprentice)) if(!length(possible_wizards)) - return 1 - var/datum/mind/apprentice = pick(possible_wizards) - + break + var/datum/mind/apprentice = pick_n_take(possible_wizards) apprentices += apprentice - modePlayer += apprentice - - apprentice.assigned_role = SPECIAL_ROLE_WIZARD_APPRENTICE //So they aren't chosen for other jobs. - apprentice.special_role = SPECIAL_ROLE_WIZARD_APPRENTICE - possible_wizards.Remove(apprentice) - apprentice.set_original_mob(apprentice.current) - return 1 + return TRUE /datum/game_mode/wizard/pre_setup() - for(var/datum/mind/wiz in wizards) - wiz.current.loc = pick(GLOB.wizardstart) - for(var/datum/mind/app in apprentices) - app.current.loc = pick(GLOB.wizardstart) + for(var/datum/mind/wizard in wizards) + wizard.assigned_role = SPECIAL_ROLE_WIZARD //So they aren't chosen for other jobs. + wizard.special_role = SPECIAL_ROLE_WIZARD + wizard.offstation_role = TRUE + wizard.set_original_mob(wizard.current) + wizard.current.loc = pick(GLOB.wizardstart) + for(var/datum/mind/apprentice in apprentices) + apprentice.assigned_role = SPECIAL_ROLE_WIZARD_APPRENTICE //So they aren't chosen for other jobs. + apprentice.special_role = SPECIAL_ROLE_WIZARD_APPRENTICE + apprentice.offstation_role = TRUE + apprentice.set_original_mob(apprentice.current) + apprentice.current.loc = pick(GLOB.wizardstart) ..() - return 1 + return TRUE /datum/game_mode/wizard/post_setup() var/datum/mind/wizard_teacher diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 4aa36e57cbd..cef76bf1c0c 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -458,50 +458,7 @@ /proc/get_all_special_jobs() return list("Special Reaction Team Member", "HONKsquad", "Clown Security") -//gets the actual job rank (ignoring alt titles) -//this is used solely for sechuds -/obj/proc/GetJobRealName() - if(!istype(src, /obj/item/pda) && !istype(src,/obj/item/card/id)) - return - - var/rank - var/assignment - if(istype(src, /obj/item/pda)) - if(src:id) - rank = src:id:rank - assignment = src:id:assignment - else if(istype(src, /obj/item/card/id)) - rank = src:rank - assignment = src:assignment - - if( rank in GLOB.joblist ) - return rank - - if( assignment in GLOB.joblist ) - return assignment - - return "Unknown" - -//gets the alt title, failing that the actual job rank -//this is unused -// THEN WHY IS IT STILL HERE?? -AA07, 2020-07-31 -/obj/proc/sdsdsd() //GetJobDisplayName - if(!istype(src, /obj/item/pda) && !istype(src,/obj/item/card/id)) - return - - var/assignment - if(istype(src, /obj/item/pda)) - if(src:id) - assignment = src:id:assignment - else if(istype(src, /obj/item/card/id)) - assignment = src:assignment - - if(assignment) - return assignment - - return "Unknown" - -/proc/GetIdCard(var/mob/living/carbon/human/H) +/proc/GetIdCard(mob/living/carbon/human/H) if(H.wear_id) var/id = H.wear_id.GetID() if(id) @@ -510,35 +467,6 @@ var/obj/item/I = H.get_active_hand() return I.GetID() -/proc/FindNameFromID(var/mob/living/carbon/human/H) - ASSERT(istype(H)) - var/obj/item/card/id/C = H.get_active_hand() - if( istype(C) || istype(C, /obj/item/pda) ) - var/obj/item/card/id/ID = C - - if( istype(C, /obj/item/pda) ) - var/obj/item/pda/pda = C - ID = pda.id - if(!istype(ID)) - ID = null - - if(ID) - return ID.registered_name - - C = H.wear_id - - if( istype(C) || istype(C, /obj/item/pda) ) - var/obj/item/card/id/ID = C - - if( istype(C, /obj/item/pda) ) - var/obj/item/pda/pda = C - ID = pda.id - if(!istype(ID)) - ID = null - - if(ID) - return ID.registered_name - /proc/get_all_job_icons() //For all existing HUD icons return GLOB.joblist + list("Prisoner") diff --git a/code/game/jobs/job/central.dm b/code/game/jobs/job/central.dm index a9950cffd60..d012c9f2df9 100644 --- a/code/game/jobs/job/central.dm +++ b/code/game/jobs/job/central.dm @@ -154,6 +154,10 @@ /obj/item/implant/dust ) + backpack_contents = list( + /obj/item/stamp/solgov = 1, + ) + /datum/outfit/job/ntspecops/solgovspecops/post_equip(mob/living/carbon/human/H, visualsOnly = FALSE) . = ..() if(visualsOnly) diff --git a/code/game/jobs/job/syndicate.dm b/code/game/jobs/job/syndicate.dm index b4452cc5805..ca71db768e5 100644 --- a/code/game/jobs/job/syndicate.dm +++ b/code/game/jobs/job/syndicate.dm @@ -51,7 +51,7 @@ var/obj/item/implant/uplink/admin/U = new /obj/item/implant/uplink/admin(H) U.implant(H) - U.hidden_uplink.uses = 500 + U.hidden_uplink.uses = 2500 H.faction += "syndicate" var/datum/atom_hud/antag/opshud = GLOB.huds[ANTAG_HUD_OPS] opshud.join_hud(H.mind.current) diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 354de75e424..21a9ef8dc86 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -271,7 +271,7 @@ occupantData["implant_len"] = implantData.len var/extOrganData[0] - for(var/obj/item/organ/external/E in occupant.bodyparts) + for(var/obj/item/organ/external/E as anything in occupant.bodyparts) var/organData[0] organData["name"] = E.name organData["open"] = E.open @@ -284,7 +284,7 @@ organData["broken"] = E.min_broken_damage var/shrapnelData[0] - for(var/obj/I in E.embedded_objects) + for(var/obj/item/I in E.embedded_objects) var/shrapnelSubData[0] shrapnelSubData["name"] = I.name @@ -294,13 +294,13 @@ organData["shrapnel_len"] = shrapnelData.len var/organStatus[0] - if(E.status & ORGAN_BROKEN) + if(E.has_fracture()) organStatus["broken"] = E.broken_description if(E.is_robotic()) organStatus["robotic"] = TRUE - if(E.status & ORGAN_SPLINTED) + if(E.is_splinted()) organStatus["splinted"] = TRUE - if(E.status & ORGAN_DEAD) + if(E.is_dead()) organStatus["dead"] = TRUE organData["status"] = organStatus @@ -308,7 +308,7 @@ if(istype(E, /obj/item/organ/external/chest) && occupant.is_lung_ruptured()) organData["lungRuptured"] = TRUE - if(E.internal_bleeding) + if(E.has_internal_bleeding()) organData["internalBleeding"] = TRUE extOrganData.Add(list(organData)) @@ -316,17 +316,17 @@ occupantData["extOrgan"] = extOrganData var/intOrganData[0] - for(var/obj/item/organ/internal/I in occupant.internal_organs) + for(var/obj/item/organ/internal/organ as anything in occupant.internal_organs) var/organData[0] - organData["name"] = I.name - organData["desc"] = I.desc - organData["germ_level"] = I.germ_level - organData["damage"] = I.damage - organData["maxHealth"] = I.max_damage - organData["bruised"] = I.min_bruised_damage - organData["broken"] = I.min_broken_damage - organData["robotic"] = I.is_robotic() - organData["dead"] = (I.status & ORGAN_DEAD) + organData["name"] = organ.name + organData["desc"] = organ.desc + organData["germ_level"] = organ.germ_level + organData["damage"] = organ.damage + organData["maxHealth"] = organ.max_damage + organData["bruised"] = organ.min_bruised_damage + organData["broken"] = organ.min_broken_damage + organData["robotic"] = organ.is_robotic() + organData["dead"] = (organ.is_dead()) intOrganData.Add(list(organData)) @@ -457,7 +457,7 @@ dat += "Other Wounds" dat += "" - for(var/obj/item/organ/external/e in occupant.bodyparts) + for(var/obj/item/organ/external/e as anything in occupant.bodyparts) dat += "" var/AN = "" var/open = "" @@ -469,15 +469,15 @@ var/splint = "" var/internal_bleeding = "" var/lung_ruptured = "" - if(e.internal_bleeding) + if(e.has_internal_bleeding()) internal_bleeding = "
Internal bleeding" if(istype(e, /obj/item/organ/external/chest) && occupant.is_lung_ruptured()) lung_ruptured = "Lung ruptured:" - if(e.status & ORGAN_SPLINTED) + if(e.is_splinted()) splint = "Splinted:" - if(e.status & ORGAN_BROKEN) + if(e.has_fracture()) AN = "[e.broken_description]:" - if(e.status & ORGAN_DEAD) + if(e.is_dead()) dead = "DEAD:" if(e.is_robotic()) robot = "Robotic:" @@ -499,23 +499,19 @@ if(INFECTION_LEVEL_TWO + 400 to INFINITY) infected = "Septic:" - var/unknown_body = 0 - for(var/I in e.embedded_objects) - unknown_body++ - - if(unknown_body || e.hidden) + if(LAZYLEN(e.embedded_objects) || e.hidden) imp += "Unknown body present:" if(!AN && !open && !infected && !imp) AN = "None:" dat += "[e.name][e.burn_dam][e.brute_dam][robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured][dead]" dat += "" - for(var/obj/item/organ/internal/i in occupant.internal_organs) - var/mech = i.desc + for(var/obj/item/organ/internal/organ as anything in occupant.internal_organs) + var/mech = organ.desc var/infection = "None" var/dead = "" - if(i.status & ORGAN_DEAD) + if(organ.is_dead()) dead = "DEAD:" - switch(i.germ_level) + switch(organ.germ_level) if(1 to INFECTION_LEVEL_ONE + 200) infection = "Mild Infection:" if(INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) @@ -532,7 +528,7 @@ infection = "Septic:" dat += "" - dat += "[i.name]N/A[i.damage][infection]:[mech][dead]" + dat += "[organ.name]N/A[organ.damage][infection]:[mech][dead]" dat += "" dat += "" if(BLINDNESS in occupant.mutations) diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 369b43d2b9f..e6f28032492 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -646,24 +646,25 @@ GLOBAL_LIST_INIT(cloner_biomass_items, list(\ H.setCloneLoss(CLONE_INITIAL_DAMAGE, FALSE) H.setBrainLoss(BRAIN_INITIAL_DAMAGE) - for(var/o in H.internal_organs) - var/obj/item/organ/O = o - if(!istype(O) || O.vital) + for(var/obj/item/organ/internal/organ as anything in H.internal_organs) + if(organ.vital) continue // Let's non-specially remove all non-vital organs // What could possibly go wrong - var/obj/item/I = O.remove(H, TRUE) + var/atom/movable/thing = organ.remove(H, ORGAN_MANIPULATION_NOEFFECT) // Make this support stuff that turns into items when removed - I.forceMove(src) - missing_organs += I + if(!QDELETED(thing)) + thing.forceMove(src) + missing_organs += thing - var/static/list/zones = list("r_arm", "l_arm", "r_leg", "l_leg") + var/static/list/zones = list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG) for(var/zone in zones) - var/obj/item/organ/external/E = H.get_organ(zone) - var/obj/item/I = E.remove(H) - I.forceMove(src) - missing_organs += I + var/obj/item/organ/external/bodypart = H.get_organ(zone) + var/atom/movable/thing = bodypart.remove(H) + if(!QDELETED(thing)) + thing.forceMove(src) + missing_organs += thing organs_number = LAZYLEN(missing_organs) H.updatehealth() diff --git a/code/game/machinery/computer/prisoner.dm b/code/game/machinery/computer/prisoner.dm index 483d276099c..e48242bbff2 100644 --- a/code/game/machinery/computer/prisoner.dm +++ b/code/game/machinery/computer/prisoner.dm @@ -1,3 +1,5 @@ +#define IMPLANT_WARN_COOLDOWN (30 SECONDS) + /obj/machinery/computer/prisoner name = "labor camp points manager" icon = 'icons/obj/machines/computer.dmi' @@ -5,138 +7,195 @@ icon_screen = "explosive" req_access = list(ACCESS_ARMORY) circuit = /obj/item/circuitboard/prisoner - var/id = 0.0 - var/temp = null - var/status = 0 - var/timeleft = 60 - var/stop = 0.0 - var/screen = 0 // 0 - No Access Denied, 1 - Access allowed - var/obj/item/card/id/prisoner/inserted_id - light_color = LIGHT_COLOR_DARKRED + /// FALSE - No Access Denied, TRUE - Access allowed + var/authenticated = FALSE + var/inserted_id_uid + -/obj/machinery/computer/prisoner/attack_ai(var/mob/user as mob) - return src.attack_hand(user) +/obj/machinery/computer/prisoner/Initialize(mapload) + . = ..() + GLOB.prisoncomputer_list += src -/obj/machinery/computer/prisoner/New() - GLOB.prisoncomputer_list += src - return ..() /obj/machinery/computer/prisoner/Destroy() - GLOB.prisoncomputer_list -= src - return ..() + GLOB.prisoncomputer_list -= src + return ..() + + +/obj/machinery/computer/prisoner/attackby(obj/item/I, mob/user, params) + var/datum/ui_login/state = ui_login_get() + if(state.logged_in) + var/obj/item/card/id/prisoner/id_card = I + if(istype(id_card) && user.drop_transfer_item_to_loc(id_card, src)) + inserted_id_uid = id_card.UID() + return + + if(ui_login_attackby(I, user)) + add_fingerprint(user) + return + + return ..() + + +/obj/machinery/computer/prisoner/attack_ai(mob/user) + ui_interact(user) + -/obj/machinery/computer/prisoner/attack_hand(var/mob/user as mob) +/obj/machinery/computer/prisoner/attack_hand(mob/user) if(..()) - return 1 - user.set_machine(src) - var/dat = {""} - dat += "Prisoner Implant Manager System
" - if(screen == 0) - dat += "
Unlock Console" - else if(screen == 1) - if(istype(inserted_id)) - var/p = inserted_id:points - var/g = inserted_id:goal - dat += text("[inserted_id]
") - dat += text("Collected points: [p]. Reset.
") - dat += text("Card goal: [g]. Set
") - dat += text("Space Law recommends sentences of 100 points per minute they would normally serve in the brig.
") - else - dat += text("Insert Prisoner ID
") - var/turf/Tr = null - dat += "
Chemical Implants
" - for(var/obj/item/implant/chem/C in GLOB.tracked_implants) - Tr = get_turf(C) - if((Tr) && (Tr.z != src.z)) continue//Out of range - if(!C.implanted) continue - // AUTOFIXED BY fix_string_idiocy.py - // C:\Users\Rob\Documents\Projects\vgstation13\code\game\machinery\computer\prisoner.dm:41: dat += "[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: " - dat += {"[C.imp_in.name] | Remaining Units: [C.reagents.total_volume] | Inject: - ((1)) - ((5)) - ((10))
- ********************************
"} - // END AUTOFIX - dat += "
Tracking Implants
" - for(var/obj/item/implant/tracking/T in GLOB.tracked_implants) - Tr = get_turf(T) - if((Tr) && (Tr.z != src.z)) continue//Out of range - if(!T.implanted) continue - var/mob/living/carbon/M = T.imp_in - var/loc_display = "Unknown" - var/health_display = "OK" - var/total_loss = (M.maxHealth - M.health) - if(M.stat == DEAD) - health_display = "DEAD" - else if(total_loss) - health_display = "HURT ([total_loss])" - if(is_station_level(Tr.z) && !istype(Tr.loc, /turf/space)) - loc_display = "[get_area(Tr)]" - dat += "ID: [T.id]
Subject: [M]
Location: [loc_display]
Health: [health_display]
" - dat += "(Message Holder) |
" - dat += "********************************
" - dat += "
Lock Console" - - user << browse(dat, "window=computer;size=400x500") - onclose(user, "computer") - return - -/obj/machinery/computer/prisoner/process() - if(!..()) - src.updateDialog() - return - -/obj/machinery/computer/prisoner/Topic(href, href_list) + return TRUE + add_fingerprint(user) + ui_interact(user) + + +/obj/machinery/computer/prisoner/proc/check_implant(obj/item/implant/checked_imp) + var/turf/implant_location = get_turf(checked_imp) + if(!implant_location || implant_location.z != z) + return FALSE + if(!checked_imp.implanted) + return FALSE + return TRUE + + +/obj/machinery/computer/prisoner/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "PrisonerImplantManager", name, 500, 500, master_ui, state) + ui.open() + + +/obj/machinery/computer/prisoner/ui_data(mob/user) + var/list/data = list() + ui_login_data(data, user) + var/obj/item/card/id/prisoner/inserted_id = locateUID(inserted_id_uid) + data["prisonerInfo"] = list( + "name" = inserted_id?.name, + "points" = inserted_id?.mining_points, + "goal" = inserted_id?.goal, + ) + + data["chemicalInfo"] = list() + for(var/obj/item/implant/chem/chem_imp in GLOB.tracked_implants) + if(!check_implant(chem_imp)) + continue + var/list/implant_info = list( + "name" = chem_imp.imp_in.name, + "volume" = chem_imp.reagents.total_volume, + "uid" = chem_imp.UID(), + ) + data["chemicalInfo"] += list(implant_info) + + data["trackingInfo"] = list() + for(var/obj/item/implant/tracking/track_imp in GLOB.tracked_implants) + if(!check_implant(track_imp)) + continue + var/mob/living/carbon/carrier = track_imp.imp_in + var/loc_display = "Unknown" + var/health_display = "OK" + var/total_loss = (carrier.maxHealth - carrier.health) + if(carrier.stat == DEAD) + health_display = "DEAD" + else if(total_loss) + health_display = "HURT ([total_loss])" + var/turf/implant_location = get_turf(track_imp) + if(!isspaceturf(implant_location)) + loc_display = "[get_area(implant_location)]" + + var/list/implant_info = list( + "subject" = carrier.name, + "location" = loc_display, + "health" = health_display, + "uid" = track_imp.UID() + ) + data["trackingInfo"] += list(implant_info) + + data["modal"] = ui_modal_data(src) + + return data + + +/obj/machinery/computer/prisoner/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) if(..()) - return 1 - - usr.set_machine(src) - - if(href_list["id"]) - switch(href_list["id"]) - if("0") - var/obj/item/card/id/prisoner/I = usr.get_active_hand() - if(istype(I)) - usr.drop_transfer_item_to_loc(I, src) - inserted_id = I - else - to_chat(usr, span_warning("No valid ID.")) - if("1") - inserted_id.loc = get_step(src,get_turf(usr)) - inserted_id = null - if("2") + return + + add_fingerprint(ui.user) + + if(ui_act_modal(action, params, ui)) + return + if(ui_login_act(action, params)) + return + + var/mob/living/user = ui.user + var/obj/item/card/id/prisoner/inserted_id = locateUID(inserted_id_uid) + switch(action) + if("id_card") + if(inserted_id) + inserted_id.forceMove_turf() + ui.user.put_in_hands(inserted_id, ignore_anim = FALSE) + inserted_id_uid = null + return + var/obj/item/card/id/prisoner/card = user.get_active_hand() + if(istype(card) && user.drop_transfer_item_to_loc(card, src)) + inserted_id_uid = card.UID() + else + to_chat(user, span_warning("No valid ID.")) + + if("inject") + var/obj/item/implant/chem/implant = locateUID(params["uid"]) + if(!implant) + return + implant.activate(text2num(params["amount"])) + + if("reset_points") + if(inserted_id) inserted_id.mining_points = 0 - if("3") - var/num = round(input(usr, "Choose prisoner's goal:", "Input an Integer", null) as num|null) - if(num >= 0) - inserted_id.goal = num - if(href_list["inject1"]) - var/obj/item/implant/I = locate(href_list["inject1"]) - if(I) I.activate(1) - - else if(href_list["inject5"]) - var/obj/item/implant/I = locate(href_list["inject5"]) - if(I) I.activate(5) - - else if(href_list["inject10"]) - var/obj/item/implant/I = locate(href_list["inject10"]) - if(I) I.activate(10) - - else if(href_list["lock"]) - if(src.allowed(usr)) - screen = !screen - else - to_chat(usr, span_warning("Unauthorized access.")) - - else if(href_list["warn"]) - var/warning = sanitize(copytext_char(input(usr,"Message:","Enter your message here!",""),1,MAX_MESSAGE_LEN)) - if(!warning) return - var/obj/item/implant/I = locate(href_list["warn"]) - if((I)&&(I.imp_in)) - var/mob/living/carbon/R = I.imp_in - to_chat(R, span_boldnotice("You hear a voice in your head saying: '[warning]'")) - - src.add_fingerprint(usr) - src.updateUsrDialog() - return + + +/obj/machinery/computer/prisoner/proc/ui_act_modal(action, list/params, datum/tgui/ui) + if(!ui_login_get().logged_in) + return + . = TRUE + var/id = params["id"] + var/mob/living/user = ui.user + var/list/arguments = istext(params["arguments"]) ? json_decode(params["arguments"]) : params["arguments"] + + switch(ui_modal_act(src, action, params)) + if(UI_MODAL_OPEN) + switch(id) + if("warn") + ui_modal_input(src, id, "Please enter your message:", null, arguments = list( + "uid" = arguments["uid"], + )) + if("set_points") + ui_modal_input(src, id, "Please enter the new point goal:", null, arguments) + + if(UI_MODAL_ANSWER) + var/answer = params["answer"] + switch(id) + if("warn") + var/obj/item/implant/tracking/implant = locateUID(arguments["uid"]) + if(!implant) + return + + if(implant.warn_cooldown >= world.time) + to_chat(user, span_warning("The warning system for that bio-chip is still cooling down.")) + return + + implant.warn_cooldown = world.time + IMPLANT_WARN_COOLDOWN + if(implant.imp_in) + var/mob/living/carbon/implantee = implant.imp_in + var/warning = copytext_char(sanitize(answer), 1, MAX_MESSAGE_LEN) + to_chat(implantee, "[span_boldnotice("Your skull vibrates violently as a loud announcement is broadcasted to you: ")][span_userdanger("'[warning]'")]") + + if("set_points") + if(isnull(text2num(answer))) + return + var/obj/item/card/id/prisoner/inserted_id = locateUID(inserted_id_uid) + inserted_id?.goal = max(text2num(answer), 0) + + return FALSE + + +#undef IMPLANT_WARN_COOLDOWN + diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index b67b0f2df01..464f10d9554 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -783,7 +783,7 @@ to destroy them and players will be able to make replacements. /obj/item/stock_parts/manipulator = 1, /obj/item/stock_parts/micro_laser = 1, /obj/item/stack/sheet/glass = 1, - /obj/item/stack/telecrystal = 5) + /obj/item/stack/telecrystal = 25) /obj/item/circuitboard/podfab board_name = "Spacepod Fabricator" @@ -902,7 +902,7 @@ to destroy them and players will be able to make replacements. build_path = /obj/machinery/syndiepad board_type = "machine" req_components = list( - /obj/item/stack/telecrystal = 1, + /obj/item/stack/telecrystal = 5, /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/manipulator = 1, /obj/item/stack/cable_coil = 1) @@ -915,7 +915,7 @@ to destroy them and players will be able to make replacements. board_type = "machine" origin_tech = "programming=3;engineering=3;plasmatech=3;bluespace=4;syndicate=6" //Технология достойная подобного уровня нелегала как по мне req_components = list( - /obj/item/stack/telecrystal = 1, + /obj/item/stack/telecrystal = 5, /obj/item/stock_parts/capacitor = 1, /obj/item/stock_parts/manipulator = 1, /obj/item/stack/cable_coil = 1) diff --git a/code/game/machinery/defib_mount.dm b/code/game/machinery/defib_mount.dm index 0d69f0e752b..4b018c16719 100644 --- a/code/game/machinery/defib_mount.dm +++ b/code/game/machinery/defib_mount.dm @@ -80,8 +80,8 @@ to_chat(user, span_warning("There's no defibrillator unit loaded!")) return - var/obj/item/organ/external/temp2 = user.bodyparts_by_name["r_hand"] - var/obj/item/organ/external/temp = user.bodyparts_by_name["l_hand"] + var/obj/item/organ/external/temp2 = user.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] + var/obj/item/organ/external/temp = user.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(!temp || !temp.is_usable() && !temp2 || !temp2.is_usable()) to_chat(user, span_warning("You can't use your hand to take out the paddles!")) @@ -149,8 +149,8 @@ if(!istype(user) || user.incapacitated()) to_chat(user, span_warning("You can't do that right now!")) return - var/obj/item/organ/external/temp2 = user.bodyparts_by_name["r_hand"] - var/obj/item/organ/external/temp = user.bodyparts_by_name["l_hand"] + var/obj/item/organ/external/temp2 = user.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] + var/obj/item/organ/external/temp = user.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(!Adjacent(user)) return if(!defib) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index c30005f7a98..d9fdfa98b17 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -769,7 +769,7 @@ About the new airlock wires panel: playsound(loc, 'sound/effects/bang.ogg', 25, 1) if(!istype(H.head, /obj/item/clothing/head/helmet)) visible_message(span_warning("[user] headbutts the airlock.")) - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BODY_ZONE_HEAD) H.Weaken(10 SECONDS) if(affecting.receive_damage(10, 0)) H.UpdateDamageIcon() diff --git a/code/game/machinery/poolcontroller.dm b/code/game/machinery/poolcontroller.dm index 1ea33005c1f..7e2c57e9fe7 100644 --- a/code/game/machinery/poolcontroller.dm +++ b/code/game/machinery/poolcontroller.dm @@ -83,6 +83,9 @@ handleTemp(M) //handles pool temp effects on the swimmers if(ishuman(M)) //Only human types will drown, to keep things simple for non-human mobs that live in the water handleDrowning(M) + if(isliving(M)) + var/mob/living/mob = M + mob.ExtinguishMob() /obj/machinery/poolcontroller/proc/cleanPool() for(var/obj/effect/decal/cleanable/decal in decalinpool) //Cleans up cleanable decals like blood and such diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index de3ca989dad..6df827fa093 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -2296,9 +2296,9 @@ /obj/item/ammo_box/shotgun = 4, /obj/item/ammo_box/shotgun/buck = 4, /obj/item/ammo_box/shotgun/rubbershot = 4, - /obj/item/ammo_box/shotgun/stunslug = 35, - /obj/item/ammo_box/shotgun/ion = 14, - /obj/item/ammo_box/shotgun/laserslug = 35, + /obj/item/ammo_box/shotgun/stunslug = 5, + /obj/item/ammo_box/shotgun/ion = 2, + /obj/item/ammo_box/shotgun/laserslug = 5, /obj/item/ammo_box/speedloader/shotgun = 8, /obj/item/ammo_box/magazine/lr30mag = 12, @@ -2334,15 +2334,13 @@ /obj/item/gun/projectile/automatic/lasercarbine = 3, /obj/item/ammo_box/magazine/laser = 6, /obj/item/suppressor = 4, - /obj/item/gun/projectile/automatic/wt550 = 3, - /obj/item/ammo_box/magazine/wt550m9 = 6, - /obj/item/gun/projectile/shotgun/riot = 6, - /obj/item/ammo_box/shotgun/rubbershot = 6, - /obj/item/ammo_box/shotgun/beanbag = 4, - /obj/item/ammo_box/shotgun/tranquilizer = 4, /obj/item/ammo_box/speedloader/shotgun = 4, /obj/item/gun/projectile/automatic/sfg = 3, - /obj/item/ammo_box/magazine/sfg9mm = 6 + /obj/item/ammo_box/magazine/sfg9mm = 6, + /obj/item/gun/projectile/shotgun/automatic/combat = 3, + /obj/item/ammo_box/shotgun = 4, + /obj/item/ammo_box/shotgun/buck = 4, + /obj/item/ammo_box/shotgun/dragonsbreath = 2 ) contraband = list(/obj/item/storage/fancy/donut_box = 2) refill_canister = /obj/item/vending_refill/nta @@ -2365,11 +2363,6 @@ /obj/item/gun/energy/xray = 2, /obj/item/gun/energy/immolator/multi = 2, /obj/item/gun/energy/gun/nuclear = 3, - /obj/item/gun/projectile/shotgun/automatic/combat = 3, - /obj/item/ammo_box/shotgun = 4, - /obj/item/ammo_box/shotgun/buck = 4, - /obj/item/ammo_box/shotgun/dragonsbreath = 2, - /obj/item/ammo_box/speedloader/shotgun = 4, /obj/item/storage/lockbox/t4 = 3, /obj/item/grenade/smokebomb = 3, /obj/item/grenade/frag = 4 @@ -2393,9 +2386,13 @@ /obj/item/gun/energy/gun/advtaser = 4, /obj/item/gun/projectile/automatic/pistol/enforcer = 6, /obj/item/storage/box/barrier = 2, - /obj/item/gun/projectile/shotgun/riot = 1, - /obj/item/ammo_box/shotgun/rubbershot = 3, + /obj/item/gun/projectile/shotgun/riot = 3, + /obj/item/ammo_box/shotgun/rubbershot = 6, + /obj/item/ammo_box/shotgun/beanbag = 4, + /obj/item/ammo_box/shotgun/tranquilizer = 4, /obj/item/ammo_box/speedloader/shotgun = 4, + /obj/item/gun/projectile/automatic/wt550 = 3, + /obj/item/ammo_box/magazine/wt550m9 = 6, /obj/item/gun/energy/dominator/sibyl = 2 ) contraband = list(/obj/item/storage/fancy/donut_box = 2) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 8cacda1464c..b217979f083 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -8,13 +8,14 @@ force = 5 origin_tech = "materials=2;engineering=2" max_integrity = 300 + /// Only used in start_cooldown() and do_after_cooldown(), so be sure to add one of these procs to your successful action(). var/equip_cooldown = 0 - var/equip_ready = 1 + var/equip_ready = TRUE var/energy_drain = 0 var/obj/mecha/chassis = null var/range = MECHA_MELEE //bitflags - var/salvageable = 1 - var/selectable = 1 // Set to 0 for passive equipment such as mining scanner or armor plates + var/salvageable = TRUE + var/selectable = TRUE // Set to FALSE for passive equipment such as mining scanner or armor plates var/harmful = FALSE //Controls if equipment can be used to attack by a pacifist. @@ -22,18 +23,18 @@ if(chassis) send_byjax(chassis.occupant,"exosuit.browser","eq_list",chassis.get_equipment_list()) send_byjax(chassis.occupant,"exosuit.browser","equipment_menu",chassis.get_equipment_menu(),"dropdowns") - return 1 + return TRUE return /obj/item/mecha_parts/mecha_equipment/proc/update_equip_info() if(chassis) send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) - return 1 + return TRUE return /obj/item/mecha_parts/mecha_equipment/Destroy()//missiles detonating, teleporter creating singularity? if(chassis) - chassis.occupant_message("The [src] is destroyed!") + chassis.occupant_message(span_danger("The [src] is destroyed!")) chassis.log_append_to_last("[src] is destroyed.",1) if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon)) chassis.occupant << sound(chassis.weapdestrsound, volume = 50) @@ -72,16 +73,16 @@ /obj/item/mecha_parts/mecha_equipment/proc/action_checks(atom/target) if(!target) - return 0 + return FALSE if(!chassis) - return 0 + return FALSE if(!equip_ready) - return 0 + return FALSE if(crit_fail) - return 0 + return FALSE if(energy_drain && !chassis.has_charge(energy_drain)) - return 0 - return 1 + return FALSE + return TRUE /** * Proc that checks if the target of the mecha is in front of it @@ -96,10 +97,10 @@ return dir_to_target == chassis.dir || dir_to_target == get_clockwise_dir(chassis.dir) || dir_to_target == get_anticlockwise_dir(chassis.dir) /obj/item/mecha_parts/mecha_equipment/proc/action(atom/target) - return 0 + return FALSE /obj/item/mecha_parts/mecha_equipment/proc/start_cooldown() - set_ready_state(0) + set_ready_state(FALSE) chassis.use_power(energy_drain) var/cooldown = equip_cooldown @@ -107,16 +108,16 @@ if(istype(W)) cooldown += (W.projectiles_per_shot - 1) * W.projectile_delay - addtimer(CALLBACK(src, PROC_REF(set_ready_state), 1), cooldown) + addtimer(CALLBACK(src, PROC_REF(set_ready_state), TRUE), cooldown) /obj/item/mecha_parts/mecha_equipment/proc/do_after_cooldown(atom/target) if(!chassis) return var/C = chassis.loc - set_ready_state(0) + set_ready_state(FALSE) chassis.use_power(energy_drain) . = do_after(chassis.occupant, equip_cooldown * gettoolspeedmod(chassis.occupant), needhand = FALSE, target = target) - set_ready_state(1) + set_ready_state(TRUE) if(!chassis || chassis.loc != C || src != chassis.selected || !(get_dir(chassis, target) & chassis.dir)) return FALSE @@ -175,7 +176,7 @@ chassis.log_message("[src] removed from equipment.") chassis = null flags &= ~NODROP - set_ready_state(1) + set_ready_state(TRUE) /obj/item/mecha_parts/mecha_equipment/proc/detach_act() return diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index 038c9abecfd..d3f098d99cc 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -23,7 +23,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/process() if(!chassis) STOP_PROCESSING(SSobj, src) - return 1 + return TRUE /obj/item/mecha_parts/mecha_equipment/medical/detach_act() STOP_PROCESSING(SSobj, src) @@ -36,10 +36,10 @@ origin_tech = "engineering=3;biotech=3;plasmatech=2" energy_drain = 20 range = MECHA_MELEE - equip_cooldown = 20 + equip_cooldown = 2 SECONDS var/mob/living/carbon/patient = null var/inject_amount = 10 - salvageable = 0 + salvageable = FALSE /// List of reagents IDs, which will use touch reaction instead of ingest, upon injecting the patient. var/static/list/reagent_ingest_blacklist = list( /datum/reagent/medicine/styptic_powder, @@ -56,43 +56,46 @@ return ..() /obj/item/mecha_parts/mecha_equipment/medical/sleeper/Exit(atom/movable/O) - return 0 + return FALSE /obj/item/mecha_parts/mecha_equipment/medical/sleeper/action(mob/living/carbon/target) if(!action_checks(target)) - return + return FALSE if(!istype(target)) - return + return FALSE if(!patient_insertion_check(target)) - return - occupant_message("You start putting [target] into [src]...") - chassis.visible_message("[chassis] starts putting [target] into \the [src].") - if(do_after_cooldown(target)) - if(!patient_insertion_check(target)) - return - target.forceMove(src) - patient = target - START_PROCESSING(SSobj, src) - update_equip_info() - occupant_message("[target] successfully loaded into [src]. Life support functions engaged.") - chassis.visible_message("[chassis] loads [target] into [src].") - log_message("[target] loaded. Life support functions engaged.") + return FALSE + occupant_message(span_notice("You start putting [target] into [src]...")) + chassis.visible_message(span_warning("[chassis] starts putting [target] into \the [src].")) + if(!do_after_cooldown(target)) + return FALSE + if(!patient_insertion_check(target)) + return FALSE + target.forceMove(src) + patient = target + START_PROCESSING(SSobj, src) + update_equip_info() + occupant_message(span_notice("[target] successfully loaded into [src]. Life support functions engaged.")) + chassis.visible_message(span_warning("[chassis] loads [target] into [src].")) + log_message("[target] loaded. Life support functions engaged.") /obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/patient_insertion_check(mob/living/carbon/target) if(target.buckled) - occupant_message("[target] will not fit into the sleeper because [target.p_they()] [target.p_are()] buckled to [target.buckled]!") - return + occupant_message(span_warning("[target] will not fit into the sleeper because [target.p_they()] [target.p_are()] buckled to [target.buckled]!")) + return FALSE if(target.has_buckled_mobs()) - occupant_message("[target] will not fit into the sleeper because of the creatures attached to it!") - return + occupant_message(span_warning("[target] will not fit into the sleeper because of the creatures attached to it!")) + return FALSE if(patient) - occupant_message("The sleeper is already occupied!") - return - return 1 + occupant_message(span_warning("The sleeper is already occupied!")) + return FALSE + return TRUE -/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/go_out() +/obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/go_out(force) + if(!action_checks(src) && !force) // Patiens always can leave this cage. + return FALSE if(!patient) - return + return FALSE patient.forceMove(get_turf(src)) occupant_message("[patient] ejected. Life support functions disabled.") log_message("[patient] ejected. Life support functions disabled.") @@ -102,7 +105,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/sleeper/can_detach() if(patient) - occupant_message("Unable to detach [src] - equipment occupied!") + occupant_message(span_warning("Unable to detach [src] - equipment occupied!")) return FALSE return TRUE @@ -114,12 +117,12 @@ ..() var/datum/topic_input/afilter = new /datum/topic_input(href,href_list) if(afilter.get("eject")) - go_out() - if(afilter.get("view_stats")) + go_out(FALSE) + else if(afilter.get("view_stats")) chassis.occupant << browse(get_patient_stats(),"window=msleeper") onclose(chassis.occupant, "msleeper") return - if(afilter.get("inject")) + else if(afilter.get("inject")) inject_reagent(afilter.getType("inject",/datum/reagent),afilter.getObj("source")) return @@ -156,11 +159,11 @@ /obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/get_patient_dam() var/t1 switch(patient.stat) - if(0) + if(CONSCIOUS) t1 = "Conscious" - if(1) + if(UNCONSCIOUS) t1 = "Unconscious" - if(2) + if(DEAD) t1 = "*dead*" else t1 = "Unknown" @@ -192,6 +195,9 @@ /obj/item/mecha_parts/mecha_equipment/medical/sleeper/proc/inject_reagent(datum/reagent/R,obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/SG) + if(!action_checks(src)) + return FALSE + if(!R || !patient || !SG || !(SG in chassis.equipment)) return @@ -213,7 +219,7 @@ chosen_reagent.reaction(patient, method, fraction) chosen_reagent.trans_to(patient, to_inject) update_equip_info() - + start_cooldown() /obj/item/mecha_parts/mecha_equipment/medical/sleeper/update_equip_info() if(..()) @@ -221,17 +227,17 @@ send_byjax(chassis.occupant,"msleeper.browser","lossinfo",get_patient_dam()) send_byjax(chassis.occupant,"msleeper.browser","reagents",get_patient_reagents()) send_byjax(chassis.occupant,"msleeper.browser","injectwith",get_available_reagents()) - return 1 + return TRUE return /obj/item/mecha_parts/mecha_equipment/medical/sleeper/container_resist() - go_out() + go_out(TRUE) /obj/item/mecha_parts/mecha_equipment/medical/sleeper/process() if(..()) return if(!chassis.has_charge(energy_drain)) - set_ready_state(1) + set_ready_state(TRUE) log_message("Deactivated.") occupant_message("[src] deactivated - no power.") STOP_PROCESSING(SSobj, src) @@ -261,10 +267,10 @@ var/max_volume = 75 //max reagent volume var/synth_speed = 5 //[num] reagent units per cycle energy_drain = 10 - var/mode = 0 //0 - fire syringe, 1 - analyze reagents. + var/analyze_mode = FALSE //Toggler for alternative "analyze reagents" mode. var/emagged = FALSE range = MECHA_MELEE | MECHA_RANGED - equip_cooldown = 10 + equip_cooldown = 1 SECONDS origin_tech = "materials=3;biotech=4;magnets=4" /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/New() @@ -294,31 +300,36 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/can_attach(obj/mecha/M) if(..()) if(istype(M, /obj/mecha/medical) || istype(M, /obj/mecha/combat/lockersyndie)) - return 1 - return 0 + return TRUE + return FALSE /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/get_module_equip_info() - return " \[[mode? "Analyze" : "Launch"]\]
\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]
Reagents list" + return " \[[analyze_mode? "Analyze" : "Launch"]\]
\[Syringes: [syringes.len]/[max_syringes] | Reagents: [reagents.total_volume]/[reagents.maximum_volume]\]
Reagents list" /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/action(atom/movable/target) if(!action_checks(target)) - return - if(istype(target,/obj/item/reagent_containers/syringe)) - return load_syringe(target) - if(istype(target,/obj/item/storage))//Loads syringes from boxes - for(var/obj/item/reagent_containers/syringe/S in target.contents) - load_syringe(S) - return - if(mode) + return FALSE + if(istype(target, /obj/item/reagent_containers/syringe) || istype(target, /obj/item/storage)) + if(get_dist(src, target) < 2) + for(var/obj/structure/D in target.loc)//Basic level check for structures in the way (Like grilles and windows) + if(!(D.CanPass(target, src.loc))) + occupant_message("Unable to load syringe.") + return FALSE + for(var/obj/machinery/door/D in target.loc)//Checks for doors + if(!(D.CanPass(target, src.loc))) + occupant_message("Unable to load syringe.") + return FALSE + return start_syringe_loading(target) + if(analyze_mode) return analyze_reagents(target) if(!is_faced_target(target)) return FALSE if(!syringes.len) - occupant_message("No syringes loaded.") - return + occupant_message(span_alert("No syringes loaded.")) + return FALSE if(reagents.total_volume<=0) - occupant_message("No available reagents to load syringe with.") - return + occupant_message(span_alert("No available reagents to load syringe with.")) + return FALSE var/turf/trg = get_turf(target) var/obj/item/reagent_containers/syringe/mechsyringe = syringes[1] mechsyringe.forceMove(get_turf(chassis)) @@ -328,6 +339,7 @@ mechsyringe.icon_state = "syringeproj" playsound(chassis, 'sound/items/syringeproj.ogg', 50, 1) log_message("Launched [mechsyringe] from [src], targeting [target].") + start_cooldown() var/mob/originaloccupant = chassis.occupant var/original_target_zone = originaloccupant.zone_selected spawn(0) @@ -336,7 +348,7 @@ for(var/i=0, i [M] was hit by the syringe!") + mechsyringe.visible_message(span_danger("[M] was hit by the syringe!")) if(M.can_inject(originaloccupant, TRUE, original_target_zone)) if(mechsyringe.reagents) for(var/datum/reagent/A in mechsyringe.reagents.reagent_list) @@ -364,14 +376,12 @@ mechsyringe.icon_state = initial(mechsyringe.icon_state) mechsyringe.icon = initial(mechsyringe.icon) mechsyringe.update_icon() - return 1 - /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/Topic(href,href_list) ..() var/datum/topic_input/afilter = new (href,href_list) if(afilter.get("toggle_mode")) - mode = !mode + analyze_mode = !analyze_mode update_equip_info() return if(afilter.get("select_reagents")) @@ -408,7 +418,7 @@ /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/emag_act(mob/user) if(!emagged) emagged = TRUE - user.visible_message("Sparks fly out of the [src]!", "You short out the safeties on[src].") + user.visible_message(span_warning("Sparks fly out of the [src]!"), span_notice("You short out the safeties on[src].")) playsound(src.loc, 'sound/effects/sparks4.ogg', 50, TRUE) /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/get_reagents_page() @@ -471,55 +481,58 @@ output += "Total: [round(reagents.total_volume,0.001)]/[reagents.maximum_volume] - Purge All" return output || "None" -/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/S) - if(syringes.len= 2) - occupant_message("The syringe is too far away.") - return 0 - for(var/obj/structure/D in S.loc)//Basic level check for structures in the way (Like grilles and windows) - if(!(D.CanPass(S,src.loc))) - occupant_message("Unable to load syringe.") - return 0 - for(var/obj/machinery/door/D in S.loc)//Checks for doors - if(!(D.CanPass(S,src.loc))) - occupant_message("Unable to load syringe.") - return 0 - S.reagents.trans_to(src, S.reagents.total_volume) - S.forceMove(src) - syringes += S - occupant_message("Syringe loaded.") - update_equip_info() - return 1 - occupant_message("The [src] syringe chamber is full.") - return 0 +/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/load_syringe(obj/item/reagent_containers/syringe/syringe) + if(syringes.len >= max_syringes) + occupant_message("The [src] syringe chamber is full.") + return FALSE + syringe.reagents.trans_to(src, syringe.reagents.total_volume) + syringe.forceMove(src) + syringes += syringe + return TRUE + +/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/start_syringe_loading(obj/item/ammunition) + var/lock_n_load = 0 + if(istype(ammunition, /obj/item/reagent_containers/syringe)) + if(!load_syringe(ammunition)) + return FALSE + else + var/obj/item/storage/storage = ammunition + for(var/obj/item/reagent_containers/syringe/syringe in storage.contents) + if(!load_syringe(syringe)) + break + lock_n_load ++ + if(!lock_n_load) + return FALSE + occupant_message("Syringe[lock_n_load > 1 ? "s (x[lock_n_load])" : ""] loaded.") + start_cooldown() + return TRUE /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/analyze_reagents(atom/A) - if(get_dist(src,A) >= 4) + if(get_dist(src, A) >= 4) occupant_message("The object is too far away.") - return 0 + return FALSE if(!A.reagents || istype(A,/mob)) - occupant_message("No reagent info gained from [A].") - return 0 + occupant_message(span_alert("No reagent info gained from [A].")) + return FALSE occupant_message("Analyzing reagents...") for(var/datum/reagent/R in A.reagents.reagent_list) if((emagged && (R.id in strings("chemistry_tools.json", "traitor_poison_bottle")) || R.can_synth) && add_known_reagent(R.id, R.name)) occupant_message("Reagent analyzed, identified as [R.name] and added to database.") send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form()) occupant_message("Analyzis complete.") - return 1 /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/proc/add_known_reagent(r_id,r_name) if(!(r_id in known_reagents)) known_reagents += r_id known_reagents[r_id] = r_name - return 1 - return 0 + return TRUE + return FALSE /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/update_equip_info() if(..()) send_byjax(chassis.occupant,"msyringegun.browser","reagents",get_current_reagents()) send_byjax(chassis.occupant,"msyringegun.browser","reagents_form",get_reagents_form()) - return 1 + return TRUE return /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/on_reagent_change() @@ -532,7 +545,7 @@ if(..()) return if(!processed_reagents.len || reagents.total_volume >= reagents.maximum_volume || !chassis.has_charge(energy_drain)) - occupant_message("Reagent processing stopped.") + occupant_message(span_alert("Reagent processing stopped.")) log_message("Reagent processing stopped.") STOP_PROCESSING(SSobj, src) return @@ -548,15 +561,15 @@ icon_state = "beaker_upgrade" origin_tech = "materials=5;engineering=5;biotech=6" energy_drain = 10 - selectable = 0 + selectable = FALSE var/improv_max_volume = 300 var/imrov_synth_speed = 20 /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun_upgrade/can_attach(obj/mecha/M) if(..()) for(var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/S in M.equipment) - return 1 - return 0 + return TRUE + return FALSE /obj/item/mecha_parts/mecha_equipment/medical/syringe_gun_upgrade/attach_act(obj/mecha/M) for(var/obj/item/mecha_parts/mecha_equipment/medical/syringe_gun/S in chassis.equipment) @@ -575,28 +588,31 @@ desc = "Emergency rescue jaws, designed to help first responders reach their patients. Opens doors and removes obstacles." icon_state = "mecha_clamp" //can work, might use a blue resprite later but I think it works for now origin_tech = "materials=2;engineering=2" //kind of sad, but identical to jaws of life - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS energy_drain = 10 var/dam_force = 20 /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/action(atom/target) if(!action_checks(target)) - return + return FALSE if(istype(target, /obj)) if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door - return + return FALSE + set_ready_state(FALSE) var/obj/machinery/door/D = target //the door we want to open D.try_to_crowbar(chassis.occupant, src)//use the door's crowbar function - if(isliving(target)) //interact with living beings + set_ready_state(TRUE) + else if(isliving(target)) //interact with living beings var/mob/living/M = target if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not. - target.visible_message("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.", \ - "") + target.visible_message(span_notice("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second."), \ + span_notice("[chassis] gently boops [target] on the nose, its hydraulics hissing as safety overrides slow a brutal punch down at the last second.")) else push_aside(chassis, M)//out of the way, I have people to save! - occupant_message("You gently push [target] out of the way.") - chassis.visible_message("[chassis] gently pushes [target] out of the way.") + occupant_message(span_notice("You gently push [target] out of the way.")) + chassis.visible_message(span_notice("[chassis] gently pushes [target] out of the way.")) + start_cooldown() /obj/item/mecha_parts/mecha_equipment/medical/rescue_jaw/proc/push_aside(obj/mecha/M, mob/living/L) switch(get_dir(M, L)) diff --git a/code/game/mecha/equipment/tools/mining_tools.dm b/code/game/mecha/equipment/tools/mining_tools.dm index 0d4ae3cdde9..2fad8814ec3 100644 --- a/code/game/mecha/equipment/tools/mining_tools.dm +++ b/code/game/mecha/equipment/tools/mining_tools.dm @@ -8,7 +8,7 @@ name = "exosuit drill" desc = "Equipment for engineering and combat exosuits. This is the drill that'll pierce the heavens!" icon_state = "mecha_drill" - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS energy_drain = 10 force = 15 harmful = TRUE @@ -18,28 +18,27 @@ /obj/item/mecha_parts/mecha_equipment/drill/action(atom/target) if(!action_checks(target)) - return + return FALSE if(isspaceturf(target)) - return + return FALSE if(isobj(target)) var/obj/target_obj = target if(target_obj.resistance_flags & UNACIDABLE) - return + return FALSE if(isancientturf(target)) - visible_message("This rock appears to be resistant to all mining tools except pickaxes!") - return - target.visible_message("[chassis] starts to drill [target].", - "[chassis] starts to drill [target]...", - "You hear drilling.") - + visible_message(span_notice("This rock appears to be resistant to all mining tools except pickaxes!")) + return FALSE + target.visible_message(span_warning("[chassis] starts to drill [target]."), + span_userdanger("[chassis] starts to drill [target]..."), + span_italics("You hear drilling.")) if(do_after_cooldown(target)) - set_ready_state(FALSE) log_message("Started drilling [target]") + set_ready_state(FALSE) if(isturf(target)) var/turf/T = target T.drill_act(src) set_ready_state(TRUE) - return + return TRUE while(do_after_mecha(target, drill_delay)) if(isliving(target)) drill_mob(target, chassis.occupant) @@ -50,7 +49,7 @@ playsound(src, 'sound/weapons/drill.ogg', 40, TRUE) else set_ready_state(TRUE) - return + return TRUE set_ready_state(TRUE) /turf/proc/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill) @@ -67,7 +66,7 @@ drill.log_message("Drilled through [src]") dismantle_wall(TRUE, FALSE) else - drill.occupant_message("[src] is too durable to drill through.") + drill.occupant_message(span_danger("[src] is too durable to drill through.")) /turf/simulated/mineral/drill_act(obj/item/mecha_parts/mecha_equipment/drill/drill) for(var/turf/simulated/mineral/M in range(drill.chassis, 1)) @@ -91,12 +90,12 @@ /obj/item/mecha_parts/mecha_equipment/drill/can_attach(obj/mecha/M) if(..()) if(istype(M, /obj/mecha/working) || istype(M, /obj/mecha/combat)) - return 1 - return 0 + return TRUE + return FALSE /obj/item/mecha_parts/mecha_equipment/drill/proc/drill_mob(mob/living/target, mob/user) - target.visible_message("[chassis] is drilling [target] with [src]!", - "[chassis] is drilling you with [src]!") + target.visible_message(span_danger("[chassis] is drilling [target] with [src]!"), + span_userdanger("[chassis] is drilling you with [src]!")) add_attack_logs(user, target, "DRILLED with [src] ([uppertext(user.a_intent)]) ([uppertext(damtype)])") if(target.stat == DEAD && target.getBruteLoss() >= 200) add_attack_logs(user, target, "gibbed") @@ -108,8 +107,8 @@ var/splatter_dir = get_dir(chassis, target) if(ishuman(target)) var/mob/living/carbon/human/H = target - var/obj/item/organ/external/target_part = H.get_organ(ran_zone("chest")) - H.apply_damage(10, BRUTE, "chest", H.run_armor_check(target_part, "melee")) + var/obj/item/organ/external/target_part = H.get_organ(ran_zone(BODY_ZONE_CHEST)) + H.apply_damage(10, BRUTE, BODY_ZONE_CHEST, H.run_armor_check(target_part, MELEE)) //blood splatters blood_color = H.dna.species.blood_color @@ -129,7 +128,7 @@ desc = "Equipment for engineering and combat exosuits. This is an upgraded version of the drill that'll pierce the heavens!" icon_state = "mecha_diamond_drill" origin_tech = "materials=4;engineering=4" - equip_cooldown = 10 + equip_cooldown = 1 SECONDS drill_delay = 4 drill_level = DRILL_HARDENED force = 15 @@ -139,8 +138,7 @@ name = "exosuit mining scanner" desc = "Equipment for engineering and combat exosuits. It will automatically check surrounding rock for useful minerals." icon_state = "mecha_analyzer" - equip_cooldown = 15 - var/scanning_time = 0 + equip_cooldown = 1.5 SECONDS /obj/item/mecha_parts/mecha_equipment/mining_scanner/Initialize(mapload) . = ..() @@ -150,16 +148,25 @@ STOP_PROCESSING(SSfastprocess, src) return ..() +/obj/item/mecha_parts/mecha_equipment/mining_scanner/attach_act(obj/mecha/M) + START_PROCESSING(SSfastprocess, src) + +/obj/item/mecha_parts/mecha_equipment/mining_scanner/detach_act() + STOP_PROCESSING(SSfastprocess, src) + /obj/item/mecha_parts/mecha_equipment/mining_scanner/process() - if(!loc) + if(!chassis) STOP_PROCESSING(SSfastprocess, src) - qdel(src) - if(istype(loc, /obj/mecha/working) && scanning_time <= world.time) + return TRUE + if(!action_checks(src)) + return FALSE + if(istype(loc, /obj/mecha/working)) var/obj/mecha/working/mecha = loc if(!mecha.occupant) - return - scanning_time = world.time + equip_cooldown + return FALSE mineral_scan_pulse(get_turf(src)) + start_cooldown() + return TRUE /obj/item/mecha_parts/mecha_equipment/mining_scanner/action(atom/target) melee_attack_chain(chassis.occupant, target) diff --git a/code/game/mecha/equipment/tools/other_tools.dm b/code/game/mecha/equipment/tools/other_tools.dm index 99f0d45446b..7a1c546d497 100644 --- a/code/game/mecha/equipment/tools/other_tools.dm +++ b/code/game/mecha/equipment/tools/other_tools.dm @@ -8,23 +8,24 @@ desc = "An exosuit module that allows exosuits to teleport to any position in view." icon_state = "mecha_teleport" origin_tech = "bluespace=7" - equip_cooldown = 150 + equip_cooldown = 15 SECONDS energy_drain = 4000 range = MECHA_RANGED var/tele_precision = 4 /obj/item/mecha_parts/mecha_equipment/teleporter/action(atom/target) if(!action_checks(target) || !is_teleport_allowed(loc.z)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/turf/T = get_turf(target) - if(T) - chassis.use_power(energy_drain) - var/turf/user_turf = get_turf(src) - do_teleport(chassis, T, tele_precision) - chassis.investigate_log("[key_name_log(chassis.occupant)] mecha-teleported from [COORD(user_turf)] to [COORD(chassis)].", INVESTIGATE_TELEPORTATION) - return 1 + if(!T) + return FALSE + chassis.use_power(energy_drain) + var/turf/user_turf = get_turf(src) + do_teleport(chassis, T, tele_precision) + chassis.investigate_log("[key_name_log(chassis.occupant)] mecha-teleported from [COORD(user_turf)] to [COORD(chassis)].", INVESTIGATE_TELEPORTATION) + start_cooldown() /obj/item/mecha_parts/mecha_equipment/teleporter/precise name = "upgraded teleporter" @@ -41,35 +42,35 @@ desc = "An exosuit module that allows generating of small quasi-stable wormholes." icon_state = "mecha_wholegen" origin_tech = "bluespace=4;magnets=4;plasmatech=2" - equip_cooldown = 50 + equip_cooldown = 5 SECONDS energy_drain = 300 range = MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/wormhole_generator/action(atom/target) if(!action_checks(target) || !is_teleport_allowed(loc.z)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/list/theareas = get_areas_in_range(100, chassis) if(!theareas.len) - return + return FALSE var/area/thearea = pick(theareas) var/list/L = list() var/turf/pos = get_turf(src) for(var/turf/T in get_area_turfs(thearea.type)) if(!T.density && pos.z == T.z) - var/clear = 1 + var/clear = TRUE for(var/obj/O in T) if(O.density) - clear = 0 + clear = FALSE break if(clear) L+=T if(!L.len) - return + return FALSE var/turf/target_turf = pick(L) if(!target_turf) - return + return FALSE var/obj/effect/portal/P = new /obj/effect/portal(get_turf(target), target_turf) P.icon = 'icons/obj/objects.dmi' P.failchance = 0 @@ -79,10 +80,9 @@ add_game_logs("used a Wormhole Generator in [COORD(loc)]", chassis.occupant) chassis.investigate_log("[key_name_log(chassis.occupant)] used a Wormhole Generator at [COORD(loc)].", INVESTIGATE_TELEPORTATION) - src = null + start_cooldown() spawn(rand(150,300)) qdel(P) - return 1 /////////////////////////////////////// GRAVITATIONAL CATAPULT /////////////////////////////////////////// @@ -91,40 +91,36 @@ desc = "An exosuit mounted Gravitational Catapult." icon_state = "mecha_teleport" origin_tech = "bluespace=3;magnets=3;engineering=4" - equip_cooldown = 10 + equip_cooldown = 3 SECONDS energy_drain = 100 range = MECHA_MELEE | MECHA_RANGED var/atom/movable/locked - var/cooldown_timer = 0 var/mode = 1 //1 - gravsling 2 - gravpush /obj/item/mecha_parts/mecha_equipment/gravcatapult/action(atom/movable/target) if(!action_checks(target)) - return + return FALSE if(!is_faced_target(target)) return FALSE - if(cooldown_timer > world.time) - occupant_message("[src] is still recharging.") - return + equip_cooldown = (initial(equip_cooldown) * mode) switch(mode) if(1) if(!locked) if(!istype(target) || target.anchored) occupant_message("Unable to lock on [target]") - return + return FALSE locked = target occupant_message("Locked on [target]") send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) - else if(target!=locked) + else if(target != locked) if(locked in view(chassis)) locked.throw_at(target, 14, 1.5) locked = null send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) - cooldown_timer = world.time + 3 SECONDS - return 1 + start_cooldown() else - locked = null occupant_message("Lock on [locked] disengaged.") + locked = null send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) if(2) var/list/atoms = list() @@ -133,16 +129,16 @@ else atoms = orange(3, target) for(var/atom/movable/A in atoms) - if(A.anchored || A.move_resist == INFINITY) continue + if(A.anchored || A.move_resist == INFINITY) + continue spawn(0) var/iter = 5-get_dist(A,target) for(var/i=0 to iter) step_away(A,target) sleep(2) var/turf/T = get_turf(target) - cooldown_timer = world.time + 3 SECONDS add_game_logs("used a Gravitational Catapult in [COORD(T)]", chassis.occupant) - return 1 + start_cooldown() /obj/item/mecha_parts/mecha_equipment/gravcatapult/get_module_equip_info() @@ -162,17 +158,17 @@ desc = "Boosts exosuit armor against armed melee attacks. Requires energy to operate." icon_state = "mecha_abooster_ccw" origin_tech = "materials=4;combat=4" - equip_cooldown = 10 + equip_cooldown = 1 SECONDS energy_drain = 50 range = 0 var/deflect_coeff = 1.15 var/damage_coeff = 0.8 - selectable = 0 + selectable = FALSE -/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/proc/attack_react(mob/user as mob) +/obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster/proc/attack_react(mob/user) if(action_checks(user)) start_cooldown() - return 1 + return TRUE /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster @@ -180,17 +176,17 @@ desc = "Boosts exosuit armor against ranged attacks. Completely blocks taser shots. Requires energy to operate." icon_state = "mecha_abooster_proj" origin_tech = "materials=4;combat=3;engineering=3" - equip_cooldown = 10 + equip_cooldown = 1 SECONDS energy_drain = 50 range = 0 var/deflect_coeff = 1.15 var/damage_coeff = 0.8 - selectable = 0 + selectable = FALSE /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster/proc/projectile_react() if(action_checks(src)) start_cooldown() - return 1 + return TRUE ////////////////////////////////// REPAIR DROID ////////////////////////////////////////////////// @@ -200,13 +196,14 @@ desc = "Automated repair droid. Scans exosuit for damage and repairs it. Can fix almost all types of external or internal damage." icon_state = "repair_droid" origin_tech ="magnets=3;programming=3;engineering=4" - equip_cooldown = 20 + equip_cooldown = 2 SECONDS energy_drain = 50 range = 0 + var/active_mode = FALSE var/health_boost = 1 var/icon/droid_overlay var/list/repairable_damage = list(MECHA_INT_TEMP_CONTROL,MECHA_INT_TANK_BREACH) - selectable = 0 + selectable = FALSE /obj/item/mecha_parts/mecha_equipment/repair_droid/Destroy() STOP_PROCESSING(SSobj, src) @@ -223,51 +220,54 @@ STOP_PROCESSING(SSobj, src) /obj/item/mecha_parts/mecha_equipment/repair_droid/get_module_equip_info() - return " [equip_ready?"A":"Dea"]ctivate" + return " [!active_mode?"A":"Dea"]ctivate" /obj/item/mecha_parts/mecha_equipment/repair_droid/Topic(href, href_list) ..() if(href_list["toggle_repairs"]) + if(!action_checks(src)) + return chassis.overlays -= droid_overlay - if(equip_ready) + if(!active_mode) START_PROCESSING(SSobj, src) droid_overlay = new(icon, icon_state = "repair_droid_a") log_message("Activated.") - set_ready_state(0) else STOP_PROCESSING(SSobj, src) droid_overlay = new(icon, icon_state = "repair_droid") log_message("Deactivated.") - set_ready_state(1) + active_mode = !active_mode chassis.overlays += droid_overlay send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) - + start_cooldown() /obj/item/mecha_parts/mecha_equipment/repair_droid/process() if(!chassis) STOP_PROCESSING(SSobj, src) - set_ready_state(1) + active_mode = FALSE return var/h_boost = health_boost - var/repaired = 0 + var/repaired = FALSE if(chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT) h_boost *= -2 else if(chassis.internal_damage && prob(15)) for(var/int_dam_flag in repairable_damage) if(chassis.internal_damage & int_dam_flag) chassis.clearInternalDamage(int_dam_flag) - repaired = 1 + repaired = TRUE break if(h_boost<0 || chassis.obj_integrity < chassis.max_integrity) chassis.obj_integrity += min(h_boost, chassis.max_integrity-chassis.obj_integrity) - repaired = 1 + repaired = TRUE if(repaired) if(!chassis.use_power(energy_drain)) STOP_PROCESSING(SSobj, src) - set_ready_state(1) + active_mode = FALSE + send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) else //no repair needed, we turn off STOP_PROCESSING(SSobj, src) - set_ready_state(1) + active_mode = FALSE + send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) chassis.overlays -= droid_overlay droid_overlay = new(icon, icon_state = "repair_droid") chassis.overlays += droid_overlay @@ -283,7 +283,7 @@ range = 0 var/coeff = 100 var/list/use_channels = list(EQUIP,ENVIRON,LIGHT) - selectable = 0 + selectable = FALSE /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/Destroy() STOP_PROCESSING(SSobj, src) @@ -301,7 +301,7 @@ return 1000 //making magic -/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(var/area/A) +/obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/proc/get_power_channel(area/A) var/pow_chan if(A) for(var/c in use_channels) @@ -315,11 +315,11 @@ if(href_list["toggle_relay"]) if(equip_ready) //inactive START_PROCESSING(SSobj, src) - set_ready_state(0) + set_ready_state(FALSE) log_message("Activated.") else STOP_PROCESSING(SSobj, src) - set_ready_state(1) + set_ready_state(TRUE) log_message("Deactivated.") /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/get_module_equip_info() @@ -329,12 +329,12 @@ /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay/process() if(!chassis || chassis.internal_damage & MECHA_INT_SHORT_CIRCUIT) STOP_PROCESSING(SSobj, src) - set_ready_state(1) + set_ready_state(TRUE) return var/cur_charge = chassis.get_charge() if(isnull(cur_charge) || !chassis.cell) STOP_PROCESSING(SSobj, src) - set_ready_state(1) + set_ready_state(TRUE) occupant_message("No powercell detected.") return if(cur_charge < chassis.cell.maxcharge) @@ -379,11 +379,11 @@ ..() if(href_list["toggle"]) if(equip_ready) //inactive - set_ready_state(0) + set_ready_state(FALSE) START_PROCESSING(SSobj, src) log_message("Activated.") else - set_ready_state(1) + set_ready_state(TRUE) STOP_PROCESSING(SSobj, src) log_message("Deactivated.") @@ -411,14 +411,13 @@ return added_fuel else occupant_message("Unit is full.") - return 0 + return FALSE else // Some other object containing our fuel's type, so we just eat it (ores mainly) var/to_load = max(min(I.materials[fuel_type], max_fuel - fuel_amount),0) - if(to_load == 0) - return 0 - fuel_amount += to_load - qdel(I) - return to_load + if(to_load) + fuel_amount += to_load + qdel(I) + return to_load else if(istype(I, /obj/structure/ore_box)) var/fuel_added = 0 @@ -430,8 +429,8 @@ return fuel_added else - occupant_message("[fuel_name] traces in target minimal! [I] cannot be used as fuel.") - return + occupant_message(span_warning("[fuel_name] traces in target minimal! [I] cannot be used as fuel.")) + return FALSE /obj/item/mecha_parts/mecha_equipment/generator/attackby(weapon,mob/user, params) load_fuel(weapon) @@ -456,16 +455,16 @@ /obj/item/mecha_parts/mecha_equipment/generator/process() if(!chassis) STOP_PROCESSING(SSobj, src) - set_ready_state(1) + set_ready_state(TRUE) return if(fuel_amount<=0) STOP_PROCESSING(SSobj, src) log_message("Deactivated - no fuel.") - set_ready_state(1) + set_ready_state(TRUE) return var/cur_charge = chassis.get_charge() if(isnull(cur_charge)) - set_ready_state(1) + set_ready_state(TRUE) occupant_message("No powercell detected.") log_message("Deactivated.") STOP_PROCESSING(SSobj, src) @@ -476,8 +475,6 @@ chassis.give_power(power_per_cycle) fuel_amount -= min(use_fuel, fuel_amount) update_equip_info() - return 1 - /obj/item/mecha_parts/mecha_equipment/generator/nuclear name = "exonuclear reactor" @@ -498,7 +495,7 @@ /obj/item/mecha_parts/mecha_equipment/generator/nuclear/process() if(..()) for(var/mob/living/carbon/M in view(chassis)) - M.apply_effect((rad_per_cycle * 3),IRRADIATE,0) + M.apply_effect((rad_per_cycle * 3), IRRADIATE, 0) /////////////////////////////////// SERVO-HYDRAULIC ACTUATOR //////////////////////////////////////////////// @@ -507,7 +504,7 @@ desc = "Boosts exosuit servo-motors, allowing it to activate strafe mode. Requires energy to operate." icon_state = "actuator" origin_tech = "powerstorage=5;programming=5;engineering=5;combat=5" - selectable = 0 + selectable = FALSE var/energy_per_step = 50 //How much energy this module drains per step in strafe mode /obj/item/mecha_parts/mecha_equipment/servo_hydra_actuator/can_attach(obj/mecha/M) @@ -546,7 +543,7 @@ icon_state = "move_plating" origin_tech = "materials=5;engineering=5;magnets=4;powerstorage=4" energy_drain = 20 - selectable = 0 + selectable = FALSE var/ripley_step_in = 2.5 var/odyss_step_in = 1.8 var/clarke_step_in = 1.5 diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 611d4e242ef..0ff7fed6e6a 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -4,7 +4,7 @@ name = "hydraulic clamp" desc = "Equipment for engineering exosuits. Lifts objects and loads them into cargo." icon_state = "mecha_clamp" - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS energy_drain = 10 var/dam_force = 20 var/obj/mecha/working/cargo_holder @@ -24,9 +24,9 @@ /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/action(atom/target) if(!action_checks(target)) - return + return FALSE if(!cargo_holder) - return + return FALSE if(istype(target,/obj)) var/obj/O = target if(!O.anchored) @@ -39,21 +39,30 @@ O.anchored = FALSE occupant_message(span_notice("[target] successfully loaded.")) log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]") + return TRUE else O.anchored = initial(O.anchored) else occupant_message(span_warning("Not enough room in cargo compartment!")) else occupant_message(span_warning("[target] is firmly secured!")) - + return FALSE else if(istype(target,/mob/living)) var/mob/living/M = target - if(M.stat == DEAD && !issilicon(M)) - return - if(M.stat == DEAD && issilicon(M) || chassis.cargo_expanded == TRUE) + if(chassis.occupant.a_intent == INTENT_HARM) + M.take_overall_damage(dam_force) + if(!M) + return FALSE + M.adjustOxyLoss(round(dam_force/2)) + target.visible_message(span_danger("[chassis] squeezes [target]."), \ + span_userdanger("[chassis] squeezes [target]."),\ + span_italics("You hear something crack.")) + add_attack_logs(chassis.occupant, M, "Squeezed with [src] ([uppertext(chassis.occupant.a_intent)]) ([uppertext(damtype)])") + start_cooldown() + else if(M.stat == DEAD && issilicon(M) || chassis.cargo_expanded) if(ismegafauna(M)) occupant_message(SPAN_WARNING("БЕГИ, ИДИОТ, НЕ ВРЕМЯ ДЛЯ ОБНИМАШЕК!!!")) - return + return FALSE if(!M.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.") @@ -64,29 +73,20 @@ M.anchored = FALSE occupant_message(span_notice("[target] successfully loaded.")) log_message("Loaded [M]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]") + return TRUE else M.anchored = initial(M.anchored) else occupant_message(span_warning("Not enough room in cargo compartment!")) else occupant_message(span_warning("[target] is buckled to something!")) - if(chassis.occupant.a_intent == INTENT_HARM) - M.take_overall_damage(dam_force) - if(!M) - return - M.adjustOxyLoss(round(dam_force/2)) - target.visible_message(span_danger("[chassis] squeezes [target]."), \ - span_userdanger("[chassis] squeezes [target]."),\ - span_italics("You hear something crack.")) - add_attack_logs(chassis.occupant, M, "Squeezed with [src] ([uppertext(chassis.occupant.a_intent)]) ([uppertext(damtype)])") - start_cooldown() + return FALSE else - if(M.stat == DEAD && issilicon(M) || chassis.cargo_expanded == TRUE) - return step_away(M,chassis) occupant_message(span_notice("You push [target] out of the way.")) chassis.visible_message(span_notice("[chassis] pushes [target] out of the way.")) - return 1 + start_cooldown() + return TRUE @@ -97,30 +97,37 @@ energy_drain = 0 /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/kill/action(atom/target) - if(!action_checks(target)) return - if(!cargo_holder) return + if(!action_checks(target)) + return FALSE + if(!cargo_holder) + return FALSE if(istype(target,/obj)) var/obj/O = target if(!O.anchored) if(cargo_holder.cargo.len < cargo_holder.cargo_capacity) chassis.visible_message("[chassis] lifts [target] and starts to load it into cargo compartment.") - O.anchored = 1 + O.anchored = TRUE if(do_after_cooldown(target)) cargo_holder.cargo += O O.loc = chassis - O.anchored = 0 + O.anchored = FALSE occupant_message(span_notice("[target] successfully loaded.")) log_message("Loaded [O]. Cargo compartment capacity: [cargo_holder.cargo_capacity - cargo_holder.cargo.len]") + return TRUE else O.anchored = initial(O.anchored) + return FALSE else occupant_message(span_warning("Not enough room in cargo compartment!")) + return FALSE else occupant_message(span_warning("[target] is firmly secured!")) + return FALSE else if(istype(target,/mob/living)) var/mob/living/M = target - if(M.stat == DEAD) return + if(M.stat == DEAD) + return FALSE if(chassis.occupant.a_intent == INTENT_HARM) target.visible_message(span_danger("[chassis] destroys [target] in an unholy fury."), span_userdanger("[chassis] destroys [target] in an unholy fury.")) @@ -131,7 +138,8 @@ else step_away(M,chassis) target.visible_message("[chassis] tosses [target] like a piece of paper.") - return 1 + start_cooldown() + return TRUE /obj/item/mecha_parts/mecha_equipment/cargo_upgrade name = "Cargo expansion upgrade" @@ -163,7 +171,6 @@ desc = "An exosuit-mounted Rapid Construction Device. (Can be attached to: Any exosuit)" icon_state = "mecha_rcd" origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4" - equip_cooldown = 10 energy_drain = 500 range = MECHA_MELEE | MECHA_RANGED flags_2 = NO_MAT_REDEMPTION_2 @@ -189,11 +196,11 @@ /obj/item/mecha_parts/mecha_equipment/rcd/action(atom/target) if(!action_checks(target) || get_dist(chassis, target)>3) - return + return FALSE var/area/check_area = get_area(target) if(check_area?.type in rcd_holder.areas_blacklist) to_chat(chassis.occupant, span_warning("Something prevents you from using [rcd_holder] in here...")) - return + return FALSE playsound(chassis, 'sound/machines/click.ogg', 50, 1) chassis.can_move = world.time + 2 SECONDS // We don't move while we build var/rcd_act_result = target.rcd_act(chassis.occupant, rcd_holder, rcd_holder.mode) @@ -262,15 +269,15 @@ desc = "An exosuit-mounted Mime Rapid Construction Device. (Can be attached to: Reticence)" icon_state = "mecha_rcd" origin_tech = "materials=4;bluespace=3;magnets=4;powerstorage=4;engineering=4" - equip_cooldown = 10 + equip_cooldown = 1 SECONDS energy_drain = 250 range = MECHA_MELEE | MECHA_RANGED /obj/item/mecha_parts/mecha_equipment/mimercd/can_attach(obj/mecha/combat/M) if(..()) if(istype(M, /obj/mecha/combat/reticence) || istype(M, /obj/mecha/combat/lockersyndie)) - return 1 - return 0 + return TRUE + return FALSE /obj/item/mecha_parts/mecha_equipment/mimercd/action(atom/target) if(istype(target, /turf/space/transit))//>implying these are ever made -Sieve @@ -418,7 +425,7 @@ /obj/item/mecha_parts/mecha_equipment/cable_layer/action(atom/target) if(!action_checks(target)) - return + return FALSE if(istype(target, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/target_coil = target var/cur_amount = cable? cable.amount : 0 @@ -430,15 +437,16 @@ cable.amount += to_load target_coil.use(to_load) occupant_message(span_notice("[to_load] meters of cable successfully loaded.")) - send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",src.get_equip_info()) - return + send_byjax(chassis.occupant,"exosuit.browser","\ref[src]",get_equip_info()) + return TRUE else occupant_message(span_warning("Reel is full.")) if(isturf(target)) target.attackby(cable, chassis) - return + return TRUE else occupant_message(span_warning("Unable to load from [target] - no cable found.")) + return FALSE /obj/item/mecha_parts/mecha_equipment/cable_layer/Topic(href,href_list) @@ -465,21 +473,21 @@ /obj/item/mecha_parts/mecha_equipment/cable_layer/proc/use_cable(amount) if(!cable || cable.amount<1) - set_ready_state(1) + set_ready_state(TRUE) occupant_message("Cable depleted, [src] deactivated.") log_message("Cable depleted, [src] deactivated.") - return + return FALSE if(cable.amount < amount) occupant_message("No enough cable to finish the task.") - return + return FALSE cable.use(amount) update_equip_info() - return 1 + return TRUE /obj/item/mecha_parts/mecha_equipment/cable_layer/proc/reset() last_piece = null -/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(var/turf/new_turf) +/obj/item/mecha_parts/mecha_equipment/cable_layer/proc/dismantleFloor(turf/new_turf) if(istype(new_turf, /turf/simulated/floor)) var/turf/simulated/floor/T = new_turf if(!istype(T, /turf/simulated/floor/plating)) @@ -526,7 +534,7 @@ name = "extinguisher" desc = "Equipment for engineering exosuits. A rapid-firing high capacity fire extinguisher." icon_state = "mecha_exting" - equip_cooldown = 5 + equip_cooldown = 1.5 SECONDS energy_drain = 0 range = MECHA_MELEE | MECHA_RANGED @@ -537,12 +545,12 @@ /obj/item/mecha_parts/mecha_equipment/extinguisher/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch. if(!action_checks(target) || get_dist(chassis, target)>3) - return + return FALSE if(istype(target, /obj/structure/reagent_dispensers/watertank) && get_dist(chassis,target) <= 1) var/obj/structure/reagent_dispensers/watertank/WT = target WT.reagents.trans_to(src, 1000) - occupant_message("Extinguisher refilled.") + occupant_message(span_notice("Extinguisher refilled.")) playsound(chassis, 'sound/effects/refill.ogg', 50, 1, -6) else if(reagents.total_volume > 0) @@ -553,6 +561,7 @@ var/turf/T2 = get_step(T,turn(direction, -90)) var/list/the_targets = list(T,T1,T2) + start_cooldown() spawn(0) for(var/a = 0 to 5) var/obj/effect/particle_effect/water/W = new (get_turf(chassis)) @@ -580,7 +589,6 @@ if(W.loc == my_target) break sleep(2) - return TRUE /obj/item/mecha_parts/mecha_equipment/extinguisher/get_module_equip_info() return " \[[src.reagents.total_volume]\]" @@ -599,7 +607,7 @@ desc = "Equipment for engineering exosuits. With it, you can build atmos holographic barriers." icon_state = "mecha_wholegen" energy_drain = 100 - equip_cooldown = 5 + equip_cooldown = 0.5 SECONDS range = MECHA_MELEE | MECHA_RANGED var/max_barriers = 5 var/list/barriers = list() @@ -608,7 +616,7 @@ /obj/item/mecha_parts/mecha_equipment/holowall/action(atom/target) //copypasted from extinguisher. TODO: Rewrite from scratch. if(!action_checks(target) || get_dist(chassis, target) > 5) - return + return FALSE if(!is_faced_target(target)) return FALSE @@ -616,14 +624,17 @@ var/turf/T = get_turf(target) var/obj/structure/holosign/barrier/atmos/H = locate() in T if(H) - occupant_message("You use [src] to deactivate [H].") + occupant_message(span_notice("You use [src] to deactivate [H].")) qdel(H) else if(!is_blocked_turf(T, TRUE)) //can't put holograms on a tile that has dense stuff if(holocreator_busy) - occupant_message("[src] is busy creating a hologram.") - return - if(length(barriers) < max_barriers) + occupant_message(span_notice("[src] is busy creating a hologram.")) + return FALSE + if(length(barriers) >= max_barriers) + occupant_message(span_notice("[src] is projecting at max capacity!")) + return FALSE + else playsound(src.loc, 'sound/machines/click.ogg', 20, 1) if(creation_time) holocreator_busy = TRUE @@ -637,9 +648,8 @@ return H = new /obj/structure/holosign/barrier/atmos(T, src) chassis.use_power(energy_drain) - occupant_message("You create [H] with [src].") - else - occupant_message("[src] is projecting at max capacity!") + occupant_message(span_notice("You create [H] with [src].")) + start_cooldown() /obj/item/mecha_parts/mecha_equipment/holowall/get_module_equip_info() return " \[Holobarriers left: [max_barriers - length(barriers)]|Return all barriers\]" @@ -650,7 +660,7 @@ if(length(barriers)) for(var/H in barriers) qdel(H) - occupant_message("You clear all active holobarriers.") + occupant_message(span_notice("You clear all active holobarriers.")) /obj/item/mecha_parts/mecha_equipment/holowall/can_attach(obj/mecha/M) if(..()) @@ -666,7 +676,7 @@ lefthand_file = 'icons/goonstation/mob/inhands/items_lefthand.dmi' righthand_file = 'icons/goonstation/mob/inhands/items_righthand.dmi' force = 10 - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS energy_drain = 100 harmful = TRUE var/list/items_list = newlist(/obj/item/screwdriver/cyborg, /obj/item/wrench/cyborg, /obj/item/weldingtool/experimental/mecha, @@ -710,12 +720,12 @@ /obj/item/mecha_parts/mecha_equipment/eng_toolset/action(atom/target) if(!action_checks(target)) - return + return FALSE selected_item.melee_attack_chain(chassis.occupant, target) if(isliving(target)) chassis.do_attack_animation(target) + start_cooldown() chassis.use_power(energy_drain) - return TRUE /obj/item/mecha_parts/mecha_equipment/eng_toolset/self_occupant_attack() radial_menu(chassis.occupant) @@ -748,6 +758,6 @@ if(!emagged) items_list.Add(new emag_item) emagged = TRUE - user.visible_message("Sparks fly out of [src.name]!", "You short out the safeties on [src.name].") + user.visible_message(span_warning("Sparks fly out of [src.name]"), span_notice("You short out the safeties on [src.name].")) playsound(src.loc, 'sound/effects/sparks4.ogg', 50, TRUE) update_equip_info() diff --git a/code/game/mecha/equipment/weapons/weapons.dm b/code/game/mecha/equipment/weapons/weapons.dm index 5f23f27799c..282c9eba4cb 100644 --- a/code/game/mecha/equipment/weapons/weapons.dm +++ b/code/game/mecha/equipment/weapons/weapons.dm @@ -7,12 +7,12 @@ var/size = 0 var/projectiles_per_shot = 1 var/variance = 0 - var/randomspread = 0 //use random spread for machineguns, instead of shotgun scatter + var/randomspread = FALSE //use random spread for machineguns, instead of shotgun scatter var/projectile_delay = 0 var/projectiles var/projectile_energy_cost -/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(var/obj/mecha/combat/M as obj) +/obj/item/mecha_parts/mecha_equipment/weapon/can_attach(obj/mecha/combat/M) if(..()) if(istype(M)) if(size > M.maxsize) @@ -67,7 +67,7 @@ size = 2 /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser - equip_cooldown = 4 + equip_cooldown = 0.4 SECONDS name = "CH-PS \"Firedart\" Laser" icon_state = "mecha_firedart" origin_tech = "magnets=3;combat=3;engineering=3" @@ -87,7 +87,7 @@ harmful = FALSE /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy - equip_cooldown = 10 + equip_cooldown = 1 SECONDS name = "CH-LC \"Solaris\" Laser Cannon" icon_state = "mecha_solaris" origin_tech = "magnets=4;combat=4;engineering=3" @@ -96,7 +96,7 @@ fire_sound = 'sound/weapons/gunshots/1pulse.ogg' /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS name = "mkIV Ion Heavy Cannon" icon_state = "mecha_ion" origin_tech = "materials=4;combat=5;magnets=4" @@ -105,7 +105,7 @@ fire_sound = 'sound/weapons/ionrifle.ogg' /obj/item/mecha_parts/mecha_equipment/weapon/energy/ionshotgun - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS name = "G.M. Ion Shotgun" desc = "Having carefully studied the ion rifle, the brightest minds of the Gorlex Marauders found duct tape and stuck two more barrels! Impressive, isn't it?" icon_state = "mecha_ion" @@ -117,7 +117,7 @@ variance = 15 /obj/item/mecha_parts/mecha_equipment/weapon/energy/tesla - equip_cooldown = 35 + equip_cooldown = 3.5 SECONDS name = "P-X Tesla Cannon" desc = "A weapon for combat exosuits. Fires bolts of electricity similar to the experimental tesla engine" icon_state = "mecha_teslacannon" @@ -128,7 +128,7 @@ harmful = TRUE /obj/item/mecha_parts/mecha_equipment/weapon/energy/xray - equip_cooldown = 10 + equip_cooldown = 1 SECONDS name = "S-1 X-Ray Projector" desc = "A weapon for combat exosuits. Fires beams of X-Rays that pass through solid matter." icon_state = "mecha_xray" @@ -144,18 +144,20 @@ projectile_delay = 1 /obj/item/mecha_parts/mecha_equipment/weapon/energy/immolator - equip_cooldown = 8 + equip_cooldown = 1.2 SECONDS name = "ZFI Immolation Beam Gun" desc = "A weapon for combat exosuits. Fires beams of extreme heat that set targets on fire." icon_state = "mecha_immolator" origin_tech = "materials=4;engineering=4;combat=6;magnets=6" energy_drain = 80 - projectile = /obj/item/projectile/beam/immolator + variance = 25 + projectiles_per_shot = 4 + projectile = /obj/item/projectile/beam/immolator/mech fire_sound = 'sound/weapons/gunshots/1xray.ogg' harmful = TRUE /obj/item/mecha_parts/mecha_equipment/weapon/energy/pulse - equip_cooldown = 30 + equip_cooldown = 3 SECONDS name = "eZ-13 mk2 Heavy pulse rifle" icon_state = "mecha_pulse" energy_drain = 120 @@ -188,7 +190,7 @@ icon_state = "mecha_taser" origin_tech = "combat=3" energy_drain = 20 - equip_cooldown = 8 + equip_cooldown = 0.8 SECONDS projectile = /obj/item/projectile/energy/electrode fire_sound = 'sound/weapons/gunshots/1taser.ogg' size = 1 @@ -197,10 +199,10 @@ name = "HoNkER BlAsT 5000" icon_state = "mecha_honker" energy_drain = 200 - equip_cooldown = 150 + equip_cooldown = 15 SECONDS range = MECHA_MELEE | MECHA_RANGED -/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/M as obj) +/obj/item/mecha_parts/mecha_equipment/weapon/honker/can_attach(obj/mecha/combat/M) if(..()) if(istype(M, /obj/mecha/combat/honker) || istype(M, /obj/mecha/combat/lockersyndie)) return TRUE @@ -287,7 +289,7 @@ name = "FNX-99 \"Hades\" Carbine" icon_state = "mecha_carbine" origin_tech = "materials=4;combat=4" - equip_cooldown = 8 + equip_cooldown = 0.8 SECONDS projectile = /obj/item/projectile/bullet/incendiary/shell/dragonsbreath/mecha fire_sound = 'sound/weapons/gunshots/1m90.ogg' projectiles = 24 @@ -298,12 +300,12 @@ name = "\improper S.H.H. \"Quietus\" Carbine" fire_sound = 'sound/weapons/gunshots/1suppres.ogg' icon_state = "mecha_mime" - equip_cooldown = 15 + equip_cooldown = 1.5 SECONDS projectile = /obj/item/projectile/bullet/mime projectiles = 20 projectile_energy_cost = 50 -/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine/silenced/can_attach(obj/mecha/combat/M as obj) +/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/carbine/silenced/can_attach(obj/mecha/combat/M) if(..()) if(istype(M, /obj/mecha/combat/reticence) || istype(M, /obj/mecha/combat/lockersyndie)) return TRUE @@ -313,7 +315,7 @@ name = "LBX AC 10 \"Scattershot\"" icon_state = "mecha_scatter" origin_tech = "combat=4" - equip_cooldown = 20 + equip_cooldown = 2 SECONDS projectile = /obj/item/projectile/bullet/midbullet fire_sound = 'sound/weapons/gunshots/1shotgun_auto.ogg' projectiles = 40 @@ -327,7 +329,7 @@ desc = "Minotaur go brr right into your face!" icon_state = "mecha_scatter" origin_tech = "combat=4" - equip_cooldown = 8 + equip_cooldown = 0.8 SECONDS projectile = /obj/item/projectile/bullet/pellet/flechette fire_sound = 'sound/weapons/gunshots/1shotgun_auto.ogg' projectiles = 50 @@ -340,7 +342,7 @@ name = "Ultra AC 2" icon_state = "mecha_uac2" origin_tech = "combat=4" - equip_cooldown = 12 + equip_cooldown = 1.2 SECONDS projectile = /obj/item/projectile/bullet/weakbullet3 fire_sound = 'sound/weapons/gunshots/1mg2.ogg' projectiles = 300 @@ -355,7 +357,7 @@ desc = "Cr20c inside!" icon_state = "mecha_uac2" origin_tech = "combat=4" - equip_cooldown = 8 + equip_cooldown = 0.8 SECONDS projectile = /obj/item/projectile/bullet/midbullet_AC2S fire_sound = 'sound/weapons/gunshots/1mg2.ogg' projectiles = 300 @@ -373,7 +375,7 @@ name = "AMLG-90" icon_state = "mecha_amlg90" origin_tech = "combat=4" - equip_cooldown = 12 + equip_cooldown = 1.2 SECONDS projectile = /obj/item/projectile/beam/laser fire_sound = 'sound/weapons/gunshots/gunshot_lascarbine.ogg' projectiles = 150 @@ -391,14 +393,14 @@ fire_sound = 'sound/weapons/gunshots/1launcher.ogg' projectiles = 8 projectile_energy_cost = 1000 - equip_cooldown = 60 + equip_cooldown = 6 SECONDS var/missile_speed = 2 var/missile_range = 30 harmful = TRUE /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/action(target, params) if(!action_checks(target)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/obj/item/missile/M = new projectile(chassis.loc) @@ -454,14 +456,14 @@ projectiles = 6 missile_speed = 1.5 projectile_energy_cost = 800 - equip_cooldown = 60 + equip_cooldown = 6 SECONDS var/det_time = 20 harmful = TRUE size = 1 /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/action(target, params) if(!action_checks(target)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/obj/item/grenade/flashbang/F = new projectile(chassis.loc) @@ -480,7 +482,7 @@ projectiles = 3 projectile = /obj/item/grenade/clusterbuster projectile_energy_cost = 1600 //getting off cheap seeing as this is 3 times the flashbangs held in the grenade launcher. - equip_cooldown = 90 + equip_cooldown = 9 SECONDS size = 1 /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited/get_module_equip_info()//Limited version of the clusterbang launcher that can't reload @@ -497,10 +499,10 @@ projectiles = 15 missile_speed = 1.5 projectile_energy_cost = 100 - equip_cooldown = 20 + equip_cooldown = 2 SECONDS harmful = FALSE -/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/can_attach(obj/mecha/combat/M as obj) +/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/can_attach(obj/mecha/combat/M) if(..()) if(istype(M, /obj/mecha/combat/honker) || istype(M, /obj/mecha/combat/lockersyndie)) return TRUE @@ -508,7 +510,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar/action(target, params) if(!action_checks(target)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/obj/item/grown/bananapeel/B = new projectile(chassis.loc) @@ -526,10 +528,10 @@ projectiles = 15 missile_speed = 1.5 projectile_energy_cost = 100 - equip_cooldown = 10 + equip_cooldown = 1 SECONDS harmful = FALSE -/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/can_attach(obj/mecha/combat/M as obj) +/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/can_attach(obj/mecha/combat/M) if(..()) if(istype(M, /obj/mecha/combat/honker) || istype(M, /obj/mecha/combat/lockersyndie)) return TRUE @@ -537,7 +539,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar/action(target, params) if(!action_checks(target)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/obj/item/assembly/mousetrap/M = new projectile(chassis.loc) @@ -558,10 +560,10 @@ missile_speed = 1 missile_range = 30 projectile_energy_cost = 50 - equip_cooldown = 10 + equip_cooldown = 1 SECONDS harmful = FALSE -/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola/can_attach(obj/mecha/combat/M as obj) +/obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola/can_attach(obj/mecha/combat/M) if(..()) if(istype(M, /obj/mecha/combat/gygax) || istype(M, /obj/mecha/combat/lockersyndie)) return TRUE @@ -569,7 +571,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bola/action(target, params) if(!action_checks(target)) - return + return FALSE if(!is_faced_target(target)) return FALSE var/obj/item/restraints/legcuffs/bola/M = new projectile(chassis.loc) @@ -580,7 +582,7 @@ start_cooldown() /obj/item/mecha_parts/mecha_equipment/weapon/energy/plasma - equip_cooldown = 10 + equip_cooldown = 1 SECONDS name = "217-D Heavy Plasma Cutter" desc = "A device that shoots resonant plasma bursts at extreme velocity. The blasts are capable of crushing rock and demloishing solid obstacles." icon_state = "mecha_plasmacutter" @@ -600,7 +602,7 @@ return FALSE /obj/item/mecha_parts/mecha_equipment/weapon/energy/mecha_kineticgun - equip_cooldown = 10 + equip_cooldown = 1 SECONDS name = "Exosuit Proto-kinetic Accelerator" desc = "An exosuit-mounted mining tool that does increased damage in low pressure. Drawing from an onboard power source allows it to project further than the handheld version." icon_state = "mecha_kineticgun" diff --git a/code/game/mecha/makeshift/makeshift_tools.dm b/code/game/mecha/makeshift/makeshift_tools.dm index 19f0b9bdef5..169074c90e4 100644 --- a/code/game/mecha/makeshift/makeshift_tools.dm +++ b/code/game/mecha/makeshift/makeshift_tools.dm @@ -1,11 +1,11 @@ /obj/item/mecha_parts/mecha_equipment/drill/makeshift name = "Makeshift exosuit drill" desc = "Cobbled together from likely stolen parts, this drill is nowhere near as effective as the real deal." - equip_cooldown = 60 //Its slow as shit + equip_cooldown = 6 SECONDS //Its slow as shit force = 10 //Its not very strong drill_delay = 15 -/obj/item/mecha_parts/mecha_equipment/drill/makeshift/can_attach(obj/mecha/M as obj) +/obj/item/mecha_parts/mecha_equipment/drill/makeshift/can_attach(obj/mecha/M) if(istype(M, /obj/mecha/makeshift) || istype(M, /obj/mecha/combat/lockersyndie)) if(M.equipment.len < M.max_equip) return TRUE @@ -14,10 +14,10 @@ /obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/makeshift name = "makeshift clamp" desc = "Loose arrangement of cobbled together bits resembling a clamp." - equip_cooldown = 25 + equip_cooldown = 2.5 SECONDS dam_force = 10 -/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/makeshift/can_attach(obj/mecha/M as obj) +/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/makeshift/can_attach(obj/mecha/M) if(istype(M, /obj/mecha/makeshift) || istype(M, /obj/mecha/combat/lockersyndie)) if(M.equipment.len < M.max_equip) return TRUE diff --git a/code/game/objects/effects/decals/Cleanable/tracks.dm b/code/game/objects/effects/decals/Cleanable/tracks.dm index 2c6b2678e63..eb09fe2599d 100644 --- a/code/game/objects/effects/decals/Cleanable/tracks.dm +++ b/code/game/objects/effects/decals/Cleanable/tracks.dm @@ -34,8 +34,8 @@ GLOBAL_LIST_EMPTY(fluidtrack_cache) if(ishuman(O)) var/mob/living/carbon/human/H = O var/obj/item/clothing/shoes/S = H.shoes - var/obj/item/organ/external/l_foot = H.get_organ("l_foot") - var/obj/item/organ/external/r_foot = H.get_organ("r_foot") + var/obj/item/organ/external/l_foot = H.get_organ(BODY_ZONE_PRECISE_L_FOOT) + var/obj/item/organ/external/r_foot = H.get_organ(BODY_ZONE_PRECISE_R_FOOT) var/hasfeet = TRUE if(!l_foot && !r_foot) hasfeet = FALSE @@ -61,8 +61,8 @@ GLOBAL_LIST_EMPTY(fluidtrack_cache) if(ishuman(O)) var/mob/living/carbon/human/H = O var/obj/item/clothing/shoes/S = H.shoes - var/obj/item/organ/external/l_foot = H.get_organ("l_foot") - var/obj/item/organ/external/r_foot = H.get_organ("r_foot") + var/obj/item/organ/external/l_foot = H.get_organ(BODY_ZONE_PRECISE_L_FOOT) + var/obj/item/organ/external/r_foot = H.get_organ(BODY_ZONE_PRECISE_R_FOOT) var/hasfeet = TRUE if(!l_foot && !r_foot) hasfeet = FALSE diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index e458c1c82c7..ab9d10c954a 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -14,8 +14,8 @@ ..() if(!off_floor && ishuman(O)) var/mob/living/carbon/human/H = O - var/obj/item/organ/external/l_foot = H.get_organ("l_foot") - var/obj/item/organ/external/r_foot = H.get_organ("r_foot") + var/obj/item/organ/external/l_foot = H.get_organ(BODY_ZONE_PRECISE_L_FOOT) + var/obj/item/organ/external/r_foot = H.get_organ(BODY_ZONE_PRECISE_R_FOOT) var/hasfeet = TRUE if(!l_foot && !r_foot) hasfeet = FALSE @@ -53,6 +53,9 @@ /obj/effect/decal/cleanable/proc/can_bloodcrawl_in() return FALSE +/obj/effect/decal/cleanable/is_cleanable() + return TRUE + /obj/effect/decal/cleanable/Initialize(mapload) . = ..() if(loc && isturf(loc)) diff --git a/code/game/objects/effects/effects.dm b/code/game/objects/effects/effects.dm index 12027879d0b..0bbace48d63 100644 --- a/code/game/objects/effects/effects.dm +++ b/code/game/objects/effects/effects.dm @@ -6,7 +6,7 @@ icon = 'icons/effects/effects.dmi' resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | FREEZE_PROOF move_resist = INFINITY - anchored = 1 + anchored = TRUE can_be_hit = FALSE /obj/effect/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) @@ -22,6 +22,9 @@ /obj/effect/acid_act() return +/obj/effect/proc/is_cleanable() //Called when you want to clean something, and usualy delete it after + return FALSE + /obj/effect/mech_melee_attack(obj/mecha/M) return 0 @@ -55,6 +58,7 @@ density = FALSE icon = null icon_state = null + armor = list(MELEE = 100, BULLET = 100, LASER = 100, ENERGY = 100, BOMB = 100, BIO = 100, RAD = 100, FIRE = 100, ACID = 100) // Most of these overrides procs below are overkill, but better safe than sorry. /obj/effect/abstract/swarmer_act() @@ -81,6 +85,15 @@ /obj/effect/abstract/ex_act(severity) return +/obj/effect/abstract/blob_act() + return + +/obj/effect/abstract/acid_act() + return + +/obj/effect/abstract/fire_act() + return + /obj/effect/decal plane = FLOOR_PLANE resistance_flags = FIRE_PROOF | UNACIDABLE | ACID_PROOF diff --git a/code/game/objects/effects/temporary_visuals/miscellaneous.dm b/code/game/objects/effects/temporary_visuals/miscellaneous.dm index 6dbd6d6b8e9..e8ba25e2089 100644 --- a/code/game/objects/effects/temporary_visuals/miscellaneous.dm +++ b/code/game/objects/effects/temporary_visuals/miscellaneous.dm @@ -1,12 +1,3 @@ -/obj/effect/temp_visual/point - name = "arrow" - desc = "It's an arrow hanging in mid-air. There may be a wizard about." - icon = 'icons/mob/screen_gen.dmi' - icon_state = "arrow" - layer = POINT_LAYER - duration = 20 - randomdir = FALSE - /obj/effect/temp_visual/dir_setting/bloodsplatter icon = 'icons/effects/blood.dmi' duration = 5 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 2aae7e910bc..11acf5d7f3a 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -317,9 +317,9 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] if(user.hand) - temp = H.bodyparts_by_name["l_hand"] + temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(!temp) to_chat(user, SPAN_WARNING("You try to use your hand, but it's missing!")) return @@ -335,7 +335,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g to_chat(user, SPAN_NOTICE("You put out the fire on [src].")) else to_chat(user, SPAN_WARNING("You burn your hand on [src]!")) - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm") + var/obj/item/organ/external/affecting = H.get_organ(H.hand ? BODY_ZONE_L_ARM : BODY_ZONE_R_ARM) if(affecting && affecting.receive_damage(0, 5)) // 5 burn damage H.UpdateDamageIcon() return @@ -347,7 +347,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g if(istype(H)) if(!H.gloves || (!(H.gloves.resistance_flags & (UNACIDABLE|ACID_PROOF)))) to_chat(user, SPAN_WARNING("The acid on [src] burns your hand!")) - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_arm") + var/obj/item/organ/external/affecting = H.get_organ(H.hand ? BODY_ZONE_L_ARM : BODY_ZONE_R_ARM) if(affecting && affecting.receive_damage( 0, 5 )) // 5 burn damage H.UpdateDamageIcon() @@ -786,7 +786,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g * The default action is attack_self(). * Checks before we get to here are: mob is alive, mob is not restrained, paralyzed, asleep, resting, laying, item is on the mob. */ -/obj/item/proc/ui_action_click(mob/user, actiontype) +/obj/item/proc/ui_action_click(mob/user, actiontype, leftclick) attack_self(user) @@ -845,7 +845,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g if(istype(H)) var/obj/item/organ/internal/eyes/eyes = H.get_int_organ(/obj/item/organ/internal/eyes) if(!eyes) // should still get stabbed in the head - var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"] + var/obj/item/organ/external/head/head = H.bodyparts_by_name[BODY_ZONE_HEAD] head.receive_damage(rand(10,14), 1) return eyes.receive_damage(rand(3,4), 1) @@ -863,7 +863,7 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/g if(eyes.damage >= eyes.min_broken_damage) if(M.stat != 2) to_chat(M, "You go blind!") - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting.receive_damage(7)) H.UpdateDamageIcon() else diff --git a/code/game/objects/items/devices/airlock_painter.dm b/code/game/objects/items/devices/airlock_painter.dm index 8f845f2bac6..35979fde479 100644 --- a/code/game/objects/items/devices/airlock_painter.dm +++ b/code/game/objects/items/devices/airlock_painter.dm @@ -45,7 +45,7 @@ /obj/item/airlock_painter/suicide_act(mob/user) - var/obj/item/organ/internal/lungs/L = user.get_organ_slot("lungs") + var/obj/item/organ/internal/lungs/L = user.get_organ_slot(INTERNAL_ORGAN_LUNGS) var/lungs_name = "\improper[L.name]" if(L) diff --git a/code/game/objects/items/devices/autopsy.dm b/code/game/objects/items/devices/autopsy.dm index 301e97913d5..4cb4a70f3ef 100644 --- a/code/game/objects/items/devices/autopsy.dm +++ b/code/game/objects/items/devices/autopsy.dm @@ -39,30 +39,29 @@ W.time_inflicted = time_inflicted return W -/obj/item/autopsy_scanner/proc/add_data(obj/item/organ/O) - if(O.autopsy_data.len) - for(var/V in O.autopsy_data) - var/datum/autopsy_data/W = O.autopsy_data[V] - - var/datum/autopsy_data_scanner/D = wdata[V] - if(!D) - D = new() - D.weapon = W.weapon - wdata[V] = D - - if(!D.organs_scanned[O.name]) - if(D.organ_names == "") - D.organ_names = O.name - else - D.organ_names += ", [O.name]" +/obj/item/autopsy_scanner/proc/add_data(obj/item/organ/check_organ) + for(var/index in check_organ.autopsy_data) + var/datum/autopsy_data/weapon_data = check_organ.autopsy_data[index] + + var/datum/autopsy_data_scanner/scanner_data = wdata[index] + if(!scanner_data) + scanner_data = new + scanner_data.weapon = weapon_data.weapon + wdata[index] = scanner_data + + if(!scanner_data.organs_scanned[check_organ.name]) + if(scanner_data.organ_names == "") + scanner_data.organ_names = check_organ.name + else + scanner_data.organ_names += ", [check_organ.name]" + + qdel(scanner_data.organs_scanned[check_organ.name]) + scanner_data.organs_scanned[check_organ.name] = weapon_data.copy() - qdel(D.organs_scanned[O.name]) - D.organs_scanned[O.name] = W.copy() + for(var/chemID in check_organ.trace_chemicals) + if(check_organ.trace_chemicals[chemID] > 0 && !chemtraces.Find(chemID)) + chemtraces += chemID - if(O.trace_chemicals.len) - for(var/V in O.trace_chemicals) - if(O.trace_chemicals[V] > 0 && !chemtraces.Find(V)) - chemtraces += V /obj/item/autopsy_scanner/attackby(obj/item/P, mob/user) if(istype(P, /obj/item/pen)) diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 9d2c7e598b4..f11ad4b7d4f 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -46,7 +46,7 @@ /obj/item/flashlight/attack(mob/living/M as mob, mob/living/user as mob) add_fingerprint(user) - if(on && user.zone_selected == "eyes") + if(on && user.zone_selected == BODY_ZONE_PRECISE_EYES) if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50)) //too dumb to use flashlight properly return ..() //just hit them in the head @@ -376,7 +376,7 @@ return TRUE /obj/item/flashlight/emp/attack(mob/living/M as mob, mob/living/user as mob) - if(on && user.zone_selected == "eyes") // call original attack proc only if aiming at the eyes + if(on && user.zone_selected == BODY_ZONE_PRECISE_EYES) // call original attack proc only if aiming at the eyes ..() return diff --git a/code/game/objects/items/devices/laserpointer.dm b/code/game/objects/items/devices/laserpointer.dm index b582714838f..f06b2e28add 100644 --- a/code/game/objects/items/devices/laserpointer.dm +++ b/code/game/objects/items/devices/laserpointer.dm @@ -91,7 +91,7 @@ //human/alien mobs if(iscarbon(target)) var/mob/living/carbon/C = target - if(user.zone_selected == "eyes") + if(user.zone_selected == BODY_ZONE_PRECISE_EYES) add_attack_logs(user, C, "Shone a laser in the eyes with [src]") var/severity = 1 diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 941db8c8dc7..469c49b8ceb 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -455,7 +455,7 @@ REAGENT SCANNER var/list/damaged = H.get_damaged_organs(1,1) . += "Локализация повреждений, Ожоги/Физ.:" if(length(damaged) > 0) - for(var/obj/item/organ/external/org in damaged) + for(var/obj/item/organ/external/org as anything in damaged) . += " [capitalize(org.name)]: [(org.burn_dam > 0) ? "[org.burn_dam]" : "0"] - [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]" /* if(H.status_flags & FAKEDEATH) @@ -490,13 +490,13 @@ REAGENT SCANNER . += " Лечение: [D.cure_text]" if(H.undergoing_cardiac_arrest()) var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart) - if(heart && !(heart.status & ORGAN_DEAD)) + if(heart && !heart.is_dead()) . += "Внимание: Критическое состояние" . += " Название: Остановка сердца" . += " Тип: Сердце пациента остановилось" . += " Стадия: 1/1" . += " Лечение: Электрический шок" - else if(heart && (heart.status & ORGAN_DEAD)) + else if(heart && heart.is_dead()) . += "Обнаружен некроз сердца!" else if(!heart) . += "Сердце не обнаружено!" @@ -526,8 +526,9 @@ REAGENT SCANNER if(!e) continue var/limb = e.name - if(e.status & ORGAN_BROKEN) - if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED)) + if(e.has_fracture()) + var/list/check_list = list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT) + if((e.limb_zone in check_list) && !e.is_splinted()) . += "Незакрепленные переломы в [limb]." . += " Рекомендуется применить шину." if(e.has_infected_wound()) @@ -538,12 +539,12 @@ REAGENT SCANNER var/obj/item/organ/external/e = H.bodyparts_by_name[name] if(!e) continue - if(e.status & ORGAN_BROKEN) + if(e.has_fracture()) . += "Обнаружены переломы." . += " Рекомендуется подробное сканирование." break - for(var/obj/item/organ/external/e in H.bodyparts) - if(e.internal_bleeding) + for(var/obj/item/organ/external/e as anything in H.bodyparts) + if(e.has_internal_bleeding()) . += "Внутреннее кровотечение." . += " Рекомендуется подробное сканирование." break @@ -569,9 +570,9 @@ REAGENT SCANNER . += "Пульс: [H.get_pulse(GETPULSE_TOOL)] bpm." var/list/implant_detect = list() - for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs) - if(CI.is_robotic()) - implant_detect += " [CI.name]" + for(var/obj/item/organ/internal/cyberimp/cybernetics in H.internal_organs) + if(cybernetics.is_robotic()) + implant_detect += " [cybernetics.name]" if(length(implant_detect)) . += "Обнаружены кибернетические модификации:" . += implant_detect @@ -972,7 +973,7 @@ REAGENT SCANNER dat += "Other Wounds" dat += "" - for(var/obj/item/organ/external/e in target.bodyparts) + for(var/obj/item/organ/external/e as anything in target.bodyparts) dat += "" var/AN = "" var/open = "" @@ -983,13 +984,13 @@ REAGENT SCANNER var/splint = "" var/internal_bleeding = "" var/lung_ruptured = "" - if(e.internal_bleeding) + if(e.has_internal_bleeding()) internal_bleeding = "
Internal bleeding" if(istype(e, /obj/item/organ/external/chest) && target.is_lung_ruptured()) lung_ruptured = "Lung ruptured:" - if(e.status & ORGAN_SPLINTED) + if(e.is_splinted()) splint = "Splinted:" - if(e.status & ORGAN_BROKEN) + if(e.has_fracture()) AN = "[e.broken_description]:" if(e.is_robotic()) robot = "Robotic:" @@ -1011,20 +1012,16 @@ REAGENT SCANNER if(INFECTION_LEVEL_THREE to INFINITY) infected = "Septic:" - var/unknown_body = 0 - for(var/I in e.embedded_objects) - unknown_body++ - - if(unknown_body || e.hidden) + if(LAZYLEN(e.embedded_objects) || e.hidden) imp += "Unknown body present:" if(!AN && !open && !infected && !imp) AN = "None:" dat += "[e.name][e.burn_dam][e.brute_dam][robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured]" dat += "" - for(var/obj/item/organ/internal/i in target.internal_organs) - var/mech = i.desc + for(var/obj/item/organ/internal/organ as anything in target.internal_organs) + var/mech = organ.desc var/infection = "None" - switch(i.germ_level) + switch(organ.germ_level) if(1 to INFECTION_LEVEL_ONE + 200) infection = "Mild Infection:" if(INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) @@ -1039,7 +1036,7 @@ REAGENT SCANNER infection = "Acute Infection++:" dat += "" - dat += "[i.name]N/A[i.damage][infection]:[mech]" + dat += "[organ.name]N/A[organ.damage][infection]:[mech]" dat += "" dat += "" if(BLINDNESS in target.mutations) diff --git a/code/game/objects/items/devices/signmaker.dm b/code/game/objects/items/devices/signmaker.dm index 77ea597c60c..c7e3fa678f7 100644 --- a/code/game/objects/items/devices/signmaker.dm +++ b/code/game/objects/items/devices/signmaker.dm @@ -93,7 +93,7 @@ energy -= 1 icon_flick() var/mob/living/carbon/C = target - if(user.zone_selected == "eyes") + if(user.zone_selected == BODY_ZONE_PRECISE_EYES) add_attack_logs(user, C, "Shone a laser in the eyes with [src]") //20% chance to actually hit the eyes if(prob(20)) @@ -108,7 +108,7 @@ energy -= 1 icon_flick() var/mob/living/silicon/S = target - if(user.zone_selected == "eyes") + if(user.zone_selected == BODY_ZONE_PRECISE_EYES) //20% chance to actually hit the sensors if(prob(20)) S.flash_eyes(affect_silicon = 1) diff --git a/code/game/objects/items/devices/uplinks.dm b/code/game/objects/items/devices/uplinks.dm index e5d1d127f3a..ead322e8b40 100644 --- a/code/game/objects/items/devices/uplinks.dm +++ b/code/game/objects/items/devices/uplinks.dm @@ -9,7 +9,8 @@ A list of items and costs is stored under the datum of every game mode, alongsid GLOBAL_LIST_EMPTY(world_uplinks) /obj/item/uplink - var/uses // Numbers of crystals + /// Uplink TC amount + var/uses = 100 var/hidden_crystals = 0 /// List of categories with items inside var/list/uplink_cats @@ -32,12 +33,14 @@ GLOBAL_LIST_EMPTY(world_uplinks) /obj/item/uplink/ui_host() return loc -/obj/item/uplink/proc/update_uplink_items() + +/obj/item/uplink/proc/update_uplink_type(new_uplink_type) + uplink_type = new_uplink_type uplink_items = get_uplink_items(src) + /obj/item/uplink/New() ..() - uses = SSticker.mode.uplink_uses uplink_items = get_uplink_items(src) GLOB.world_uplinks += src @@ -302,9 +305,7 @@ GLOBAL_LIST_EMPTY(world_uplinks) /obj/item/radio/uplink/nuclear/New() ..() - if(hidden_uplink) - hidden_uplink.uplink_type = UPLINK_TYPE_NUCLEAR - hidden_uplink.update_uplink_items() + hidden_uplink?.update_uplink_type(UPLINK_TYPE_NUCLEAR) GLOB.nuclear_uplink_list += src /obj/item/radio/uplink/nuclear/Destroy() @@ -313,16 +314,13 @@ GLOBAL_LIST_EMPTY(world_uplinks) /obj/item/radio/uplink/sst/New() ..() - if(hidden_uplink) - hidden_uplink.uplink_type = UPLINK_TYPE_SST - hidden_uplink.update_uplink_items() + hidden_uplink?.update_uplink_type(UPLINK_TYPE_SST) /obj/item/radio/uplink/admin/New() ..() if(hidden_uplink) - hidden_uplink.uplink_type = UPLINK_TYPE_ADMIN - hidden_uplink.update_uplink_items() - hidden_uplink.uses = 500 + hidden_uplink.update_uplink_type(UPLINK_TYPE_ADMIN) + hidden_uplink.uses = 2500 /obj/item/multitool/uplink/New() ..() @@ -338,4 +336,4 @@ GLOBAL_LIST_EMPTY(world_uplinks) /obj/item/radio/headset/uplink/New() ..() hidden_uplink = new(src) - hidden_uplink.uses = 20 + hidden_uplink.uses = 100 diff --git a/code/game/objects/items/hand_item.dm b/code/game/objects/items/hand_item.dm index d44f4ad9f11..9ce206e666f 100644 --- a/code/game/objects/items/hand_item.dm +++ b/code/game/objects/items/hand_item.dm @@ -15,9 +15,11 @@ /obj/item/slapper/attack(mob/living/carbon/target, mob/living/carbon/human/user) user.do_attack_animation(target) playsound(target, hitsound, 50, TRUE, -1) - user.visible_message(span_danger("[user] slaps [target]!"), - span_notice("You slap [target]!"), - span_hear("You hear a slap.")) + user.visible_message( + span_danger("[user] slaps [target]!"), + span_notice("You slap [target]!"), + span_italics("You hear a slap."), + ) if(iscarbon(target) && target.IsSleeping()) target.AdjustSleeping(-15 SECONDS) if(force) diff --git a/code/game/objects/items/random_items.dm b/code/game/objects/items/random_items.dm index ef13d175ad0..3b9caa6fed6 100644 --- a/code/game/objects/items/random_items.dm +++ b/code/game/objects/items/random_items.dm @@ -240,6 +240,9 @@ overlay_locked = "c_locked" overlay_locker = "c_locker" overlay_unlocked = "c_unlocked" + open_sound = 'sound/machines/wooden_closet_open.ogg' + close_sound = 'sound/machines/wooden_closet_close.ogg' + /obj/structure/closet/secure_closet/random_drinks/populate_contents() for(var/i in 1 to 5) diff --git a/code/game/objects/items/robot/robot_parts.dm b/code/game/objects/items/robot/robot_parts.dm index 361ba8f186f..0f62cf9a3ac 100644 --- a/code/game/objects/items/robot/robot_parts.dm +++ b/code/game/objects/items/robot/robot_parts.dm @@ -36,31 +36,31 @@ name = "left arm" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "l_arm" - part = list("l_arm","l_hand") + part = list(BODY_ZONE_L_ARM, BODY_ZONE_PRECISE_L_HAND) /obj/item/robot_parts/r_arm name = "right arm" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "r_arm" - part = list("r_arm","r_hand") + part = list(BODY_ZONE_R_ARM, BODY_ZONE_PRECISE_R_HAND) /obj/item/robot_parts/l_leg name = "left leg" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "l_leg" - part = list("l_leg","l_foot") + part = list(BODY_ZONE_L_LEG, BODY_ZONE_PRECISE_L_FOOT) /obj/item/robot_parts/r_leg name = "right leg" desc = "A skeletal limb wrapped in pseudomuscles, with a low-conductivity case." icon_state = "r_leg" - part = list("r_leg","r_foot") + part = list(BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_R_FOOT) /obj/item/robot_parts/chest name = "torso" desc = "A heavily reinforced case containing cyborg logic boards, with space for a standard power cell." icon_state = "chest" - part = list("groin","chest") + part = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_CHEST) var/wired = FALSE var/obj/item/stock_parts/cell/cell = null @@ -72,7 +72,7 @@ name = "head" desc = "A standard reinforced braincase, with spine-plugged neural socket and sensor gimbals." icon_state = "head" - part = list("head") + part = list(BODY_ZONE_HEAD) var/obj/item/flash/flash1 = null var/obj/item/flash/flash2 = null diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 644e099f7c8..24dae468401 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -91,7 +91,7 @@ var/nremburn = remburn affecting.heal_damage(heal_brute, heal_burn) var/list/achildlist - if(!isnull(affecting.children)) + if(LAZYLEN(affecting.children)) achildlist = affecting.children.Copy() var/parenthealed = FALSE while(rembrute + remburn > 0) // Don't bother if there's not enough leftover heal @@ -103,7 +103,7 @@ parenthealed = TRUE else break // If the organ have no child left and no parent / parent healed, break - if(E.status & ORGAN_ROBOT || E.open) // Ignore robotic or open limb + if(E.is_robotic() || E.open) // Ignore robotic or open limb continue else if(!E.brute_dam && !E.burn_dam) // Ignore undamaged limb continue @@ -267,61 +267,75 @@ singular_name = "medical splint" icon_state = "splint" unique_handling = TRUE - self_delay = 100 + self_delay = 10 SECONDS var/other_delay = 0 + var/static/list/available_splint_zones = list( + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_R_FOOT, + ) /obj/item/stack/medical/splint/cyborg - is_cyborg = 1 + is_cyborg = TRUE + /obj/item/stack/medical/splint/cyborg/attack(mob/living/M, mob/user) if(!get_amount()) - to_chat(user, "No splints left!") - return 1 - else - . = ..() -/obj/item/stack/medical/splint/attack(mob/living/M, mob/user) - if(..()) + to_chat(user, span_danger("No splints left!")) return TRUE + return ..() - if(ishuman(M)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/external/affecting = H.get_organ(user.zone_selected) - var/limb = affecting.name - if(!(affecting.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot"))) - to_chat(user, "You can't apply a splint there!") - return TRUE +/obj/item/stack/medical/splint/attack(mob/living/carbon/human/target, mob/user) + . = ..() + if(. || !ishuman(target)) + return . - if(affecting.status & ORGAN_SPLINTED) - to_chat(user, "[H]'s [limb] is already splinted!") - if(alert(user, "Would you like to remove the splint from [H]'s [limb]?", "Splint removal.", "Yes", "No") == "Yes") - affecting.status &= ~ORGAN_SPLINTED - H.handle_splints() - to_chat(user, "You remove the splint from [H]'s [limb].") - return TRUE + var/obj/item/organ/external/bodypart = target.get_organ(user.zone_selected) + var/bodypart_name = bodypart.name + + if(!(bodypart.limb_zone in available_splint_zones)) + to_chat(user, span_danger("You can't apply a splint there!")) + return TRUE - if((M == user && self_delay > 0) || (M != user && other_delay > 0)) - user.visible_message("[user] starts to apply [src] to [H]'s [limb].", \ - "You start to apply [src] to [H]'s [limb].", \ - "You hear something being wrapped.") + if(bodypart.is_splinted()) + to_chat(user, span_danger("[target]'s [bodypart_name] is already splinted!")) + if(alert(user, "Would you like to remove the splint from [target]'s [bodypart_name]?", "Splint removal.", "Yes", "No") == "Yes") + bodypart.remove_splint() + to_chat(user, span_notice("You remove the splint from [target]'s [bodypart_name].")) + return TRUE - if(M == user && !do_mob(user, H, self_delay)) - return TRUE - else if(!do_mob(user, H, other_delay)) - return TRUE + if((target == user && self_delay > 0) || (target != user && other_delay > 0)) + user.visible_message( + span_notice("[user] starts to apply [src] to [target == user ? "[user.p_their()]" : "[target]'s"] [bodypart_name]."), + span_notice("You start to apply [src] to [target == user ? "your" : "[target]'s"] [bodypart_name]."), + span_italics("You hear something being wrapped."), + ) - user.visible_message("[user] applies [src] to [H]'s [limb].", \ - "You apply [src] to [H]'s [limb].") + if(target == user && !do_mob(user, target, self_delay)) + return TRUE + else if(!do_mob(user, target, other_delay)) + return TRUE + + user.visible_message( + span_notice("[user] applies [src] to [target == user ? "[user.p_their()]" : "[target]'s"] [bodypart_name]."), + span_notice("You apply [src] to [target == user ? "your" : "[target]'s"] [bodypart_name]."), + ) + + bodypart.apply_splint() + use(1) - affecting.status |= ORGAN_SPLINTED - affecting.splinted_count = H.step_count - H.handle_splints() - use(1) /obj/item/stack/medical/splint/tribal name = "tribal splints" icon_state = "tribal_splint" - other_delay = 50 + other_delay = 5 SECONDS + /obj/item/stack/medical/splint/makeshift name = "makeshift splints" @@ -329,3 +343,4 @@ icon_state = "makeshift_splint" other_delay = 3 SECONDS self_delay = 15 SECONDS + diff --git a/code/game/objects/items/stacks/nanopaste.dm b/code/game/objects/items/stacks/nanopaste.dm index b270d14cd0b..208255da04d 100644 --- a/code/game/objects/items/stacks/nanopaste.dm +++ b/code/game/objects/items/stacks/nanopaste.dm @@ -49,9 +49,9 @@ use(1) var/remheal = 15 var/nremheal = 0 - S.heal_damage(robo_repair = 1) //should in, theory, heal the robotic organs in just the targeted area with it being S instead of E + S.heal_damage(robo_repair = TRUE) //should in, theory, heal the robotic organs in just the targeted area with it being S instead of E var/childlist - if(!isnull(S.children)) + if(LAZYLEN(S.children)) childlist = S.children.Copy() var/parenthealed = FALSE while(remheal > 0) @@ -70,8 +70,8 @@ else break nremheal = max(remheal - E.get_damage(), 0) - E.heal_damage(remheal, 0, 0, 1) //Healing Brute - E.heal_damage(0, remheal, 0, 1) //Healing Burn + E.heal_damage(remheal, 0, FALSE, TRUE) //Healing Brute + E.heal_damage(0, remheal, FALSE, TRUE) //Healing Burn remheal = nremheal H.UpdateDamageIcon() user.visible_message("\The [user] applies some nanite paste at \the [M]'s [E.name] with \the [src].") diff --git a/code/game/objects/items/stacks/telecrystal.dm b/code/game/objects/items/stacks/telecrystal.dm index 67c2e1f6c9d..40e6d1947fa 100644 --- a/code/game/objects/items/stacks/telecrystal.dm +++ b/code/game/objects/items/stacks/telecrystal.dm @@ -6,9 +6,9 @@ icon = 'icons/obj/telescience.dmi' icon_state = "telecrystal" w_class = WEIGHT_CLASS_TINY - max_amount = 50 + max_amount = 250 flags = NOBLUDGEON - origin_tech = "materials=6;syndicate=1" + origin_tech = "materials=6" /obj/item/stack/telecrystal/attack(mob/target, mob/user) if(target == user) //You can't go around smacking people with crystals to find out if they have an uplink or not. @@ -37,8 +37,11 @@ /obj/item/stack/telecrystal/five amount = 5 -/obj/item/stack/telecrystal/twenty - amount = 20 +/obj/item/stack/telecrystal/twenty_five + amount = 25 -/obj/item/stack/telecrystal/fifty - amount = 50 +/obj/item/stack/telecrystal/hundread + amount = 100 + +/obj/item/stack/telecrystal/twohundread_fifty + amount = 250 diff --git a/code/game/objects/items/theft_items.dm b/code/game/objects/items/theft_items.dm index cd52a268267..50c7f62e796 100644 --- a/code/game/objects/items/theft_items.dm +++ b/code/game/objects/items/theft_items.dm @@ -171,7 +171,7 @@ /obj/item/nuke_core/supermatter_sliver/attack_tk(mob/user) // no TK gibbing memes return -/obj/item/nuke_core/supermatter_sliver/can_be_pulled(user) // no drag memes +/obj/item/nuke_core/supermatter_sliver/can_be_pulled(atom/movable/user, force, show_message = FALSE) // no drag memes return FALSE /obj/item/nuke_core/supermatter_sliver/attackby(obj/item/I, mob/living/user, params) @@ -222,9 +222,11 @@ /obj/item/nuke_core/supermatter_sliver/pickup(mob/living/user) if(!isliving(user) || user.status_flags & GODMODE) //try to keep this in sync with supermatter's consume fail conditions return ..() - user.visible_message(span_danger("[user] reaches out and tries to pick up [src]. [user.p_their()] body starts to glow and bursts into flames before bursting into flames!"), - span_userdanger("You reach for [src] with your hands. That was dumb."), - span_hear("Everything suddenly goes silent.")) + user.visible_message( + span_danger("[user] reaches out and tries to pick up [src]. [user.p_their()] body starts to glow and bursts into flames before bursting into flames!"), + span_userdanger("You reach for [src] with your hands. That was dumb."), + span_italics("Everything suddenly goes silent."), + ) for(var/mob/living/L in view(5, src)) L.apply_effect(80, IRRADIATE) playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index d53afbca819..4073af7b32e 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -47,7 +47,7 @@ /obj/item/screwdriver/attack(mob/living/carbon/M, mob/living/carbon/user) if(!istype(M) || user.a_intent == INTENT_HELP) return ..() - if(user.zone_selected != "eyes" && user.zone_selected != "head") + if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD) return ..() if((CLUMSY in user.mutations) && prob(50)) M = user diff --git a/code/game/objects/items/tools/wirecutters.dm b/code/game/objects/items/tools/wirecutters.dm index 9e55b3c750d..feb78b51df2 100644 --- a/code/game/objects/items/tools/wirecutters.dm +++ b/code/game/objects/items/tools/wirecutters.dm @@ -88,7 +88,7 @@ playsound(loc, 'sound/items/jaws_cut.ogg', 50, 1, -1) if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/head/head = H.bodyparts_by_name["head"] + var/obj/item/organ/external/head/head = H.bodyparts_by_name[BODY_ZONE_HEAD] if(head) head.droplimb(0, DROPLIMB_BLUNT, FALSE, TRUE) playsound(loc,"desceration" ,50, 1, -1) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index df3fbbbd551..83d321e5bd4 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -1910,9 +1910,9 @@ return FALSE if(bullets_left == 1) bullets_left = 0 - var/zone = "head" - if(!(user.has_organ(zone))) // If they somehow don't have a head. - zone = "chest" + var/zone = BODY_ZONE_HEAD + if(!(user.get_organ(zone))) // If they somehow don't have a head. + zone = BODY_ZONE_CHEST playsound(src, 'sound/weapons/gunshots/gunshot_strong.ogg', 50, 1) user.visible_message("[src] goes off!") post_shot(user) diff --git a/code/game/objects/items/trash.dm b/code/game/objects/items/trash.dm index 4a82a7eb963..20daac9b273 100644 --- a/code/game/objects/items/trash.dm +++ b/code/game/objects/items/trash.dm @@ -119,7 +119,7 @@ icon = 'icons/obj/weapons/ammo.dmi' name = "bullet casing" desc = "A spent bullet casing. Smells like cordite." - icon_state = "gshell" + icon_state = "buckshotshell" /obj/item/trash/tapetrash name = "old duct tape" @@ -146,7 +146,7 @@ /obj/item/spentcasing icon = 'icons/obj/weapons/ammo.dmi' - icon_state = "gshell" + icon_state = "buckshotshell" name = "Old bullet casing" desc = "A spent bullet casing. Smells like rusty metal." diff --git a/code/game/objects/items/weapons/anomaly_extract.dm b/code/game/objects/items/weapons/anomaly_extract.dm index fa9cdcd4a38..92bfb2b0530 100644 --- a/code/game/objects/items/weapons/anomaly_extract.dm +++ b/code/game/objects/items/weapons/anomaly_extract.dm @@ -215,14 +215,14 @@ desc = "Anomaly core grow from thing which had to be slime heart" icon_state = "anomaly_heart" -/obj/item/organ/internal/heart/slime/anomaly/insert(var/mob/living/carbon/M, special = 0) - ..() +/obj/item/organ/internal/heart/slime/anomaly/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() var/obj/effect/proc_holder/spell/slime_degradation/degrad = new var/obj/effect/proc_holder/spell/slime_selfheat/heat = new M.mind.AddSpell(degrad) M.mind.AddSpell(heat) -/obj/item/organ/internal/heart/slime/anomaly/remove(var/mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/slime/anomaly/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) M.mind.RemoveSpell(/obj/effect/proc_holder/spell/slime_degradation) M.mind.RemoveSpell(/obj/effect/proc_holder/spell/slime_selfheat) . = ..() diff --git a/code/game/objects/items/weapons/batons.dm b/code/game/objects/items/weapons/batons.dm index 59262481a7e..a590308d450 100644 --- a/code/game/objects/items/weapons/batons.dm +++ b/code/game/objects/items/weapons/batons.dm @@ -43,7 +43,7 @@ user.Weaken(stun_time) if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(force * 2, BRUTE, "head") + H.apply_damage(force * 2, BRUTE, BODY_ZONE_HEAD) else user.take_organ_damage(force * 2) return diff --git a/code/game/objects/items/weapons/caution.dm b/code/game/objects/items/weapons/caution.dm index 9d0902132e5..9103e8a3ef8 100644 --- a/code/game/objects/items/weapons/caution.dm +++ b/code/game/objects/items/weapons/caution.dm @@ -57,8 +57,8 @@ qdel(src) /obj/item/caution/proximity_sign/proc/dead_legs(mob/living/carbon/human/H as mob) - var/obj/item/organ/external/l = H.get_organ("l_leg") - var/obj/item/organ/external/r = H.get_organ("r_leg") + var/obj/item/organ/external/l = H.get_organ(BODY_ZONE_L_LEG) + var/obj/item/organ/external/r = H.get_organ(BODY_ZONE_L_LEG) if(l) l.droplimb(0, DROPLIMB_SHARP) if(r) diff --git a/code/game/objects/items/weapons/cosmetics.dm b/code/game/objects/items/weapons/cosmetics.dm index e59f99ead34..68407db2445 100644 --- a/code/game/objects/items/weapons/cosmetics.dm +++ b/code/game/objects/items/weapons/cosmetics.dm @@ -110,10 +110,10 @@ /obj/item/razor/attack(mob/living/carbon/M as mob, mob/user as mob) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/C = H.get_organ("head") + var/obj/item/organ/external/head/C = H.get_organ(BODY_ZONE_HEAD) var/datum/robolimb/robohead = GLOB.all_robolimbs[C.model] if(user.zone_selected == "mouth") - if(!get_location_accessible(H, "mouth")) + if(!get_location_accessible(H, BODY_ZONE_PRECISE_MOUTH)) to_chat(user, "The mask is in the way.") return if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'... @@ -143,8 +143,8 @@ C.f_style = "Shaved" H.update_fhair() playsound(src.loc, usesound, 20, 1) - if(user.zone_selected == "head") - if(!get_location_accessible(H, "head")) + if(user.zone_selected == BODY_ZONE_HEAD) + if(!get_location_accessible(H, BODY_ZONE_HEAD)) to_chat(user, "The headgear is in the way.") return if((C.dna.species.bodyflags & ALL_RPARTS) && robohead.is_monitor) //If the target is of a species that can have prosthetic heads, but the head doesn't support human hair 'wigs'... diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 7291de691dc..9949b240712 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -86,15 +86,15 @@ update_icon() -/obj/item/defibrillator/ui_action_click() - if(!ishuman(usr) && !Adjacent(usr)) +/obj/item/defibrillator/ui_action_click(mob/user) + if(!ishuman(user) || !Adjacent(user)) return toggle_paddles() -/obj/item/defibrillator/CtrlClick() - if(!ishuman(usr) && !Adjacent(usr)) +/obj/item/defibrillator/CtrlClick(mob/user) + if(!ishuman(user) || !Adjacent(user)) return toggle_paddles() @@ -165,8 +165,8 @@ //Detach the paddles into the user's hands var/mob/living/carbon/human/user = usr - var/obj/item/organ/external/temp2 = user.bodyparts_by_name["r_hand"] - var/obj/item/organ/external/temp = user.bodyparts_by_name["l_hand"] + var/obj/item/organ/external/temp2 = user.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] + var/obj/item/organ/external/temp = user.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(user.incapacitated()) return @@ -479,7 +479,7 @@ return else var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart) - if(heart.status & ORGAN_DEAD) + if(heart.is_dead()) user.visible_message("[defib || src] buzzes: Resuscitation failed - Heart necrosis detected.") playsound(get_turf(src), 'sound/machines/defib_failed.ogg', 50, 0) busy = FALSE @@ -503,7 +503,7 @@ var/total_cloneloss = H.cloneloss var/total_bruteloss = 0 var/total_burnloss = 0 - for(var/obj/item/organ/external/O in H.bodyparts) + for(var/obj/item/organ/external/O as anything in H.bodyparts) total_bruteloss += O.brute_dam total_burnloss += O.burn_dam if(total_cloneloss <= 180 && total_bruteloss <= 180 && total_burnloss <= 180 && !H.suiciding && !ghost && tplus < tlimit && !(NOCLONE in H.mutations) && (H.mind && H.mind.is_revivable()) && (H.get_int_organ(/obj/item/organ/internal/heart) || H.get_int_organ(/obj/item/organ/internal/brain/slime))) @@ -563,10 +563,10 @@ return if(electrocute_mob(affecting, defib.cell, origin)) // shock anyone touching them >:) - var/obj/item/organ/internal/heart/HE = affecting.get_organ_slot("heart") - if(HE.parent_organ == "chest" && affecting.has_both_hands()) // making sure the shock will go through their heart (drask hearts are in their head), and that they have both arms so the shock can cross their heart inside their chest + var/obj/item/organ/internal/heart/HE = affecting.get_organ_slot(INTERNAL_ORGAN_HEART) + if(HE.parent_organ_zone == BODY_ZONE_CHEST && affecting.has_both_hands()) // making sure the shock will go through their heart (drask hearts are in their head), and that they have both arms so the shock can cross their heart inside their chest affecting.visible_message("[affecting]'s entire body shakes as a shock travels up their arm!", \ - "You feel a powerful shock travel up your [affecting.hand ? affecting.get_organ("l_arm") : affecting.get_organ("r_arm")] and back down your [affecting.hand ? affecting.get_organ("r_arm") : affecting.get_organ("l_arm")]!") + "You feel a powerful shock travel up your [affecting.hand ? affecting.get_organ(BODY_ZONE_L_ARM) : affecting.get_organ(BODY_ZONE_R_ARM)] and back down your [affecting.hand ? affecting.get_organ(BODY_ZONE_L_ARM) : affecting.get_organ(BODY_ZONE_R_ARM)]!") affecting.set_heartattack(TRUE) /obj/item/twohanded/shockpaddles/borg diff --git a/code/game/objects/items/weapons/dna_upgrader.dm b/code/game/objects/items/weapons/dna_upgrader.dm new file mode 100644 index 00000000000..3ca2bf1cdb4 --- /dev/null +++ b/code/game/objects/items/weapons/dna_upgrader.dm @@ -0,0 +1,91 @@ +#define VAULT_TOXIN "Toxin Adaptation" +#define VAULT_NOBREATH "Lung Enhancement" +#define VAULT_FIREPROOF "Thermal Regulation" +#define VAULT_STUNTIME "Neural Repathing" +#define VAULT_ARMOUR "Hardened Skin" +#define VAULT_SPEED "Leg Muscle Stimulus" +#define VAULT_QUICK "Arm Muscle Stimulus" + +/obj/item/dna_upgrader + name = "dna upgrader" + desc = "test" + icon = 'icons/obj/hypo.dmi' + icon_state = "dnaupgrader" + var/used = FALSE + +/obj/item/dna_upgrader/attack_self(mob/user) + if(!used) + ui_interact(user) + else + to_chat(user, span_notice("Looks like it is already used.")) + +/obj/item/dna_upgrader/ui_interact(mob/user, ui_key, datum/tgui/ui, force_open, datum/tgui/master_ui, datum/ui_state/state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + + if(!ui) + ui = new(user, src, ui_key, "DNAModifyer", name, 400, 150, master_ui, state) + ui.open() + +/obj/item/dna_upgrader/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) + + if(..()) + return + + switch(action) + if("gene") + var/mob/living/carbon/human/H = ui.user + var/datum/species/S = H.dna.species + if(NO_DNA in S.species_traits) + to_chat(H, "Error, no DNA detected.") + return + var/modification = params["modification"] + switch(modification) + if(VAULT_TOXIN) + to_chat(H, "You feel resistant to airborne toxins.") + var/obj/item/organ/internal/lungs/L = H.get_int_organ(/obj/item/organ/internal/lungs) + if(L) + L.tox_breath_dam_min = 0 + L.tox_breath_dam_max = 0 + S.species_traits |= VIRUSIMMUNE + if(VAULT_NOBREATH) + to_chat(H, "Your lungs feel great.") + S.species_traits |= NO_BREATHE + if(VAULT_FIREPROOF) + to_chat(H, "You feel fireproof.") + S.burn_mod *= 0.5 + S.species_traits |= RESISTHOT + if(VAULT_STUNTIME) + to_chat(H, "Nothing can keep you down for long.") + S.stun_mod *= 0.5 + S.stamina_mod *= 0.5 + H.stam_regen_start_modifier *= 0.5 + if(VAULT_ARMOUR) + to_chat(H, "You feel tough.") + S.brute_mod *= 0.7 + S.burn_mod *= 0.7 + S.tox_mod *= 0.7 + S.oxy_mod *= 0.7 + S.clone_mod *= 0.7 + S.brain_mod *= 0.7 + S.stamina_mod *= 0.7 + S.species_traits |= PIERCEIMMUNE + if(VAULT_SPEED) + to_chat(H, "You feel very fast and agile.") + S.speed_mod = -1 + if(VAULT_QUICK) + to_chat(H, "Your arms move as fast as lightning.") + H.next_move_modifier = 0.5 + ui.close() + H.gene_stability += 25 + to_chat(H, span_notice("You feel like your body rebasing.")) + used = TRUE + icon_state = "[icon_state]0" + return TRUE + +#undef VAULT_TOXIN +#undef VAULT_NOBREATH +#undef VAULT_FIREPROOF +#undef VAULT_STUNTIME +#undef VAULT_ARMOUR +#undef VAULT_SPEED +#undef VAULT_QUICK diff --git a/code/game/objects/items/weapons/garrote.dm b/code/game/objects/items/weapons/garrote.dm index c784be678d5..132ec7649fa 100644 --- a/code/game/objects/items/weapons/garrote.dm +++ b/code/game/objects/items/weapons/garrote.dm @@ -160,14 +160,14 @@ if(improvised) strangling.Stuttering(6 SECONDS) - strangling.apply_damage(2, OXY, "head") + strangling.apply_damage(2, OXY, BODY_ZONE_HEAD) return if(!(src in strangling.garroted_by)) strangling.garroted_by+=src strangling.Silence(6 SECONDS) // Non-improvised effects - strangling.apply_damage(20, OXY, "head") + strangling.apply_damage(20, OXY, BODY_ZONE_HEAD) /obj/item/twohanded/garrote/suicide_act(mob/user) diff --git a/code/game/objects/items/weapons/implants/health.dm b/code/game/objects/items/weapons/implants/health.dm deleted file mode 100644 index e40006f4a2a..00000000000 --- a/code/game/objects/items/weapons/implants/health.dm +++ /dev/null @@ -1,11 +0,0 @@ -/obj/item/implant/health - name = "health implant" - activated = FALSE - var/healthstring = "" - -/obj/item/implant/health/proc/sensehealth() - if(!imp_in) - return "ERROR" - else - healthstring = "[round(imp_in.getOxyLoss())] - [round(imp_in.getFireLoss())] - [round(imp_in.getToxLoss())] - [round(imp_in.getBruteLoss())]" - return healthstring diff --git a/code/game/objects/items/weapons/implants/implant.dm b/code/game/objects/items/weapons/implants/implant.dm index 36c55b77d3d..72a36fdb90b 100644 --- a/code/game/objects/items/weapons/implants/implant.dm +++ b/code/game/objects/items/weapons/implants/implant.dm @@ -1,25 +1,153 @@ +/** + * # Implants + * + * Code for implants that can be inserted into a person and have some sort of passive or triggered action. + * + */ /obj/item/implant - name = "implant" + name = "bio-chip" icon = 'icons/obj/implants.dmi' - icon_state = "generic" //Shows up as the action button icon + icon_state = "generic" //Shows up as a auto surgeon, used as a placeholder when a implant doesn't have a sprite origin_tech = "materials=2;biotech=3;programming=2" - actions_types = list(/datum/action/item_action/hands_free/activate) - var/activated = 1 //1 for implant types that can be activated, 0 for ones that are "always on" like mindshield implants - var/implanted = null - var/mob/living/imp_in = null - item_color = "b" - var/allow_multiple = 0 + item_color = "black" + flags = DROPDEL // By default, don't let implants be harvestable. + + /// Which implant overlay should be used for implant cases. This should point to a state in implants.dmi + var/implant_state = "implant-default" + /// How the implant is activated. + var/activated = BIOCHIP_ACTIVATED_ACTIVE + /// Whether the implant is currently implanted (`BIOCHIP_IMPLANTED`), was implanted previously (`BIOCHIP_USED`) or if its new and intact (`BIOCHIP_NEW`). + var/implanted = BIOCHIP_NEW + /// Who the implant is inside of. + var/mob/living/imp_in + + /// Whether multiple implants of this same type can be inserted into someone. + var/allow_multiple = FALSE + /// Amount of times that the implant can be triggered by the user. If the implant can't be used, it can't be inserted. var/uses = -1 - flags = DROPDEL + + /// List of emote keys that activate this implant when used. + var/list/trigger_emotes + /// What type of action will trigger this emote. Bitfield of IMPLANT_EMOTE_* defines. + var/trigger_causes + /// Whether this implant has already triggered on death or not, to prevent it firing multiple times. + var/has_triggered_on_death = FALSE + + ///the implant_fluff datum attached to this implant, purely cosmetic "lore" information + var/datum/implant_fluff/implant_data = /datum/implant_fluff + + +/obj/item/implant/Initialize(mapload) + . = ..() + if(ispath(implant_data, /datum/implant_fluff)) + implant_data = new implant_data + + +/obj/item/implant/Destroy() + if(imp_in) + removed(imp_in) + imp_in = null + if(istype(loc, /obj/item/implanter)) + var/obj/item/implanter/implanter = loc + implanter.imp = null + implanter.update_icon() + if(istype(loc, /obj/item/implantpad)) + var/obj/item/implantcase/implantcase = loc + implantcase.imp = null + implantcase.update_state() + QDEL_NULL(implant_data) + return ..() + + +/obj/item/implant/proc/unregister_emotes() + if(imp_in && LAZYLEN(trigger_emotes)) + for(var/emote in trigger_emotes) + UnregisterSignal(imp_in, COMSIG_MOB_EMOTED(emote)) + + +/** + * Set the emote that will trigger the implant. + * + * Arguments: + * * user - User who is trying to associate the implant to themselves. + * * emote_key - Key of the emote that should trigger the implant. + * * on_implant - Whether this proc is being called during the implantation of the implant. + * * silent - If `TRUE`, the user won't get any to_chat messages if an implantation fails. + */ +/obj/item/implant/proc/set_trigger(mob/user, emote_key, on_implant = FALSE, silent = TRUE) + if(imp_in != user) + return FALSE + + if(!emote_key) + return FALSE + + if(LAZYIN(trigger_emotes, emote_key) && !on_implant) + if(!silent) + to_chat(user, span_warning("You've already registered [emote_key]!")) + return FALSE + + if(emote_key == "me" || emote_key == "custom") + if(!silent) + to_chat(user, span_warning("You can't trigger [src] with a custom emote.")) + return FALSE + + if(!(emote_key in user.usable_emote_keys(trigger_causes & BIOCHIP_EMOTE_TRIGGER_INTENTIONAL))) + if(!silent) + to_chat(user, span_warning("You can't trigger [src] with that emote! Try *help to see emotes you can use.")) + return FALSE + + if(!(emote_key in user.usable_emote_keys(trigger_causes & BIOCHIP_EMOTE_TRIGGER_UNINTENTIONAL))) + CRASH("User was given an bio-chip for an unintentional emote that they can't use.") + + LAZYADD(trigger_emotes, emote_key) + RegisterSignal(user, COMSIG_MOB_EMOTED(emote_key), PROC_REF(on_emote)) + + +/obj/item/implant/proc/on_emote(mob/living/user, datum/emote/fired_emote, key, emote_type, message, intentional) + SIGNAL_HANDLER + + if(!implanted || !imp_in) + return + + if(!(intentional && (trigger_causes & BIOCHIP_EMOTE_TRIGGER_INTENTIONAL)) && !(!intentional && (trigger_causes & BIOCHIP_EMOTE_TRIGGER_UNINTENTIONAL))) + return + + add_attack_logs(user, user, "[intentional ? "intentionally" : "unintentionally"] [src] was [intentional ? "intentionally" : "unintentionally"] triggered with the emote [fired_emote].") + emote_trigger(key, user, intentional) -/obj/item/implant/proc/trigger(emote, mob/source, force) +/obj/item/implant/proc/on_death(mob/source, gibbed) + SIGNAL_HANDLER + + if(!implanted || !imp_in) + return + + if(gibbed && (trigger_causes & BIOCHIP_TRIGGER_NOT_WHEN_GIBBED)) + return + + // This should help avoid infinite recursion for things like dust that call death() + if(has_triggered_on_death && (trigger_causes & BIOCHIP_TRIGGER_DEATH_ONCE)) + return + + has_triggered_on_death = TRUE + + add_attack_logs(source, source, "had their [src] bio-chip triggered on [gibbed ? "gib" : "death"].") + death_trigger(source, gibbed) + + +/obj/item/implant/proc/emote_trigger(emote, mob/source, force) return + +/obj/item/implant/proc/death_trigger(mob/source, gibbed) + return + + /obj/item/implant/proc/activate(cause) return + /obj/item/implant/ui_action_click() activate("action_button") @@ -27,68 +155,100 @@ /** * Try to implant ourselves into a mob. * + * Arguments: * * source - The person the implant is being administered to. * * user - The person who is doing the implanting. + * * force - If `TRUE` bypasses all checks in [/obj/item/implant/proc/can_implant()] * - * Returns - * `TRUE` if the implant injects successfully - * `FALSE` if the implant fails to inject + * Returns `TRUE` on success. */ -/obj/item/implant/proc/implant(mob/source, mob/user) - var/obj/item/implant/imp_e = locate(src.type) in source +/obj/item/implant/proc/implant(mob/living/carbon/human/source, mob/user, force = FALSE) + if(!force && !can_implant(source, user)) + return + var/obj/item/implant/imp_e = locate(type) in source if(!allow_multiple && imp_e && imp_e != src) - if(imp_e.uses < initial(imp_e.uses)*2) + if(imp_e.uses < initial(imp_e.uses) * 2) if(uses == -1) imp_e.uses = -1 else - imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses)*2) + imp_e.uses = min(imp_e.uses + uses, initial(imp_e.uses) * 2) qdel(src) return TRUE - else - return FALSE + return FALSE - src.loc = source + loc = source imp_in = source - implanted = TRUE + implanted = BIOCHIP_IMPLANTED + + if(trigger_emotes) + if(!(trigger_causes & BIOCHIP_EMOTE_TRIGGER_INTENTIONAL|BIOCHIP_EMOTE_TRIGGER_UNINTENTIONAL)) + CRASH("Bio-chip [src] has trigger emotes defined but no trigger cause with which to use them!") + if(!activated && (trigger_causes & BIOCHIP_EMOTE_TRIGGER_INTENTIONAL)) + CRASH("Bio-chip [src] has intentional emote triggers on a passive bio-chip") + // If you can't activate the implant manually, you shouldn't be able to deliberately activate it with an emote + for(var/emote in trigger_emotes) + set_trigger(source, emote, on_implant = TRUE) + if(activated) - for(var/X in actions) - var/datum/action/A = X - A.Grant(source) + for(var/datum/action/action as anything in actions) + action.Grant(source) + update_button(action) + + if(trigger_causes & (BIOCHIP_TRIGGER_DEATH_ONCE|BIOCHIP_TRIGGER_DEATH_ANY)) + RegisterSignal(source, COMSIG_MOB_DEATH, PROC_REF(on_death)) + if(ishuman(source)) - var/mob/living/carbon/human/H = source - H.sec_hud_set_implants() + source.sec_hud_set_implants() if(user) - add_attack_logs(user, source, "Implanted with [src]") + add_attack_logs(user, source, "Chipped with [src]") return TRUE -/obj/item/implant/proc/removed(mob/source) +/** + * Check that we can actually implant this before implanting it + * * source - The person being implanted + * * user - The person doing the implanting + * + * Returns: + * `TRUE` - I could care less, implant it, maybe don't. I don't care. + * `FALSE` - Don't implant! + */ +/obj/item/implant/proc/can_implant(mob/source, mob/user) + return TRUE + + +/** + * Clean up when an implant is removed. + * + * Arguments: + * * source - the user who the implant was removed from. + */ +/obj/item/implant/proc/removed(mob/living/carbon/human/source) loc = null imp_in = null - implanted = FALSE + implanted = BIOCHIP_USED - for(var/X in actions) - var/datum/action/A = X - A.Grant(source) + for(var/datum/action/action as anything in actions) + action.Remove(source) if(ishuman(source)) - var/mob/living/carbon/human/H = source - H.sec_hud_set_implants() + source.sec_hud_set_implants() - return TRUE + if(trigger_causes & (BIOCHIP_TRIGGER_DEATH_ONCE|BIOCHIP_TRIGGER_DEATH_ANY)) + UnregisterSignal(source, COMSIG_MOB_DEATH) + unregister_emotes() -/obj/item/implant/Destroy() - if(imp_in) - removed(imp_in) - return ..() + return TRUE -/obj/item/implant/proc/get_data() - return "No information available" +/** + * Updates button name and description. + */ +/obj/item/implant/proc/update_button(datum/action/action) + action.name = "[initial(action.name)] [name]" + action.desc = desc + action.UpdateButtonIcon() -/obj/item/implant/dropped(mob/user, silent = FALSE) - . = 1 - ..() diff --git a/code/game/objects/items/weapons/implants/implant_abductor.dm b/code/game/objects/items/weapons/implants/implant_abductor.dm index 8967f364078..87aa771693f 100644 --- a/code/game/objects/items/weapons/implants/implant_abductor.dm +++ b/code/game/objects/items/weapons/implants/implant_abductor.dm @@ -1,47 +1,57 @@ /obj/item/implant/abductor - name = "recall implant" + name = "recall bio-chip" desc = "Returns you to the mothership." icon = 'icons/obj/abductor.dmi' icon_state = "implant" - activated = 1 + implant_state = "implant-alien" origin_tech = "materials=2;biotech=7;magnets=4;bluespace=4;abductor=5" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/abductor + COOLDOWN_DECLARE(abductor_recall_cooldown) var/obj/machinery/abductor/pad/home - var/cooldown = 30 - var/total_cooldown = 30 + var/cooldown = 30 SECONDS + /obj/item/implant/abductor/activate() - if(cooldown == total_cooldown) - home.Retrieve(imp_in,1) - cooldown = 0 - START_PROCESSING(SSobj, src) + if(COOLDOWN_FINISHED(src, abductor_recall_cooldown)) + home?.Retrieve(imp_in) + COOLDOWN_START(src, abductor_recall_cooldown, cooldown) else - to_chat(imp_in, "You must wait [(total_cooldown - cooldown)*2] seconds to use [src] again!") - -/obj/item/implant/abductor/process() - if(cooldown < total_cooldown) - cooldown++ - if(cooldown == total_cooldown) - STOP_PROCESSING(SSobj, src) - -/obj/item/implant/abductor/implant(mob/source, mob/user) - if(..()) - var/obj/machinery/abductor/console/console - if(ishuman(source)) - var/mob/living/carbon/human/H = source - if(isabductor(H)) - var/datum/species/abductor/S = H.dna.species - console = get_team_console(S.team) - home = console.pad - - if(!home) - console = get_team_console(pick(1, 2, 3, 4)) - home = console.pad - return 1 - -/obj/item/implant/abductor/proc/get_team_console(var/team) + to_chat(imp_in, span_warning("You must wait [round(COOLDOWN_TIMELEFT(src, abductor_recall_cooldown) / 10)] seconds to use [src] again!")) + + +/obj/item/implant/abductor/implant(mob/living/carbon/human/source, mob/user, force = FALSE) + . = ..() + if(!.) + return + var/obj/machinery/abductor/console/console - for(var/obj/machinery/abductor/console/c in GLOB.abductor_equipment) - if(c.team == team) - console = c + if(ishuman(source) && isabductor(source)) + var/datum/species/abductor/species = source.dna.species + console = get_team_console(species.team) + home = console.pad + + if(!home) + console = get_team_console(pick(1, 2, 3, 4)) + home = console.pad + + +/obj/item/implant/abductor/proc/get_team_console(team) + var/obj/machinery/abductor/console/console + for(var/obj/machinery/abductor/console/check in GLOB.abductor_equipment) + if(check.team == team) + console = check break return console + + +/obj/item/implanter/abductor + name = "bio-chip implanter (abductor)" + imp = /obj/item/implant/abductor + + +/obj/item/implantcase/abductor + name = "bio-chip case - 'abductor'" + desc = "A glass case containing an abductor bio-chip." + imp = /obj/item/implant/abductor + diff --git a/code/game/objects/items/weapons/implants/implant_adrenalin.dm b/code/game/objects/items/weapons/implants/implant_adrenalin.dm new file mode 100644 index 00000000000..96317a0dcdc --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_adrenalin.dm @@ -0,0 +1,41 @@ +/obj/item/implant/adrenalin + name = "adrenal bio-chip" + desc = "Removes all stuns and knockdowns." + icon_state = "adrenal" + implant_state = "implant-syndicate" + origin_tech = "materials=2;biotech=4;combat=3;syndicate=2" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/adrenaline + uses = 3 + + +/obj/item/implant/adrenalin/activate() + uses-- + to_chat(imp_in, span_notice("You feel an electric sensation as your components enter overdrive!")) + imp_in.SetStunned(0) + imp_in.SetWeakened(0) + imp_in.SetImmobilized(0) + imp_in.SetParalysis(0) + imp_in.adjustStaminaLoss(-100) + imp_in.lying = 0 + imp_in.update_canmove() + + imp_in.reagents.add_reagent("synaptizine", 10) + imp_in.reagents.add_reagent("omnizine", 10) + imp_in.reagents.add_reagent("stimulative_agent", 10) + imp_in.reagents.add_reagent("adrenaline", 2) + + if(!uses) + qdel(src) + + +/obj/item/implanter/adrenalin + name = "bio-chip implanter (adrenalin)" + imp = /obj/item/implant/adrenalin + + +/obj/item/implantcase/adrenaline + name = "bio-chip case - 'Adrenaline'" + desc = "A glass case containing an adrenaline bio-chip." + imp = /obj/item/implant/adrenalin + diff --git a/code/game/objects/items/weapons/implants/implant_chem.dm b/code/game/objects/items/weapons/implants/implant_chem.dm index f1c4dd4126b..5a60d9b3375 100644 --- a/code/game/objects/items/weapons/implants/implant_chem.dm +++ b/code/game/objects/items/weapons/implants/implant_chem.dm @@ -1,61 +1,63 @@ /obj/item/implant/chem - name = "chem implant" + name = "chem bio-chip" desc = "Injects things." icon_state = "reagents" + implant_state = "implant-nanotrasen" origin_tech = "materials=3;biotech=4" + activated = BIOCHIP_ACTIVATED_ACTIVE container_type = OPENCONTAINER + trigger_causes = BIOCHIP_TRIGGER_DEATH_ANY + implant_data = /datum/implant_fluff/chem -/obj/item/implant/chem/get_data() - var/dat = {"Implant Specifications:
- Name: Robust Corp MJ-420 Prisoner Management Implant
- Life: Deactivates upon death but remains within the body.
- Important Notes: Due to the system functioning off of nutrients in the implanted subject's body, the subject
- will suffer from an increased appetite.

-
- Implant Details:
- Function: Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal
- the implant releases the chemicals directly into the blood stream.
- Special Features: - Micro-Capsule- Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units.
- Can only be loaded while still in its original case.
- Integrity: Implant will last so long as the subject is alive."} - return dat - -/obj/item/implant/chem/New() - ..() + +/obj/item/implant/chem/Initialize(mapload) + . = ..() create_reagents(50) GLOB.tracked_implants += src + /obj/item/implant/chem/Destroy() GLOB.tracked_implants -= src return ..() +/obj/item/implant/chem/death_trigger(mob/victim, gibbed) + activate(reagents.total_volume) -/obj/item/implant/chem/trigger(emote, mob/source, force) - if(force && emote == "deathgasp") - activate(reagents.total_volume) - /obj/item/implant/chem/activate(cause) - if(!cause || !imp_in) return 0 - var/mob/living/carbon/R = imp_in - var/injectamount = null + if(!cause || !imp_in) + return FALSE + var/mob/living/carbon/carrier = imp_in + var/injectamount + + var/list/implant_chems = list() + for(var/datum/reagent/chems in reagents.reagent_list) + implant_chems += chems.name + var/contained_chemicals = english_list(implant_chems) + if(cause == "action_button") injectamount = reagents.total_volume else injectamount = cause - reagents.trans_to(R, injectamount) - to_chat(R, "You hear a faint beep.") + + reagents.trans_to(carrier, injectamount) + add_attack_logs(usr, carrier, "Chem bio-chip activated injecting [injectamount]u of [contained_chemicals]") + if(!reagents.total_volume) - to_chat(R, "You hear a faint click from your chest.") + to_chat(carrier, span_italics("You hear a faint click from your chest.")) qdel(src) + else + to_chat(carrier, span_italics("You hear a faint beep.")) + + +/obj/item/implanter/chem + name = "bio-chip implanter (chem)" + imp = /obj/item/implant/chem /obj/item/implantcase/chem - name = "implant case - 'Remote Chemical'" - desc = "A glass case containing a remote chemical implant." + name = "bio-chip case - 'Remote Chemical'" + desc = "A glass case containing a remote chemical bio-chip." + imp = /obj/item/implant/chem -/obj/item/implantcase/chem/New() - imp = new /obj/item/implant/chem(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implant_clown.dm b/code/game/objects/items/weapons/implants/implant_clown.dm deleted file mode 100644 index bb5170fced6..00000000000 --- a/code/game/objects/items/weapons/implants/implant_clown.dm +++ /dev/null @@ -1,29 +0,0 @@ -/obj/item/implant/sad_trombone - name = "sad trombone implant" - activated = FALSE - -/obj/item/implant/sad_trombone/get_data() - var/dat = {"Implant Specifications:
- Name: Honk Co. Sad Trombone Implant
- Life: Activates upon death.
- "} - return dat - -/obj/item/implant/sad_trombone/trigger(emote, mob/source, force) - if(force && emote == "deathgasp") - playsound(loc, 'sound/misc/sadtrombone.ogg', 50, FALSE) - -/obj/item/implanter/sad_trombone - name = "implanter (sad trombone)" - -/obj/item/implanter/sad_trombone/New() //gross - imp = new /obj/item/implant/sad_trombone - ..() - -/obj/item/implantcase/sad_trombone - name = "implant case - 'Sad Trombone'" - desc = "A glass case containing a sad trombone implant." - -/obj/item/implantcase/sad_trombone/New() //gross - imp = new /obj/item/implant/sad_trombone - ..() diff --git a/code/game/objects/items/weapons/implants/implant_cortical_stack.dm b/code/game/objects/items/weapons/implants/implant_cortical_stack.dm new file mode 100644 index 00000000000..0da4bd54bf0 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_cortical_stack.dm @@ -0,0 +1,20 @@ + +/obj/item/implant/cortical + name = "cortical stack" + desc = "A fist-sized mass of biocircuits and chips." + origin_tech = "materials=4;programming=7;biotech=5" + implant_state = "implant-syndicate" + activated = BIOCHIP_ACTIVATED_PASSIVE + implant_data = /datum/implant_fluff/cortical + + +/obj/item/implanter/cortical // must be a huge implanter .\_/. + name = "bio-chip implanter (cortical stack)" + imp = /obj/item/implant/cortical + + +/obj/item/implantcase/cortical + name = "bio-chip case - 'Cortical Stack'" + desc = "A glass case containing a cortical stack." + imp = /obj/item/implant/cortical + diff --git a/code/game/objects/items/weapons/implants/implant_death_alarm.dm b/code/game/objects/items/weapons/implants/implant_death_alarm.dm index e8330c0c5cd..0f911e41728 100644 --- a/code/game/objects/items/weapons/implants/implant_death_alarm.dm +++ b/code/game/objects/items/weapons/implants/implant_death_alarm.dm @@ -1,72 +1,69 @@ /obj/item/implant/death_alarm - name = "death alarm implant" + name = "death alarm bio-chip" desc = "An alarm which monitors host vital signs and transmits a radio message upon death." - var/mobname = "Will Robinson" - activated = 0 + implant_state = "implant-nanotrasen" + activated = BIOCHIP_ACTIVATED_PASSIVE + trigger_causes = BIOCHIP_TRIGGER_DEATH_ANY + implant_data = /datum/implant_fluff/death_alarm + var/mobname = "Unknown" var/static/list/stealth_areas = typecacheof(list(/area/syndicate_mothership, /area/shuttle/syndicate_elite)) -/obj/item/implant/death_alarm/get_data() - var/dat = {"Implant Specifications:
- Name: Nanotrasen \"Profit Margin\" Class Employee Lifesign Sensor
- Life: Activates upon death.
- Important Notes: Alerts crew to crewmember death.
-
- Implant Details:
- Function: Contains a compact radio signaler that triggers when the host's lifesigns cease.
- Special Features: Alerts crew to crewmember death.
- Integrity: Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."} - return dat - -/obj/item/implant/death_alarm/Destroy() - STOP_PROCESSING(SSobj, src) - return ..() - -/obj/item/implant/death_alarm/process() - if(!implanted) - return - var/mob/M = imp_in - - if(isnull(M)) // If the mob got gibbed - activate() - else if(M.stat == DEAD) - activate("death") -/obj/item/implant/death_alarm/activate(var/cause) - var/mob/M = imp_in - var/area/t = get_area(M) +/obj/item/implant/death_alarm/implant(mob/living/carbon/human/source, mob/user, force = FALSE) + . = ..() + if(.) + mobname = source.real_name + + +/obj/item/implant/death_alarm/activate(cause) // Death signal sends name followed by the gibbed / not gibbed check + var/area/mob_area = get_area(imp_in) - var/obj/item/radio/headset/a = new /obj/item/radio/headset(src) - a.follow_target = M + var/obj/item/radio/headset/dummy = new /obj/item/radio/headset(src) + dummy.follow_target = imp_in switch(cause) - if("death") - if(is_type_in_typecache(t, stealth_areas)) - //give the syndies a bit of stealth - a.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm") - else - a.autosay("[mobname] has died in [t.name]!", "[mobname]'s Death Alarm") + if("gib") + dummy.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm") qdel(src) if("emp") - var/name = prob(50) ? t.name : pick(GLOB.teleportlocs) - a.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm") + var/name = prob(50) ? mob_area.name : pick(GLOB.teleportlocs) + dummy.autosay("[mobname] has died in [name]!", "[mobname]'s Death Alarm") else - a.autosay("[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm") + if(is_type_in_typecache(mob_area, stealth_areas)) + //give the syndies a bit of stealth + dummy.autosay("[mobname] has died in Space!", "[mobname]'s Death Alarm") + else + dummy.autosay("[mobname] has died in [mob_area.name]!", "[mobname]'s Death Alarm") qdel(src) - qdel(a) + qdel(dummy) -/obj/item/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this + +/obj/item/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this activate("emp") //let's shout that this dude is dead -/obj/item/implant/death_alarm/implant(mob/target) - if(..()) - mobname = target.real_name - START_PROCESSING(SSobj, src) - return 1 - return 0 + +/obj/item/implant/death_alarm/death_trigger(mob/source, gibbed) + if(gibbed) + activate("gib") + else + activate("death") + /obj/item/implant/death_alarm/removed(mob/target) if(..()) - STOP_PROCESSING(SSobj, src) - return 1 - return 0 + UnregisterSignal(target, COMSIG_MOB_DEATH) + return TRUE + return FALSE + + +/obj/item/implanter/death_alarm + name = "bio-chip implanter (Death Alarm)" + imp = /obj/item/implant/death_alarm + + +/obj/item/implantcase/death_alarm + name = "bio-chip Case - 'Death Alarm'" + desc = "A case containing a death alarm bio-chip." + imp = /obj/item/implant/death_alarm + diff --git a/code/game/objects/items/weapons/implants/implant_dust.dm b/code/game/objects/items/weapons/implants/implant_dust.dm new file mode 100644 index 00000000000..063d36bd7a8 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_dust.dm @@ -0,0 +1,42 @@ +// Dust implant, for CC officers. Prevents gear theft if they die. + +/obj/item/implant/dust + name = "duster bio-chip" + desc = "A remote controlled bio-chip that will dust the user upon activation (or death of user)." + icon = 'icons/obj/implants.dmi' + icon_state = "dust" + implant_state = "implant-nanotrasen" + activated = BIOCHIP_ACTIVATED_ACTIVE + actions_types = list(/datum/action/item_action/hands_free/activate/always) + trigger_causes = BIOCHIP_TRIGGER_DEATH_ONCE|BIOCHIP_TRIGGER_NOT_WHEN_GIBBED + implant_data = /datum/implant_fluff/dust + + +/obj/item/implant/dust/death_trigger(mob/source, force) + activate("death") + + +/obj/item/implant/dust/activate(cause) + if(!cause || !imp_in || cause == "emp") + return FALSE + if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your dusting bio-chip? This will turn you to ash!", "Dusting Confirmation", "Yes", "No") != "Yes") + return FALSE + to_chat(imp_in, span_notice("Your dusting bio-chip activates!")) + imp_in.visible_message(span_warning("[imp_in] burns up in a flash!")) + imp_in.dust() + + +/obj/item/implant/dust/emp_act(severity) + return + + +/obj/item/implanter/dust + name = "bio-chip implanter (Dust-on-death)" + imp = /obj/item/implant/dust + + +/obj/item/implantcase/dust + name = "bio-chip case - 'Dust'" + desc = "A glass case containing a dust bio-chip." + imp = /obj/item/implant/dust + diff --git a/code/game/objects/items/weapons/implants/implant_emp.dm b/code/game/objects/items/weapons/implants/implant_emp.dm new file mode 100644 index 00000000000..011d406c26f --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_emp.dm @@ -0,0 +1,28 @@ +/obj/item/implant/emp + name = "emp bio-chip" + desc = "Triggers an EMP." + icon_state = "emp" + origin_tech = "biotech=3;magnets=4;syndicate=1" + activated = BIOCHIP_ACTIVATED_ACTIVE + uses = 2 + implant_data = /datum/implant_fluff/emp + implant_state = "implant-syndicate" + + +/obj/item/implant/emp/activate() + uses-- + INVOKE_ASYNC(GLOBAL_PROC, /proc/empulse, get_turf(imp_in), 3, 5, TRUE, name) + if(!uses) + qdel(src) + + +/obj/item/implanter/emp + name = "bio-chip implanter (EMP)" + imp = /obj/item/implant/emp + + +/obj/item/implantcase/emp + name = "bio-chip case - 'EMP'" + desc = "A glass case containing an EMP bio-chip." + imp = /obj/item/implant/emp + diff --git a/code/game/objects/items/weapons/implants/implant_exile.dm b/code/game/objects/items/weapons/implants/implant_exile.dm new file mode 100644 index 00000000000..b0edcc811ea --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_exile.dm @@ -0,0 +1,23 @@ +/** + * Exile implants will allow you to use the station gate, but not return home. + * This will allow security to exile badguys/for badguys to exile their kill targets. + */ +/obj/item/implant/exile + name = "exile implant" + desc = "Prevents you from returning from away missions" + origin_tech = "materials=2;biotech=3;magnets=2;bluespace=3" + implant_state = "implant-nanotrasen" + activated = BIOCHIP_ACTIVATED_PASSIVE + implant_data = /datum/implant_fluff/exile + + +/obj/item/implanter/exile + name = "bio-chip implanter (exile)" + imp = /obj/item/implant/exile + + +/obj/item/implantcase/exile + name = "bio-chip case - 'Exile'" + desc = "A glass case containing an exile bio-chip." + imp = /obj/item/implant/exile + diff --git a/code/game/objects/items/weapons/implants/implant_explosive.dm b/code/game/objects/items/weapons/implants/implant_explosive.dm index 80b502e9ee2..cd247845e76 100644 --- a/code/game/objects/items/weapons/implants/implant_explosive.dm +++ b/code/game/objects/items/weapons/implants/implant_explosive.dm @@ -1,179 +1,158 @@ /obj/item/implant/explosive - name = "microbomb implant" + name = "microbomb bio-chip" desc = "And boom goes the weasel." icon_state = "explosive" origin_tech = "materials=2;combat=3;biotech=4;syndicate=4" - actions_types = list(/datum/action/item_action/bomb_imp/activate) + implant_state = "implant-syndicate" + activated = BIOCHIP_ACTIVATED_ACTIVE + actions_types = list(/datum/action/item_action/hands_free/activate/always) + trigger_causes = BIOCHIP_TRIGGER_DEATH_ONCE // Not surviving that + implant_data = /datum/implant_fluff/explosive + var/detonating = FALSE var/weak = 2 var/medium = 0.8 var/heavy = 0.4 - var/delay = 7 - -/obj/item/implant/explosive/get_data() - var/dat = {"Implant Specifications:
- Name: Robust Corp RX-78 Employee Management Implant
- Life: Activates upon death.
- Important Notes: Explodes
-
- Implant Details:
- Function: Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death.
- Special Features: Explodes
- "} - return dat - -/obj/item/implant/explosive/trigger(emote, mob/source, force) - if(force && emote == "deathgasp") - activate("death") + var/delay = (0.7 SECONDS) + + +/obj/item/implant/explosive/death_trigger(mob/source, gibbed) + activate("death") + /obj/item/implant/explosive/activate(cause) - if(!cause || !imp_in) + if(!cause || QDELETED(imp_in)) + return FALSE + if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb bio-chip? This will cause you to explode!", "Microbomb Bio-chip Confirmation", "Yes", "No") != "Yes") return FALSE - if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your microbomb implant? This will cause you to explode!", "Microbomb Implant Confirmation", "Yes", "No") != "Yes") + if(detonating) return FALSE + heavy = round(heavy) medium = round(medium) weak = round(weak) - to_chat(imp_in, "You activate your microbomb implant.") -//If the delay is short, just blow up already jeez - if(delay <= 7) - explosion(src,heavy,medium,weak,weak, flame_range = weak, cause = src) - if(imp_in) - imp_in.gib() - qdel(src) + detonating = TRUE + to_chat(imp_in, span_danger("You activate your microbomb bio-chip.")) + + if(delay <= 7) //If the delay is short, just blow up already jeez + self_destruct() return + timed_explosion() -/obj/item/implant/explosive/implant(mob/source) - var/obj/item/implant/explosive/imp_e = locate(src.type) in source - if(imp_e && imp_e != src) - imp_e.heavy += heavy - imp_e.medium += medium - imp_e.weak += weak - imp_e.delay += delay - qdel(src) - return TRUE - return ..() +/** + * Gib the implantee and delete their destructible contents. + */ +/obj/item/implant/explosive/proc/self_destruct() + if(QDELETED(imp_in)) + return + + explosion(src, heavy, medium, weak, weak, flame_range = weak, cause = src) + + // In case something happens to the implantee between now and the self-destruct + var/current_location = get_turf(imp_in) + var/list/destructed_items = list() + + // Iterate over the implantee's contents and take out indestructible + // things to avoid having to worry about containers and recursion + for(var/obj/item/check in imp_in.get_contents()) + if(check == src) // Don't delete ourselves prematurely + continue + // Drop indestructible items on the ground first, to avoid them + // getting deleted when destroying the rest of the items, which we + // track in a list to qdel afterwards + if(check.resistance_flags & INDESTRUCTIBLE) + check.forceMove(current_location) + else + destructed_items += check + + QDEL_LIST(destructed_items) + imp_in.gib() + qdel(src) + /obj/item/implant/explosive/proc/timed_explosion() - imp_in.visible_message("[imp_in] starts beeping ominously!") - playsound(loc, 'sound/items/timer.ogg', 30, 0) - sleep(delay/4) - if(imp_in && imp_in.stat) - imp_in.visible_message("[imp_in] doubles over in pain!") + imp_in.visible_message(span_warning("[imp_in] starts beeping ominously!")) + playsound(loc, 'sound/items/timer.ogg', 30, FALSE) + var/wait_delay = delay / 4 + sleep(wait_delay) + if(!QDELETED(imp_in) && imp_in.stat) + imp_in.visible_message(span_warning("[imp_in] doubles over in pain!")) imp_in.Weaken(14 SECONDS) - playsound(loc, 'sound/items/timer.ogg', 30, 0) - sleep(delay/4) - playsound(loc, 'sound/items/timer.ogg', 30, 0) - sleep(delay/4) - playsound(loc, 'sound/items/timer.ogg', 30, 0) - sleep(delay/4) - explosion(src,heavy,medium,weak,weak, flame_range = weak, cause = src) - if(imp_in) - imp_in.gib() - qdel(src) + playsound(loc, 'sound/items/timer.ogg', 30, FALSE) + sleep(wait_delay) + playsound(loc, 'sound/items/timer.ogg', 30, FALSE) + sleep(wait_delay) + playsound(loc, 'sound/items/timer.ogg', 30, FALSE) + sleep(wait_delay) + self_destruct() + + +/obj/item/implant/explosive/implant(mob/living/carbon/human/source, mob/user, force = FALSE) + var/obj/item/implant/explosive/same_imp = locate(type) in source + if(same_imp && same_imp != src) + same_imp.heavy += heavy + same_imp.medium += medium + same_imp.weak += weak + same_imp.delay += delay + qdel(src) + return TRUE + return ..() + /obj/item/implant/explosive/macro - name = "macrobomb implant" + name = "macrobomb bio-chip" desc = "And boom goes the weasel. And everything else nearby." icon_state = "explosive" origin_tech = "materials=3;combat=5;biotech=4;syndicate=5" weak = 16 medium = 8 heavy = 4 - delay = 70 + delay = (7 SECONDS) + implant_data = new /datum/implant_fluff/explosive_macro + /obj/item/implant/explosive/macro/activate(cause) - if(!cause || !imp_in) return 0 - if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb implant? This will cause you to explode and gib!", "Macrobomb Implant Confirmation", "Yes", "No") != "Yes") + if(!cause || QDELETED(imp_in)) return FALSE - to_chat(imp_in, "You activate your macrobomb implant.") + if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your macrobomb bio-chip? This will cause you to explode and gib!", "Macrobomb Bio-chip Confirmation", "Yes", "No") != "Yes") + return FALSE + to_chat(imp_in, span_notice("You activate your macrobomb bio-chip.")) timed_explosion() -/obj/item/implant/explosive/macro/implant(mob/source) - var/obj/item/implant/explosive/imp_e = locate(src.type) in source - if(imp_e && imp_e != src) - return FALSE - imp_e = locate(/obj/item/implant/explosive) in source - if(imp_e && imp_e != src) - heavy += imp_e.heavy - medium += imp_e.medium - weak += imp_e.weak - delay += imp_e.delay - qdel(imp_e) +/obj/item/implant/explosive/macro/implant(mob/living/carbon/human/source, mob/user, force = FALSE) + var/obj/item/implant/explosive/same_imp = locate(type) in source + if(same_imp && same_imp != src) + return FALSE + same_imp = locate(/obj/item/implant/explosive) in source + if(same_imp && same_imp != src) + heavy += same_imp.heavy + medium += same_imp.medium + weak += same_imp.weak + delay += same_imp.delay + qdel(same_imp) return ..() /obj/item/implanter/explosive - name = "implanter (explosive)" - -/obj/item/implanter/explosive/New() - imp = new /obj/item/implant/explosive(src) - ..() + name = "bio-chip implanter (micro-explosive)" + imp = /obj/item/implant/explosive /obj/item/implantcase/explosive - name = "implant case - 'Explosive'" - desc = "A glass case containing an explosive implant." - -/obj/item/implantcase/explosive/New() - imp = new /obj/item/implant/explosive(src) - ..() + name = "bio-chip case - 'Micro Explosive'" + desc = "A glass case containing a micro explosive bio-chip." + imp = /obj/item/implant/explosive /obj/item/implanter/explosive_macro - name = "implanter (macro-explosive)" - -/obj/item/implanter/explosive_macro/New() - imp = new /obj/item/implant/explosive/macro(src) - ..() - - -// Dust implant, for CC officers. Prevents gear theft if they die. - -/obj/item/implant/dust - name = "duster implant" - desc = "An alarm which monitors host vital signs, transmitting a radio message and dusting the corpse on death." - icon = 'icons/effects/blood.dmi' - icon_state = "remains" - -/obj/item/implant/dust/get_data() - var/dat = {"Implant Specifications:
- Name: Ultraviolet Corp XX-13 Security Implant
- Life: Activates upon death.
- Important Notes: Vaporizes organic matter
-
- Implant Details:
- Function: Contains a compact, electrically activated heat source that turns its host to ash upon activation, or their death.
- Special Features: Vaporizes
- "} - return dat - -/obj/item/implant/dust/trigger(emote, mob/source, force) - if(force && emote == "deathgasp") - activate("death") - -/obj/item/implant/dust/activate(cause) - if(!cause || !imp_in || cause == "emp") - return FALSE - if(cause == "action_button" && alert(imp_in, "Are you sure you want to activate your dusting implant? This will turn you to ash!", "Dusting Confirmation", "Yes", "No") != "Yes") - return FALSE - to_chat(imp_in, "Your dusting implant activates!") - imp_in.visible_message("[imp_in] burns up in a flash!") - for(var/obj/item/I in imp_in.contents) - if(I == src) - continue - if(I.flags & NODROP) - qdel(I) - imp_in.dust() + name = "bio-chip implanter (macro-explosive)" + imp = /obj/item/implant/explosive/macro -/obj/item/implant/dust/emp_act(severity) - return -/obj/item/implanter/dust - name = "implanter (Dust-on-death)" +/obj/item/implantcase/explosive_macro + name = "bio-chip case - 'Macro Explosive'" + desc = "A glass case containing a macro explosive bio-chip." + imp = /obj/item/implant/explosive/macro -/obj/item/implanter/dust/New() - imp = new /obj/item/implant/dust(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implant_freedom.dm b/code/game/objects/items/weapons/implants/implant_freedom.dm index e355a1ee945..6e0fc3c11d4 100644 --- a/code/game/objects/items/weapons/implants/implant_freedom.dm +++ b/code/game/objects/items/weapons/implants/implant_freedom.dm @@ -1,60 +1,61 @@ /obj/item/implant/freedom - name = "freedom implant" + name = "freedom bio-chip" desc = "Use this to escape from those evil Red Shirts." icon_state = "freedom" + implant_state = "implant-syndicate" item_color = "r" origin_tech = "combat=5;magnets=3;biotech=4;syndicate=2" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/freedom uses = 4 -/obj/item/implant/freedom/activate() +/obj/item/implant/freedom/activate(cause) uses-- to_chat(imp_in, "You feel a faint click.") if(iscarbon(imp_in)) var/mob/living/carbon/C_imp_in = imp_in C_imp_in.uncuff() - for(var/obj/item/grab/G in C_imp_in.grabbed_by) - var/mob/living/carbon/M = G.assailant - C_imp_in.visible_message("[C_imp_in] suddenly shocks [M] from their wrists and slips out of their grab!") - M.Stun(2 SECONDS) //Drops the grab - M.apply_damage(2, BURN, "r_hand", M.run_armor_check("r_hand", "energy")) - M.apply_damage(2, BURN, "l_hand", M.run_armor_check("l_hand", "energy")) + for(var/obj/item/grab/grab in C_imp_in.grabbed_by) + var/mob/living/carbon/grabber = grab.assailant + C_imp_in.visible_message(span_warning("[C_imp_in] suddenly shocks [grabber] from their wrists and slips out of their grab!")) + grabber.Stun(2 SECONDS) //Drops the grab + grabber.apply_damage(2, BURN, BODY_ZONE_PRECISE_R_HAND, grabber.run_armor_check(BODY_ZONE_PRECISE_R_HAND, ENERGY)) + grabber.apply_damage(2, BURN, BODY_ZONE_PRECISE_L_HAND, grabber.run_armor_check(BODY_ZONE_PRECISE_L_HAND, ENERGY)) C_imp_in.SetStunned(0) //This only triggers if they are grabbed, to have them break out of the grab, without the large stun time. C_imp_in.SetWeakened(0) - playsound(C_imp_in.loc, "sound/weapons/Egloves.ogg", 75, 1) + playsound(C_imp_in.loc, 'sound/weapons/egloves.ogg', 75, TRUE) if(!uses) qdel(src) -/obj/item/implant/freedom/get_data() - var/dat = {" -Implant Specifications:
-Name: Freedom Beacon
-Life: optimum 5 uses
-Important Notes: Illegal
-
-Implant Details:
-Function: Transmits a specialized cluster of signals to override handcuff locking -mechanisms
-Special Features:
-Neuro-Scan- Analyzes certain shadow signals in the nervous system
-
-No Implant Specifics"} - return dat +/obj/item/implanter/freedom + name = "bio-chip implanter (freedom)" + imp = /obj/item/implant/freedom -/obj/item/implanter/freedom - name = "implanter (freedom)" +/obj/item/implantcase/freedom + name = "bio-chip case - 'Freedom'" + desc = "A glass case containing a freedom bio-chip." + imp = /obj/item/implant/freedom -/obj/item/implanter/freedom/New() - imp = new /obj/item/implant/freedom(src) - ..() +/obj/item/implant/freedom/prototype + name = "prototype freedom bio-chip" + desc = "Use this to escape from those evil Red Shirts. Works only once!" + origin_tech = "combat=5;magnets=3;biotech=3;syndicate=1" + implant_data = /datum/implant_fluff/protofreedom + uses = 1 -/obj/item/implantcase/freedom - name = "implant case - 'Freedom'" - desc = "A glass case containing a freedom implant." -/obj/item/implantcase/freedom/New() - imp = new /obj/item/implant/freedom(src) - ..() + +/obj/item/implanter/freedom/prototype + name = "bio-chip implanter (proto-freedom)" + imp = /obj/item/implant/freedom/prototype + + +/obj/item/implantcase/freedom/prototype + name = "bio-chip case - 'Proto-Freedom'" + desc = "A glass case containing a prototype freedom bio-chip." + imp = /obj/item/implant/freedom/prototype + diff --git a/code/game/objects/items/weapons/implants/implant_health.dm b/code/game/objects/items/weapons/implants/implant_health.dm new file mode 100644 index 00000000000..1f9432e8015 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_health.dm @@ -0,0 +1,27 @@ +/obj/item/implant/health + name = "health bio-chip" + activated = FALSE + implant_data = /datum/implant_fluff/health + implant_state = "implant-default" + + var/healthstring = "" + + +/obj/item/implant/health/proc/sensehealth() + if(!imp_in) + return "ERROR" + else + healthstring = "[round(imp_in.getOxyLoss())] - [round(imp_in.getFireLoss())] - [round(imp_in.getToxLoss())] - [round(imp_in.getBruteLoss())]" + return healthstring + + +/obj/item/implanter/health + name = "implanter (health)" + imp = /obj/item/implant/health + + +/obj/item/implantcase/health + name = "implant case - 'Health'" + desc = "A glass case containing a health implant." + imp = /obj/item/implant/health + diff --git a/code/game/objects/items/weapons/implants/implant_krav_maga.dm b/code/game/objects/items/weapons/implants/implant_krav_maga.dm index 9c33f43950a..46d46c02dfd 100644 --- a/code/game/objects/items/weapons/implants/implant_krav_maga.dm +++ b/code/game/objects/items/weapons/implants/implant_krav_maga.dm @@ -1,40 +1,32 @@ /obj/item/implant/krav_maga - name = "krav maga implant" + name = "krav maga bio-chip" desc = "Teaches you the arts of Krav Maga in 5 short instructional videos beamed directly into your eyeballs." icon = 'icons/obj/wizard.dmi' icon_state ="scroll2" - activated = 1 + implant_state = "implant-default" origin_tech = "materials=2;biotech=4;combat=5;syndicate=4" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/krav_maga var/datum/martial_art/krav_maga/style = new -/obj/item/implant/krav_maga/get_data() - var/dat = {"Implant Specifications:
- Name: Krav Maga Implant
- Life: 4 hours after death of host
- Implant Details:
- Function: Teaches even the clumsiest host the arts of Krav Maga."} - return dat -/obj/item/implant/krav_maga/activate() - var/mob/living/carbon/human/H = imp_in - if(!ishuman(H) || !H.mind) +/obj/item/implant/krav_maga/activate(cause) + var/mob/living/carbon/human/human_owner = imp_in + if(!ishuman(human_owner) || !human_owner.mind) return - if(istype(H.mind.martial_art, /datum/martial_art/krav_maga)) - style.remove(H) + if(istype(human_owner.mind.martial_art, /datum/martial_art/krav_maga)) + style.remove(human_owner) else - style.teach(H, TRUE) + style.teach(human_owner, TRUE) + /obj/item/implanter/krav_maga - name = "implanter (krav maga)" + name = "bio-chip implanter (krav maga)" + imp = /obj/item/implant/krav_maga -/obj/item/implanter/krav_maga/New() - imp = new /obj/item/implant/krav_maga(src) - ..() /obj/item/implantcase/krav_maga - name = "implant case - 'Krav Maga'" - desc = "A glass case containing an implant that can teach the user the art of Krav Maga." + name = "bio-chip case - 'Krav Maga'" + desc = "A glass case containing a bio-chip that can teach the user the art of Krav Maga." + imp = /obj/item/implant/krav_maga -/obj/item/implantcase/krav_maga/New() - imp = new /obj/item/implant/krav_maga(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implant_mindshield.dm b/code/game/objects/items/weapons/implants/implant_mindshield.dm index b87d167a82d..bd859c39803 100644 --- a/code/game/objects/items/weapons/implants/implant_mindshield.dm +++ b/code/game/objects/items/weapons/implants/implant_mindshield.dm @@ -1,75 +1,68 @@ /obj/item/implant/mindshield - name = "mindshield implant" + name = "mindshield bio-chip" desc = "Stops people messing with your mind." origin_tech = "materials=2;biotech=4;programming=4" - activated = 0 - -/obj/item/implant/mindshield/get_data() - var/dat = {"Implant Specifications:
- Name: Nanotrasen Employee Management Implant
- Life: Ten years.
- Important Notes: Personnel injected with this device can better resist mental compulsions.
-
- Implant Details:
- Function: Contains a small pod of nanobots that manipulate the host's mental functions.
- Special Features: Will prevent and cure most forms of brainwashing.
- Integrity: Implant will last so long as the nanobots are inside the bloodstream."} - return dat - - -/obj/item/implant/mindshield/implant(mob/target) - if(..()) - if(is_shadow_or_thrall(target)) - target.visible_message("[target] seems to resist the implant!", "You feel the corporate tendrils of Nanotrasen try to invade your mind!") - removed(target, 1) - qdel(src) - return -1 - if((target.mind in SSticker.mode?.cult) || (target.mind in SSticker.mode?.head_revolutionaries)) - to_chat(target, "You feel the corporate tendrils of Nanotrasen try to invade your mind!") - else if(target.mind in SSticker.mode?.revolutionaries) - SSticker.mode.remove_revolutionary(target.mind) - else - to_chat(target, "Your mind feels hardened - more resistant to brainwashing.") - return 1 - return 0 - -/obj/item/implant/mindshield/removed(mob/target, var/silent = 0) - if(..()) - if(target.stat != DEAD && !silent) - to_chat(target, "You feel a sense of liberation as Nanotrasen's grip on your mind fades away.") - return 1 - return 0 + implant_state = "implant-nanotrasen" + activated = BIOCHIP_ACTIVATED_PASSIVE + implant_data = /datum/implant_fluff/mindshield -/obj/item/implanter/mindshield - name = "implanter (mindshield)" +/obj/item/implant/mindshield/implant(mob/living/target, mob/user, force = FALSE) + . = ..() + if(!.) + return . + + if(is_shadow_or_thrall(target)) + target.visible_message( + span_warning("[target] seems to resist the implant!"), + span_warning("You feel the corporate tendrils of Nanotrasen try to invade your mind!"), + ) + removed(target, silent = TRUE) + qdel(src) + + else if(is_cultist(target) || is_head_revolutionary(target)) + to_chat(target, span_warning("You feel the corporate tendrils of Nanotrasen try to invade your mind!")) + + else if(is_revolutionary(target)) + SSticker.mode.remove_revolutionary(target.mind) + + else + to_chat(target, span_notice("Your mind feels hardened - more resistant to brainwashing.")) + -/obj/item/implanter/mindshield/New() - imp = new /obj/item/implant/mindshield(src) - ..() - update_icon() +/obj/item/implant/mindshield/removed(mob/target, silent = FALSE) + . = ..() + if(. && target.stat != DEAD && !silent) + to_chat(target, span_boldnotice("Your mind softens. You feel susceptible to the effects of brainwashing once more.")) + + +/obj/item/implanter/mindshield + name = "bio-chip implanter (mindshield)" + imp = /obj/item/implant/mindshield /obj/item/implantcase/mindshield - name = "implant case - 'mindshield'" - desc = "A glass case containing a mindshield implant." + name = "bio-chip case - 'mindshield'" + desc = "A glass case containing a mindshield bio-chip." + imp = /obj/item/implant/mindshield -/obj/item/implantcase/mindshield/New() - imp = new /obj/item/implant/mindshield(src) - ..() +/** + * ERT mindshield + */ /obj/item/implant/mindshield/ert - name = "ERT mindshield implant" - desc = "Защищает ваш разум и предоставляет доступ к продвинутому боевому оборудованию НТ" + name = "ERT-mindshield bio-chip" + desc = "Stops people messing with your mind and allows to use some high-tech weapons." + implant_data = /datum/implant_fluff/mindshield/ert + /obj/item/implanter/mindshield/ert - name = "implanter (ERT mindshield)" + name = "bio-chip implanter (ERT-mindshield)" + imp = /obj/item/implant/mindshield/ert + -/obj/item/implanter/mindshield/ert/New() - imp = new /obj/item/implant/mindshield/ert(src) - ..() - update_icon() +/obj/item/implantcase/mindshield/ert + name = "bio-chip case - 'ERT-mindshield'" + desc = "A glass case containing an ERT mindshield bio-chip." + imp = /obj/item/implant/mindshield/ert -/obj/item/implantcase/mindshield/ert/New() - imp = new /obj/item/implant/mindshield/ert(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implant_misc.dm b/code/game/objects/items/weapons/implants/implant_misc.dm deleted file mode 100644 index 24c5c086fb2..00000000000 --- a/code/game/objects/items/weapons/implants/implant_misc.dm +++ /dev/null @@ -1,93 +0,0 @@ -/obj/item/implant/weapons_auth - name = "firearms authentication implant" - desc = "Lets you shoot your guns" - icon_state = "auth" - origin_tech = "magnets=2;programming=7;biotech=5;syndicate=5" - activated = 0 - -/obj/item/implant/weapons_auth/get_data() - var/dat = {"Implant Specifications:
- Name: Firearms Authentication Implant
- Life: 4 hours after death of host
- Implant Details:
- Function: Allows operation of implant-locked weaponry, preventing equipment from falling into enemy hands."} - return dat - - -/obj/item/implant/adrenalin - name = "adrenal implant" - desc = "Removes all stuns and knockdowns." - icon_state = "adrenal" - origin_tech = "materials=2;biotech=4;combat=3;syndicate=2" - uses = 3 - -/obj/item/implant/adrenalin/get_data() - var/dat = {"Implant Specifications:
- Name: Cybersun Industries Adrenaline Implant
- Life: Five days.
- Important Notes: Illegal
-
- Implant Details: Subjects injected with implant can activate an injection of medical cocktails.
- Function: Removes stuns, increases speed, and has a mild healing effect.
- Integrity: Implant can only be used three times before reserves are depleted."} - return dat - -/obj/item/implant/adrenalin/activate() - uses-- - to_chat(imp_in, "You feel a sudden surge of energy!") - imp_in.SetStunned(0) - imp_in.SetWeakened(0) - imp_in.SetParalysis(0) - imp_in.adjustStaminaLoss(-100) - imp_in.lying = 0 - imp_in.update_canmove() - - imp_in.reagents.add_reagent("synaptizine", 10) - imp_in.reagents.add_reagent("omnizine", 10) - imp_in.reagents.add_reagent("stimulative_agent", 10) - imp_in.reagents.add_reagent("adrenaline", 2) - if(!uses) - qdel(src) - - -/obj/item/implant/supercharge - name = "supercharge bio-chip" - desc = "Removes all stuns and knockdowns." - icon_state = "adrenal" - origin_tech = "materials=3;combat=5;syndicate=2" - uses = 3 - -/obj/item/implant/supercharge/activate() - uses-- - to_chat(imp_in, "You feel an electric sensation as your components enter overdrive!") - imp_in.SetStunned(0) - imp_in.SetWeakened(0) - imp_in.SetParalysis(0) - imp_in.adjustStaminaLoss(-100) - imp_in.lying = 0 - imp_in.update_canmove() - - imp_in.reagents.add_reagent("surge_plus", 10) - imp_in.reagents.add_reagent("liquid_solder", 10) - imp_in.reagents.add_reagent("combatlube", 10) - if(!uses) - qdel(src) - - -/obj/item/implant/emp - name = "emp implant" - desc = "Triggers an EMP." - icon_state = "emp" - origin_tech = "biotech=3;magnets=4;syndicate=1" - uses = 2 - -/obj/item/implant/emp/activate() - uses-- - empulse(imp_in, 3, 5, TRUE, name) - if(!uses) - qdel(src) - -/obj/item/implant/cortical - name = "cortical stack" - desc = "A fist-sized mass of biocircuits and chips." - icon_state = "implant_evil" diff --git a/code/game/objects/items/weapons/implants/implant_sad_trombone.dm b/code/game/objects/items/weapons/implants/implant_sad_trombone.dm new file mode 100644 index 00000000000..097324fe1ce --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_sad_trombone.dm @@ -0,0 +1,32 @@ +/obj/item/implant/sad_trombone + name = "sad trombone bio-chip" + activated = BIOCHIP_ACTIVATED_PASSIVE + trigger_emotes = list("deathgasp") + // If something forces the clown to fake death, it's pretty funny to still see the sad trombone played + trigger_causes = BIOCHIP_EMOTE_TRIGGER_UNINTENTIONAL|BIOCHIP_TRIGGER_DEATH_ANY + implant_data = /datum/implant_fluff/sad_trombone + implant_state = "implant-honk" + + +/obj/item/implant/sad_trombone/emote_trigger(emote, mob/source, force) + activate(emote) + + +/obj/item/implant/sad_trombone/death_trigger(mob/user, gibbed) + activate(gibbed) + + +/obj/item/implant/sad_trombone/activate() + playsound(loc, 'sound/misc/sadtrombone.ogg', 50, FALSE) + + +/obj/item/implanter/sad_trombone + name = "bio-chip implanter (sad trombone)" + imp = /obj/item/implant/sad_trombone + + +/obj/item/implantcase/sad_trombone + name = "bio-chip case - 'Sad Trombone'" + desc = "A glass case containing a sad trombone bio-chip." + imp = /obj/item/implant/sad_trombone + diff --git a/code/game/objects/items/weapons/implants/implant_stealth.dm b/code/game/objects/items/weapons/implants/implant_stealth.dm index cd371d67502..2ade57d2f36 100644 --- a/code/game/objects/items/weapons/implants/implant_stealth.dm +++ b/code/game/objects/items/weapons/implants/implant_stealth.dm @@ -1,97 +1,209 @@ +/** + * # Stealth Implant + * + * Implant which allows you to summon an MGS-style cardboard box that turns you invisble after a short delay. + */ +/obj/item/implant/stealth + name = "S3 bio-chip" + desc = "Allows you to be hidden in plain sight." + implant_state = "implant-syndicate" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/stealth + actions_types = list(/datum/action/item_action/agent_box) + + +/obj/item/implant/stealth/update_button(datum/action/action) + return + /obj/item/implanter/stealth - name = "implanter (stealth)" + name = "bio-chip implanter (stealth box)" + imp = /obj/item/implant/stealth -/obj/item/implanter/stealth/New() - imp = new /obj/item/implant/agent_box(src) - ..() /obj/item/implantcase/stealth - name = "implant case - 'Stealth Box'" - desc = "A glass case containing a stealth box implant." + name = "implant case - 'Stealth Box'" + desc = "A glass case containing a stealth box implant." + imp = /obj/item/implant/stealth -/obj/item/implantcase/stealth/New() - imp = new /obj/item/implant/agent_box(src) - ..() -/obj/item/implant/agent_box +/datum/action/item_action/agent_box name = "Deploy Box" desc = "Find inner peace, here, in the box." - icon_state = "deploy_box" - item_color = "r" - origin_tech = "materials=6;bluespace=4;magnets=4;syndicate=2" - // type of box this spawns - var/boxtype = /obj/structure/closet/cardboard/agent - COOLDOWN_DECLARE(box_cooldown) - -/obj/item/implant/agent_box/activate() - if(imp_in.IsParalyzed() || imp_in.IsStunned() || imp_in.IsWeakened() || imp_in.restrained()) - return - if(istype(imp_in.loc, /obj/structure/closet/cardboard/agent)) - var/obj/structure/closet/cardboard/agent/box = imp_in.loc - if(box.open()) - imp_in.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE) - return - //Box closing from here on out. - if(!isturf(imp_in.loc)) //Don't let the player use this to escape mechs/welded closets. - to_chat(imp_in, span_warning("You need more space to activate this implant!")) - return - if(!COOLDOWN_FINISHED(src, box_cooldown)) - return - COOLDOWN_START(src, box_cooldown, 10 SECONDS) - var/box = new boxtype(imp_in.drop_location()) - imp_in.forceMove(box) - imp_in.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE) - -// the box. + background_icon_state = "bg_agent" + button_icon_state = "deploy_box" + check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_STUNNED|AB_CHECK_RESTRAINED|AB_CHECK_LYING + use_itemicon = FALSE + /// If TRUE, the box can't be deployed + var/on_cooldown = FALSE + + +/datum/action/item_action/agent_box/Trigger(left_click = TRUE) + . = ..() + if(!.) + return FALSE + if(istype(owner.loc, /obj/structure/closet/cardboard/agent)) + var/obj/structure/closet/cardboard/agent/box = owner.loc + if(box.open()) + owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE) + recall_box_animation() + return + // Box closing from here on out. + if(!isturf(owner.loc)) //Don't let the player use this to escape mechs/welded closets. + to_chat(owner, span_warning("You need more space to activate this implant!")) + return + owner.playsound_local(owner, 'sound/misc/box_deploy.ogg', 50, TRUE) + spawn_box() + + +/datum/action/item_action/agent_box/proc/spawn_box() + // Do the box's fade in spawn animation with an image so it follows the owner. + var/image/fake_box = image('icons/obj/cardboard_boxes.dmi', owner, "agentbox", ABOVE_MOB_LAYER) + owner.flick_overlay_view(fake_box, 0.4 SECONDS) + fake_box.alpha = 0 + fake_box.pixel_z = 30 + animate(fake_box, pixel_z = fake_box.pixel_z - 30, alpha = fake_box.alpha + 255, time = 3, loop = 1) + sleep(3) + + // Spawn the actual box + var/obj/structure/closet/cardboard/agent/box = new(get_turf(owner), owner) + box.implant_user_UID = owner.UID() + // Slightly shorter time since we needed 0.3s to to do the spawn animation. + INVOKE_ASYNC(box, TYPE_PROC_REF(/obj/structure/closet/cardboard/agent, go_invisible), 1.7 SECONDS) + box.create_fake_box() + owner.forceMove(box) + RegisterSignal(box, COMSIG_PARENT_QDELETING, PROC_REF(start_cooldown)) + + +/datum/action/item_action/agent_box/proc/start_cooldown(datum/source) + SIGNAL_HANDLER + on_cooldown = TRUE + addtimer(CALLBACK(src, PROC_REF(end_cooldown)), 10 SECONDS) + UpdateButtonIcon() + + +/datum/action/item_action/agent_box/proc/end_cooldown() + on_cooldown = FALSE + UpdateButtonIcon() + + +/datum/action/item_action/agent_box/proc/recall_box_animation() + var/image/fake_box = image('icons/obj/cardboard_boxes.dmi', owner, "agentbox", ABOVE_MOB_LAYER) + owner.flick_overlay_view(fake_box, 0.4 SECONDS) + animate(fake_box, pixel_z = fake_box.pixel_z + 30, alpha = fake_box.alpha - 255, time = 3, loop = 1) + + +/datum/action/item_action/agent_box/IsAvailable() + if(..() && !on_cooldown) + return TRUE + return FALSE + + +/datum/action/item_action/agent_box/Grant(mob/grant_to) + . = ..() + if(owner) + RegisterSignal(owner, COMSIG_HUMAN_SUICIDE_ACT, PROC_REF(suicide_act)) + + +/datum/action/item_action/agent_box/Remove(mob/M) + if(owner) + UnregisterSignal(owner, COMSIG_HUMAN_SUICIDE_ACT) + return ..() + + +/datum/action/item_action/agent_box/proc/suicide_act(datum/source) + SIGNAL_HANDLER + + if(!istype(owner.loc, /obj/structure/closet/cardboard/agent)) + return + var/obj/structure/closet/cardboard/agent/box = owner.loc + owner.visible_message(span_suicide("[owner] falls out of [box]! It looks like [owner.p_they()] committed suicide!")) + owner.playsound_local(box, 'sound/misc/box_deploy.ogg', 50, TRUE) + INVOKE_ASYNC(box, TYPE_PROC_REF(/obj/structure/closet/cardboard/agent, open)) + INVOKE_ASYNC(owner, TYPE_PROC_REF(/atom/movable, throw_at), get_turf(owner)) + return OXYLOSS + + +/** + * Stealth implant box + */ /obj/structure/closet/cardboard/agent name = "inconspicious box" desc = "It's so normal that you didn't notice it before." icon_state = "agentbox" max_integrity = 1 + move_speed_multiplier = 0.5 // You can move at run speed while in this box. material_drop = null + /// UID of the person who summoned this box with an implant. + var/implant_user_UID + // This has to be a separate object and not just an image because the image will inherit the box's 0 alpha while it is stealthed. + /// A holder effect which follows the src box so we can display an image to the person inside the box. + var/obj/effect/fake_box + /// The box image attached to the `fake_box` object. + var/image/box_img -/obj/structure/closet/cardboard/agent/Initialize(mapload) - . = ..() - go_invisible() -/obj/structure/closet/cardboard/agent/proc/go_invisible() - animate(src, alpha = 0, time = 20) +/obj/structure/closet/cardboard/agent/Destroy() + var/mob/living/implant_user = locateUID(implant_user_UID) + implant_user?.client?.images -= box_img + QDEL_NULL(fake_box) + QDEL_NULL(box_img) + return ..() + -/obj/structure/closet/cardboard/agent/after_open(mob/living/user) +/obj/structure/closet/cardboard/agent/open() . = ..() - qdel(src) + if(.) + qdel(src) + + +/obj/structure/closet/cardboard/agent/update_icon() // When the box is opened, it's deleted, so we never need to update this. + return + + +/obj/structure/closet/cardboard/agent/proc/create_fake_box() + if(fake_box) + return + fake_box = new(get_turf(src)) + fake_box.mouse_opacity = MOUSE_OPACITY_TRANSPARENT // This object should be completely invisible. + box_img = image(icon, fake_box, icon_state, ABOVE_MOB_LAYER) + box_img.alpha = 128 + RegisterSignal(src, COMSIG_MOVABLE_MOVED, PROC_REF(move_fake_box)) + var/mob/living/implant_user = locateUID(implant_user_UID) + add_image_to_client(box_img, implant_user?.client) + + +/obj/structure/closet/cardboard/agent/proc/move_fake_box(datum/source, oldloc, move_dir) + SIGNAL_HANDLER + + // For non-standard movement such as teleports. + if(!move_dir) + fake_box.loc = get_turf(src) + return + // For basic 8-directional movement. + fake_box.loc = get_step(fake_box, move_dir) + + +/obj/structure/closet/cardboard/agent/proc/go_invisible(invis_time = 2 SECONDS) + animate(src, alpha = 0, time = invis_time) + sleep(invis_time) + // This is so people can't locate the box by spamming right click everywhere. + mouse_opacity = MOUSE_OPACITY_TRANSPARENT -/obj/structure/closet/cardboard/agent/process() - alpha = max(0, alpha - 50) /obj/structure/closet/cardboard/agent/proc/reveal() alpha = 255 - addtimer(CALLBACK(src, PROC_REF(go_invisible)), 10, TIMER_OVERRIDE|TIMER_UNIQUE) + mouse_opacity = MOUSE_OPACITY_OPAQUE + addtimer(CALLBACK(src, PROC_REF(go_invisible)), 1 SECONDS, TIMER_OVERRIDE|TIMER_UNIQUE) + -/obj/structure/closet/cardboard/agent/Bump(atom/A) +/obj/structure/closet/cardboard/agent/Bump(atom/A, yes) . = ..() if(isliving(A)) reveal() + /obj/structure/closet/cardboard/agent/Bumped(atom/movable/A) . = ..() if(isliving(A)) reveal() -/obj/structure/closet/cardboard/agent/open() - if(opened || !can_open()) - return 0 - if(!egged) - var/mob/living/Snake = null - for(var/mob/living/L in src.contents) - Snake = L - break - if(Snake) - var/list/alerted = viewers(7,src) - if(alerted) - for(var/mob/living/L in alerted) - if(!L.stat) - L.do_alert_animation(L) - egged = 1 - alerted << sound('sound/misc/mgs_sound.ogg') - ..() diff --git a/code/game/objects/items/weapons/implants/implant_storage.dm b/code/game/objects/items/weapons/implants/implant_storage.dm index b530fd860fa..eb0314a2f46 100644 --- a/code/game/objects/items/weapons/implants/implant_storage.dm +++ b/code/game/objects/items/weapons/implants/implant_storage.dm @@ -1,65 +1,87 @@ -/obj/item/storage/hidden/implant - name = "bluespace pocket" - storage_slots = 2 - max_w_class = WEIGHT_CLASS_NORMAL - max_combined_w_class = WEIGHT_CLASS_GIGANTIC - w_class = WEIGHT_CLASS_BULKY - cant_hold = list(/obj/item/disk/nuclear) - silent = 1 - - /obj/item/implant/storage - name = "storage implant" + name = "storage bio-chip" desc = "Stores up to two big items in a bluespace pocket." icon_state = "storage" + implant_state = "implant-syndicate" origin_tech = "materials=2;magnets=4;bluespace=5;syndicate=4" item_color = "r" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/storage var/obj/item/storage/hidden/implant/storage -/obj/item/implant/storage/New() - ..() + +/obj/item/implant/storage/Initialize(mapload) + . = ..() storage = new /obj/item/storage/hidden/implant(src) + /obj/item/implant/storage/emp_act(severity) ..() storage.emp_act(severity) -/obj/item/implant/storage/activate() - storage.MouseDrop(imp_in) -/obj/item/implant/storage/removed(source) - if(..()) - for(var/mob/M in range(1)) - if(M.s_active == storage) - storage.close(M) - for(var/obj/item/I in storage) - storage.remove_from_storage(I, get_turf(source)) - return 1 +/obj/item/implant/storage/activate(cause) + if(!length(storage.mobs_viewing)) + storage.MouseDrop(imp_in) + else + for(var/mob/to_close in storage.mobs_viewing) + storage.close(to_close) + + +/obj/item/implant/storage/removed(mob/living/source) + . = ..() + if(!.) + return . + + for(var/mob/check in range(1)) + if(check.s_active == storage) + storage.close(check) + + for(var/obj/item/item in storage) + storage.remove_from_storage(item, drop_location()) -/obj/item/implant/storage/implant(mob/source) + +/obj/item/implant/storage/implant(mob/living/source, mob/user, force = FALSE) var/obj/item/implant/storage/imp_e = locate(src.type) in source if(imp_e) imp_e.storage.storage_slots += storage.storage_slots imp_e.storage.max_combined_w_class += storage.max_combined_w_class imp_e.storage.contents += storage.contents - for(var/mob/M in range(1)) - if(M.s_active == storage) - storage.close(M) + for(var/mob/check in range(1)) + if(check.s_active == storage) + storage.close(check) storage.show_to(source) qdel(src) - return 1 + return TRUE return ..() + /obj/item/implant/storage/proc/get_contents() //Used for swiftly returning a list of the implant's contents i.e. for checking a theft objective's completion. if(storage && storage.contents) return storage.contents + /obj/item/implanter/storage - name = "implanter (storage)" + name = "bio-chip implanter (storage)" + imp = /obj/item/implant/storage + + +/obj/item/implantcase/storage + name = "bio-chip case - 'Storage'" + desc = "A glass case containing a storage bio-chip." + imp = /obj/item/implant/storage + + +/obj/item/storage/hidden/implant + name = "bluespace pocket" + storage_slots = 2 + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = WEIGHT_CLASS_GIGANTIC + w_class = WEIGHT_CLASS_BULKY + cant_hold = list(/obj/item/disk/nuclear) + w_class_override = list(/obj/item/storage/belt) + silent = TRUE -/obj/item/implanter/storage/New() - imp = new /obj/item/implant/storage(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implant_supercharge.dm b/code/game/objects/items/weapons/implants/implant_supercharge.dm new file mode 100644 index 00000000000..b93ac33feaf --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_supercharge.dm @@ -0,0 +1,40 @@ +/obj/item/implant/supercharge + name = "supercharge bio-chip" + desc = "Removes all stuns and knockdowns." + icon_state = "adrenal" + implant_state = "implant-syndicate" + origin_tech = "materials=3;combat=5;syndicate=2" + activated = BIOCHIP_ACTIVATED_ACTIVE + uses = 3 + implant_data = /datum/implant_fluff/adrenaline + + +/obj/item/implant/supercharge/activate(cause) + uses-- + to_chat(imp_in, span_notice("You feel an electric sensation as your components enter overdrive!")) + imp_in.SetStunned(0) + imp_in.SetWeakened(0) + imp_in.SetImmobilized(0) + imp_in.SetParalysis(0) + imp_in.adjustStaminaLoss(-100) + imp_in.lying = 0 + imp_in.update_canmove() + + imp_in.reagents.add_reagent("surge_plus", 10) + imp_in.reagents.add_reagent("liquid_solder", 10) + imp_in.reagents.add_reagent("combatlube", 10) + + if(!uses) + qdel(src) + + +/obj/item/implanter/supercharge + name = "bio-chip implanter (supercharge)" + imp = /obj/item/implant/supercharge + + +/obj/item/implantcase/supercharge + name = "bio-chip case - 'supercharge'" + desc = "A glass case containing an supercharge bio-chip." + imp = /obj/item/implant/supercharge + diff --git a/code/game/objects/items/weapons/implants/implant_track.dm b/code/game/objects/items/weapons/implants/implant_track.dm deleted file mode 100644 index af37768f469..00000000000 --- a/code/game/objects/items/weapons/implants/implant_track.dm +++ /dev/null @@ -1,40 +0,0 @@ -/obj/item/implant/tracking - name = "tracking implant" - desc = "Track with this." - activated = 0 - origin_tech = "materials=2;magnets=2;programming=2;biotech=2" - var/id = 1 - - -/obj/item/implant/tracking/New() - ..() - GLOB.tracked_implants += src - -/obj/item/implant/tracking/Destroy() - GLOB.tracked_implants -= src - return ..() - -/obj/item/implant/tracking/get_data() - var/dat = {"Implant Specifications:
- Name: Tracking Beacon
- Life: 10 minutes after death of host
- Important Notes: None
-
- Implant Details:
- Function: Continuously transmits low power signal. Useful for tracking.
- Special Features:
- Neuro-Safe- Specialized shell absorbs excess voltages self-destructing the chip if - a malfunction occurs thereby securing safety of subject. The implant will melt and - disintegrate into bio-safe elements.
- Integrity: Gradient creates slight risk of being overcharged and frying the - circuitry. As a result neurotoxins can cause massive damage.
- Implant Specifics:
"} - return dat - -/obj/item/implantcase/track - name = "implant case - 'Tracking'" - desc = "A glass case containing a tracking implant." - -/obj/item/implantcase/track/New() - imp = new /obj/item/implant/tracking(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implant_tracking.dm b/code/game/objects/items/weapons/implants/implant_tracking.dm new file mode 100644 index 00000000000..bd7b1ae4fa0 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_tracking.dm @@ -0,0 +1,52 @@ +/obj/item/implant/tracking + name = "tracking bio-chip" + desc = "Track with this." + activated = BIOCHIP_ACTIVATED_PASSIVE + origin_tech = "materials=2;magnets=2;programming=2;biotech=2" + implant_data = /datum/implant_fluff/tracking + implant_state = "implant-nanotrasen" + /// Used to customize user gps tag. + var/gps_tag = "TAG0" + var/warn_cooldown = 0 + var/obj/item/gps/internal_gps = /obj/item/gps/internal/tracking_implant + + +/obj/item/implant/tracking/Initialize(mapload) + . = ..() + GLOB.tracked_implants += src + + +/obj/item/implant/tracking/Destroy() + QDEL_NULL(internal_gps) + GLOB.tracked_implants -= src + return ..() + + +/obj/item/implant/tracking/implant(mob/target) + . = ..() + if(. && ispath(internal_gps, /obj/item/gps)) + internal_gps = new internal_gps(src) + + +/obj/item/implant/tracking/removed(mob/target) + . = ..() + if(.) + QDEL_NULL(internal_gps) + internal_gps = initial(internal_gps) + + +/obj/item/gps/internal/tracking_implant + gpstag = "TRACK0" + local = FALSE + + +/obj/item/implanter/tracking + name = "bio-chip implanter (tracking)" + imp = /obj/item/implant/tracking + + +/obj/item/implantcase/tracking + name = "bio-chip case - 'Tracking'" + desc = "A glass case containing a tracking bio-chip." + imp = /obj/item/implant/tracking + diff --git a/code/game/objects/items/weapons/implants/implant_traitor.dm b/code/game/objects/items/weapons/implants/implant_traitor.dm index 8b4e5cd3956..ae542f9aecc 100644 --- a/code/game/objects/items/weapons/implants/implant_traitor.dm +++ b/code/game/objects/items/weapons/implants/implant_traitor.dm @@ -1,29 +1,17 @@ /obj/item/implant/traitor - name = "Mindslave Implant" + name = "Mindslave Bio-chip" desc = "Divide and Conquer" + implant_state = "implant-syndicate" origin_tech = "programming=5;biotech=5;syndicate=8" - actions_types = list() - activated = FALSE + activated = BIOCHIP_ACTIVATED_PASSIVE + implant_data = /datum/implant_fluff/traitor /// The UID of the mindslave's `mind`. Stored to solve GC race conditions and ensure we can remove their mindslave status even when they're deleted or gibbed. var/mindslave_UID -/obj/item/implant/traitor/get_data() - var/dat = {"Implant Specifications:
- Name: Mind-Slave Implant
- Life: ???
- Important Notes: Any humanoid injected with this implant will become loyal to the injector, unless of course the host is already loyal to someone else.
-
- Implant Details:
- Function: Contains a small pod of nanobots that manipulate the host's mental functions.
- Special Features: Diplomacy was never so easy.
- Integrity: Implant will last so long as the nanobots are inside the bloodstream."} - return dat - - -/obj/item/implant/traitor/implant(mob/living/carbon/human/mindslave_target, mob/living/carbon/human/user) - // Check `activated` here so you can't just keep taking it out and putting it back into other people. - if(activated || !istype(mindslave_target) || !istype(user)) // Both the target and the user need to be human. +/obj/item/implant/traitor/implant(mob/living/carbon/human/mindslave_target, mob/living/carbon/human/user, force = FALSE) + // Check `implanted` here so you can't just keep taking it out and putting it back into other people. + if(implanted == BIOCHIP_USED || !ishuman(mindslave_target) || !ishuman(user)) // Both the target and the user need to be human. return FALSE // If the target is catatonic or doesn't have a mind, don't let them use it @@ -34,11 +22,13 @@ // Fails if they're already a mindslave of someone, or if they're mindshielded. if(ismindslave(mindslave_target) || ismindshielded(mindslave_target) || isvampirethrall(mindslave_target)) mindslave_target.visible_message( - span_warning("[mindslave_target] seems to resist the bio-chip!"), \ - span_warning("You feel a strange sensation in your head that quickly dissipates.")) + span_warning("[mindslave_target] seems to resist the bio-chip!"), + span_warning("You feel a strange sensation in your head that quickly dissipates."), + ) qdel(src) return FALSE + // Mindslaving yourself. if(mindslave_target == user) to_chat(user, span_notice("Making yourself loyal to yourself was a great idea! Perhaps even the best idea ever! Actually, you just feel like an idiot.")) user.adjustBrainLoss(20) @@ -50,12 +40,23 @@ slave_datum.special = TRUE mindslave_target.mind.add_antag_datum(slave_datum) mindslave_UID = mindslave_target.mind.UID() - activated = TRUE log_admin("[key_name_admin(user)] has mind-slaved [key_name_admin(mindslave_target)].") return ..() /obj/item/implant/traitor/removed(mob/target) . = ..() - var/datum/mind/M = locateUID(mindslave_UID) - M.remove_antag_datum(/datum/antagonist/mindslave) + var/datum/mind/the_slave = locateUID(mindslave_UID) + the_slave?.remove_antag_datum(/datum/antagonist/mindslave) + + +/obj/item/implanter/traitor + name = "bio-chip implanter (Mindslave)" + imp = /obj/item/implant/traitor + + +/obj/item/implantcase/traitor + name = "bio-chip case - 'Mindslave'" + desc = "A glass case containing a mindslave bio-chip." + imp = /obj/item/implant/traitor + diff --git a/code/game/objects/items/weapons/implants/implant_uplink.dm b/code/game/objects/items/weapons/implants/implant_uplink.dm new file mode 100644 index 00000000000..4a863e20354 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_uplink.dm @@ -0,0 +1,68 @@ +/obj/item/implant/uplink + name = "uplink bio-chip" + desc = "Summons things." + icon = 'icons/obj/radio.dmi' + icon_state = "radio" + implant_state = "implant-syndicate" + origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5" + activated = BIOCHIP_ACTIVATED_ACTIVE + implant_data = /datum/implant_fluff/uplink + + +/obj/item/implant/uplink/Initialize(mapload) + . = ..() + hidden_uplink = new(src) + hidden_uplink.uses = 50 + + +/obj/item/implant/uplink/sit/Initialize(mapload) + . = ..() + hidden_uplink?.update_uplink_type(UPLINK_TYPE_SIT) + + +/obj/item/implant/uplink/nuclear/Initialize(mapload) + . = ..() + hidden_uplink?.update_uplink_type(UPLINK_TYPE_NUCLEAR) + + +/obj/item/implant/uplink/admin/Initialize(mapload) + . = ..() + hidden_uplink?.update_uplink_type(UPLINK_TYPE_ADMIN) + + +/obj/item/implant/uplink/implant(mob/living/carbon/human/source, mob/user, force = FALSE) + var/obj/item/implant/imp_e = locate(type) in source + if(imp_e && imp_e != src) + imp_e.hidden_uplink.uses += hidden_uplink.uses + qdel(src) + return TRUE + if(..()) + hidden_uplink.uplink_owner= "[source.key]" + return TRUE + return FALSE + + +/obj/item/implant/uplink/activate(cause) + hidden_uplink?.check_trigger(imp_in) + + +/obj/item/implanter/uplink + name = "bio-chip implanter (uplink)" + imp = /obj/item/implant/uplink + + +/obj/item/implantcase/uplink + name = "bio-chip case - 'Syndicate Uplink'" + desc = "A glass case containing an uplink bio-chip." + imp = /obj/item/implant/uplink + + +/obj/item/implanter/nuclear + name = "bio-chip implanter (Nuclear Agent Uplink)" + imp = /obj/item/implant/uplink/nuclear + + +/obj/item/implantcase/nuclear + name = "bio-chip case - 'Nuclear Agent Uplink'" + imp = /obj/item/implant/uplink/nuclear + diff --git a/code/game/objects/items/weapons/implants/implant_weapon_auth.dm b/code/game/objects/items/weapons/implants/implant_weapon_auth.dm new file mode 100644 index 00000000000..e7e6622ca7c --- /dev/null +++ b/code/game/objects/items/weapons/implants/implant_weapon_auth.dm @@ -0,0 +1,19 @@ +/obj/item/implant/weapons_auth + name = "firearms authentication bio-chip" + desc = "Lets you shoot your guns." + origin_tech = "magnets=2;programming=7;biotech=5;syndicate=5" + implant_state = "implant-syndicate" + activated = BIOCHIP_ACTIVATED_PASSIVE + implant_data = /datum/implant_fluff/weapons_auth + + +/obj/item/implanter/weapons_auth + name = "bio-chip implanter (firearms authentication)" + imp = /obj/item/implant/weapons_auth + + +/obj/item/implantcase/weapons_auth + name = "bio-chip case - 'Firearms Authentication'" + desc = "A glass case containing a weapon firearms authentication bio-chip." + imp = /obj/item/implant/weapons_auth + diff --git a/code/game/objects/items/weapons/implants/implantcase.dm b/code/game/objects/items/weapons/implants/implantcase.dm index 22605c8f2ec..5c50ffdd780 100644 --- a/code/game/objects/items/weapons/implants/implantcase.dm +++ b/code/game/objects/items/weapons/implants/implantcase.dm @@ -1,102 +1,73 @@ /obj/item/implantcase - name = "implant case" - desc = "A glass case containing an implant." - icon = 'icons/obj/items.dmi' - icon_state = "implantcase-0" + name = "bio-chip case" + desc = "A glass case containing a bio-chip." + icon = 'icons/obj/implants.dmi' + icon_state = "implantcase" item_state = "implantcase" throw_speed = 2 throw_range = 5 w_class = WEIGHT_CLASS_TINY origin_tech = "materials=1;biotech=2" - container_type = OPENCONTAINER | INJECTABLE | DRAWABLE - materials = list(MAT_GLASS=500) - var/obj/item/implant/imp = null + container_type = OPENCONTAINER|INJECTABLE|DRAWABLE + materials = list(MAT_GLASS = 500) + /// Path thats will be transformed into object on Initialize() + var/obj/item/implant/imp -/obj/item/implantcase/update_icon() +/obj/item/implantcase/Initialize(mapload) + . = ..() + if(ispath(imp, /obj/item/implant)) + imp = new imp(src) + update_state() + + +/obj/item/implantcase/Destroy() + if(imp) + QDEL_NULL(imp) + return ..() + + +/obj/item/implantcase/proc/update_state() if(imp) - icon_state = "implantcase-[imp.item_color]" origin_tech = imp.origin_tech flags = imp.flags & ~DROPDEL reagents = imp.reagents else - icon_state = "implantcase-0" origin_tech = initial(origin_tech) flags = initial(flags) reagents = null + update_icon() -/obj/item/implantcase/attackby(obj/item/W, mob/user, params) +/obj/item/implantcase/update_icon() ..() - if(istype(W, /obj/item/pen)) - rename_interactive(user, W) - else if(istype(W, /obj/item/implanter)) - var/obj/item/implanter/I = W - if(I.imp) - if(imp || I.imp.implanted) + cut_overlays() + if(imp) + var/image/implant_overlay = image('icons/obj/implants.dmi', imp.implant_state) + add_overlay(implant_overlay) + + +/obj/item/implantcase/attackby(obj/item/I, mob/user) + if(is_pen(I)) + rename_interactive(user, I) + else if(istype(I, /obj/item/implanter)) + var/obj/item/implanter/implater = I + if(implater.imp) + if(imp || implater.imp.implanted) return - I.imp.loc = src - imp = I.imp - I.imp = null - update_icon() - I.update_icon() + implater.imp.forceMove(src) + imp = implater.imp + implater.imp = null + implater.update_icon() else if(imp) - if(I.imp) + if(implater.imp) return - imp.loc = I - I.imp = imp + imp.forceMove(implater) + implater.imp = imp imp = null - update_icon() - I.update_icon() - - /*else if(istype(W, /obj/item/ammo_casing/shotgun/implanter)) - var/obj/item/ammo_casing/shotgun/implanter/I = W - if(I.implanter) - src.attackby(I.implanter, user, params) */ // COMING SOON -- c0 - -/obj/item/implantcase/New() - ..() - update_icon() - - -/obj/item/implantcase/tracking - name = "implant case - 'Tracking'" - desc = "A glass case containing a tracking implant." - -/obj/item/implantcase/tracking/New() - imp = new /obj/item/implant/tracking(src) - ..() - - -/obj/item/implantcase/weapons_auth - name = "implant case - 'Firearms Authentication'" - desc = "A glass case containing a firearms authentication implant." - -/obj/item/implantcase/weapons_auth/New() - imp = new /obj/item/implant/weapons_auth(src) - ..() - -/obj/item/implantcase/adrenaline - name = "implant case - 'Adrenaline'" - desc = "A glass case containing an adrenaline implant." - -/obj/item/implantcase/adrenaline/New() - imp = new /obj/item/implant/adrenalin(src) - ..() - -/obj/item/implantcase/supercharge - name = "implant case - 'Supercharge'" - desc = "A glass case containing a supercharge implant." - -/obj/item/implantcase/supercharge/New() - imp = new /obj/item/implant/supercharge(src) - ..() - -/obj/item/implantcase/death_alarm - name = "Glass Case- 'Death Alarm'" - desc = "A case containing a death alarm implant." + implater.update_icon() + update_state() + else + return ..() -/obj/item/implantcase/death_alarm/New() - imp = new /obj/item/implant/death_alarm(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implantchair.dm b/code/game/objects/items/weapons/implants/implantchair.dm index 0406a146aff..63de271a625 100644 --- a/code/game/objects/items/weapons/implants/implantchair.dm +++ b/code/game/objects/items/weapons/implants/implantchair.dm @@ -3,151 +3,195 @@ desc = "Used to implant occupants with mindshield implants." icon = 'icons/obj/machines/implantchair.dmi' icon_state = "implantchair" - density = 1 - opacity = 0 - anchored = 1 - - var/ready = 1 - var/malfunction = 0 - var/list/obj/item/implant/mindshield/implant_list = list() + density = TRUE + anchored = TRUE var/max_implants = 5 - var/injection_cooldown = 600 - var/replenish_cooldown = 6000 - var/replenishing = 0 - var/mob/living/carbon/occupant = null - var/injecting = 0 - -/obj/machinery/implantchair/New() - ..() + var/injection_cooldown = 30 SECONDS + var/replenish_cooldown = 10 MINUTES + var/cooldown_timer + var/list/implants_list + var/mob/living/carbon/human/occupant + + +/obj/machinery/implantchair/Initialize(mapload) + . = ..() add_implants() +/obj/machinery/implantchair/Destroy() + if(occupant) + go_out() + return ..() + + +/obj/machinery/implantchair/proc/add_implants() + LAZYINITLIST(implants_list) + var/imps_amount = max_implants - LAZYLEN(implants_list) + if(imps_amount) + for(var/i in 1 to imps_amount) + var/obj/item/implant/mindshield/bio_chip = new(src) + LAZYADD(implants_list, bio_chip) + + +/obj/machinery/implantchair/update_icon() + . = ..() + if(occupant) + icon_state = "implantchair_on" + else + icon_state = "implantchair" + + /obj/machinery/implantchair/attack_hand(mob/user) add_fingerprint(user) user.set_machine(src) var/health_text = "" - if(src.occupant) - if(src.occupant.health <= -100) + if(occupant) + if(occupant.stat == DEAD) health_text = "Dead" - else if(src.occupant.health < 0) - health_text = "[round(src.occupant.health,0.1)]" + else if(occupant.health < 0) + health_text = "[round(occupant.health, 0.1)]" else - health_text = "[round(src.occupant.health,0.1)]" - - var/dat = {"Implanter Status
"} - - dat +="Current occupant: [src.occupant ? "
Name: [src.occupant]
Health: [health_text]
" : "None"]
" - dat += "Implants: [src.implant_list.len ? "[implant_list.len]" : "Replenish"]
" - if(src.occupant) - dat += "[src.ready ? "Implant" : "Recharging"]
" + health_text = "[round(occupant.health, 0.1)]" + var/dat = {"Mindshield Implanter Machine
"} + dat +="Current occupant: [occupant ? "
Name: [occupant]
Health: [health_text]
" : "None"]
" + var/remaining_time = cooldown_timer ? round(timeleft(cooldown_timer) / 10) : 0 + var/implants_length = LAZYLEN(implants_list) + if(implants_length) + dat += "Status: [cooldown_timer ? "Recharging... For [remaining_time] more seconds
" : "READY"]
" + else + dat += "Status: [cooldown_timer ? "Replenishing... For [remaining_time] more seconds
" : "READY"]
" + dat += "Implants: [implants_length ? "[implants_length]
" : cooldown_timer ? "0
" : "Replenish"]
" + if(occupant) + if(locate(/obj/item/implant/mindshield) in occupant) + dat += "Occupant is already implanted
" + if(!cooldown_timer && implants_length) + dat += "Implant
" + dat += "Eject Occupant
" + dat += "Refresh" user.set_machine(src) user << browse(dat, "window=implant") onclose(user, "implant") +/obj/machinery/implantchair/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/grab)) + var/obj/item/grab/grab = I + if(put_mob(grab.affecting, user)) + qdel(grab) + else + return ..() + + /obj/machinery/implantchair/Topic(href, href_list) if(..()) return - if(href_list["implant"]) - if(src.occupant) - injecting = 1 - go_out() - ready = 0 - spawn(injection_cooldown) - ready = 1 - - if(href_list["replenish"]) - ready = 0 - spawn(replenish_cooldown) - add_implants() - ready = 1 - - src.updateUsrDialog() - return - - -/obj/machinery/implantchair/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/grab)) - var/obj/item/grab/G = W - if(!ismob(G.affecting)) - return - var/mob/M = G.affecting - if(M.has_buckled_mobs()) - to_chat(user, "[M] will not fit into [src] because [M.p_they()] [M.p_have()] a slime latched onto [M.p_their()] head.") - return - if(put_mob(M)) - qdel(G) - add_fingerprint(user) - src.updateUsrDialog() - return + if(href_list["implant"] && occupant && (!cooldown_timer) && LAZYLEN(implants_list)) + var/prev_occupant = occupant + if(go_out(usr)) + implant(prev_occupant) + cooldown_timer = addtimer(CALLBACK(src, PROC_REF(on_cooldown_finish)), injection_cooldown, TIMER_STOPPABLE|TIMER_DELETE_ME) -/obj/machinery/implantchair/proc/go_out(mob/M) - if(!( src.occupant )) - return - if(M == occupant) // so that the guy inside can't eject himself -Agouri - return - occupant.forceMove(loc) - if(injecting) - implant(src.occupant) - injecting = 0 - src.occupant = null - icon_state = "implantchair" - return + if(href_list["replenish"] && (!cooldown_timer) && (!LAZYLEN(implants_list))) + cooldown_timer = addtimer(CALLBACK(src, PROC_REF(on_cooldown_finish), TRUE), replenish_cooldown, TIMER_STOPPABLE|TIMER_DELETE_ME) + if(href_list["eject"] && occupant) + go_out(usr) -/obj/machinery/implantchair/proc/put_mob(mob/living/carbon/M) - if(!iscarbon(M)) - to_chat(usr, "The [src.name] cannot hold this!") - return - if(src.occupant) - to_chat(usr, "The [src.name] is already occupied!") - return - M.stop_pulling() - M.forceMove(src) - src.occupant = M - src.add_fingerprint(usr) - icon_state = "implantchair_on" - return 1 + updateUsrDialog() -/obj/machinery/implantchair/proc/implant(mob/M) - if(!istype(M, /mob/living/carbon)) - return - if(!implant_list.len) return - for(var/obj/item/implant/mindshield/imp in implant_list) - if(!imp) continue - if(istype(imp, /obj/item/implant/mindshield)) - M.visible_message("[M] has been implanted by the [src.name].") +/obj/machinery/implantchair/proc/on_cooldown_finish(replenish = FALSE) + playsound(loc, 'sound/machines/ping.ogg', 50, TRUE) + visible_message(span_notice("[src] is ready to implant.")) + if(replenish) + add_implants() + cooldown_timer = null + updateUsrDialog() - if(imp.implant(M)) - implant_list -= imp - break - return +/obj/machinery/implantchair/proc/implant(mob/living/carbon/human/target) + if(!ishuman(target)) + return FALSE + if(!LAZYLEN(implants_list)) + return FALSE + for(var/obj/item/implant/mindshield/imp as anything in implants_list) + if(imp.implant(target)) + playsound(loc, 'sound/machines/ding.ogg', 50, TRUE) + target.visible_message(span_warning("[target] has been implanted by [src].")) + LAZYREMOVE(implants_list, imp) + return TRUE + return FALSE + + +/obj/machinery/implantchair/MouseDrop_T(mob/living/carbon/human/dropping, mob/living/user) + return put_mob(dropping, user) + + +/obj/machinery/implantchair/proc/put_mob(mob/living/carbon/human/target, mob/living/user) + if(!put_mob_check(target, user)) + return FALSE + target.stop_pulling() + target.pulledby?.stop_pulling() + target.forceMove(src) + occupant = target + add_fingerprint(user) + update_icon() + updateUsrDialog() + return TRUE + + +/obj/machinery/implantchair/proc/put_mob_check(mob/living/carbon/human/target, mob/living/user) + if(stat & (NOPOWER|BROKEN)) + return FALSE + if(target == user && !Adjacent(target)) + return FALSE + if(target != user && (!Adjacent(user) && !user.Adjacent(target))) + return FALSE + if(!isliving(user) || user.incapacitated()) + return FALSE + if(!ishuman(target)) + to_chat(user, span_warning("[src] cannot hold this!")) + return FALSE + if(occupant) + to_chat(user, span_warning("[src] is already occupied!")) + return FALSE + if(target.buckled) + to_chat(user, span_warning("Subject cannot be buckled.")) + return FALSE + if(target.abiotic()) + to_chat(user, span_warning("Subject cannot have abiotic items on.")) + return FALSE + if(target.has_buckled_mobs()) + to_chat(user, span_warning("Subject will not fit into [src] because [target.p_they()] [target.p_have()] a slime latched onto [target.p_their()] head.")) + return FALSE + return TRUE + + +/obj/machinery/implantchair/proc/go_out(mob/living/carbon/human/user) + if(!occupant) + return FALSE + if(occupant == user) // so that the guy inside can't eject himself -Agouri + return FALSE + if(user && (!ishuman(user) || user.incapacitated())) + return FALSE + occupant.forceMove(loc) + add_fingerprint(user) + occupant = null + update_icon() + return TRUE -/obj/machinery/implantchair/proc/add_implants() - for(var/i=0, i[user] is attemping to implant [M].
") - - var/turf/T = get_turf(M) - if(T && (M == user || do_after(user, 50 * toolspeed * gettoolspeedmod(user), target = M))) - if(user && M && (get_turf(M) == T) && src && imp) - if(imp.implant(M, user)) - if(M == user) - to_chat(user, "You implant yourself.") - else - M.visible_message("[user] has implanted [M].", "[user] implants you.") - imp = null - update_icon() - -/obj/item/implanter/attackby(obj/item/W, mob/user, params) - ..() - if(istype(W, /obj/item/pen)) - rename_interactive(user, W) - -/obj/item/implanter/New() - ..() - spawn(1) - update_icon() - - -/obj/item/implanter/adrenalin - name = "implanter (adrenalin)" - -/obj/item/implanter/adrenalin/New() - imp = new /obj/item/implant/adrenalin(src) - ..() - - -/obj/item/implanter/supercharge - name = "implanter (supercharge)" - -/obj/item/implanter/supercharge/New() - imp = new /obj/item/implant/supercharge(src) - ..() - - -/obj/item/implanter/emp - name = "implanter (EMP)" - -/obj/item/implanter/emp/New() - imp = new /obj/item/implant/emp(src) - ..() - -/obj/item/implanter/traitor - name = "implanter (Mindslave)" - -/obj/item/implanter/traitor/New() - imp = new /obj/item/implant/traitor(src) - ..() - -/obj/item/implanter/death_alarm - name = "implanter (Death Alarm)" + if(target != user) + target.visible_message(span_warning("[user] is attempting to bio-chip [target].")) + + var/turf/target_turf = get_turf(target) + if(target_turf && (target == user || do_after(user, 5 SECONDS * toolspeed * gettoolspeedmod(user), target = target))) + if(!QDELETED(user) && !QDELETED(target) && !QDELETED(src) && !QDELETED(imp) && get_turf(target) == target_turf && imp.implant(target, user)) + if(user == target) + to_chat(user, span_notice("You bio-chip yourself.")) + else + target.visible_message("[user] has implanted [target].", span_notice("[user] bio-chips you.")) + imp = null + update_icon() + + +/obj/item/implanter/attackby(obj/item/I, mob/user, params) + if(is_pen(I)) + rename_interactive(user, I) + else + return ..() -/obj/item/implanter/death_alarm/New() - imp = new /obj/item/implant/death_alarm(src) - ..() diff --git a/code/game/objects/items/weapons/implants/implantfluff.dm b/code/game/objects/items/weapons/implants/implantfluff.dm new file mode 100644 index 00000000000..b1d2510e9b2 --- /dev/null +++ b/code/game/objects/items/weapons/implants/implantfluff.dm @@ -0,0 +1,177 @@ + +/** + * # Bio-chip Fluff Datum + * + * Bio-chip fluff is just lore about the bio-chip that is accessed through the implantpad, you must attach + * one of these datums to the implant_data var on a bio-chip for it to show it up. + */ +/datum/implant_fluff + var/name = "Unknown bio-chip" + var/life = "Not Specified." + var/notes = "No Notes." + var/function = "An electronic insert that supplements biological functions." + + +/datum/implant_fluff/abductor + name = "GC$X9%D#G" + life = "Unknown." + notes = "Appears to contain highly advanced bluespace technology." + + +/datum/implant_fluff/adrenaline + name = "Cybersun Industries RX-2 Adrenaline Bio-chip" + life = "Five days." + notes = "One of Cybersun Industries oldest and simplest implants, even in its simplicity it is rumoured to be one of Cybersun Industries best-selling products." + function = "Subjects injected with this bio-chip can activate an injection of medical cocktails that removes stuns, increases speed, and has mild healing effects." + + +/datum/implant_fluff/supercharge + name = "Cybersun Industries RX-4 Synthetic Supercharge Bio-chip" + life = "Known to last for up to a year." + notes = "One of Cybersun Industries simplest implants, it's rumored that synthetic rights groups maintain stockpiles of these." + function = "Synthetic subjects injected with this bio-chip can activate an injection of lubricants, coolants, and positronic patching fluid." + + +/datum/implant_fluff/chem + name = "BioTech Solutions MJ-420 Prisoner Management Bio-chip" //ah yes, MJ-420, old coders are FUNNY + life = "Deactivates upon death but remains within the body." + notes = "Can be loaded with any sort of chemical agent via the common syringe and can hold 50 units. Can only be loaded while still in its original case." + function = "Contains a small capsule that can contain various chemicals. Upon receiving a specially encoded signal the bio-chip releases the chemicals directly into the blood stream." + + +/datum/implant_fluff/death_alarm + name = "BioTech Solutions MJ-102 Death Alarm Bio-chip" + notes = "Alerts crew to crewmember death." + function = "Contains a compact radio signaler that triggers when the host's lifesigns cease." + + +/datum/implant_fluff/dust + name = "Nanotrasen Employee Dust Bio-chip" + life = "Unknown, attempts to retrieve a sample of the bio-chip have often led to the destruction of the bio-chip... and user." + notes = "Activates upon death or from manual activation by the user." + function = "Contains a compact, electrically activated heat source that turns its host to ash upon activation, or their death." + + +/datum/implant_fluff/emp + name = "Cybersun Industries RX-22 Electromagnetic Pulse Emitter Bio-chip" + life = "Destroyed upon final activation." + notes = "An minituarized nuclear squib fit snuggly into a bio-chip." + function = "Upon detonization the bio-chip will release an EMP affecting the immediate area around the user." + + +/datum/implant_fluff/explosive + name = "Cybersun Industries RX-78 Employee Management Bio-chip" + life = "Destroyed upon activation." + notes = "Appears to contain a small, dense explosive device wired to a signaller chip, the serial number on the side is scratched out." + function = "Contains a compact, electrically detonated explosive that detonates upon receiving a specially encoded signal or upon host death." + + +/datum/implant_fluff/explosive_macro + name = "Cybersun Industries RX-79 Employee Management Bio-chip" + life = "Destroyed upon activation." + notes = "Compared to its predecessor, the RX-79 contains a much larger explosive; sometimes you just need a bigger boom. Due to its bulkiness, it has been known to press into the user's frontal lobe, impairing judgement." + function = "Contains a bulky, electrically triggered explosive that detonates upon receiving a specially encoded signal or upon host death." + + +/datum/implant_fluff/freedom + name = "Cybersun Industries RX-92 Quick Escape Bio-chip" + life = "Destroyed after 4 uses." + notes = "A bio-chip that is illegal in many systems. It is notoriously known for allowing users to grotesquely fracture bones and over-exert joints in order to slip out of the tightest of restraints." + function = "Uses a mixture of cybernetic nanobots, bone regrowth chemicals, and radio signals to quickly break the user out of restraints." + + +/datum/implant_fluff/protofreedom + name = "Cybersun Industries X-92 Quick Escape Bio-chip" + life = "Destroyed after 1 use." + notes = "A bio-chip that is illegal in many systems. This is the early prototype version of the RX-92. It's significantly cheaper than it's newer version." + function = "Uses a mixture of cheap cybernetic nanobots, bone regrowth chemicals, and radio signals to quickly break the user out of restraints." + + +/datum/implant_fluff/health + name = "Nanotrasen Health Bio-chip" + + +/datum/implant_fluff/krav_maga + name = "Prospero Foreign Industries Krav Maga Neurotrainer" + life = "Will cease functioning 4 hours after death of host." + notes = "As a consequence of using a neurotrainer, using this bio-chip will overwrite other martial arts knowledge in the users brain." + function = "Teaches even the clumsiest host the arts of Krav Maga." + + +/datum/implant_fluff/mindshield + name = "Nanotrasen Type 3 Mindshield Bio-chip" + life = "Studies have shown the bio-chip to last up to 10 years." + notes = "This is the third iteration of a bio-chip that has garnered attention from many galactic humanoid rights groups over concerns of self autonomy. Allegedly, it used to force the user to be completely loyal to Nanotrasen." + function = "Personnel injected with this device can better resist mental compulsions such as brainwashing and mindslaving." + + +/datum/implant_fluff/mindshield/ert + name = "Nanotrasen ERT oriented Mindshield Bio-chip" + life = "NT provides lifetime warranty on this bio-chip." + notes = "This is the 5 iteration of a mindshiled bio-chip. Designed specifically for Nanotrasen special forces. Its not only makes you loyal but also allows to use some high-tech weapons." + function = "Personnel injected with this device can better resist mental compulsions such as brainwashing and mindslaving. Also allows to use specialized energy weapons." + + +/datum/implant_fluff/storage + name = "Cybersun Industries RX-16 Collapsible Body Cavity Bio-chip" + notes = "Prolonged usage of this bio-chip often results in the users bones being fractured and occassionaly complete organ failure." + function = "Allows the user to store two small objects within a cybernetic body cavity." + + +/datum/implant_fluff/tracking + name = "Nanotrasen RFID Tracking Bio-chip" + life = "Unknown, known to last up to a few years." + notes = "Tracking bio-chips are Neuro-safe! Makes use of a specialized shell that will melt and disintegrate into bio-safe elements in the event of a malfunction. " + function = "Continuously transmits a low power signal. Can be used for tracking and teleporting to the user." + + +/datum/implant_fluff/traitor + name = "Syndicate Type E Mindslave Bio-chip" + life = "Unknown, no collected sample has been active long enough to determine lifespan." + notes = "Any humanoid injected with this bio-chip will become loyal to the injector, unless of course the host is already loyal to someone else. It's Diplomacy made easy. The Syndicate is known to use this for political and diplomatic leverage." + function = " Contains a small pod of nanobots that manipulate the host's mental functions and slave the host to the implanter." + + +/datum/implant_fluff/uplink + name = "Syndicate Agent Uplink Bio-chip" + life = "Unknown, no collected sample has been active long enough to determine lifespan." + notes = "An intricate piece of machinery that interfaces directly with the users brain and which inner workings are a closely guarded syndicate secret." + function = "Allows the user to access a syndicate uplink connected contained within their body, invisible from the outside but provides the same functionality as a regular uplink." + + +/datum/implant_fluff/sad_trombone + name = "BioTech Solutions Comedy Bio-chip" + function = "Plays a sad trombone noise upon death of the implantee, allows clowns to entertain the crew even post-mortem." + + +/datum/implant_fluff/pathfinder + name = "Paizo Productions 5-E Pathfinder Implant" + life = "Lasts 2-12 months. Known to fail at the worst possible time, space radation may be a factor." + notes = "By use of an internal private GPS signal, allows the pathfinder module to have the MODsuit find the user. Also wirelessly transfers ID information to the suit, to allow doors to open." + function = "Allows for the recall of a Modular Outerwear Device by the implant owner at any time." + + +/datum/implant_fluff/stealth + name = "Syndicate S3 \"Stealth\" Bio-chip" + life = "Unknown. No collected sample has been active long enough to determine lifespan." + notes = "Manually activated by the user." + function = "Allows the user to summon a box from a bluespace pocket located inside the implant. The exterior of this box is lined with experimental cloaking panels which render the box invisible to the naked eye." + + +/datum/implant_fluff/weapons_auth + name = "Firearms Authentication Bio-chip" + life = "Lasts 4 hours after death of host." + function = "Allows operation of biochip-locked weaponry, preventing equipment from falling into enemy hands." + + +/datum/implant_fluff/cortical + name = "Cortical Stack" + life = "Unknown, no collected sample has been active long enough to determine lifespan." + notes = "A fist-sized mass of biocircuits and chips of unknown origin." + + +/datum/implant_fluff/exile + name = "Nanotrasen Employee Exile Bio-chip" + life = "Lifetime warranty." + function = "The onboard gateway system has been modified to reject entry by individuals containing this bio-chip." + diff --git a/code/game/objects/items/weapons/implants/implantpad.dm b/code/game/objects/items/weapons/implants/implantpad.dm index 0de4086d28b..a14bcaeb9d6 100644 --- a/code/game/objects/items/weapons/implants/implantpad.dm +++ b/code/game/objects/items/weapons/implants/implantpad.dm @@ -1,107 +1,110 @@ /obj/item/implantpad - name = "implantpad" - desc = "Used to modify implants." - icon = 'icons/obj/items.dmi' - icon_state = "implantpad-0" + name = "bio-chip pad" + desc = "Used to modify bio-chips." + icon = 'icons/obj/implants.dmi' + icon_state = "implantpad-off" item_state = "electronic" throw_speed = 3 throw_range = 5 w_class = WEIGHT_CLASS_SMALL - var/obj/item/implantcase/case = null + /// Bio-chip case inside source. + var/obj/item/implantcase/case + /obj/item/implantpad/Destroy() if(case) - dropcase() + eject_case() return ..() + /obj/item/implantpad/update_icon() if(case) - src.icon_state = "implantpad-1" + icon_state = "implantpad-on" + else + icon_state = "implantpad-off" + + +/obj/item/implantpad/attack_self(mob/user) + ui_interact(user) + + +/obj/item/implantpad/attackby(obj/item/implantcase/new_case, mob/user, params) + if(istype(new_case)) + addcase(user, new_case) else - src.icon_state = "implantpad-0" - return + return ..() -/obj/item/implantpad/proc/addcase(mob/user as mob, obj/item/implantcase/C as obj) - if(!user || !C) + +/obj/item/implantpad/proc/addcase(mob/user, obj/item/implantcase/new_case) + if(!user || !new_case) return if(case) - to_chat(user, "There's already an implant in the pad!") + to_chat(user, span_warning("There's already a bio-chip in the pad!")) return - user.drop_transfer_item_to_loc(C, src) - case = C + user.drop_transfer_item_to_loc(new_case, src) + case = new_case update_icon() -/obj/item/implantpad/proc/dropcase(mob/user as mob) + +/obj/item/implantpad/proc/eject_case(mob/user) if(!case) - to_chat(user, "There's no implant in the pad!") + to_chat(user, span_warning("There's no bio-chip in the pad!")) return case.forceMove_turf() - if(user) - if(user.put_in_hands(case, ignore_anim = FALSE)) - add_fingerprint(user) - case.add_fingerprint(user) - case = null - update_icon() - return + if(user?.put_in_hands(case, ignore_anim = FALSE)) + add_fingerprint(user) + case.add_fingerprint(user) case = null update_icon() -/obj/item/implantpad/verb/remove_implant() - set category = "Object" - set name = "Remove Implant" - set src in usr - if(usr.stat || usr.restrained()) +/obj/item/implantpad/AltClick(mob/living/user) + if(!ishuman(user) || user.incapacitated() || !Adjacent(user)) return + eject_case(user) - dropcase(usr) -/obj/item/implantpad/attackby(obj/item/implantcase/C as obj, mob/user as mob, params) - if(istype(C, /obj/item/implantcase)) - addcase(user, C) - else - return ..() +/obj/item/implantpad/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = TRUE, datum/tgui/master_ui = null, datum/ui_state/state = GLOB.default_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "ImplantPad", name, 410, 400, master_ui, state) + ui.open() -/obj/item/implantpad/attack_self(mob/user as mob) - add_fingerprint(user) - user.set_machine(src) - var/dat = {"Implant Mini-Computer:
"} - if(case) - if(case.imp) - if(istype(case.imp, /obj/item/implant)) - dat += "Remove Case
" - dat += case.imp.get_data() - if(istype(case.imp, /obj/item/implant/tracking)) - var/obj/item/implant/tracking/T = case.imp - dat += {"ID (1-100): - - - - [T.id] - + - +
"} - else - dat += "The implant casing is empty." - else - dat += "Please insert an implant casing!" - user << browse(dat, "window=implantpad") - onclose(user, "implantpad") - return + +/obj/item/implantpad/ui_data(mob/user) + var/list/data = list() + data["contains_case"] = case ? TRUE : FALSE + if(case && case.imp) + var/datum/implant_fluff/implant_data = case.imp.implant_data + data["implant"] = list( + "name" = implant_data.name, + "life" = implant_data.life, + "notes" = implant_data.notes, + "function" = implant_data.function, + "image" = "[icon2base64(icon(initial(case.imp.icon), initial(case.imp.icon_state), SOUTH, 1))]", + ) + var/obj/item/implant/tracking/tracking_imp = case.imp + data["tag"] = istype(tracking_imp) ? tracking_imp.gps_tag : null + return data -/obj/item/implantpad/Topic(href, href_list) +/obj/item/implantpad/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) if(..()) - return 1 - - var/mob/living/user = usr - if(href_list["tracking_id"]) - if(case && case.imp) - var/obj/item/implant/tracking/T = case.imp - T.id += text2num(href_list["tracking_id"]) - T.id = min(100, T.id) - T.id = max(1, T.id) - else if(href_list["removecase"]) - dropcase(user) - - attack_self(user) - return 1 + return + + . = TRUE + switch(action) + if("tag") + var/obj/item/implant/tracking/tracking_imp = case.imp + if(!istype(tracking_imp)) + return + var/newtag = params["newtag"] || tracking_imp.gps_tag + newtag = uppertext(paranoid_sanitize(copytext(newtag, 1, 5))) + if(length(newtag)) + tracking_imp.gps_tag = newtag + + if("eject_case") + eject_case(ui.user) + diff --git a/code/game/objects/items/weapons/implants/implantuplink.dm b/code/game/objects/items/weapons/implants/implantuplink.dm deleted file mode 100644 index c7b35b88aee..00000000000 --- a/code/game/objects/items/weapons/implants/implantuplink.dm +++ /dev/null @@ -1,46 +0,0 @@ -/obj/item/implant/uplink - name = "uplink implant" - desc = "Summon things." - icon = 'icons/obj/radio.dmi' - icon_state = "radio" - origin_tech = "materials=4;magnets=4;programming=4;biotech=4;syndicate=5;bluespace=5" - -/obj/item/implant/uplink/New() - hidden_uplink = new(src) - hidden_uplink.uses = 10 - ..() - -/obj/item/implant/uplink/sit/New() - ..() - if(hidden_uplink) - hidden_uplink.uplink_type = "sit" - -/obj/item/implant/uplink/admin/New() - ..() - if(hidden_uplink) - hidden_uplink.uplink_type = UPLINK_TYPE_ADMIN - hidden_uplink.update_uplink_items() - -/obj/item/implant/uplink/implant(mob/source) - var/obj/item/implant/imp_e = locate(src.type) in source - if(imp_e && imp_e != src) - imp_e.hidden_uplink.uses += hidden_uplink.uses - qdel(src) - return 1 - - if(..()) - hidden_uplink.uplink_owner="[source.key]" - return 1 - return 0 - -/obj/item/implant/uplink/activate() - if(hidden_uplink) - hidden_uplink.check_trigger(imp_in) - - -/obj/item/implanter/uplink - name = "implanter (uplink)" - -/obj/item/implanter/uplink/New() - imp = new /obj/item/implant/uplink(src) - ..() diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 81341a39056..d44104522ce 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -47,7 +47,7 @@ return ..() if(user.a_intent != INTENT_HELP) - if(user.zone_selected == "head" || user.zone_selected == "eyes") + if(user.zone_selected == BODY_ZONE_HEAD || user.zone_selected == BODY_ZONE_PRECISE_EYES) if((CLUMSY in user.mutations) && prob(50)) C = user return eyestab(C, user) @@ -57,7 +57,7 @@ if(length(contents)) var/obj/item/reagent_containers/food/snacks/toEat = contents[1] if(istype(toEat)) - if(!get_location_accessible(C, "mouth")) + if(!get_location_accessible(C, BODY_ZONE_PRECISE_MOUTH)) if(C == user) to_chat(user, "Your face is obscured, so you cant eat.") else diff --git a/code/game/objects/items/weapons/lighters.dm b/code/game/objects/items/weapons/lighters.dm index b05e7c1b73b..592a71c8484 100644 --- a/code/game/objects/items/weapons/lighters.dm +++ b/code/game/objects/items/weapons/lighters.dm @@ -51,7 +51,7 @@ to_chat(user, "You light [src].") else var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(affecting.receive_damage( 0, 5 )) //INFERNO H.UpdateDamageIcon() to_chat(user,"You light [src], but you burn your hand in the process.") diff --git a/code/game/objects/items/weapons/mop.dm b/code/game/objects/items/weapons/mop.dm index d9085eb6764..5593fe302d7 100644 --- a/code/game/objects/items/weapons/mop.dm +++ b/code/game/objects/items/weapons/mop.dm @@ -39,7 +39,7 @@ if(reagents.has_reagent("water", 1) || reagents.has_reagent("cleaner", 1) || reagents.has_reagent("holywater", 1)) A.clean_blood() for(var/obj/effect/O in A) - if(is_cleanable(O)) + if(O.is_cleanable()) qdel(O) reagents.reaction(A, REAGENT_TOUCH, 10) //10 is the multiplier for the reaction effect. probably needed to wet the floor properly. reagents.remove_any(1) //reaction() doesn't use up the reagents diff --git a/code/game/objects/items/weapons/scissors.dm b/code/game/objects/items/weapons/scissors.dm index 179145c2daa..3af41b22c0c 100644 --- a/code/game/objects/items/weapons/scissors.dm +++ b/code/game/objects/items/weapons/scissors.dm @@ -29,7 +29,7 @@ return if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/C = H.get_organ("head") + var/obj/item/organ/external/head/C = H.get_organ(BODY_ZONE_HEAD) //facial hair var/f_new_style = input(user, "Select a facial hair style", "Grooming") as null|anything in H.generate_valid_facial_hairstyles() //handle normal hair @@ -72,7 +72,7 @@ playsound(loc, 'sound/weapons/bladeslice.ogg', 50, 1, -1) user.visible_message("[user] abruptly stops cutting [M]'s hair and slices [M.p_their()] throat!", "You stop cutting [M]'s hair and slice [M.p_their()] throat!") //Just a little off the top. H.AdjustLoseBreath(20 SECONDS) //30 Oxy damage over time - H.apply_damage(18, BRUTE, "head", sharp =1, used_weapon = "scissors") + H.apply_damage(18, BRUTE, BODY_ZONE_HEAD, sharp =1, used_weapon = "scissors") var/turf/location = get_turf(src) H.add_splatter_floor(location) H.bloody_hands(H) diff --git a/code/game/objects/items/weapons/shards.dm b/code/game/objects/items/weapons/shards.dm index e317d686009..42206a7e0c1 100644 --- a/code/game/objects/items/weapons/shards.dm +++ b/code/game/objects/items/weapons/shards.dm @@ -52,7 +52,7 @@ if(ishuman(user)) var/mob/living/carbon/human/H = user if(!H.gloves && !(PIERCEIMMUNE in H.dna.species.species_traits)) - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = H.get_organ(H.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(affecting.is_robotic()) return to_chat(H, "[src] cuts into your hand!") diff --git a/code/game/objects/items/weapons/soap.dm b/code/game/objects/items/weapons/soap.dm index cbea25203e7..c3ad7d3664f 100644 --- a/code/game/objects/items/weapons/soap.dm +++ b/code/game/objects/items/weapons/soap.dm @@ -49,7 +49,7 @@ /obj/item/soap/proc/clean_turf(turf/simulated/T) T.clean_blood() for(var/obj/effect/O in T) - if(is_cleanable(O)) + if(O.is_cleanable()) qdel(O) /obj/item/soap/attack(mob/target as mob, mob/user as mob) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index a14307002fb..bb506aef1e3 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -541,7 +541,7 @@ /obj/item/storage/belt/bandolier/booze/populate_contents() for(var/I in 1 to 16) - new /obj/item/ammo_casing/shotgun/fakebeanbag(src) + new /obj/item/ammo_casing/shotgun/beanbag/fake(src) update_icon() /obj/item/storage/belt/bandolier/update_icon() diff --git a/code/game/objects/items/weapons/storage/bible.dm b/code/game/objects/items/weapons/storage/bible.dm index 9ce4aac0957..e8bb99075a5 100644 --- a/code/game/objects/items/weapons/storage/bible.dm +++ b/code/game/objects/items/weapons/storage/bible.dm @@ -68,7 +68,7 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M var/heal_amt = 10 - for(var/obj/item/organ/external/affecting in H.bodyparts) + for(var/obj/item/organ/external/affecting as anything in H.bodyparts) if(affecting.heal_damage(heal_amt, heal_amt)) H.UpdateDamageIcon() return diff --git a/code/game/objects/items/weapons/storage/storage.dm b/code/game/objects/items/weapons/storage/storage.dm index 85dd0c992cb..71d5e82b93e 100644 --- a/code/game/objects/items/weapons/storage/storage.dm +++ b/code/game/objects/items/weapons/storage/storage.dm @@ -12,9 +12,11 @@ ///No message on putting items in var/silent = FALSE ///List of objects which this item can store (if set, it can't store anything else) - var/list/can_hold = new/list() + var/list/can_hold = list() + /// List of objects that can be stored, regardless of w_class + var/list/w_class_override = list() ///List of objects which this item can't store (in effect only if can_hold isn't set) - var/list/cant_hold = new/list() + var/list/cant_hold = list() ///Max size of objects that this object can store (in effect only if can_hold isn't set) var/max_w_class = WEIGHT_CLASS_SMALL ///Min size of objects that this object can store (in effect only if can_hold isn't set) @@ -81,10 +83,10 @@ for(var/obj/O in contents) O.mouse_opacity = initial(O.mouse_opacity) + . = ..() QDEL_NULL(boxes) QDEL_NULL(closer) LAZYCLEARLIST(mobs_viewing) - return ..() /obj/item/storage/forceMove(atom/destination) . = ..() @@ -330,11 +332,17 @@ return FALSE if(W.w_class > max_w_class) + if(length(w_class_override) && is_type_in_list(W, w_class_override)) + return TRUE + if(!stop_messages) to_chat(usr, "[W] is too big for [src].") return FALSE if(W.w_class < min_w_class) + if(length(w_class_override) && is_type_in_list(W, w_class_override)) + return TRUE + if(!stop_messages) to_chat(usr, "[W] is too small for [src].") return FALSE diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 1e1b5397a91..5840aa2b149 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -25,7 +25,7 @@ if(!istype(H)) return - if(user.zone_selected != "eyes" && user.zone_selected != "head") + if(user.zone_selected != BODY_ZONE_PRECISE_EYES && user.zone_selected != BODY_ZONE_HEAD) return if(!prob(blurry_chance)) diff --git a/code/game/objects/items/weapons/tanks/tanks.dm b/code/game/objects/items/weapons/tanks/tanks.dm index fbd05d56709..b592c3d220a 100644 --- a/code/game/objects/items/weapons/tanks/tanks.dm +++ b/code/game/objects/items/weapons/tanks/tanks.dm @@ -52,7 +52,7 @@ to_chat(C, "You close \the [src] valve.") C.internal = null else - if(!C.get_organ_slot("breathing_tube")) // Breathing tubes can always use internals, if they have one, skip ahead and turn internals on/off + if(!C.get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) // Breathing tubes can always use internals, if they have one, skip ahead and turn internals on/off if(!C.wear_mask) // Do we have a mask equipped? return FALSE diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 36fb2d4e2e1..db3266d75b1 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -73,7 +73,7 @@ Frequency: var/turf/Tr = get_turf(T) if(Tr && Tr.z == sr.z) - temp += "[T.id]: [Tr.x], [Tr.y], [Tr.z]
" + temp += "[T.gps_tag]: [Tr.x], [Tr.y], [Tr.z]
" temp += "You are at \[[sr.x],[sr.y],[sr.z]\]." temp += "

Refresh
" diff --git a/code/game/objects/items/weapons/twohanded.dm b/code/game/objects/items/weapons/twohanded.dm index b054745c36b..dd9fa2391fb 100644 --- a/code/game/objects/items/weapons/twohanded.dm +++ b/code/game/objects/items/weapons/twohanded.dm @@ -832,14 +832,14 @@ "\"As you pick up the [src] your arms ignite, reminding you of all your past sins.\"") if(ishuman(U)) var/mob/living/carbon/human/H = U - H.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm")) + H.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) else U.adjustFireLoss(rand(force/2,force)) /obj/item/twohanded/pitchfork/demonic/attack(mob/target, mob/living/carbon/human/user) if(user.mind && !user.mind.devilinfo && (user.mind.soulOwner != user.mind)) to_chat(user, "The [src] burns in your hands.") - user.apply_damage(rand(force/2, force), BURN, pick("l_arm", "r_arm")) + user.apply_damage(rand(force/2, force), BURN, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) ..() // It's no fun being the lord of all hell if you can't get out of a simple room diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index acaec13b4ea..6cc621bd3ce 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -398,7 +398,7 @@ to_chat(user, "\"Это - оружие истинного правосудия. Тебе не дано обуздать его мощь.\"") if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(rand(force/2, force), BRUTE, pick("l_arm", "r_arm")) + H.apply_damage(rand(force/2, force), BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) else user.adjustBruteLoss(rand(force/2, force)) return FALSE diff --git a/code/game/objects/structures.dm b/code/game/objects/structures.dm index e4caba1c520..fcb49d30568 100644 --- a/code/game/objects/structures.dm +++ b/code/game/objects/structures.dm @@ -187,15 +187,15 @@ switch(pick(list("ankle","wrist","head","knee","elbow"))) if("ankle") - affecting = H.get_organ(pick("l_foot", "r_foot")) + affecting = H.get_organ(pick(BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT)) if("knee") - affecting = H.get_organ(pick("l_leg", "r_leg")) + affecting = H.get_organ(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) if("wrist") - affecting = H.get_organ(pick("l_hand", "r_hand")) + affecting = H.get_organ(pick(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)) if("elbow") - affecting = H.get_organ(pick("l_arm", "r_arm")) + affecting = H.get_organ(pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) if("head") - affecting = H.get_organ("head") + affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting) to_chat(M, "You land heavily on your [affecting.name]!") diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 9b0f9429eda..cddf5443606 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -405,7 +405,6 @@ // Its okay to silently teleport mobs out of lockers, since the only thing affected is their contents list. return - /obj/structure/closet/bluespace name = "bluespace closet" desc = "A storage unit that moves and stores through the fourth dimension." diff --git a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm index 8f306133451..8b727d0cf67 100644 --- a/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm +++ b/code/game/objects/structures/crates_lockers/closets/cardboardbox.dm @@ -15,8 +15,11 @@ material_drop = /obj/item/stack/sheet/cardboard var/decal = "" var/amt = 4 - var/move_delay = 0 + var/move_delay = FALSE var/egged = 0 + /// How fast a mob can move inside this box. + var/move_speed_multiplier = 1 + /obj/structure/closet/cardboard/relaymove(mob/living/user, direction) if(!istype(user) || opened || move_delay || user.incapacitated() || !isturf(loc) || !has_gravity(loc)) @@ -24,17 +27,19 @@ move_delay = TRUE var/oldloc = loc step(src, direction) + // By default, while inside a box, we move at walk speed times the speed multipler of the box. + var/delay = CONFIG_GET(number/walk_speed) * move_speed_multiplier + if(direction & (direction - 1)) + delay *= SQRT_2 // Moving diagonal counts as moving 2 tiles, we need to slow them down accordingly. if(oldloc != loc) - addtimer(CALLBACK(src, PROC_REF(ResetMoveDelay)), CONFIG_GET(number/walk_speed)) + addtimer(VARSET_CALLBACK(src, move_delay, FALSE), delay) else move_delay = FALSE -/obj/structure/closet/cardboard/proc/ResetMoveDelay() - move_delay = FALSE /obj/structure/closet/cardboard/open() if(opened || !can_open()) - return 0 + return FALSE if(!egged) var/mob/living/Snake = null for(var/mob/living/L in src.contents) @@ -47,8 +52,8 @@ if(!L.stat) L.do_alert_animation(L) egged = 1 - alerted << sound('sound/machines/chime.ogg') - ..() + SEND_SOUND(alerted, sound('sound/machines/chime.ogg')) + return ..() /mob/living/proc/do_alert_animation(atom/A) var/image/I diff --git a/code/game/objects/structures/crates_lockers/closets/secure/civillian.dm b/code/game/objects/structures/crates_lockers/closets/secure/civillian.dm index e8ec178f43c..4b930dfc361 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/civillian.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/civillian.dm @@ -5,3 +5,6 @@ overlay_locked = "c_locked" overlay_locker = "c_locker" overlay_unlocked = "c_unlocked" + open_sound = 'sound/machines/wooden_closet_open.ogg' + close_sound = 'sound/machines/wooden_closet_close.ogg' + diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index 4afa608a6ff..a0a6bcc66e0 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -165,7 +165,7 @@ update_icon() else // Bad day) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? "l_hand" : "r_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.apply_damage(5, BRUTE , affecting) user.emote("scream") to_chat(user, "Проклятье! [I] сорвалась и повредила [affecting.name]!") diff --git a/code/game/objects/structures/crates_lockers/closets/syndicate.dm b/code/game/objects/structures/crates_lockers/closets/syndicate.dm index 7c2bae962a3..ab5070d0871 100644 --- a/code/game/objects/structures/crates_lockers/closets/syndicate.dm +++ b/code/game/objects/structures/crates_lockers/closets/syndicate.dm @@ -150,6 +150,7 @@ layer = 2.9 // ensures the loot they drop always appears on top of them. max_integrity = 300 icon_state = "syndicate_secure" + custom_open_overlay = "syndicate_secure" /obj/structure/closet/secure_closet/syndicate/comms_officer req_access = list(ACCESS_SYNDICATE_COMMS_OFFICER) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index b8d7a50832e..b62a0da5af8 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -630,7 +630,7 @@ //icon_state = icon_off // Crates has no icon_off :( else // Bad day) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? "l_hand" : "r_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.apply_damage(5, BRUTE , affecting) user.emote("scream") to_chat(user, span_warning("Проклятье! [I] сорвалась и повредила [affecting.name]!")) diff --git a/code/game/objects/structures/crates_lockers/crittercrate.dm b/code/game/objects/structures/crates_lockers/crittercrate.dm index d1fe6a80a51..54f0fa398ec 100644 --- a/code/game/objects/structures/crates_lockers/crittercrate.dm +++ b/code/game/objects/structures/crates_lockers/crittercrate.dm @@ -184,3 +184,4 @@ /obj/structure/closet/critter/snake name = "snake crate" content_mob = /mob/living/simple_animal/hostile/retaliate/poison/snake + diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 1e1174bacca..20c58523d17 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -105,9 +105,9 @@ return if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] if(user.hand) - temp = H.bodyparts_by_name["l_hand"] + temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return diff --git a/code/game/objects/structures/guillotine.dm b/code/game/objects/structures/guillotine.dm index 53444524a5f..c1fbb87d958 100644 --- a/code/game/objects/structures/guillotine.dm +++ b/code/game/objects/structures/guillotine.dm @@ -105,7 +105,7 @@ icon_state = "guillotine" return - var/obj/item/organ/external/head/head = H.get_organ("head") + var/obj/item/organ/external/head/head = H.get_organ(BODY_ZONE_HEAD) if(QDELETED(head)) blade_status = GUILLOTINE_BLADE_DROPPED diff --git a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm index ddd226cf8e4..929bd508ce6 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/wheelchair.dm @@ -44,13 +44,13 @@ if(!driver.has_left_hand() && !driver.has_right_hand()) return 0 // No hands to drive your chair? Tough luck! - for(var/organ_name in list("l_hand","r_hand","l_arm","r_arm")) + for(var/organ_name in list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)) var/obj/item/organ/external/E = driver.get_organ(organ_name) if(!E) calculated_move_delay += 4 - else if(E.status & ORGAN_SPLINTED) + else if(E.is_splinted()) calculated_move_delay += 0.5 - else if(E.status & ORGAN_BROKEN) + else if(E.has_fracture()) calculated_move_delay += 1.5 if(calculated_move_delay < 4) @@ -131,18 +131,18 @@ if(ishuman(buckled_mob)) var/mob/living/carbon/human/driver = user - var/obj/item/organ/external/l_hand = driver.get_organ("l_hand") - var/obj/item/organ/external/r_hand = driver.get_organ("r_hand") + var/obj/item/organ/external/l_hand = driver.get_organ(BODY_ZONE_PRECISE_L_HAND) + var/obj/item/organ/external/r_hand = driver.get_organ(BODY_ZONE_PRECISE_R_HAND) if(!l_hand && !r_hand) calculated_move_delay += 0.5 //I can ride my bike with no handlebars... (but it's slower) - for(var/organ_name in list("l_leg","r_leg","l_foot","r_foot")) + for(var/organ_name in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT)) var/obj/item/organ/external/E = driver.get_organ(organ_name) if(!E) return 0 //Bikes need both feet/legs to work. missing even one makes it so you can't ride the bike - else if(E.status & ORGAN_SPLINTED) + else if(E.is_splinted()) calculated_move_delay += 0.5 - else if(E.status & ORGAN_BROKEN) + else if(E.has_fracture()) calculated_move_delay += 1.5 move_delay = world.time diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 301f31ef60e..82934cd6bf5 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -453,7 +453,7 @@ var/turf/tile = loc loc.clean_blood() for(var/obj/effect/E in tile) - if(is_cleanable(E)) + if(E.is_cleanable()) qdel(E) /obj/machinery/shower/process() @@ -519,9 +519,9 @@ return if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] if(user.hand) - temp = H.bodyparts_by_name["l_hand"] + temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(temp && !temp.is_usable()) to_chat(user, "You try to move your [temp.name], but cannot!") return @@ -531,7 +531,7 @@ return var/selected_area = parse_zone(user.zone_selected) var/washing_face = 0 - if(selected_area in list("head", "mouth", "eyes")) + if(selected_area in list(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_EYES)) washing_face = 1 user.visible_message("[user] starts washing [user.p_their()] [washing_face ? "face" : "hands"]...", \ "You start washing your [washing_face ? "face" : "hands"]...") diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index ffece6b9772..6d15f484e9e 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -94,9 +94,9 @@ if(M.slip("the icy floor", 4 SECONDS, tilesSlipped = 0, walkSafely = 0)) M.inertia_dir = 0 if(prob(5)) - var/obj/item/organ/external/affected = M.get_organ("head") + var/obj/item/organ/external/affected = M.get_organ(BODY_ZONE_HEAD) if(affected) - M.apply_damage(5, BRUTE, "head") + M.apply_damage(5, BRUTE, BODY_ZONE_HEAD) M.visible_message(span_warning("[M] hits their head on the ice!")) playsound(src, 'sound/weapons/genhit1.ogg', 50, 1) diff --git a/code/game/turfs/simulated/floor/indestructible.dm b/code/game/turfs/simulated/floor/indestructible.dm index 6738054469c..58e2a708994 100644 --- a/code/game/turfs/simulated/floor/indestructible.dm +++ b/code/game/turfs/simulated/floor/indestructible.dm @@ -223,6 +223,9 @@ if(!linkedcontroller) return if(ismob(AM)) + if(isliving(AM)) + var/mob/living/creature = AM + creature.ExtinguishMob() linkedcontroller.mobinpool += AM /turf/simulated/floor/indestructible/beach/water/Exited(atom/movable/AM, atom/newloc) diff --git a/code/game/turfs/simulated/floor/misc_floor.dm b/code/game/turfs/simulated/floor/misc_floor.dm index e924c897c78..929bf0c3c42 100644 --- a/code/game/turfs/simulated/floor/misc_floor.dm +++ b/code/game/turfs/simulated/floor/misc_floor.dm @@ -106,6 +106,9 @@ if(!linkedcontroller) return if(ismob(AM)) + if(isliving(AM)) + var/mob/living/creature = AM + creature.ExtinguishMob() linkedcontroller.mobinpool += AM /turf/simulated/floor/beach/water/Exited(atom/movable/AM, atom/newloc) diff --git a/code/game/verbs/ooc.dm b/code/game/verbs/ooc.dm index 1a160519df6..2bf9b63f961 100644 --- a/code/game/verbs/ooc.dm +++ b/code/game/verbs/ooc.dm @@ -33,6 +33,7 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") msg = typing_input(src.mob, "", "ooc \"text\"") msg = trim(sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))) + if(!msg) return @@ -58,6 +59,8 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]") return + msg = handleDiscordEmojis(msg) + add_ooc_logs(src, msg) var/display_colour = GLOB.normal_ooc_colour @@ -220,6 +223,8 @@ GLOBAL_VAR_INIT(admin_ooc_colour, "#b82e00") message_admins("[key_name_admin(src)] has attempted to advertise in OOC: [msg]") return + msg = handleDiscordEmojis(msg) + add_ooc_logs(src, msg, TRUE) var/mob/source = mob.get_looc_source() diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 976133421a1..b3f038b3eb9 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -1,60 +1,13 @@ -/mob/var/suiciding = 0 +/mob + var/suiciding = FALSE -/mob/living/carbon/human/proc/do_suicide(damagetype, byitem) - var/threshold = check_death_method() ? ((HEALTH_THRESHOLD_CRIT + HEALTH_THRESHOLD_DEAD) / 2) : (HEALTH_THRESHOLD_DEAD - 50) - var/dmgamt = maxHealth - threshold - - var/damage_mod = 1 - switch(damagetype) //Sorry about the magic numbers. - //brute = 1, burn = 2, tox = 4, oxy = 8 - if(15) //4 damage types - damage_mod = 4 - - if(6, 11, 13, 14) //3 damage types - damage_mod = 3 - - if(3, 5, 7, 9, 10, 12) //2 damage types - damage_mod = 2 - - if(1, 2, 4, 8) //1 damage type - damage_mod = 1 - - else //This should not happen, but if it does, everything should still work - damage_mod = 1 - - //Do dmgamt damage divided by the number of damage types applied. - if(damagetype & BRUTELOSS) - adjustBruteLoss(dmgamt / damage_mod, FALSE) - - if(damagetype & FIRELOSS) - adjustFireLoss(dmgamt / damage_mod, FALSE) - - if(damagetype & TOXLOSS) - adjustToxLoss(dmgamt / damage_mod, FALSE) - - if(damagetype & OXYLOSS) - adjustOxyLoss(dmgamt / damage_mod, FALSE) - - // Failing that... - if(!(damagetype & BRUTELOSS) && !(damagetype & FIRELOSS) && !(damagetype & TOXLOSS) && !(damagetype & OXYLOSS)) - if(NO_BREATHE in dna.species.species_traits) - // the ultimate fallback - take_overall_damage(max(dmgamt - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0), 0, updating_health = FALSE) - else - adjustOxyLoss(max(dmgamt - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0), FALSE) - - var/obj/item/organ/external/affected = get_organ("head") - if(affected) - affected.add_autopsy_data(byitem ? "Suicide by [byitem]" : "Suicide", dmgamt) - - updatehealth() - -/mob/living/carbon/human/verb/suicide() - set hidden = 1 +/mob/living/verb/suicide() + set hidden = TRUE be_suicidal() -/mob/living/carbon/human/proc/be_suicidal(forced = FALSE) + +/mob/living/proc/be_suicidal(forced = FALSE) if(stat == DEAD) to_chat(src, "You're already dead!") return @@ -63,11 +16,6 @@ to_chat(src, "You can't commit suicide before the game starts!") return - // No more borergrief, one way or the other - if(has_brain_worms()) - to_chat(src, "You try to bring yourself to commit suicide, but - something prevents you!") - return - if(suiciding) to_chat(src, "You're already committing suicide! Be patient!") return @@ -75,174 +23,174 @@ var/confirm = null if(!forced) + if(ischangeling(src)) + // the alternative is to allow clings to commit suicide, but then you'd probably have them + // killing themselves as soon as they're in cuffs + to_chat(src, span_warning("We refuse to take the coward's way out.")) + return confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") - if(forced || (confirm == "Yes")) - suiciding = TRUE - add_attack_logs(src, null, "Attempted suicide") - var/obj/item/held_item = get_active_hand() - if(held_item) - var/damagetype = held_item.suicide_act(src) - if(damagetype) - if(damagetype & SHAME) - adjustStaminaLoss(200) - suiciding = FALSE - return - if(damagetype & OBLITERATION) // Does it gib or something? Don't deal damage - return - do_suicide(damagetype, held_item) - return - else - for(var/obj/O in orange(1, src)) - if(O.suicidal_hands) - continue - var/damagetype = O.suicide_act(src) - if(damagetype) - if(damagetype & SHAME) - adjustStaminaLoss(200) - suiciding = FALSE - return - if(damagetype & OBLITERATION) - return - do_suicide(damagetype, O) - return - - to_chat(viewers(src), "[src] [replacetext(pick(dna.species.suicide_messages), "their", p_their())] It looks like [p_theyre()] trying to commit suicide.") - do_suicide(0) - -/mob/living/carbon/brain/verb/suicide() - set hidden = 1 - - if(stat == 2) + if(stat == DEAD || suiciding) //We check again, because alerts sleep until a choice is made to_chat(src, "You're already dead!") return - if(!SSticker) - to_chat(src, "You can't commit suicide before the game starts!") - return + if(forced || (confirm == "Yes")) + if(!forced && isAntag(src)) + confirm = alert("Are you absolutely sure? If you do this after you got converted/joined as an antagonist, you could face a jobban!", "Confirm Suicide", "Yes", "No") + if(confirm == "Yes") + suiciding = TRUE + do_suicide() + create_log(ATTACK_LOG, "Attempted suicide as special role") + message_admins("[src] with a special role attempted suicide at [ADMIN_JMP(src)]") + return + return + suiciding = TRUE + do_suicide() + create_log(ATTACK_LOG, "Attempted suicide") - if(suiciding) - to_chat(src, "You're already committing suicide! Be patient!") - return - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") +/mob/living/proc/do_suicide() + return - if(confirm == "Yes") - suiciding = 1 - to_chat(viewers(loc), "[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.") - spawn(50) - death(0) - suiciding = 0 +/mob/living/simple_animal/do_suicide() + setOxyLoss((health * 1.5), TRUE) -/mob/living/silicon/ai/verb/suicide() - set hidden = 1 - if(stat == 2) - to_chat(src, "You're already dead!") - return +/mob/living/simple_animal/mouse/do_suicide() + visible_message(span_danger("[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.")) + adjustOxyLoss(max(100 - getBruteLoss(100), 0)) - if(suiciding) - to_chat(src, "You're already committing suicide! Be patient!") - return - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") +/mob/living/simple_animal/slime/do_suicide() + setOxyLoss(100, FALSE) + adjustBruteLoss(100 - getBruteLoss(), FALSE) + setToxLoss(100, FALSE) + setCloneLoss(100, FALSE) + updatehealth() - if(confirm == "Yes") - suiciding = 1 - to_chat(viewers(src), "[src] is powering down. It looks like [p_theyre()] trying to commit suicide.") - //put em at -175 - adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) -/mob/living/silicon/robot/verb/suicide() - set hidden = 1 +/mob/living/simple_animal/mouse/do_suicide() + visible_message(span_danger("[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.")) + adjustOxyLoss(max(100 - getBruteLoss(100), 0)) - if(stat == 2) - to_chat(src, "You're already dead!") - return - if(suiciding) - to_chat(src, "You're already committing suicide! Be patient!") - return +/mob/living/silicon/do_suicide() + to_chat(viewers(src), span_danger("[src] is powering down. It looks like [p_theyre()] trying to commit suicide.")) + //put em at -175 + adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") - - if(confirm == "Yes") - suiciding = 1 - to_chat(viewers(src), "[src] is powering down. It looks like [p_theyre()] trying to commit suicide.") - //put em at -175 - adjustOxyLoss(max(maxHealth * 2 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) - -/mob/living/silicon/pai/verb/suicide() - set category = "pAI Commands" - set desc = "Kill yourself and become a ghost (You will receive a confirmation prompt)" - set name = "pAI Suicide" - var/answer = input("REALLY kill yourself? This action can't be undone.", "Suicide", "No") in list ("Yes", "No") - if(answer == "Yes") - if(canmove || resting) - close_up() - var/obj/item/paicard/card = loc - card.removePersonality() - var/turf/T = get_turf_or_move(card.loc) - for(var/mob/M in viewers(T)) - M.show_message("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\"", 3, "[src] bleeps electronically.", 2) - death(0, 1) - else - to_chat(src, "Aborting suicide attempt.") - -/mob/living/carbon/alien/humanoid/verb/suicide() - set hidden = 1 - - if(stat == 2) - to_chat(src, "You're already dead!") - return - if(suiciding) - to_chat(src, "You're already committing suicide! Be patient!") - return +/mob/living/silicon/robot/drone/do_suicide() + shut_down() - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") - if(confirm == "Yes") - suiciding = 1 - to_chat(viewers(src), "[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.") - //put em at -175 - adjustOxyLoss(max(175 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) +/mob/living/silicon/pai/do_suicide() + if(canmove || resting) + close_up() + card.removePersonality() + var/turf/T = get_turf(card.loc) + for(var/mob/M in viewers(T)) + M.show_message(span_notice("[src] flashes a message across its screen, \"Wiping core files. Please acquire a new personality to continue using pAI device functions.\""), EMOTE_VISIBLE, span_notice("[src] bleeps electronically."), EMOTE_AUDIBLE) + death(gibbed = FALSE, cleanWipe = TRUE) -/mob/living/simple_animal/slime/verb/suicide() - set hidden = 1 - if(stat == 2) - to_chat(src, "You're already dead!") - return +/mob/living/carbon/do_suicide() + death(gibbed = FALSE) + suiciding = FALSE - if(suiciding) - to_chat(src, "You're already committing suicide! Be patient!") - return - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") +/mob/living/carbon/brain/do_suicide() + to_chat(viewers(loc), span_danger("[src]'s brain is growing dull and lifeless. It looks like it's lost the will to live.")) + spawn(5 SECONDS) + death(gibbed = FALSE) + suiciding = FALSE - if(confirm == "Yes") - suiciding = 1 - setOxyLoss(100, FALSE) - adjustBruteLoss(100 - getBruteLoss(), FALSE) - setToxLoss(100, FALSE) - setCloneLoss(100, FALSE) - updatehealth() +/mob/living/carbon/alien/humanoid/do_suicide() + to_chat(viewers(src), span_danger("[src] is thrashing wildly! It looks like [p_theyre()] trying to commit suicide.")) + //put em at -175 + adjustOxyLoss(max(175 - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) -/mob/living/simple_animal/mouse/verb/suicide() - set hidden = 1 - if(stat == DEAD) - to_chat(src, "You're already dead!") - return - if(suiciding) - to_chat(src, "You're already committing suicide! Be patient!") + +/mob/living/carbon/human/do_suicide() + var/obj/item/held_item = get_active_hand() + var/damagetype = SEND_SIGNAL(src, COMSIG_HUMAN_SUICIDE_ACT) || held_item?.suicide_act(src) + + if(damagetype) + if(damagetype & SHAME) + adjustStaminaLoss(200) + suiciding = FALSE + return + if(damagetype & OBLITERATION) // Does it gib or something? Don't deal damage + return + human_suicide(damagetype, held_item) return - var/confirm = alert("Are you sure you want to commit suicide?", "Confirm Suicide", "Yes", "No") + for(var/obj/O in orange(1, src)) + if(O.suicidal_hands) + continue + damagetype = O.suicide_act(src) + if(damagetype) + if(damagetype & SHAME) + adjustStaminaLoss(200) + suiciding = FALSE + return + if(damagetype & OBLITERATION) + return + human_suicide(damagetype, O) + return + + to_chat(viewers(src), span_danger("[src] [replacetext(pick(dna.species.suicide_messages), "their", p_their())] It looks like [p_theyre()] trying to commit suicide.")) + human_suicide(0) + + +/mob/living/carbon/human/proc/human_suicide(damagetype, byitem) + var/threshold = check_death_method() ? ((HEALTH_THRESHOLD_CRIT + HEALTH_THRESHOLD_DEAD) / 2) : (HEALTH_THRESHOLD_DEAD - 50) + var/dmgamt = maxHealth - threshold + + var/damage_mod = 1 + switch(damagetype) //Sorry about the magic numbers. // this was here before I refactored it i'm not touching the magic numbers + //brute = 1, burn = 2, tox = 4, oxy = 8 + if(15) //4 damage types + damage_mod = 4 + + if(6, 11, 13, 14) //3 damage types + damage_mod = 3 + + if(3, 5, 7, 9, 10, 12) //2 damage types + damage_mod = 2 + + if(1, 2, 4, 8) //1 damage type + damage_mod = 1 + + else //This should not happen, but if it does, everything should still work + damage_mod = 1 + + //Do dmgamt damage divided by the number of damage types applied. + if(damagetype & BRUTELOSS) + adjustBruteLoss(dmgamt / damage_mod, FALSE) + + if(damagetype & FIRELOSS) + adjustFireLoss(dmgamt / damage_mod, FALSE) + + if(damagetype & TOXLOSS) + adjustToxLoss(dmgamt / damage_mod, FALSE) + + if(damagetype & OXYLOSS) + adjustOxyLoss(dmgamt / damage_mod, FALSE) + + // Failing that... + if(!(damagetype & BRUTELOSS) && !(damagetype & FIRELOSS) && !(damagetype & TOXLOSS) && !(damagetype & OXYLOSS)) + if(NO_BREATHE in dna.species.species_traits) + // the ultimate fallback + take_overall_damage(max(dmgamt - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0), 0, updating_health = FALSE) + else + adjustOxyLoss(max(dmgamt - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0), updating_health = FALSE) + + var/obj/item/organ/external/affected = get_organ(BODY_ZONE_HEAD) + if(affected) + affected.add_autopsy_data(byitem ? "Suicide by [byitem]" : "Suicide", dmgamt) + + updatehealth() - if(confirm == "Yes") - suiciding = TRUE - visible_message("[src] is playing dead permanently! It looks like [p_theyre()] trying to commit suicide.") - adjustOxyLoss(max(100 - getBruteLoss(100), 0)) diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 36d26121c7c..954485ae7e0 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -3637,7 +3637,7 @@ N.mode = 3 //MODE_ADV, not defined here N.setting = 2 //SETTING_OBJECT, not defined here N.target = H - N.point_at(N.target) + N.pinpoint_at(N.target) N.modelocked = TRUE if(!locate(/obj/item/implant/dust, hunter_mob)) var/obj/item/implant/dust/D = new /obj/item/implant/dust(hunter_mob) diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index 82fac2b815e..65755e6dc06 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -7,6 +7,8 @@ msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) if(!msg) return + msg = handleDiscordEmojis(msg) + var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday) GLOB.asays += asay log_adminsay(msg, src) @@ -47,6 +49,8 @@ if(!msg) return + msg = handleDiscordEmojis(msg) + for(var/client/C in GLOB.admins) if(check_rights(R_ADMIN|R_MOD|R_MENTOR, 0, C.mob)) var/display_name = key diff --git a/code/modules/admin/verbs/deadsay.dm b/code/modules/admin/verbs/deadsay.dm index 09966f8477b..76ab31fd19d 100644 --- a/code/modules/admin/verbs/deadsay.dm +++ b/code/modules/admin/verbs/deadsay.dm @@ -36,6 +36,8 @@ if(!msg) return + msg = handleDiscordEmojis(msg) + var/prefix = "[stafftype] ([src.key])" if(holder.fakekey) prefix = "Administrator" diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm index 09848b7c0f5..c9fb2d1c093 100644 --- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm +++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm @@ -148,7 +148,7 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0) var/obj/item/implant/uplink/sit/U = new /obj/item/implant/uplink/sit(src) U.implant(src) if (flag_mgmt) - U.hidden_uplink.uses = 500 + U.hidden_uplink.uses = 2500 else U.hidden_uplink.uses = num_tc // Dust diff --git a/code/modules/antagonists/changeling/changeling_datum.dm b/code/modules/antagonists/changeling/changeling_datum.dm index 33fa8b06037..84581438c7e 100644 --- a/code/modules/antagonists/changeling/changeling_datum.dm +++ b/code/modules/antagonists/changeling/changeling_datum.dm @@ -155,7 +155,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E return // Brains are optional for changelings. - var/obj/item/organ/internal/brain/ling_brain = carbon_user.get_organ_slot("brain") + var/obj/item/organ/internal/brain/ling_brain = carbon_user.get_organ_slot(INTERNAL_ORGAN_BRAIN) ling_brain?.decoy_brain = TRUE @@ -186,7 +186,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E return // If they get de-clinged, make sure they can't just chop their own head off for the hell of it - var/obj/item/organ/internal/brain/former_ling_brain = carbon_user.get_organ_slot("brain") + var/obj/item/organ/internal/brain/former_ling_brain = carbon_user.get_organ_slot(INTERNAL_ORGAN_BRAIN) if(former_ling_brain && former_ling_brain.decoy_brain != initial(former_ling_brain.decoy_brain)) former_ling_brain.decoy_brain = FALSE @@ -565,7 +565,7 @@ GLOBAL_LIST_INIT(possible_changeling_IDs, list("Alpha","Beta","Gamma","Delta","E // 60 SECONDS of delay overall. var/mob/living/carbon/human/h_user = user var/missing_limbs = 5 - for(var/obj/item/organ/external/limb in h_user.bodyparts) + for(var/obj/item/organ/external/limb as anything in h_user.bodyparts) if(istype(limb, /obj/item/organ/external/head) || \ istype(limb, /obj/item/organ/external/arm) || \ istype(limb, /obj/item/organ/external/leg)) diff --git a/code/modules/antagonists/changeling/changeling_power.dm b/code/modules/antagonists/changeling/changeling_power.dm index cbeb99f6b41..c1d6fd3f486 100644 --- a/code/modules/antagonists/changeling/changeling_power.dm +++ b/code/modules/antagonists/changeling/changeling_power.dm @@ -71,7 +71,7 @@ GLOBAL_LIST_INIT(changeling_mutations, list( return ..() -/datum/action/changeling/Trigger() +/datum/action/changeling/Trigger(left_click = TRUE) try_to_sting(owner) diff --git a/code/modules/antagonists/changeling/powers/augmented_eyesight.dm b/code/modules/antagonists/changeling/powers/augmented_eyesight.dm index 42557dd282e..975a616fb32 100644 --- a/code/modules/antagonists/changeling/powers/augmented_eyesight.dm +++ b/code/modules/antagonists/changeling/powers/augmented_eyesight.dm @@ -42,8 +42,8 @@ icon_state = "ling_eyeshield" eye_colour = "#000000" implant_overlay = null - slot = "eye_ling" - status = 0 + slot = INTERNAL_ORGAN_EYE_LING + status = NONE aug_message = "We adjust our eyes to protect them from bright lights." @@ -81,8 +81,8 @@ icon_state = "ling_thermal" eye_colour = "#000000" implant_overlay = null - slot = "eye_ling" - status = 0 + slot = INTERNAL_ORGAN_EYE_LING + status = NONE aug_message = "We adjust our eyes to sense prey through walls." @@ -90,8 +90,8 @@ return -/obj/item/organ/internal/cyberimp/eyes/thermals/ling/insert(mob/living/carbon/M, special = FALSE) - ..() +/obj/item/organ/internal/cyberimp/eyes/thermals/ling/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() if(ishuman(owner)) var/mob/living/carbon/human/h_owner = owner h_owner.weakeyes = TRUE @@ -99,9 +99,9 @@ h_owner.set_sight(/datum/vision_override/nightvision) -/obj/item/organ/internal/cyberimp/eyes/thermals/ling/remove(mob/living/carbon/M, special = FALSE) +/obj/item/organ/internal/cyberimp/eyes/thermals/ling/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) if(ishuman(owner)) var/mob/living/carbon/human/h_owner = owner h_owner.weakeyes = FALSE h_owner.set_sight(null) - ..() + . = ..() diff --git a/code/modules/antagonists/changeling/powers/biodegrade.dm b/code/modules/antagonists/changeling/powers/biodegrade.dm index b942fa89a5c..c6f04cc4cb1 100644 --- a/code/modules/antagonists/changeling/powers/biodegrade.dm +++ b/code/modules/antagonists/changeling/powers/biodegrade.dm @@ -76,7 +76,7 @@ var/mob/living/carbon/grab_owner = grab.assailant user.visible_message(span_warning("[user] spits acid at [grab_owner]'s face and slips out of their grab!")) grab_owner.Stun(2 SECONDS) //Drops the grab - grab_owner.apply_damage(5, BURN, "head", grab_owner.run_armor_check("head", "melee")) + grab_owner.apply_damage(5, BURN, BODY_ZONE_HEAD, grab_owner.run_armor_check(BODY_ZONE_HEAD, MELEE)) user.SetStunned(0) //This only triggers if they are grabbed, to have them break out of the grab, without the large stun time. If you use biodegrade as an antistun without being grabbed, it will not work user.SetWeakened(0) playsound(user.loc, 'sound/weapons/sear.ogg', 50, TRUE) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 0ad2ab4dc1e..d5ad3236f09 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -63,11 +63,13 @@ qdel(user.get_inactive_hand()) done = TRUE - if(done && !silent) - user.visible_message(span_warning("With a sickening crunch, [user] reforms [user.p_their()] [weapon_name_simple] into an arm!"), - span_notice("We assimilate the [weapon_name_simple] back into our body."), - span_warning("You hear organic matter ripping and tearing!")) - playsound(user, "bonebreak", 150, 1) + if(done) + . = COMPONENT_CANCEL_DROP + if(!silent) + playsound(user, "bonebreak", 150, TRUE) + user.visible_message(span_warning("With a sickening crunch, [user] reforms [user.p_their()] [weapon_name_simple] into an arm!"), + span_notice("We assimilate the [weapon_name_simple] back into our body."), + span_warning("You hear organic matter ripping and tearing!")) //Parent to space suits and armor. @@ -463,7 +465,7 @@ target.apply_damage(offarm_item.force, BRUTE, BODY_ZONE_CHEST) user.do_attack_animation(target, used_item = offarm_item) - add_blood(target) + offarm_item.add_mob_blood(target) playsound(get_turf(user), offarm_item.hitsound, 75, TRUE) diff --git a/code/modules/antagonists/changeling/powers/revive.dm b/code/modules/antagonists/changeling/powers/revive.dm index 5844baade74..aae7993f773 100644 --- a/code/modules/antagonists/changeling/powers/revive.dm +++ b/code/modules/antagonists/changeling/powers/revive.dm @@ -16,7 +16,7 @@ var/mob/living/carbon/grab_owner = grab.assailant user.visible_message(span_warning("[user] suddenly hits [grab_owner] in the face and slips out of their grab!")) grab_owner.Stun(2 SECONDS) //Drops the grab - grab_owner.apply_damage(5, BRUTE, "head", grab_owner.run_armor_check("head", "melee")) + grab_owner.apply_damage(5, BRUTE, BODY_ZONE_HEAD, grab_owner.run_armor_check(BODY_ZONE_HEAD, MELEE)) playsound(user.loc, 'sound/weapons/punch1.ogg', 25, 1, -1) user.revive() diff --git a/code/modules/antagonists/changeling/powers/tiny_prick.dm b/code/modules/antagonists/changeling/powers/tiny_prick.dm index 00cdea06e96..ffab0a7de58 100644 --- a/code/modules/antagonists/changeling/powers/tiny_prick.dm +++ b/code/modules/antagonists/changeling/powers/tiny_prick.dm @@ -22,7 +22,7 @@ return ..() -/datum/action/changeling/sting/Trigger() +/datum/action/changeling/sting/Trigger(left_click = TRUE) if(!ischangeling(owner) || !ishuman(owner)) to_chat(owner, span_warning("We cannot do that in this form!")) return @@ -142,7 +142,7 @@ return ..() -/datum/action/changeling/sting/transformation/Trigger() +/datum/action/changeling/sting/transformation/Trigger(left_click = TRUE) if(!ishuman(owner)) to_chat(owner, span_warning("We cannot do that in this form!")) return diff --git a/code/modules/antagonists/space_dragon/action.dm b/code/modules/antagonists/space_dragon/action.dm index 6f5034b708c..83d31ce010b 100644 --- a/code/modules/antagonists/space_dragon/action.dm +++ b/code/modules/antagonists/space_dragon/action.dm @@ -10,7 +10,7 @@ check_flags = AB_CHECK_CONSCIOUS -/datum/action/innate/small_sprite_dragon/Trigger() +/datum/action/innate/small_sprite_dragon/Trigger(left_click = TRUE) ..() if(owner.stat == DEAD) return @@ -50,7 +50,7 @@ space_dragon = null -/datum/action/innate/space_dragon_gust/Trigger() +/datum/action/innate/space_dragon_gust/Trigger(left_click = TRUE) . = ..() if(space_dragon?.stat == DEAD) return diff --git a/code/modules/antagonists/space_ninja/creeping_widow/creeping_widow_martial_art.dm b/code/modules/antagonists/space_ninja/creeping_widow/creeping_widow_martial_art.dm index c0ec618d6b0..6f0077fe4e5 100644 --- a/code/modules/antagonists/space_ninja/creeping_widow/creeping_widow_martial_art.dm +++ b/code/modules/antagonists/space_ninja/creeping_widow/creeping_widow_martial_art.dm @@ -82,7 +82,7 @@ "[attacker]\ punches you in the neck and puts you in a [hold_name]! You are unable to speak!") defender.AdjustSilence(40 SECONDS) defender.adjustOxyLoss(20) - defender.apply_damage(5, BRUTE, pick("head", "mouth")) + defender.apply_damage(5, BRUTE, pick(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH)) addtimer(CALLBACK(src, PROC_REF(regain_focus), attacker), 300) return TRUE diff --git a/code/modules/antagonists/space_ninja/creeping_widow/neck_slice.dm b/code/modules/antagonists/space_ninja/creeping_widow/neck_slice.dm index c01d3dcc4a7..21c6bbc6a2d 100644 --- a/code/modules/antagonists/space_ninja/creeping_widow/neck_slice.dm +++ b/code/modules/antagonists/space_ninja/creeping_widow/neck_slice.dm @@ -17,11 +17,8 @@ playsound(get_turf(target), 'sound/weapons/katana-slice-loud.ogg', 75, TRUE, -1) target.visible_message("[user] cuts [target] throat with [creeping_widow.my_energy_katana]!", \ "[user] cuts your throat with [creeping_widow.my_energy_katana]!") - for(var/bodypart in target.bodyparts) - var/obj/item/organ/external/current_organ = bodypart - if(current_organ.limb_name == "head") - current_organ.droplimb() // Просто отрезаем голову. Можешь жить без головы? Значит тебе повезло! Или тебя добьют руками... - break + var/obj/item/organ/external/head_organ = target.get_organ(BODY_ZONE_HEAD) + head_organ?.droplimb() else playsound(get_turf(target), 'sound/weapons/blade_unsheath.ogg', 75, TRUE, -1) target.visible_message("[user] tries to cut [target] throat with [creeping_widow.my_energy_katana]! But fails!", \ diff --git a/code/modules/antagonists/space_ninja/creeping_widow/wrench_wrist.dm b/code/modules/antagonists/space_ninja/creeping_widow/wrench_wrist.dm index e532dab7dc0..c19a4a548f5 100644 --- a/code/modules/antagonists/space_ninja/creeping_widow/wrench_wrist.dm +++ b/code/modules/antagonists/space_ninja/creeping_widow/wrench_wrist.dm @@ -16,7 +16,7 @@ playsound(get_turf(user), 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1) target.emote("scream") target.drop_from_active_hand() - target.apply_damage(5, BRUTE, pick("l_arm", "r_arm")) + target.apply_damage(5, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) target.Stun(2 SECONDS) add_attack_logs(user, target, "Melee attacked with martial-art [creeping_widow.name] : [name]") addtimer(CALLBACK(creeping_widow, TYPE_PROC_REF(/datum/martial_art/ninja_martial_art, regain_focus), user), 50) diff --git a/code/modules/antagonists/space_ninja/energy_katana.dm b/code/modules/antagonists/space_ninja/energy_katana.dm index cdc2d0e9fdf..c2b7c1c85e5 100644 --- a/code/modules/antagonists/space_ninja/energy_katana.dm +++ b/code/modules/antagonists/space_ninja/energy_katana.dm @@ -54,7 +54,7 @@ jaunt.update_action_style(color_style) else var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(affecting.droplimb()) H.UpdateDamageIcon() playsound(src, 'sound/creatures/terrorspiders/rip.ogg', 120, 1) @@ -71,7 +71,7 @@ playsound(get_turf(src), 'sound/items/unsheath.ogg', 25, TRUE, 5) if(!isninja(user) && !isrobot(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(affecting.receive_damage(20)) //INFERNO H.UpdateDamageIcon() to_chat(user, span_userdanger("Oh fuck, it hurts!.")) @@ -88,7 +88,7 @@ /obj/item/melee/energy_katana/attack(mob/living/target, mob/living/carbon/human/user) if(!isninja(user) && !isrobot(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(affecting.droplimb()) H.UpdateDamageIcon() playsound(src, 'sound/creatures/terrorspiders/rip.ogg', 120, 1) diff --git a/code/modules/antagonists/space_ninja/suit/ninja_equipment_actions/energy_net_nets.dm b/code/modules/antagonists/space_ninja/suit/ninja_equipment_actions/energy_net_nets.dm index 4429ec639f8..18dd894bc5e 100644 --- a/code/modules/antagonists/space_ninja/suit/ninja_equipment_actions/energy_net_nets.dm +++ b/code/modules/antagonists/space_ninja/suit/ninja_equipment_actions/energy_net_nets.dm @@ -37,7 +37,11 @@ /obj/structure/energy_net/Destroy() if(!QDELETED(affected_mob)) - affected_mob.visible_message(span_notice("[affected_mob.name] is recovered from the energy net!"), span_notice("You are recovered from the energy net!"), span_hear("You hear a grunt.")) + affected_mob.visible_message( + span_notice("[affected_mob.name] is recovered from the energy net!"), + span_notice("You are recovered from the energy net!"), + span_italics("You hear a grunt."), + ) affected_mob = null return ..() diff --git a/code/modules/antagonists/traitor/contractor/datums/contractor.dm b/code/modules/antagonists/traitor/contractor/datums/contractor.dm index 3a4b280a4b6..04dd07e0562 100644 --- a/code/modules/antagonists/traitor/contractor/datums/contractor.dm +++ b/code/modules/antagonists/traitor/contractor/datums/contractor.dm @@ -15,7 +15,7 @@ special_role = SPECIAL_ROLE_TRAITOR antag_hud_type = ANTAG_HUD_TRAITOR /// How many telecrystals a traitor must forfeit to become a contractor. - var/tc_cost = 20 + var/tc_cost = 100 /// How long a traitor's chance to become a contractor lasts before going away. In deciseconds. var/offer_duration = 10 MINUTES /// world.time at which the offer will expire. diff --git a/code/modules/antagonists/traitor/contractor/datums/contractor_hub.dm b/code/modules/antagonists/traitor/contractor/datums/contractor_hub.dm index e5b263aa26a..ae9d7e3f2fb 100644 --- a/code/modules/antagonists/traitor/contractor/datums/contractor_hub.dm +++ b/code/modules/antagonists/traitor/contractor/datums/contractor_hub.dm @@ -12,9 +12,9 @@ /// Completing every contract at a given difficulty will always result in a sum of TC greater or equal than the difficulty's threshold. /// Structure: EXTRACTION_DIFFICULTY_(EASY|MEDIUM|HARD) => number var/difficulty_tc_thresholds = list( - EXTRACTION_DIFFICULTY_EASY = 20, - EXTRACTION_DIFFICULTY_MEDIUM = 30, - EXTRACTION_DIFFICULTY_HARD = 40, + EXTRACTION_DIFFICULTY_EASY = 100, + EXTRACTION_DIFFICULTY_MEDIUM = 150, + EXTRACTION_DIFFICULTY_HARD = 200, ) /// Maximum variation a single contract's TC reward can have upon generation. /// In other words: final_reward = CEILING((tc_threshold / num_contracts) * (1 + (rand(-100, 100) / 100) * tc_variation), 1) diff --git a/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm b/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm index f721e9ae9d7..9da44be0d12 100644 --- a/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm +++ b/code/modules/antagonists/traitor/contractor/datums/syndicate_contract.dm @@ -357,6 +357,14 @@ victim_belongings = list() var/list/obj/item/stuff_to_transfer = list() + // Speciall skrell headpocket handling + var/obj/item/organ/internal/headpocket/headpocket = M.get_organ_slot(INTERNAL_ORGAN_HEADPOCKET) + if(headpocket) + var/turf/target_turf = get_turf(M) + for(var/obj/item/item in headpocket.pocket.contents) + stuff_to_transfer += item + headpocket.pocket.remove_from_storage(item, target_turf) + // Cybernetic implants get removed first (to deal with NODROP stuff) for(var/obj/item/organ/internal/cyberimp/I in H.internal_organs) // Greys get to keep their implant diff --git a/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm b/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm index cff025b7ea6..1d7f33f564f 100644 --- a/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm +++ b/code/modules/antagonists/traitor/contractor/items/contractor_pinpointer.dm @@ -13,7 +13,7 @@ /// The first person to have used the item. If this is set already, no one else can use it. var/mob/owner = null -/obj/item/pinpointer/crew/contractor/point_at(atom/target) +/obj/item/pinpointer/crew/contractor/pinpoint_at(atom/target) if(target && trackable(target)) // Calc dir var/turf/T = get_turf(target) diff --git a/code/modules/antagonists/vampire/vampire_datum.dm b/code/modules/antagonists/vampire/vampire_datum.dm index fea211493c5..6d4c9e64f5e 100644 --- a/code/modules/antagonists/vampire/vampire_datum.dm +++ b/code/modules/antagonists/vampire/vampire_datum.dm @@ -101,7 +101,7 @@ if(!transformation) check_vampire_upgrade(announce = FALSE) - user.faction |= "vampire" + user.faction |= ROLE_VAMPIRE user.dna?.species?.hunger_type = "vampire" user.dna?.species?.hunger_icon = 'icons/mob/screen_hunger_vampire.dmi' @@ -113,7 +113,7 @@ remove_all_powers() if(!transformation) - user.faction -= "vampire" + user.faction -= ROLE_VAMPIRE var/datum/hud/hud = user.hud_used if(hud?.vampire_blood_display) @@ -538,14 +538,14 @@ /datum/antagonist/mindslave/thrall/apply_innate_effects(mob/living/mob_override) var/mob/living/user = ..() - user.faction |= "vampire" + user.faction |= ROLE_VAMPIRE if(!mob_override) user.mind?.AddSpell(new /obj/effect/proc_holder/spell/vampire/thrall_commune) /datum/antagonist/mindslave/thrall/remove_innate_effects(mob/living/mob_override) var/mob/living/user = ..() - user.faction -= "vampire" + user.faction -= ROLE_VAMPIRE if(!mob_override) user.mind?.RemoveSpell(/obj/effect/proc_holder/spell/vampire/thrall_commune) diff --git a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm index f7a089d4a32..9b6fc212fac 100644 --- a/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/bestia_powers.dm @@ -57,18 +57,18 @@ return switch(trophie_type) - if("hearts") - return bestia.trophies["hearts"] - if("lungs") - return bestia.trophies["lungs"] - if("livers") - return bestia.trophies["livers"] - if("kidneys") - return bestia.trophies["kidneys"] - if("eyes") - return bestia.trophies["eyes"] - if("ears") - return bestia.trophies["ears"] + if(INTERNAL_ORGAN_HEART) + return bestia.trophies[INTERNAL_ORGAN_HEART] + if(INTERNAL_ORGAN_LUNGS) + return bestia.trophies[INTERNAL_ORGAN_LUNGS] + if(INTERNAL_ORGAN_LIVER) + return bestia.trophies[INTERNAL_ORGAN_LIVER] + if(INTERNAL_ORGAN_KIDNEYS) + return bestia.trophies[INTERNAL_ORGAN_KIDNEYS] + if(INTERNAL_ORGAN_EYES) + return bestia.trophies[INTERNAL_ORGAN_KIDNEYS] + if(INTERNAL_ORGAN_EARS) + return bestia.trophies[INTERNAL_ORGAN_EARS] else stack_trace("Invalid trophie type!") @@ -86,67 +86,67 @@ var/new_trophies var/new_amount switch(trophie_type) - if("hearts") - prev_trophies = bestia.trophies["hearts"] + if(INTERNAL_ORGAN_HEART) + prev_trophies = bestia.trophies[INTERNAL_ORGAN_HEART] new_amount = prev_trophies + amount new_trophies = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_CRITICAL) - bestia.trophies["hearts"] = new_trophies + bestia.trophies[INTERNAL_ORGAN_HEART] = new_trophies - damage_modifiers["brute"] = CEILING((new_trophies * (TROPHIES_CAP_PROT_BRUTE / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 - damage_modifiers["burn"] = CEILING((new_trophies * (TROPHIES_CAP_PROT_BURN / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 + damage_modifiers[BRUTE] = CEILING((new_trophies * (TROPHIES_CAP_PROT_BRUTE / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 + damage_modifiers[BURN] = CEILING((new_trophies * (TROPHIES_CAP_PROT_BURN / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 if((prev_trophies == 0 && new_amount < 0) || (prev_trophies == MAX_TROPHIES_PER_TYPE_CRITICAL && new_amount > MAX_TROPHIES_PER_TYPE_CRITICAL)) update_spells = FALSE - if("lungs") - prev_trophies = bestia.trophies["lungs"] + if(INTERNAL_ORGAN_LUNGS) + prev_trophies = bestia.trophies[INTERNAL_ORGAN_LUNGS] new_amount = prev_trophies + amount new_trophies = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_CRITICAL) - bestia.trophies["lungs"] = new_trophies + bestia.trophies[INTERNAL_ORGAN_LUNGS] = new_trophies - damage_modifiers["oxy"] = CEILING((new_trophies * (TROPHIES_CAP_PROT_OXY / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 - damage_modifiers["stamina"] = CEILING((new_trophies * (TROPHIES_CAP_PROT_STAMINA / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 + damage_modifiers[OXY] = CEILING((new_trophies * (TROPHIES_CAP_PROT_OXY / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 + damage_modifiers[STAMINA] = CEILING((new_trophies * (TROPHIES_CAP_PROT_STAMINA / MAX_TROPHIES_PER_TYPE_CRITICAL)), 1) / 100 if((prev_trophies == 0 && new_amount < 0) || (prev_trophies == MAX_TROPHIES_PER_TYPE_CRITICAL && new_amount > MAX_TROPHIES_PER_TYPE_CRITICAL)) update_spells = FALSE - if("livers") - prev_trophies = bestia.trophies["livers"] + if(INTERNAL_ORGAN_LIVER) + prev_trophies = bestia.trophies[INTERNAL_ORGAN_LIVER] new_amount = prev_trophies + amount new_trophies = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_GENERAL) - bestia.trophies["livers"] = new_trophies + bestia.trophies[INTERNAL_ORGAN_LIVER] = new_trophies - damage_modifiers["tox"] = (new_trophies * (TROPHIES_CAP_PROT_TOX / MAX_TROPHIES_PER_TYPE_GENERAL)) / 100 + damage_modifiers[TOX] = (new_trophies * (TROPHIES_CAP_PROT_TOX / MAX_TROPHIES_PER_TYPE_GENERAL)) / 100 if((prev_trophies == 0 && new_amount < 0) || (prev_trophies == MAX_TROPHIES_PER_TYPE_GENERAL && new_amount > MAX_TROPHIES_PER_TYPE_GENERAL)) update_spells = FALSE - if("kidneys") - prev_trophies = bestia.trophies["kidneys"] + if(INTERNAL_ORGAN_KIDNEYS) + prev_trophies = bestia.trophies[INTERNAL_ORGAN_KIDNEYS] new_amount = prev_trophies + amount new_trophies = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_GENERAL) - bestia.trophies["kidneys"] = new_trophies + bestia.trophies[INTERNAL_ORGAN_KIDNEYS] = new_trophies - damage_modifiers["clone"] = (new_trophies * (TROPHIES_CAP_PROT_CLONE / MAX_TROPHIES_PER_TYPE_GENERAL)) / 100 - damage_modifiers["brain"] = (new_trophies * (TROPHIES_CAP_PROT_BRAIN / MAX_TROPHIES_PER_TYPE_GENERAL)) / 100 + damage_modifiers[CLONE] = (new_trophies * (TROPHIES_CAP_PROT_CLONE / MAX_TROPHIES_PER_TYPE_GENERAL)) / 100 + damage_modifiers[BRAIN] = (new_trophies * (TROPHIES_CAP_PROT_BRAIN / MAX_TROPHIES_PER_TYPE_GENERAL)) / 100 suck_rate = clamp(BESTIA_SUCK_RATE - (new_trophies * TROPHIES_SUCK_BONUS), 0.1 SECONDS, BESTIA_SUCK_RATE) if((prev_trophies == 0 && new_amount < 0) || (prev_trophies == MAX_TROPHIES_PER_TYPE_GENERAL && new_amount > MAX_TROPHIES_PER_TYPE_GENERAL)) update_spells = FALSE - if("eyes") - prev_trophies = bestia.trophies["eyes"] + if(INTERNAL_ORGAN_EYES) + prev_trophies = bestia.trophies[INTERNAL_ORGAN_EYES] new_amount = prev_trophies + amount - bestia.trophies["eyes"] = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_GENERAL) + bestia.trophies[INTERNAL_ORGAN_EYES] = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_GENERAL) if((prev_trophies == 0 && new_amount < 0) || (prev_trophies == MAX_TROPHIES_PER_TYPE_GENERAL && new_amount > MAX_TROPHIES_PER_TYPE_GENERAL)) update_spells = FALSE - if("ears") - prev_trophies = bestia.trophies["ears"] + if(INTERNAL_ORGAN_EARS) + prev_trophies = bestia.trophies[INTERNAL_ORGAN_EARS] new_amount = prev_trophies + amount - bestia.trophies["ears"] = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_GENERAL) + bestia.trophies[INTERNAL_ORGAN_EARS] = clamp(new_amount, 0, MAX_TROPHIES_PER_TYPE_GENERAL) if((prev_trophies == 0 && new_amount < 0) || (prev_trophies == MAX_TROPHIES_PER_TYPE_GENERAL && new_amount > MAX_TROPHIES_PER_TYPE_GENERAL)) update_spells = FALSE @@ -165,7 +165,7 @@ /obj/effect/proc_holder/spell/vampire/proc/do_blood_discount(datum/antagonist/vampire/vampire) - var/livers_amount = vampire.get_trophies("livers") + var/livers_amount = vampire.get_trophies(INTERNAL_ORGAN_LIVER) var/blood_cost_init = initial(required_blood) var/blood_adjust = livers_amount * (TROPHIES_CAP_BLOOD_REDUCE / MAX_TROPHIES_PER_TYPE_GENERAL) required_blood = blood_cost_init - blood_adjust @@ -198,8 +198,8 @@ * \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////////////////////////////////////// * \*======================================================================================================================================*/ /datum/antagonist/vampire/proc/check_trophies_passives() - var/t_ears = get_trophies("ears") - var/t_eyes = get_trophies("eyes") + var/t_ears = get_trophies(INTERNAL_ORGAN_EARS) + var/t_eyes = get_trophies(INTERNAL_ORGAN_EYES) if(t_ears >= TROPHIES_EARS_BANG_PROT) add_ability(/datum/vampire_passive/ears_bang_protection) @@ -262,6 +262,14 @@ required_blood = 10 deduct_blood_on_cast = FALSE var/is_dissecting = FALSE + var/static/list/vampire_dissect_organs = list( + INTERNAL_ORGAN_HEART, + INTERNAL_ORGAN_LUNGS, + INTERNAL_ORGAN_LIVER, + INTERNAL_ORGAN_KIDNEYS, + INTERNAL_ORGAN_EYES, + INTERNAL_ORGAN_EARS, + ) /obj/effect/proc_holder/spell/vampire/self/dissect/can_cast(mob/user = usr, charge_check = TRUE, show_message = FALSE) @@ -309,30 +317,20 @@ return TRUE -GLOBAL_LIST_INIT(vampire_dissect_organs, list( - /obj/item/organ/internal/heart, - /obj/item/organ/internal/lungs, - /obj/item/organ/internal/liver, - /obj/item/organ/internal/kidneys, - /obj/item/organ/internal/eyes, - /obj/item/organ/internal/ears -)) - - /obj/effect/proc_holder/spell/vampire/self/dissect/cast(list/targets, mob/user = usr) var/obj/item/grab/grab = user.get_active_hand() var/mob/living/carbon/human/target = grab.affecting var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire) - var/t_hearts = vampire.get_trophies("hearts") - var/t_lungs = vampire.get_trophies("lungs") - var/t_livers = vampire.get_trophies("livers") - var/t_kidneys = vampire.get_trophies("kidneys") - var/t_eyes = vampire.get_trophies("eyes") - var/t_ears = vampire.get_trophies("ears") + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) + var/t_lungs = vampire.get_trophies(INTERNAL_ORGAN_LUNGS) + var/t_livers = vampire.get_trophies(INTERNAL_ORGAN_LIVER) + var/t_kidneys = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) + var/t_eyes = vampire.get_trophies(INTERNAL_ORGAN_EYES) + var/t_ears = vampire.get_trophies(INTERNAL_ORGAN_EARS) var/list/all_organs = list() - for(var/obj/item/organ/internal/organ in target.internal_organs) - if(!is_type_in_list(organ, GLOB.vampire_dissect_organs) || (organ.status & ORGAN_ROBOT)) + for(var/obj/item/organ/internal/organ as anything in target.internal_organs) + if(!(organ.slot in vampire_dissect_organs) || organ.is_robotic()) continue if(istype(organ, /obj/item/organ/internal/heart) && \ (t_hearts >= vampire.subclass.crit_organ_cap || t_hearts >= MAX_TROPHIES_PER_TYPE_CRITICAL)) @@ -349,15 +347,15 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( if(istype(organ, /obj/item/organ/internal/ears) && t_ears >= MAX_TROPHIES_PER_TYPE_GENERAL) continue - all_organs |= organ + all_organs += organ if(!length(all_organs)) to_chat(user, span_warning("[target] has no compatible organs to dissect!")) return - for(var/obj/item/organ/internal/organ in all_organs) + for(var/obj/item/organ/internal/organ as anything in all_organs) all_organs -= organ - all_organs[organ.name] = organ + all_organs[organ.slot] = organ var/obj/item/organ/internal/organ_to_dissect = input("Select organ to dissect:", "Organ dissection", null, null) as null|anything in all_organs if(!organ_to_dissect || !special_check(user, TRUE)) @@ -405,7 +403,8 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/obj/item/thing = organ_to_dissect.remove(target) qdel(thing) target.vomit(50, TRUE, FALSE) - target.emote("scream") + if(target.has_pain()) + target.emote("scream") var/unique_dissect_id = target.UID() if(!(unique_dissect_id in vampire.dissected_humans)) @@ -414,33 +413,33 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/msg switch(organ_to_dissect.slot) - if("heart") - vampire.adjust_trophies("hearts", 1) - if(vampire.get_trophies("hearts") >= MAX_TROPHIES_PER_TYPE_CRITICAL) + if(INTERNAL_ORGAN_HEART) + vampire.adjust_trophies(INTERNAL_ORGAN_HEART, 1) + if(vampire.get_trophies(INTERNAL_ORGAN_HEART) >= MAX_TROPHIES_PER_TYPE_CRITICAL) msg = "hearts" - else if(vampire.get_trophies("hearts") >= vampire.subclass.crit_organ_cap) + else if(vampire.get_trophies(INTERNAL_ORGAN_HEART) >= vampire.subclass.crit_organ_cap) to_chat(user, span_warning("We reached our limit to dissect critical organs of type hearts!")) - if("lungs") - vampire.adjust_trophies("lungs", 1) - if(vampire.get_trophies("lungs") >= MAX_TROPHIES_PER_TYPE_CRITICAL) + if(INTERNAL_ORGAN_LUNGS) + vampire.adjust_trophies(INTERNAL_ORGAN_LUNGS, 1) + if(vampire.get_trophies(INTERNAL_ORGAN_LUNGS) >= MAX_TROPHIES_PER_TYPE_CRITICAL) msg = "lungs" - else if(vampire.get_trophies("lungs") >= vampire.subclass.crit_organ_cap) + else if(vampire.get_trophies(INTERNAL_ORGAN_LUNGS) >= vampire.subclass.crit_organ_cap) to_chat(user, span_warning("We reached our limit to dissect critical organs of type lungs!")) - if("liver") - vampire.adjust_trophies("livers", 1) - if(vampire.get_trophies("livers") >= MAX_TROPHIES_PER_TYPE_GENERAL) + if(INTERNAL_ORGAN_LIVER) + vampire.adjust_trophies(INTERNAL_ORGAN_LIVER, 1) + if(vampire.get_trophies(INTERNAL_ORGAN_LIVER) >= MAX_TROPHIES_PER_TYPE_GENERAL) msg = "livers" - if("kidneys") - vampire.adjust_trophies("kidneys", 1) - if(vampire.get_trophies("kidneys") >= MAX_TROPHIES_PER_TYPE_GENERAL) + if(INTERNAL_ORGAN_KIDNEYS) + vampire.adjust_trophies(INTERNAL_ORGAN_KIDNEYS, 1) + if(vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) >= MAX_TROPHIES_PER_TYPE_GENERAL) msg = "kidneys" - if("eyes") - vampire.adjust_trophies("eyes", 1) - if(vampire.get_trophies("eyes") >= MAX_TROPHIES_PER_TYPE_GENERAL) + if(INTERNAL_ORGAN_EYES) + vampire.adjust_trophies(INTERNAL_ORGAN_EYES, 1) + if(vampire.get_trophies(INTERNAL_ORGAN_EYES) >= MAX_TROPHIES_PER_TYPE_GENERAL) msg = "eyes" - if("ears") - vampire.adjust_trophies("ears", 1) - if(vampire.get_trophies("ears") >= MAX_TROPHIES_PER_TYPE_GENERAL) + if(INTERNAL_ORGAN_EARS) + vampire.adjust_trophies(INTERNAL_ORGAN_EARS, 1) + if(vampire.get_trophies(INTERNAL_ORGAN_EARS) >= MAX_TROPHIES_PER_TYPE_GENERAL) msg = "ears" if(msg) @@ -515,12 +514,12 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( data["trophies_xray"] = TROPHIES_EYES_XRAY data["trophies_bang"] = TROPHIES_EARS_BANG_PROT - data["hearts"] = vampire.get_trophies("hearts") - data["lungs"] = vampire.get_trophies("lungs") - data["livers"] = vampire.get_trophies("livers") - data["kidneys"] = vampire.get_trophies("kidneys") - data["eyes"] = vampire.get_trophies("eyes") - data["ears"] = vampire.get_trophies("ears") + data["hearts"] = vampire.get_trophies(INTERNAL_ORGAN_HEART) + data["lungs"] = vampire.get_trophies(INTERNAL_ORGAN_LUNGS) + data["livers"] = vampire.get_trophies(INTERNAL_ORGAN_LIVER) + data["kidneys"] = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) + data["eyes"] = vampire.get_trophies(INTERNAL_ORGAN_EYES) + data["ears"] = vampire.get_trophies(INTERNAL_ORGAN_EARS) data["suck_rate"] = vampire.suck_rate / 10 data["full_power"] = vampire.get_ability(/datum/vampire_passive/full) @@ -562,7 +561,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/self/infected_trophy/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -647,7 +646,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/datum/antagonist/vampire/vampire = firer.mind?.has_antag_datum(/datum/antagonist/vampire) var/obj/effect/proc_holder/spell/vampire/self/infected_trophy/infected_trophy = locate() in firer.mind?.spell_list if(vampire && infected_trophy) - range += vampire.get_trophies("eyes") // 15 MAX + range += vampire.get_trophies(INTERNAL_ORGAN_EYES) // 15 MAX var/datum/spell_handler/vampire/handler = infected_trophy.custom_handler var/blood_cost = handler.calculate_blood_cost(vampire) vampire.bloodusable -= blood_cost @@ -661,10 +660,10 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( if(!vampire || QDELETED(vampire.subclass)) return - var/t_hearts = vampire.get_trophies("hearts") + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) var/applied_damage = t_hearts * 5 // 30 MAX var/stun_amt = (t_hearts / 2) SECONDS // 3s. MAX - var/effect_aoe = round(vampire.get_trophies("ears") / 4) // 2 MAX + var/effect_aoe = round(vampire.get_trophies(INTERNAL_ORGAN_EARS) / 4) // 2 MAX for(var/mob/living/victim in view(effect_aoe, get_turf(target))) if(victim.loc == firer) // yeah apparently mobs can see what is inside them @@ -682,7 +681,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/mob/living/carbon/c_victim = victim c_victim.vomit(50, TRUE, FALSE) - if(prob(10 + vampire.get_trophies("livers") * 3)) + if(prob(10 + vampire.get_trophies(INTERNAL_ORGAN_LIVER) * 3)) new /obj/effect/temp_visual/cult/sparks(get_turf(victim)) var/datum/disease/vampire/D = new D.Contract(victim) // grave fever @@ -800,13 +799,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( return var/blood_gained = 0 - var/t_hearts = vampire.get_trophies("hearts") - var/t_kidneys = vampire.get_trophies("kidneys") + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) + var/t_kidneys = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) var/confusion_amt = (t_kidneys * 2) SECONDS // 20s. MAX var/weaken_amt = 1 + (t_hearts / 2) SECONDS // 4s. MAX var/blood_vamp_get = t_kidneys // +10 vampire blood MAX var/actual_blood_loss = blood_victim_lose ? blood_victim_lose : t_kidneys * 10 // 100 bloodlose MAX - var/actual_aoe = effect_aoe ? effect_aoe : 1 + round(vampire.get_trophies("ears") / 5) // 3 MAX + var/actual_aoe = effect_aoe ? effect_aoe : 1 + round(vampire.get_trophies(INTERNAL_ORGAN_EARS) / 5) // 3 MAX for(var/mob/living/victim in view(actual_aoe, get_turf(user))) if(victim.loc == user) // yeah apparently mobs can see what is inside them @@ -852,13 +851,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/lunge/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "lungs" || force) - var/lungs_amount = vampire.get_trophies("lungs") + if(trophie_type == INTERNAL_ORGAN_LUNGS || force) + var/lungs_amount = vampire.get_trophies(INTERNAL_ORGAN_LUNGS) bonus_range = lungs_amount // +6 MAX QDEL_NULL(targeting) targeting = create_new_targeting() - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -895,19 +894,19 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/mark/cast(list/targets, mob/living/user = usr) var/mob/living/target = targets[1] var/datum/antagonist/vampire/vampire = user.mind?.has_antag_datum(/datum/antagonist/vampire) - if(!vampire?.subclass) + if(!vampire || !vampire.subclass) return target.apply_status_effect(STATUS_EFFECT_MARK_PREY, vampire) /obj/effect/proc_holder/spell/vampire/mark/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "eyes" || force) - var/eyes_amount = vampire.get_trophies("eyes") + if(trophie_type == INTERNAL_ORGAN_EYES || force) + var/eyes_amount = vampire.get_trophies(INTERNAL_ORGAN_EYES) range = initial(range) + round(eyes_amount / 2) // 8 MAX QDEL_NULL(targeting) targeting = create_new_targeting() - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -987,13 +986,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/metamorphosis/proc/meta_transform(mob/living/carbon/human/user) var/list/restraints = list() if(user.handcuffed) - restraints |= user.handcuffed + restraints += user.handcuffed if(user.legcuffed) - restraints |= user.legcuffed + restraints += user.legcuffed if(user.wear_suit?.breakouttime) - restraints |= user.wear_suit + restraints += user.wear_suit - for(var/obj/item/thing in restraints) + for(var/obj/item/thing as anything in restraints) user.drop_item_ground(thing, force = TRUE) if(free_transform_back) @@ -1090,7 +1089,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/metamorphosis/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -1152,9 +1151,9 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( span_italics("You hear a painfully loud screech!")) var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire) - var/t_hearts = vampire.get_trophies("hearts") - var/t_ears = vampire.get_trophies("eyes") - var/t_kidneys = vampire.get_trophies("kidneys") + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) + var/t_ears = vampire.get_trophies(INTERNAL_ORGAN_EYES) + var/t_kidneys = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) var/confusion_amt = (t_kidneys) SECONDS // 10s. MAX var/weaken_amt = (t_hearts / 3) SECONDS // 2s. MAX var/brain_dmg = t_ears * 3 // 30 MAX @@ -1183,18 +1182,19 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( victim.Deaf(40 SECONDS) victim.Jitter(40 SECONDS) - for(var/obj/object in view(effect_aoe, user)) + for(var/object in view(effect_aoe, user)) if(istype(object, /obj/machinery/light)) var/obj/machinery/light/lamp = object lamp.on = TRUE lamp.break_light_tube() if(istype(object, /obj/structure/window)) - object.take_damage(rand(80, 100)) + var/obj/structure/window/window = object + window.take_damage(rand(80, 100)) /obj/effect/proc_holder/spell/vampire/self/bat_screech/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -1239,13 +1239,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( lunge = new(null) QDEL_NULL(lunge.custom_handler) var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire) - lunge.effect_aoe = round(vampire.get_trophies("ears") / 5) // less AOE range - lunge.blood_victim_lose = vampire.get_trophies("kidneys") * 5 // 50 MAX half as bad as original - lunge.bonus_range = round(vampire.get_trophies("lungs") / 2) // 8 MAX + lunge.effect_aoe = round(vampire.get_trophies(INTERNAL_ORGAN_EARS) / 5) // less AOE range + lunge.blood_victim_lose = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) * 5 // 50 MAX half as bad as original + lunge.bonus_range = round(vampire.get_trophies(INTERNAL_ORGAN_LUNGS) / 2) // 8 MAX lunge.create_new_targeting() - var/all_trophies = vampire.get_trophies("hearts") + vampire.get_trophies("lungs") + vampire.get_trophies("livers") + \ - vampire.get_trophies("kidneys") + vampire.get_trophies("eyes") + vampire.get_trophies("ears") + var/all_trophies = vampire.get_trophies(INTERNAL_ORGAN_HEART) + vampire.get_trophies(INTERNAL_ORGAN_LUNGS) + vampire.get_trophies(INTERNAL_ORGAN_LIVER) + \ + vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) + vampire.get_trophies(INTERNAL_ORGAN_EYES) + vampire.get_trophies(INTERNAL_ORGAN_EARS) lunge_counter += round(all_trophies / 10) // 6 lunges MAX @@ -1277,11 +1277,11 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( continue if(is_path_exist(user, victim)) - targets |= victim + targets += victim if(length(targets)) targets = shuffle(targets) - for(var/mob/living/victim in targets) + for(var/mob/living/victim as anything in targets) if((victim.UID() in same_targets) && length(targets) == 1) INVOKE_ASYNC(lunge, PROC_REF(cast), list(victim), user) break @@ -1290,7 +1290,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( targets -= victim continue - same_targets |= victim.UID() + same_targets += victim.UID() targets -= victim INVOKE_ASYNC(lunge, PROC_REF(cast), list(victim), user) break @@ -1299,7 +1299,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/self/lunge_finale/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -1422,7 +1422,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/self/anabiosis/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -1507,18 +1507,18 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/structure/closet/coffin/vampire/proc/update_trophies(datum/antagonist/vampire/vampire) - heal_brute += vampire.get_trophies("hearts") // 150 MAX - heal_burn += vampire.get_trophies("hearts") // 150 MAX - heal_tox += vampire.get_trophies("livers") // 210 MAX - heal_oxy += vampire.get_trophies("lungs") * 2 // 300 MAX - heal_clone += round(vampire.get_trophies("kidneys") / 2) // 105 MAX - heal_blood += vampire.get_trophies("kidneys") * 2 // 480 MAX - heal_organs += round(vampire.get_trophies("kidneys") / 5) // 45 MAX - - amount_reagents_cleansed += vampire.get_trophies("livers") // 15 MAX - chance_mend_fracture += vampire.get_trophies("hearts") * 4 // 24% MAX - chance_stop_internal_bleeding += vampire.get_trophies("hearts") * 4 // 24% MAX - chance_regrow_limb += vampire.get_trophies("lungs") * 2 // 12% MAX + heal_brute += vampire.get_trophies(INTERNAL_ORGAN_HEART) // 150 MAX + heal_burn += vampire.get_trophies(INTERNAL_ORGAN_HEART) // 150 MAX + heal_tox += vampire.get_trophies(INTERNAL_ORGAN_LIVER) // 210 MAX + heal_oxy += vampire.get_trophies(INTERNAL_ORGAN_LUNGS) * 2 // 300 MAX + heal_clone += round(vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) / 2) // 105 MAX + heal_blood += vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) * 2 // 480 MAX + heal_organs += round(vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) / 5) // 45 MAX + + amount_reagents_cleansed += vampire.get_trophies(INTERNAL_ORGAN_LIVER) // 15 MAX + chance_mend_fracture += vampire.get_trophies(INTERNAL_ORGAN_HEART) * 4 // 24% MAX + chance_stop_internal_bleeding += vampire.get_trophies(INTERNAL_ORGAN_HEART) * 4 // 24% MAX + chance_regrow_limb += vampire.get_trophies(INTERNAL_ORGAN_LUNGS) * 2 // 12% MAX if(vampire.get_ability(/datum/vampire_passive/full)) fullpower_unlocked = TRUE @@ -1594,15 +1594,15 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( human_vampire.blood_volume = clamp(human_vampire.blood_volume + heal_blood, 0, BLOOD_VOLUME_NORMAL) // internal organs - for(var/obj/item/organ/internal/organ in human_vampire.internal_organs) + for(var/obj/item/organ/internal/organ as anything in human_vampire.internal_organs) organ.heal_internal_damage(heal_organs, TRUE) // fractures if(chance_mend_fracture) - for(var/obj/item/organ/external/body_part in human_vampire.bodyparts) + for(var/obj/item/organ/external/body_part as anything in human_vampire.bodyparts) if(QDELETED(body_part)) continue - if(!(body_part.status & ORGAN_BROKEN)) + if(!body_part.has_fracture()) continue if(body_part.is_robotic()) continue @@ -1612,13 +1612,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( // internal bleedings if(chance_stop_internal_bleeding) - for(var/obj/item/organ/external/body_part in human_vampire.bodyparts) + for(var/obj/item/organ/external/body_part as anything in human_vampire.bodyparts) if(QDELETED(body_part)) continue - if(!body_part.internal_bleeding) + if(!body_part.has_internal_bleeding()) continue if(prob(chance_stop_internal_bleeding)) - body_part.internal_bleeding = FALSE + body_part.stop_internal_bleeding() break // regrowing limbs @@ -1630,7 +1630,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/list/specie_limbs = human_vampire.dna.species.has_limbs[index] var/obj/item/organ/external/limb_path = specie_limbs["path"] - var/obj/item/organ/external/potential_parent = human_vampire.bodyparts_by_name[initial(limb_path.parent_organ)] + var/obj/item/organ/external/potential_parent = human_vampire.bodyparts_by_name[initial(limb_path.parent_organ_zone)] if(!istype(potential_parent)) continue @@ -1662,24 +1662,29 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( human_vampire.ExtinguishMob() human_vampire.fire_stacks = 0 human_vampire.uncuff() + human_vampire.remove_all_embedded_objects() - for(var/obj/item/organ/external/body_part in human_vampire.bodyparts) + for(var/obj/item/organ/external/body_part as anything in human_vampire.bodyparts) if(QDELETED(body_part)) continue if(body_part.is_robotic()) body_part.status = ORGAN_ROBOT else - if(body_part.status & ORGAN_BROKEN) // we have separate method to mend fractures - body_part.status = ORGAN_BROKEN - else - body_part.status = NONE + var/fractured = body_part.has_fracture() + var/bleeding = body_part.has_internal_bleeding() + body_part.status = NONE + if(fractured) // we have separate method to mend fractures + body_part.status |= ORGAN_BROKEN + if(bleeding) // and stop internal bleedings too + body_part.status |= ORGAN_INT_BLEED + body_part.germ_level = 0 body_part.open = FALSE - body_part.disfigured = FALSE + body_part.undisfigure() - for(var/obj/item/organ/internal/organ in body_part.internal_organs) + for(var/obj/item/organ/internal/organ as anything in body_part.internal_organs) if(QDELETED(organ)) continue @@ -1689,7 +1694,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( else organ.status = NONE - for(var/datum/disease/virus in human_vampire.diseases) + for(var/datum/disease/virus as anything in human_vampire.diseases) if(virus.severity == NONTHREAT) continue virus.cure(need_immunity = FALSE) @@ -1783,7 +1788,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/user_UID = user.UID() if(!(user_UID in lightheaded)) - lightheaded |= user_UID + lightheaded += user_UID to_chat(user, span_warning("You feel like this is not a good idea...")) else lightheaded -= user_UID @@ -1841,8 +1846,8 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/self/bats_spawn/cast(list/targets, mob/living/user = usr) var/datum/antagonist/vampire/vampire = user.mind.has_antag_datum(/datum/antagonist/vampire) - var/all_trophies = vampire.get_trophies("hearts") + vampire.get_trophies("lungs") + vampire.get_trophies("livers") + \ - vampire.get_trophies("kidneys") + vampire.get_trophies("eyes") + vampire.get_trophies("ears") + var/all_trophies = vampire.get_trophies(INTERNAL_ORGAN_HEART) + vampire.get_trophies(INTERNAL_ORGAN_LUNGS) + vampire.get_trophies(INTERNAL_ORGAN_LIVER) + \ + vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) + vampire.get_trophies(INTERNAL_ORGAN_EYES) + vampire.get_trophies(INTERNAL_ORGAN_EARS) // 4 bats MAX if(all_trophies <= 40) num_bats += round(all_trophies / 20) @@ -1875,7 +1880,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /obj/effect/proc_holder/spell/vampire/self/bats_spawn/on_trophie_update(datum/antagonist/vampire/vampire, trophie_type, force = FALSE) - if(trophie_type == "livers" || force) + if(trophie_type == INTERNAL_ORGAN_LIVER || force) do_blood_discount(vampire) @@ -1888,7 +1893,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( name = "vampire animal" real_name = "vampire animal" desc = "Report me!" - faction = list("vampire") + faction = list(ROLE_VAMPIRE) response_help = "pets the" response_disarm = "gently pushes aside the" response_harm = "hits the" @@ -2047,13 +2052,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( if(!vampire) return - var/t_hearts = vampire.get_trophies("hearts") - health += t_hearts * 20 // 250 MAX + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) + health += t_hearts * 20 // 250 MAX maxHealth += t_hearts * 20 - melee_damage_lower += round(t_hearts / 2) // 13 MAX - melee_damage_upper += t_hearts // 21 MAX - force_threshold += t_hearts * 2 // 15 MAX - speed -= vampire.get_trophies("lungs") * 0.05 // 30% MAX + melee_damage_lower += round(t_hearts / 2) // 13 MAX + melee_damage_upper += t_hearts // 21 MAX + force_threshold += t_hearts * 2 // 15 MAX + speed -= vampire.get_trophies(INTERNAL_ORGAN_LUNGS) * 0.05 // 30% MAX /mob/living/simple_animal/hostile/vampire/bats/add_spells() @@ -2070,21 +2075,21 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/mob/living/l_target = target - if(l_target.affects_vampire(src) && prob(vampire.get_trophies("eyes") * 3)) // 30% chance MAX + if(l_target.affects_vampire(src) && prob(vampire.get_trophies(INTERNAL_ORGAN_EYES) * 3)) // 30% chance MAX l_target.Stun(1 SECONDS) l_target.visible_message(span_danger("[src] scares [l_target]!")) if(!is_vampire_compatible(l_target, only_human = TRUE, blood_required = TRUE) || isvampire(l_target) || isvampirethrall(l_target)) return - var/t_kidneys = vampire.get_trophies("kidneys") + var/t_kidneys = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) if(t_kidneys) var/mob/living/who = src if(health >= maxHealth && human_vampire) who = human_vampire who.heal_ordered_damage(t_kidneys, list(BRUTE, BURN, TOX, OXY, CLONE)) // 10 life-leech on MAX - var/t_livers = vampire.get_trophies("livers") + var/t_livers = vampire.get_trophies(INTERNAL_ORGAN_LIVER) if(t_livers && human_vampire && l_target.mind && l_target.ckey) var/blood_amt = round(t_livers / 2) vampire.adjust_blood(l_target, blood_amt) // +5 vampire blood max @@ -2128,13 +2133,13 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( if(!vampire) return - var/t_hearts = vampire.get_trophies("hearts") - health += t_hearts * 30 // 380 MAX + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) + health += t_hearts * 30 // 380 MAX maxHealth += t_hearts * 30 - melee_damage_lower += t_hearts // 25 MAX - melee_damage_upper += t_hearts // 30 MAX - force_threshold += t_hearts * 3 // 28 MAX - speed -= vampire.get_trophies("lungs") * 0.05 // 30% MAX + melee_damage_lower += t_hearts // 25 MAX + melee_damage_upper += t_hearts // 30 MAX + force_threshold += t_hearts * 3 // 28 MAX + speed -= vampire.get_trophies(INTERNAL_ORGAN_LUNGS) * 0.05 // 30% MAX /mob/living/simple_animal/hostile/vampire/hound/Life(seconds, times_fired) @@ -2147,7 +2152,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( return life_cycles_current = 0 - var/blood_drain = 15 - vampire.get_trophies("livers") // from -5 to -15 blood every 6s. + var/blood_drain = 15 - vampire.get_trophies(INTERNAL_ORGAN_LIVER) // from -5 to -15 blood every 6s. vampire.bloodusable = clamp(vampire.bloodusable - blood_drain, 0, vampire.bloodusable) if(vampire.bloodusable <= 100 && !warning_done) @@ -2166,7 +2171,7 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/mob/living/l_target = target - if(l_target.affects_vampire(src) && prob(vampire.get_trophies("eyes") * 3)) // 30% chance MAX + if(l_target.affects_vampire(src) && prob(vampire.get_trophies(INTERNAL_ORGAN_EYES) * 3)) // 30% chance MAX l_target.Stun(1 SECONDS) l_target.visible_message(span_danger("[src] scares [l_target]!")) @@ -2216,18 +2221,18 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( /mob/living/simple_animal/hostile/vampire/bats_summoned/Initialize(mapload, datum/antagonist/vampire/vamp, mob/living/carbon/human/h_vampire, obj/effect/proc_holder/spell/vampire/metamorphosis/meta_spell) . = ..() - faction = list("vampire") + faction = list(ROLE_VAMPIRE) if(!vampire) return - var/t_hearts = vampire.get_trophies("hearts") - health += t_hearts * 10 // 140 MAX + var/t_hearts = vampire.get_trophies(INTERNAL_ORGAN_HEART) + health += t_hearts * 10 // 140 MAX maxHealth += t_hearts * 10 - melee_damage_lower += round(t_hearts / 2) // 11 MAX - melee_damage_upper += t_hearts // 16 MAX - force_threshold += t_hearts // 9 MAX - speed -= vampire.get_trophies("lungs") * 0.1 // 0.4 MAX + melee_damage_lower += round(t_hearts / 2) // 11 MAX + melee_damage_upper += t_hearts // 16 MAX + force_threshold += t_hearts // 9 MAX + speed -= vampire.get_trophies(INTERNAL_ORGAN_LUNGS) * 0.1 // 0.4 MAX /mob/living/simple_animal/hostile/vampire/bats_summoned/AttackingTarget() @@ -2238,18 +2243,18 @@ GLOBAL_LIST_INIT(vampire_dissect_organs, list( var/mob/living/l_target = target - if(l_target.affects_vampire(src) && prob(round(vampire.get_trophies("eyes") * 1.5))) // 15% chance MAX + if(l_target.affects_vampire(src) && prob(round(vampire.get_trophies(INTERNAL_ORGAN_EYES) * 1.5))) // 15% chance MAX l_target.Stun(1 SECONDS) l_target.visible_message(span_danger("[src] scares [l_target]!")) if(!is_vampire_compatible(l_target, only_human = TRUE, blood_required = TRUE) || isvampire(l_target) || isvampirethrall(l_target)) return - var/t_kidneys = vampire.get_trophies("kidneys") + var/t_kidneys = vampire.get_trophies(INTERNAL_ORGAN_KIDNEYS) if(t_kidneys) heal_ordered_damage(t_kidneys, list(BRUTE, BURN, TOX, OXY, CLONE)) // 10 life-leech on MAX - var/t_livers = vampire.get_trophies("livers") + var/t_livers = vampire.get_trophies(INTERNAL_ORGAN_LIVER) if(t_livers && human_vampire && l_target.mind && l_target.ckey) var/blood_amt = round(t_livers / 2) vampire.adjust_blood(l_target, blood_amt) // +5 vampire blood max diff --git a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm index 5e4e08c385f..722f044322d 100644 --- a/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/hemomancer_powers.dm @@ -36,6 +36,7 @@ if(current) qdel(current) to_chat(user, span_notice("You dispel your claws!")) + return COMPONENT_CANCEL_DROP /obj/effect/proc_holder/spell/vampire/self/vamp_claws/can_cast(mob/user, charge_check, show_message) diff --git a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm index 8c3cbda885d..c85dda65901 100644 --- a/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm +++ b/code/modules/antagonists/vampire/vampire_powers/vampire_powers.dm @@ -222,11 +222,15 @@ return T +/obj/effect/proc_holder/spell/vampire/glare/valid_target(mob/living/target, mob/user) + return !isnull(target.mind) && target.stat != DEAD && target.affects_vampire(user) + + /obj/effect/proc_holder/spell/vampire/glare/create_new_cooldown() var/datum/spell_cooldown/charges/C = new C.max_charges = 2 C.recharge_duration = base_cooldown - C.charge_duration = 2 SECONDS + C.charge_duration = 3 SECONDS return C @@ -237,21 +241,17 @@ /// Full deviation. Flashed from directly behind or behind-left/behind-rack. Not flashed at all. #define DEVIATION_FULL 1 -/obj/effect/proc_holder/spell/vampire/glare/cast(list/targets, mob/living/user = usr) - if(ishuman(user)) - var/mob/living/carbon/human/H = user - if(istype(H.glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) - var/obj/item/clothing/glasses/sunglasses/blindfold/B = H.glasses - if(B.tint) - to_chat(user, span_warning("You're blindfolded!")) - return +/obj/effect/proc_holder/spell/vampire/glare/cast(list/targets, mob/living/carbon/human/user = usr) + if(ishuman(user) && istype(user.glasses, /obj/item/clothing/glasses/sunglasses/blindfold)) + var/obj/item/clothing/glasses/sunglasses/blindfold/blindfold = user.glasses + if(blindfold.tint) + to_chat(user, span_warning("You're blindfolded!")) + return + user.mob_light(LIGHT_COLOR_BLOOD_MAGIC, _range = 3, _duration = 0.2 SECONDS) user.visible_message(span_warning("[user]'s eyes emit a blinding flash!")) - for(var/mob/living/target in targets) - if(!target.affects_vampire(user)) - continue - + for(var/mob/living/target as anything in targets) var/deviation if(user.lying || user.resting) deviation = DEVIATION_PARTIAL @@ -358,10 +358,10 @@ visible_message(span_notice("[H] looks refreshed!")) H.adjustBruteLoss(-60) H.adjustFireLoss(-60) - for(var/obj/item/organ/external/E in H.bodyparts) + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) if(prob(25)) - E.mend_fracture() - E.internal_bleeding = FALSE + bodypart.mend_fracture() + bodypart.stop_internal_bleeding() return if(H.stat != DEAD) diff --git a/code/modules/antagonists/vampire/vampire_subclasses.dm b/code/modules/antagonists/vampire/vampire_subclasses.dm index ae690f17b21..a3af73d3147 100644 --- a/code/modules/antagonists/vampire/vampire_subclasses.dm +++ b/code/modules/antagonists/vampire/vampire_subclasses.dm @@ -19,12 +19,12 @@ var/obj/effect/proc_holder/spell/vampire/self/dissect_info/spell_TGUI /// Associated list of all trophies bestia subclass got via round. var/list/trophies = list( - "hearts" = 0, - "lungs" = 0, - "livers" = 0, - "kidneys" = 0, - "eyes" = 0, - "ears" = 0 + INTERNAL_ORGAN_HEART = 0, + INTERNAL_ORGAN_LUNGS = 0, + INTERNAL_ORGAN_LIVER = 0, + INTERNAL_ORGAN_KIDNEYS = 0, + INTERNAL_ORGAN_EYES = 0, + INTERNAL_ORGAN_EARS = 0, ) diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 898e3df8219..dde6183ca6f 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -52,9 +52,9 @@ switch(type) if("feet") if(!H.shoes) - affecting = H.get_organ(pick("l_leg", "r_leg")) + affecting = H.get_organ(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) H.Weaken(6 SECONDS) - if("l_hand", "r_hand") + if(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND) if(!H.gloves) affecting = H.get_organ(type) H.Stun(6 SECONDS) @@ -77,10 +77,7 @@ to_chat(user, "You arm [src].") else if((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)) - var/which_hand = "l_hand" - if(!user.hand) - which_hand = "r_hand" - triggered(user, which_hand) + triggered(user, user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.visible_message("[user] accidentally sets off [src], breaking [user.p_their()] fingers.", \ "You accidentally trigger [src]!") return @@ -92,10 +89,7 @@ /obj/item/assembly/mousetrap/attack_hand(mob/living/user) if(armed) if((user.getBrainLoss() >= 60 || (CLUMSY in user.mutations)) && prob(50)) - var/which_hand = "l_hand" - if(!user.hand) - which_hand = "r_hand" - triggered(user, which_hand) + triggered(user, user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.visible_message("[user] accidentally sets off [src], breaking [user.p_their()] fingers.", \ "You accidentally trigger [src]!") return @@ -119,7 +113,7 @@ if(armed) finder.visible_message("[finder] accidentally sets off [src], breaking [finder.p_their()] fingers.", \ "You accidentally trigger [src]!") - triggered(finder, finder.hand ? "l_hand" : "r_hand") + triggered(finder, finder.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) return TRUE //end the search! return FALSE diff --git a/code/modules/awaymissions/corpse.dm b/code/modules/awaymissions/corpse.dm index 1b58ca9baf7..b6efd4c3cc8 100644 --- a/code/modules/awaymissions/corpse.dm +++ b/code/modules/awaymissions/corpse.dm @@ -312,7 +312,7 @@ H.underwear = "Nude" H.undershirt = "Nude" H.socks = "Nude" - var/obj/item/organ/external/head/D = H.get_organ("head") + var/obj/item/organ/external/head/D = H.get_organ(BODY_ZONE_HEAD) if(!use_prefs) if(!random) if(_mob_name) diff --git a/code/modules/awaymissions/exile.dm b/code/modules/awaymissions/exile.dm index 0b8a777237c..6d3f5bc0e13 100644 --- a/code/modules/awaymissions/exile.dm +++ b/code/modules/awaymissions/exile.dm @@ -1,35 +1,3 @@ -//Exile implants will allow you to use the station gate, but not return home. -//This will allow security to exile badguys/for badguys to exile their kill targets - -/obj/item/implant/exile - name = "exile implant" - desc = "Prevents you from returning from away missions" - origin_tech = "materials=2;biotech=3;magnets=2;bluespace=3" - activated = 0 - -/obj/item/implant/exile/get_data() - var/dat = {"Implant Specifications:
- Name: Nanotrasen Employee Exile Implant
- Implant Details: The onboard gateway system has been modified to reject entry by individuals containing this implant
"} - return dat - - -/obj/item/implanter/exile - name = "implanter (exile)" - -/obj/item/implanter/exile/New() - imp = new /obj/item/implant/exile( src ) - ..() - -/obj/item/implantcase/exile - name = "implant case - 'Exile'" - desc = "A glass case containing an exile implant." - -/obj/item/implantcase/exile/New() - imp = new /obj/item/implant/exile(src) - ..() - - /obj/structure/closet/secure_closet/exile name = "exile implants" req_access = list(ACCESS_ARMORY) diff --git a/code/modules/client/asset_cache.dm b/code/modules/client/asset_cache.dm index cab2a0bf29f..8da9a859afd 100644 --- a/code/modules/client/asset_cache.dm +++ b/code/modules/client/asset_cache.dm @@ -211,7 +211,9 @@ GLOBAL_LIST_EMPTY(asset_datums) "large_stamp-BIGdeny.png" = 'icons/misc/paper_icons/large_stamp-BIGdeny.png', "large_stamp-navcom.png" = 'icons/misc/paper_icons/large_stamp-navcom.png', "large_stamp-ussp.png" = 'icons/misc/paper_icons/large_stamp-ussp.png', - "ussplogo.png" = 'icons/misc/paper_icons/ussplogo.png' + "ussplogo.png" = 'icons/misc/paper_icons/ussplogo.png', + "solgovlogo.png" = 'icons/misc/paper_icons/solgovlogo.png', + "large_stamp-solgov.png" = 'icons/misc/paper_icons/large_stamp-solgov.png' ) /datum/asset/simple/chess diff --git a/code/modules/client/preference/loadout/loadout_racial.dm b/code/modules/client/preference/loadout/loadout_racial.dm index fb21ba4bfeb..6f20b40faa6 100644 --- a/code/modules/client/preference/loadout/loadout_racial.dm +++ b/code/modules/client/preference/loadout/loadout_racial.dm @@ -50,6 +50,18 @@ allowed_roles = list("Quartermaster", "Cargo Technician") cost = 2 +/datum/gear/racial/taj/diag + display_name = "diagnostic veil" + description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races. This one has an in-built diagnostic HUD." + path = /obj/item/clothing/glasses/hud/diagnostic/tajblind + allowed_roles = list("Roboticist", "Research Director") + cost = 2 +/datum/gear/racial/taj/skills + display_name = "skills veil" + description = "A common traditional nano-fiber veil worn by many Tajaran, It is rare and offensive to see it on other races. This one has an in-built skills HUD." + path = /obj/item/clothing/glasses/hud/skills/tajblind + allowed_roles = list("Head of Personnel", "Captain") + cost = 2 /datum/gear/racial/footwraps display_name = "cloth footwraps" path = /obj/item/clothing/shoes/footwraps diff --git a/code/modules/client/preference/loadout/loadout_shoes.dm b/code/modules/client/preference/loadout/loadout_shoes.dm index 35a4bbf853c..b00e35839cb 100644 --- a/code/modules/client/preference/loadout/loadout_shoes.dm +++ b/code/modules/client/preference/loadout/loadout_shoes.dm @@ -15,6 +15,10 @@ display_name = "work boots" path = /obj/item/clothing/shoes/workboots +/datum/gear/shoes/leather + display_name = "leather shoes" + path = /obj/item/clothing/shoes/leather + /datum/gear/shoes/fancysandals display_name = "sandals, fancy" path = /obj/item/clothing/shoes/sandal/fancy diff --git a/code/modules/client/preference/loadout/loadout_uniform.dm b/code/modules/client/preference/loadout/loadout_uniform.dm index eb6a77da15d..f0fd0c11964 100644 --- a/code/modules/client/preference/loadout/loadout_uniform.dm +++ b/code/modules/client/preference/loadout/loadout_uniform.dm @@ -139,6 +139,10 @@ display_name = "plaid skirt, red" path = /obj/item/clothing/under/dress/plaid_red +/datum/gear/uniform/skirt/redeveninggown + display_name = "red evening gown" + path = /obj/item/clothing/under/redeveninggown + /datum/gear/uniform/skirt/black display_name = "skirt, black" path = /obj/item/clothing/under/blackskirt diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index dbf67718189..66260e6a144 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -221,8 +221,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts "1014" = 50, // CHANNEL_TTS_LOCAL "1013" = 20, // CHANNEL_TTS_RADIO "1012" = 50, // CHANNEL_RADIO_NOISE - "1010" = 100, // CHANNEL_BOSS_MUSIC - "1011" = 100, // CHANNEL_INTERACTION_SOUNDS + "1011" = 100, // CHANNEL_BOSS_MUSIC + "1010" = 100, // CHANNEL_INTERACTION_SOUNDS ) /// The volume mixer save timer handle. Used to debounce the DB call to save, to avoid spamming. var/volume_mixer_saving = null @@ -437,39 +437,39 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/status = organ_data[name] var/organ_name = null switch(name) - if("chest") + if(BODY_ZONE_CHEST) organ_name = "torso" - if("groin") + if(BODY_ZONE_PRECISE_GROIN) organ_name = "lower body" - if("head") + if(BODY_ZONE_HEAD) organ_name = "head" - if("l_arm") + if(BODY_ZONE_L_ARM) organ_name = "left arm" - if("r_arm") + if(BODY_ZONE_R_ARM) organ_name = "right arm" - if("l_leg") + if(BODY_ZONE_L_LEG) organ_name = "left leg" - if("r_leg") + if(BODY_ZONE_R_LEG) organ_name = "right leg" - if("l_foot") + if(BODY_ZONE_PRECISE_L_FOOT) organ_name = "left foot" - if("r_foot") + if(BODY_ZONE_PRECISE_R_FOOT) organ_name = "right foot" - if("l_hand") + if(BODY_ZONE_PRECISE_L_HAND) organ_name = "left hand" - if("r_hand") + if(BODY_ZONE_PRECISE_R_HAND) organ_name = "right hand" - if("eyes") + if(INTERNAL_ORGAN_EYES) organ_name = "eyes" - if("ears") + if(INTERNAL_ORGAN_EARS) organ_name = "ears" - if("heart") + if(INTERNAL_ORGAN_HEART) organ_name = "heart" - if("lungs") + if(INTERNAL_ORGAN_LUNGS) organ_name = "lungs" - if("liver") + if(INTERNAL_ORGAN_LIVER) organ_name = "liver" - if("kidneys") + if(INTERNAL_ORGAN_KIDNEYS) organ_name = "kidneys" if(status in list("cyborg", "amputated", "cybernetic")) @@ -2036,7 +2036,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(S.bodyflags & ALL_RPARTS) valid_limbs = list("Torso", "Lower Body", "Head", "Left Leg", "Right Leg", "Left Arm", "Right Arm", "Left Foot", "Right Foot", "Left Hand", "Right Hand") var/limb_name = input(user, "Which limb do you want to change?") as null|anything in valid_limbs - if(!limb_name) return + if(!limb_name) + return var/limb = null var/second_limb = null // if you try to change the arm, the hand should also change @@ -2046,50 +2047,50 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts switch(limb_name) if("Torso") - limb = "chest" - second_limb = "groin" + limb = BODY_ZONE_CHEST + second_limb = BODY_ZONE_PRECISE_GROIN no_amputate = 1 if("Lower Body") - limb = "groin" + limb = BODY_ZONE_PRECISE_GROIN no_amputate = 1 if("Head") - limb = "head" + limb = BODY_ZONE_HEAD no_amputate = 1 if("Left Leg") - limb = "l_leg" - second_limb = "l_foot" + limb = BODY_ZONE_L_LEG + second_limb = BODY_ZONE_PRECISE_L_FOOT if("Right Leg") - limb = "r_leg" - second_limb = "r_foot" + limb = BODY_ZONE_R_LEG + second_limb = BODY_ZONE_PRECISE_R_FOOT if("Left Arm") - limb = "l_arm" - second_limb = "l_hand" + limb = BODY_ZONE_L_ARM + second_limb = BODY_ZONE_PRECISE_L_HAND if("Right Arm") - limb = "r_arm" - second_limb = "r_hand" + limb = BODY_ZONE_R_ARM + second_limb = BODY_ZONE_PRECISE_R_HAND if("Left Foot") - limb = "l_foot" + limb = BODY_ZONE_PRECISE_L_FOOT if(!(S.bodyflags & ALL_RPARTS)) - third_limb = "l_leg" + third_limb = BODY_ZONE_L_LEG if("Right Foot") - limb = "r_foot" + limb = BODY_ZONE_PRECISE_R_FOOT if(!(S.bodyflags & ALL_RPARTS)) - third_limb = "r_leg" + third_limb = BODY_ZONE_R_LEG if("Left Hand") - limb = "l_hand" + limb = BODY_ZONE_PRECISE_L_HAND if(!(S.bodyflags & ALL_RPARTS)) - third_limb = "l_arm" + third_limb = BODY_ZONE_L_ARM if("Right Hand") - limb = "r_hand" + limb = BODY_ZONE_PRECISE_R_HAND if(!(S.bodyflags & ALL_RPARTS)) - third_limb = "r_arm" + third_limb = BODY_ZONE_R_ARM var/new_state = input(user, "What state do you wish the limb to be in?") as null|anything in valid_limb_states if(!new_state) return switch(new_state) if("Normal") - if(limb == "head") + if(limb == BODY_ZONE_HEAD) m_styles["head"] = "None" h_style = GLOB.hair_styles_public_list["Bald"] f_style = GLOB.facial_hair_styles_list["Shaved"] @@ -2136,10 +2137,10 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts subchoice = input(user, "Which model of [choice] [limb_name] do you wish to use?") as null|anything in robolimb_models if(subchoice) choice = subchoice - if(limb in list("head", "chest", "groin")) + if(limb in list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) if(!(S.bodyflags & ALL_RPARTS)) return - if(limb == "head") + if(limb == BODY_ZONE_HEAD) ha_style = "None" alt_head = null h_style = GLOB.hair_styles_public_list["Bald"] @@ -2163,17 +2164,17 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/organ = null switch(organ_name) if("Eyes") - organ = "eyes" + organ = INTERNAL_ORGAN_EYES if("Ears") - organ = "ears" + organ = INTERNAL_ORGAN_EARS if("Heart") - organ = "heart" + organ = INTERNAL_ORGAN_HEART if("Lungs") - organ = "lungs" + organ = INTERNAL_ORGAN_LUNGS if("Liver") - organ = "liver" + organ = INTERNAL_ORGAN_LIVER if("Kidneys") - organ = "kidneys" + organ = INTERNAL_ORGAN_KIDNEYS var/new_state = input(user, "What state do you wish the organ to be in?") as null|anything in list("Normal", "Cybernetic") if(!new_state) return @@ -2576,7 +2577,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts character.dna.tts_seed_dna = tts_seed //Head-specific - var/obj/item/organ/external/head/H = character.get_organ("head") + var/obj/item/organ/external/head/H = character.get_organ(BODY_ZONE_HEAD) H.hair_colour = h_colour @@ -2613,20 +2614,19 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts else if(status == "cyborg") if(rlimb_data[name]) - O.robotize(rlimb_data[name], convert_all = 0) + O.robotize(company = rlimb_data[name], convert_all = FALSE) else O.robotize() else - var/obj/item/organ/internal/I = character.get_int_organ_tag(name) - if(I) - if(status == "cybernetic") - I.robotize() + var/obj/item/organ/internal/I = character.internal_organs_slot[name] + if(I && status == "cybernetic") + I.robotize() character.dna.blood_type = b_type // Wheelchair necessary? - var/obj/item/organ/external/l_foot = character.get_organ("l_foot") - var/obj/item/organ/external/r_foot = character.get_organ("r_foot") + var/obj/item/organ/external/l_foot = character.get_organ(BODY_ZONE_PRECISE_L_FOOT) + var/obj/item/organ/external/r_foot = character.get_organ(BODY_ZONE_PRECISE_R_FOOT) if(!l_foot && !r_foot) var/obj/structure/chair/wheelchair/W = new /obj/structure/chair/wheelchair(character.loc) W.buckle_mob(character, TRUE) diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 04e2e8bd7bb..4c205adb452 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -24,7 +24,7 @@ sortTim(standard_outfit_options, cmp = /proc/cmp_text_asc) outfit_options = standard_outfit_options -/datum/action/chameleon_outfit/Trigger() +/datum/action/chameleon_outfit/Trigger(left_click = TRUE) return select_outfit(owner) /datum/action/chameleon_outfit/proc/select_outfit(mob/user) @@ -174,7 +174,7 @@ target.icon = initial(picked_item.icon) -/datum/action/item_action/chameleon/change/Trigger() +/datum/action/item_action/chameleon/change/Trigger(left_click = TRUE) if(!IsAvailable()) return diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index b8b0c207c17..37455126894 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -400,7 +400,7 @@ BLIND // can't see anything mask_adjusted = 1 if(adjusted_flags) slot_flags = adjusted_flags - if(ishuman(user) && H.internal && !H.get_organ_slot("breathing_tube") && user.wear_mask == src) /*If the user was wearing the mask providing internals on their face at the time it was adjusted, turn off internals. + if(ishuman(user) && H.internal && !H.get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE) && user.wear_mask == src) /*If the user was wearing the mask providing internals on their face at the time it was adjusted, turn off internals. Otherwise, they adjusted it while it was in their hands or some such so we won't be needing to turn off internals.*/ H.internal = null H.update_action_buttons_icon() diff --git a/code/modules/clothing/glasses/glasses.dm b/code/modules/clothing/glasses/glasses.dm index 106d6e86036..f2ce5d7a2ff 100644 --- a/code/modules/clothing/glasses/glasses.dm +++ b/code/modules/clothing/glasses/glasses.dm @@ -510,7 +510,7 @@ /obj/item/clothing/glasses/thermal/emp_act(severity) if(ishuman(src.loc)) var/mob/living/carbon/human/H = src.loc - var/obj/item/organ/internal/eyes/eyes = H.get_organ_slot("eyes") + var/obj/item/organ/internal/eyes/eyes = H.get_organ_slot(INTERNAL_ORGAN_EYES) if(eyes && H.glasses == src) to_chat(H, "[src] overloads and blinds you!") H.flash_eyes(visual = TRUE) @@ -687,6 +687,6 @@ /obj/item/clothing/glasses/sunglasses/blindfold/cucumbermask desc = "A simple pair of two cucumber slices. Medically proven to be able to heal your eyes over time." name = "cucumber mask" - heal_bodypart = "eyes" + heal_bodypart = INTERNAL_ORGAN_EYES icon_state = "cucumbermask" item_state = "cucumbermask" diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 1e0e7c18060..cb016752b9b 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -287,6 +287,39 @@ /obj/item/clothing/glasses/hud/health/tajblind/attack_self(mob/user = usr) toggle_veil(user) +/obj/item/clothing/glasses/hud/diagnostic/tajblind + name = "Diagnostic veil" + desc = "A tajaran veil capable of analyzing the integrity and status of robotics and exosuits." + icon_state = "tajblind_diagnostic" + item_state = "tajblind_diagnostic" + flags_cover = GLASSESCOVERSEYES + actions_types = list(/datum/action/item_action/toggle) + up = 0 + tint = 0 +/obj/item/clothing/glasses/hud/diagnostic/tajblind/sunglasses + see_in_dark = 1 + flash_protect = 1 + tint = 1 + +/obj/item/clothing/glasses/hud/diagnostic/tajblind/attack_self(mob/user = usr) + toggle_veil(user) +/obj/item/clothing/glasses/hud/skills/tajblind + name = "Skills veil" + desc = "A tajaran veil capable of showing the employment history records of NT crew members." + icon_state = "tajblind_skill" + item_state = "tajblind_skill" + flags_cover = GLASSESCOVERSEYES + actions_types = list(/datum/action/item_action/toggle) + up = 0 + tint = 0 + +/obj/item/clothing/glasses/hud/skills/tajblind/sunglasses + see_in_dark = 1 + flash_protect = 1 + tint = 1 + +/obj/item/clothing/glasses/hud/skills/tajblind/attack_self(mob/user = usr) + toggle_veil(user) /obj/item/clothing/glasses/hud/skills name = "Skills HUD" desc = "A heads-up display capable of showing the employment history records of NT crew members." diff --git a/code/modules/clothing/gloves/miscellaneous.dm b/code/modules/clothing/gloves/miscellaneous.dm index afbe75f9941..9b7f8182a92 100644 --- a/code/modules/clothing/gloves/miscellaneous.dm +++ b/code/modules/clothing/gloves/miscellaneous.dm @@ -175,6 +175,28 @@ /obj/item/clothing/gloves/fingerless/rapid var/accepted_intents = list(INTENT_HARM) var/click_speed_modifier = CLICK_CD_RAPID + var/mob/living/owner + +/obj/item/clothing/gloves/fingerless/rapid/equipped(mob/user, slot, initial) + owner = user + if(istype(owner) && slot == slot_gloves) + owner.dirslash_enabled = TRUE + owner.verbs += /obj/item/clothing/gloves/fingerless/rapid/proc/dirslash_enabling + . = ..() + +/obj/item/clothing/gloves/fingerless/rapid/dropped(mob/user, silent) + owner.verbs -= /obj/item/clothing/gloves/fingerless/rapid/proc/dirslash_enabling + owner.dirslash_enabled = initial(owner.dirslash_enabled) + . = ..() + +/obj/item/clothing/gloves/fingerless/rapid/proc/dirslash_enabling() + set name = "Enable/Disable direction slash" + set desc = "If direction slash is enabled, you can attack mobs, by clicking behind their backs" + set category = "Object" + var/mob/living/L = usr + L.dirslash_enabled = !L.dirslash_enabled + to_chat(src, span_notice("Directrion slash is [L.dirslash_enabled? "enabled" : "disabled"] now.")) + /obj/item/clothing/gloves/fingerless/rapid/Touch(mob/living/target, proximity = TRUE) var/mob/living/M = loc diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 4fb16293b7c..f875c19e718 100644 --- a/code/modules/clothing/head/misc_special.dm +++ b/code/modules/clothing/head/misc_special.dm @@ -285,7 +285,7 @@ /obj/item/clothing/head/kitty/update_icon(var/mob/living/carbon/human/user) if(!istype(user)) return - var/obj/item/organ/external/head/head_organ = user.get_organ("head") + var/obj/item/organ/external/head/head_organ = user.get_organ(BODY_ZONE_HEAD) mob = new/icon("icon" = 'icons/mob/clothing/head.dmi', "icon_state" = "kitty") mob.Blend(head_organ.hair_colour, ICON_ADD) @@ -309,7 +309,7 @@ /obj/item/clothing/head/kitty/mouse/update_icon(var/mob/living/carbon/human/user) if(!istype(user)) return - var/obj/item/organ/external/head/head_organ = user.get_organ("head") + var/obj/item/organ/external/head/head_organ = user.get_organ(BODY_ZONE_HEAD) mob = new/icon("icon" = 'icons/mob/clothing/head.dmi', "icon_state" = "mousey") mob.Blend(head_organ.hair_colour, ICON_ADD) diff --git a/code/modules/clothing/spacesuits/miscellaneous.dm b/code/modules/clothing/spacesuits/miscellaneous.dm index fa4d2e41b9d..7e87b98104c 100644 --- a/code/modules/clothing/spacesuits/miscellaneous.dm +++ b/code/modules/clothing/spacesuits/miscellaneous.dm @@ -440,15 +440,15 @@ armor = list(melee = 10, bullet = 5, laser = 30, energy = 25, bomb = 0, bio = 100, rad = 20, fire = 50, acid = 65) flash_protect = 2 sprite_sheets = list( - "Unathi" = 'icons/mob/clothing/species/unathi/suit.dmi', - "Ash Walker" = 'icons/mob/clothing/species/unathi/suit.dmi', - "Ash Walker Shaman" = 'icons/mob/clothing/species/unathi/suit.dmi', - "Draconid" = 'icons/mob/clothing/species/unathi/suit.dmi', - "Tajaran" = 'icons/mob/clothing/species/tajaran/suit.dmi', - "Skrell" = 'icons/mob/clothing/species/skrell/suit.dmi', - "Vox" = 'icons/mob/clothing/species/vox/suit.dmi', - "Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/suit.dmi', - "Drask" = 'icons/mob/clothing/species/drask/suit.dmi' + "Unathi" = 'icons/mob/clothing/species/unathi/helmet.dmi', + "Ash Walker" = 'icons/mob/clothing/species/unathi/helmet.dmi', + "Ash Walker Shaman" = 'icons/mob/clothing/species/unathi/helmet.dmi', + "Draconid" = 'icons/mob/clothing/species/unathi/helmet.dmi', + "Tajaran" = 'icons/mob/clothing/species/tajaran/helmet.dmi', + "Skrell" = 'icons/mob/clothing/species/skrell/helmet.dmi', + "Vox" = 'icons/mob/clothing/species/vox/helmet.dmi', + "Vulpkanin" = 'icons/mob/clothing/species/vulpkanin/helmet.dmi', + "Drask" = 'icons/mob/clothing/species/drask/helmet.dmi' ) /obj/item/clothing/suit/space/eva/pirate/leader diff --git a/code/modules/crafting/tailoring.dm b/code/modules/crafting/tailoring.dm index 66dc241599d..a5773ba19a1 100644 --- a/code/modules/crafting/tailoring.dm +++ b/code/modules/crafting/tailoring.dm @@ -113,6 +113,25 @@ /obj/item/stack/cable_coil = 5) category = CAT_CLOTHING +/datum/crafting_recipe/hudtajsundiag + name = "Diagnostic veil sunglasses" + result = /obj/item/clothing/glasses/hud/diagnostic/tajblind/sunglasses + time = 20 + tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) + reqs = list(/obj/item/clothing/glasses/hud/diagnostic/tajblind = 1, + /obj/item/clothing/glasses/sunglasses = 1, + /obj/item/stack/cable_coil = 5) + category = CAT_CLOTHING + +/datum/crafting_recipe/hudtajsunskills + name = "Skills veil sunglasses" + result = /obj/item/clothing/glasses/hud/skills/tajblind/sunglasses + time = 20 + tools = list(TOOL_SCREWDRIVER, TOOL_WIRECUTTER) + reqs = list(/obj/item/clothing/glasses/hud/skills/tajblind = 1, + /obj/item/clothing/glasses/sunglasses = 1, + /obj/item/stack/cable_coil = 5) + category = CAT_CLOTHING /datum/crafting_recipe/hudsundiag name = "Diagnostic HUDsunglasses" result = /obj/item/clothing/glasses/hud/diagnostic/sunglasses diff --git a/code/modules/detective_work/footprints_and_rag.dm b/code/modules/detective_work/footprints_and_rag.dm index 3a35aca8bf1..fe9b50547c1 100644 --- a/code/modules/detective_work/footprints_and_rag.dm +++ b/code/modules/detective_work/footprints_and_rag.dm @@ -25,7 +25,7 @@ /obj/item/reagent_containers/glass/rag/attack(atom/target as obj|turf|area, mob/user as mob , flag) if(ismob(target) && target.reagents && reagents.total_volume && user.zone_selected == "mouth") - if(!get_location_accessible(target, "mouth")) + if(!get_location_accessible(target, BODY_ZONE_PRECISE_MOUTH)) if(target == user) to_chat(user, "Your face is obscured, so you can't do that.") else diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm index a2857d98b13..fc97702a6c3 100644 --- a/code/modules/detectivework/tools/sample_kits.dm +++ b/code/modules/detectivework/tools/sample_kits.dm @@ -102,13 +102,13 @@ user.visible_message("\The [user] tries to take prints from \the [H], but they move away.") return 1 - if(user.zone_selected == "r_hand" || user.zone_selected == "l_hand") + if(user.zone_selected == BODY_ZONE_PRECISE_L_HAND || user.zone_selected == BODY_ZONE_PRECISE_R_HAND) var/has_hand - var/obj/item/organ/external/O = H.has_organ("r_hand") + var/obj/item/organ/external/O = H.get_organ(BODY_ZONE_PRECISE_R_HAND) if(istype(O)) has_hand = 1 else - O = H.has_organ("l_hand") + O = H.get_organ(BODY_ZONE_PRECISE_L_HAND) if(istype(O)) has_hand = 1 if(!has_hand) diff --git a/code/modules/detectivework/tools/swabs.dm b/code/modules/detectivework/tools/swabs.dm index c8f0329c092..3af2b71980a 100644 --- a/code/modules/detectivework/tools/swabs.dm +++ b/code/modules/detectivework/tools/swabs.dm @@ -41,8 +41,8 @@ return var/target_dna var/target_gsr - if(user.zone_selected == "mouth") - if(!H.has_organ("head")) + if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH) + if(!H.get_organ(BODY_ZONE_HEAD)) to_chat(user, "They don't have a head.") inuse = 0 return @@ -54,13 +54,13 @@ target_dna = list(H.dna.unique_enzymes) sample_type = "DNA" - else if(user.zone_selected == "r_hand" || user.zone_selected == "l_hand") + else if(user.zone_selected == BODY_ZONE_PRECISE_L_HAND || user.zone_selected == BODY_ZONE_PRECISE_R_HAND) var/has_hand - var/obj/item/organ/external/O = H.has_organ("r_hand") + var/obj/item/organ/external/O = H.get_organ(BODY_ZONE_PRECISE_R_HAND) if(istype(O)) has_hand = 1 else - O = H.has_organ("l_hand") + O = H.get_organ(BODY_ZONE_PRECISE_L_HAND) if(istype(O)) has_hand = 1 if(!has_hand) diff --git a/code/modules/emoji/emoji_parse.dm b/code/modules/emoji/emoji_parse.dm new file mode 100644 index 00000000000..de89df49802 --- /dev/null +++ b/code/modules/emoji/emoji_parse.dm @@ -0,0 +1,46 @@ +#define DISCORD_EMOJI_URL(id, size) "https://cdn.discordapp.com/emojis/[id]?size=[size]&quality=lossless" +#define DISCORD_EMOJI_IMAGE(id, size, imgsize) "" + +/proc/handleDiscordEmojis(msg) + var/list/listmsg = splittext_char(msg, " ") + var/list/newMsg = new/list(listmsg.len) + var/list/discordEmojis = CONFIG_GET(keyed_list/emoji) + for (var/word in listmsg) + var/emoji = discordEmojis[lowertext(word)] + if(emoji) + newMsg += DISCORD_EMOJI_IMAGE(emoji, 32, 32) + else + newMsg += word + return jointext(newMsg, " ") + +/proc/generateDiscordEmojiTable() + var/const/itemsInRow = 7 + var/discordEmojis = CONFIG_GET(keyed_list/emoji) + var/emojisListLength = length(discordEmojis) + var/html = "" + for (var/i = 0, i < (emojisListLength / itemsInRow), i++) + var/index = (i * itemsInRow)+1 + var/rowString = "" + for (var/j = 0, j < itemsInRow, j++) + if ((index+j) <= emojisListLength) + var/emojiName = discordEmojis[index+j] + var/emojiId = discordEmojis[emojiName] + rowString += "" + else + rowString += "" + rowString += "" + html += rowString + html += "
[DISCORD_EMOJI_IMAGE(emojiId, 48, 48)]
[emojiName]
" + return html + +/client/verb/show_all_emojis() + set name = "Show Emojis" + set desc = "Shows all the emojis available in OOC/LOOC/DSAY" + set category = "OOC" + + var/datum/browser/popup = new(usr, "discord_emoji", "Discord emojis", 800, 460) + popup.set_content(generateDiscordEmojiTable()) + popup.open() + +#undef DISCORD_EMOJI_IMAGE +#undef DISCORD_EMOJI_URL diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 0b712e8af64..56022e21541 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -38,7 +38,7 @@ if(istype(M, /mob/living/carbon)) var/mob/living/carbon/C = M - if(!get_location_accessible(C, "mouth")) + if(!get_location_accessible(C, BODY_ZONE_PRECISE_MOUTH)) if(C == user) to_chat(user, "Your face is obscured, so you cant eat.") else @@ -85,7 +85,7 @@ if(!(container_type & DRAINABLE)) to_chat(chugger, "You need to open [src] first!") return - if(!get_location_accessible(chugger, "mouth")) + if(!get_location_accessible(chugger, BODY_ZONE_PRECISE_MOUTH)) to_chat(chugger, "Your face is obscured, so you cant [pick("chugging","gulping")].") return if(reagents.total_volume && loc == chugger && src == chugger.get_active_hand()) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index a886f3a7309..35a8a2a1726 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -66,14 +66,14 @@ var/mob/living/carbon/human/H = target var/headarmor = 0 // Target's head armor - armor_block = H.run_armor_check(affecting, "melee","","",armour_penetration) // For normal attack damage + armor_block = H.run_armor_check(affecting, MELEE,"","",armour_penetration) // For normal attack damage //If they have a hat/helmet and the user is targeting their head. - if(istype(H.head, /obj/item/clothing/head) && affecting == "head") + if(istype(H.head, /obj/item/clothing/head) && affecting == BODY_ZONE_HEAD) // If their head has an armor value, assign headarmor to it, else give it 0. - if(H.head.armor.getRating("melee")) - headarmor = H.head.armor.getRating("melee") + if(H.head.armor.getRating(MELEE)) + headarmor = H.head.armor.getRating(MELEE) else headarmor = 0 else @@ -84,8 +84,8 @@ else //Only humans can have armor, right? - armor_block = target.run_armor_check(affecting, "melee") - if(affecting == "head") + armor_block = target.run_armor_check(affecting, MELEE) + if(affecting == BODY_ZONE_HEAD) armor_duration = duration + force armor_duration /= 10 @@ -95,7 +95,7 @@ // You are going to knock someone out for longer if they are not wearing a helmet. var/head_attack_message = "" - if(affecting == "head" && iscarbon(target)) + if(affecting == BODY_ZONE_HEAD && iscarbon(target)) head_attack_message = " on the head" //Weaken the target for the duration that we calculated and divide it by 5. if(armor_duration) diff --git a/code/modules/food_and_drinks/drinks/drinks/cans.dm b/code/modules/food_and_drinks/drinks/drinks/cans.dm index f77ab525b10..23763ddeef4 100644 --- a/code/modules/food_and_drinks/drinks/drinks/cans.dm +++ b/code/modules/food_and_drinks/drinks/drinks/cans.dm @@ -80,7 +80,7 @@ if(!canopened) to_chat(user, "You need to open the drink!") return - else if(M == user && !reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head") + else if(M == user && !reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == BODY_ZONE_HEAD) user.visible_message("[user] crushes [src] on [user.p_their()] forehead!", "You crush [src] on your forehead.") crush(user) return diff --git a/code/modules/food_and_drinks/food/condiment.dm b/code/modules/food_and_drinks/food/condiment.dm index fad914a4f74..77f936b5956 100644 --- a/code/modules/food_and_drinks/food/condiment.dm +++ b/code/modules/food_and_drinks/food/condiment.dm @@ -45,7 +45,7 @@ to_chat(user, "None of [src] left, oh no!") return 0 - if(!get_location_accessible(M, "mouth")) + if(!get_location_accessible(M, BODY_ZONE_PRECISE_MOUTH)) if(M == user) to_chat(user, "Your face is obscured, so you cant eat.") else diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index e4927ed03af..39bc68ff36c 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -397,11 +397,14 @@ /obj/item/reagent_containers/food/snacks/monkeycube/proc/Expand() if(LAZYLEN(SSmobs.cubemonkeys) >= CONFIG_GET(number/cubemonkey_cap)) - if(fingerprintslast) - to_chat(get_mob_by_ckey(fingerprintslast), "Bluespace harmonics prevent the spawning of more than [CONFIG_GET(number/cubemonkey_cap)] monkeys on the station at one time!") - else - visible_message("[src] fails to expand!") return + //Due to server crashing capabilities, chat feature is disabled. + + //if(fingerprintslast) + // to_chat(get_mob_by_ckey(fingerprintslast), "Bluespace harmonics prevent the spawning of more than [CONFIG_GET(number/cubemonkey_cap)] monkeys on the station at one time!") + //else + // visible_message("[src] fails to expand!") + if(!QDELETED(src)) visible_message("[src] expands!") if(fingerprintslast) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index 0500d1d5289..af7c17d09b3 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -74,7 +74,7 @@ qdel(src) return FALSE - if(!get_location_accessible(M, "mouth")) + if(!get_location_accessible(M, BODY_ZONE_PRECISE_MOUTH)) if(M == user) to_chat(user, "Your face is obscured, so you cant eat.") else diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index 2eba4bd56a9..9c7563555f3 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -49,7 +49,7 @@ to_chat(user, "You need a better grip to do that!") return 0 var/mob/living/carbon/human/C = G.affecting - var/obj/item/organ/external/head/head = C.get_organ("head") + var/obj/item/organ/external/head/head = C.get_organ(BODY_ZONE_HEAD) if(!head) to_chat(user, "This person doesn't have a head!") return 0 @@ -58,7 +58,7 @@ "[user] dunks your face into [src]!") C.emote("scream") user.changeNext_move(CLICK_CD_MELEE) - C.apply_damage(25, BURN, "head") //25 fire damage and disfigurement because your face was just deep fried! + C.apply_damage(25, BURN, BODY_ZONE_HEAD) //25 fire damage and disfigurement because your face was just deep fried! head.disfigure() add_attack_logs(user, G.affecting, "Deep-fried with [src]") qdel(G) //Removes the grip so the person MIGHT have a small chance to run the fuck away and to prevent rapid dunks. diff --git a/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm b/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm index d66e4a17b98..0eb43b91038 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/oven_new.dm @@ -50,7 +50,7 @@ to_chat(user, "You need a better grip to do that!") return 0 var/mob/living/carbon/human/C = G.affecting - var/obj/item/organ/external/head/head = C.get_organ("head") + var/obj/item/organ/external/head/head = C.get_organ(BODY_ZONE_HEAD) if(!head) to_chat(user, "This person doesn't have a head!") return 0 @@ -59,8 +59,8 @@ "[user] bashes your head in [src]'s door! It feels rather hot in the oven!") C.emote("scream") user.changeNext_move(CLICK_CD_MELEE) - C.apply_damage(5, BURN, "head") //5 fire damage, 15 brute damage, and weakening because your head was just in a hot oven with the door bashing into your neck! - C.apply_damage(15, BRUTE, "head") + C.apply_damage(5, BURN, BODY_ZONE_HEAD) //5 fire damage, 15 brute damage, and weakening because your head was just in a hot oven with the door bashing into your neck! + C.apply_damage(15, BRUTE, BODY_ZONE_HEAD) C.Weaken(4 SECONDS) add_attack_logs(user, G.affecting, "Smashed with [src]") qdel(G) //Removes the grip to prevent rapid bashes. With the weaken, you PROBABLY can't run unless they are slow to grab you again... diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 934bec6307f..b1548dbc002 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -537,13 +537,14 @@ /obj/machinery/smartfridge/secure/medbay/organ req_access = list(ACCESS_SURGERY) name = "\improper Secure Refrigerated Organ Storage" - desc = "A refrigerated storage unit for storing organs, limbs and implants." + desc = "A refrigerated storage unit for storing organs, limbs, implants and IV bags." opacity = 1 /obj/machinery/smartfridge/secure/medbay/organ/Initialize(mapload) . = ..() accepted_items_typecache = typecacheof(list( - /obj/item/organ + /obj/item/organ, + /obj/item/reagent_containers/iv_bag, )) /// Copy pasting to reuse existing sprites diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index 11ac3bfd366..c3c9ee94ecb 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -51,7 +51,7 @@ button_icon_state = "draw" use_itemicon = FALSE -/datum/action/item_action/draw_card/Trigger() +/datum/action/item_action/draw_card/Trigger(left_click = TRUE) if(istype(target, /obj/item/deck)) var/obj/item/deck/D = target return D.draw_card(owner) @@ -62,7 +62,7 @@ button_icon_state = "deal_card" use_itemicon = FALSE -/datum/action/item_action/deal_card/Trigger() +/datum/action/item_action/deal_card/Trigger(left_click = TRUE) if(istype(target, /obj/item/deck)) var/obj/item/deck/D = target return D.deal_card() @@ -73,7 +73,7 @@ button_icon_state = "deal_card_multi" use_itemicon = FALSE -/datum/action/item_action/deal_card_multi/Trigger() +/datum/action/item_action/deal_card_multi/Trigger(left_click = TRUE) if(istype(target, /obj/item/deck)) var/obj/item/deck/D = target return D.deal_card_multi() @@ -84,7 +84,7 @@ button_icon_state = "shuffle" use_itemicon = FALSE -/datum/action/item_action/shuffle/Trigger() +/datum/action/item_action/shuffle/Trigger(left_click = TRUE) if(istype(target, /obj/item/deck)) var/obj/item/deck/D = target return D.deckshuffle() @@ -320,7 +320,7 @@ button_icon_state = "remove_card" use_itemicon = FALSE -/datum/action/item_action/remove_card/Trigger() +/datum/action/item_action/remove_card/Trigger(left_click = TRUE) if(istype(target, /obj/item/cardhand)) var/obj/item/cardhand/C = target return C.Removecard() @@ -331,7 +331,7 @@ button_icon_state = "discard" use_itemicon = FALSE -/datum/action/item_action/discard/Trigger() +/datum/action/item_action/discard/Trigger(left_click = TRUE) if(istype(target, /obj/item/cardhand)) var/obj/item/cardhand/C = target return C.discard() diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index e6632faa799..0e551561d18 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -145,7 +145,7 @@ user.visible_message("[user] is beheading [user.p_them()]self with the [name]! It looks like [user.p_theyre()] trying to commit suicide.") if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting) affecting.droplimb(1, DROPLIMB_SHARP) playsound(loc, "desceration", 50, 1, -1) diff --git a/code/modules/hydroponics/plant_genes.dm b/code/modules/hydroponics/plant_genes.dm index 61a18857e3e..c4955075e8a 100644 --- a/code/modules/hydroponics/plant_genes.dm +++ b/code/modules/hydroponics/plant_genes.dm @@ -428,7 +428,7 @@ var/mob/living/L = target // It would be nice to inject the body part the original thrower aimed at, // but we don't have this kind of information here. So pick something at random. - var/target_zone = pick("chest", "chest", "chest", "l_leg", "r_leg", "l_arm", "r_arm", "head") + var/target_zone = pick(BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_CHEST, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_HEAD) if(L.reagents && L.can_inject(null, FALSE, target_zone)) var/injecting_amount = max(1, G.seed.potency*0.2) // Minimum of 1, max of 20 var/fraction = min(injecting_amount/G.reagents.total_volume, 1) diff --git a/code/modules/martial_arts/combos/mimejutsu/execution.dm b/code/modules/martial_arts/combos/mimejutsu/execution.dm index 055837720c3..ac5034f234d 100644 --- a/code/modules/martial_arts/combos/mimejutsu/execution.dm +++ b/code/modules/martial_arts/combos/mimejutsu/execution.dm @@ -9,8 +9,7 @@ if(!istype(mimejutsu)) return MARTIAL_COMBO_FAIL if(!target.stat) - if(!(affected.status & ORGAN_BROKEN) && !(affected.is_robotic()) && !(affected.cannot_break)) - affected.fracture() + if(affected.fracture()) user.do_attack_animation(target, ATTACK_EFFECT_KICK) else target.apply_damage(40, BRUTE, user.zone_selected) diff --git a/code/modules/martial_arts/combos/throwing/remove_embended.dm b/code/modules/martial_arts/combos/throwing/remove_embended.dm index c90c180134c..56c23879dfe 100644 --- a/code/modules/martial_arts/combos/throwing/remove_embended.dm +++ b/code/modules/martial_arts/combos/throwing/remove_embended.dm @@ -8,9 +8,9 @@ if(!istype(H)) return MARTIAL_COMBO_FAIL - for(var/obj/item/organ/external/limb in H.bodyparts) - var/obj/item/I = locate() in limb.embedded_objects - if(!istype(I) || I.loc != H) + for(var/obj/item/organ/external/limb as anything in H.bodyparts) + var/obj/item/I = safepick(limb.embedded_objects) + if(!istype(I)) continue var/time_taken = I.embedded_unsafe_removal_time @@ -18,17 +18,15 @@ span_notice("You attempt to remove [I] from [H]'s [limb.name]... (It will take [time_taken/10] seconds.)")) if(do_after(user, time_taken, needhand = 1, target = H)) - if(!I || !limb || I.loc != H || !(I in limb.embedded_objects)) + if(QDELETED(I) || QDELETED(limb) || I.loc != limb || !LAZYIN(limb.embedded_objects, I)) return MARTIAL_COMBO_FAIL - limb.embedded_objects -= I + limb.remove_embedded_object(I) limb.receive_damage(I.embedded_unsafe_removal_pain_multiplier * I.w_class) - I.forceMove(get_turf(H)) user.put_in_hands(I) - H.emote("scream") + if(H.has_pain()) + H.emote("scream") user.visible_message(span_notice("[user] successfully rips [I] out of [H]'s [limb.name]!"), span_notice("You successfully remove [I] from [H]'s [limb.name].")) - if(!H.has_embedded_objects()) - H.clear_alert("embeddedobject") add_attack_logs(user, target, "Melee attacked with martial-art [MA] : Remove embended", ATKLOG_ALL) return MARTIAL_COMBO_DONE return MARTIAL_COMBO_FAIL diff --git a/code/modules/martial_arts/krav_maga.dm b/code/modules/martial_arts/krav_maga.dm index c1312169d44..c3fdde31c74 100644 --- a/code/modules/martial_arts/krav_maga.dm +++ b/code/modules/martial_arts/krav_maga.dm @@ -10,7 +10,7 @@ name = "Neutral Stance - You relax, cancelling your last Krav Maga stance attack." button_icon_state = "neutralstance" -/datum/action/neutral_stance/Trigger() +/datum/action/neutral_stance/Trigger(left_click = TRUE) var/mob/living/carbon/human/H = owner if(!H.mind.martial_art.in_stance) to_chat(owner, "You cannot cancel an attack you haven't prepared!") @@ -24,7 +24,7 @@ name = "Neck Chop - Injures the neck, stopping the victim from speaking for a while." button_icon_state = "neckchop" -/datum/action/neck_chop/Trigger() +/datum/action/neck_chop/Trigger(left_click = TRUE) if(owner.incapacitated()) to_chat(owner, "You can't use Krav Maga while you're incapacitated.") return @@ -40,7 +40,7 @@ name = "Leg Sweep - Trips the victim, rendering them prone and unable to move for a short time." button_icon_state = "legsweep" -/datum/action/leg_sweep/Trigger() +/datum/action/leg_sweep/Trigger(left_click = TRUE) if(owner.incapacitated()) to_chat(owner, "You can't use Krav Maga while you're incapacitated.") return @@ -56,7 +56,7 @@ name = "Lung Punch - Delivers a strong punch just above the victim's abdomen, constraining the lungs. The victim will be unable to breathe for a short time." button_icon_state = "lungpunch" -/datum/action/lung_punch/Trigger() +/datum/action/lung_punch/Trigger(left_click = TRUE) if(owner.incapacitated()) to_chat(owner, "You can't use Krav Maga while you're incapacitated.") return diff --git a/code/modules/martial_arts/martial.dm b/code/modules/martial_arts/martial.dm index eeb414e9686..55b10ec23d6 100644 --- a/code/modules/martial_arts/martial.dm +++ b/code/modules/martial_arts/martial.dm @@ -480,7 +480,7 @@ user.Weaken(6 SECONDS) if(ishuman(user)) var/mob/living/carbon/human/H = user - H.apply_damage(2*force, BRUTE, "head") + H.apply_damage(2*force, BRUTE, BODY_ZONE_HEAD) else user.take_organ_damage(2*force) return diff --git a/code/modules/mining/equipment/regenerative_core.dm b/code/modules/mining/equipment/regenerative_core.dm index b9e07ad0b70..ee0a6f42916 100644 --- a/code/modules/mining/equipment/regenerative_core.dm +++ b/code/modules/mining/equipment/regenerative_core.dm @@ -24,7 +24,8 @@ desc = "All that remains of a hivelord. It can be used to help keep your body going, but it will rapidly decay into uselessness." icon_state = "roro core 2" flags = NOBLUDGEON - slot = "hivecore" + slot = INTERNAL_ORGAN_HIVECORE + parent_organ_zone = BODY_ZONE_CHEST force = 0 actions_types = list(/datum/action/item_action/organ_action/use) var/inert = 0 @@ -95,13 +96,13 @@ /obj/item/organ/internal/regenerative_core/attack_self(mob/user) applyto(user, user) -/obj/item/organ/internal/regenerative_core/insert(mob/living/carbon/M, special = 0) - ..() +/obj/item/organ/internal/regenerative_core/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() if(!preserved && !inert) preserved(TRUE) owner.visible_message("[src] stabilizes as it's inserted.") -/obj/item/organ/internal/regenerative_core/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/regenerative_core/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) if(!inert && !special) owner.visible_message("[src] rapidly decays as it's removed.") go_inert() @@ -141,9 +142,9 @@ /obj/item/organ/internal/legion_tumour name = "legion tumour" desc = "A mass of pulsing flesh and dark tendrils, containing the power to regenerate flesh at a terrible cost." - slot = "parasite_egg" icon_state = "legion_remains" - parent_organ = "chest" + slot = INTERNAL_ORGAN_PARASITE_EGG + parent_organ_zone = BODY_ZONE_CHEST /// What stage of growth the corruption has reached. var/stage = 0 /// We apply this status effect periodically or when used on someone @@ -162,10 +163,18 @@ 'sound/voice/lowHiss4.ogg', ) -/obj/item/organ/internal/legion_tumour/remove(mob/living/carbon/egg_owner, special) +/obj/item/organ/internal/legion_tumour/insert(mob/living/carbon/egg_owner, special) . = ..() + ADD_TRAIT(egg_owner, TRAIT_XENO_HOST, GENERIC_TRAIT) + egg_owner.med_hud_set_status() + +/obj/item/organ/internal/legion_tumour/remove(mob/living/carbon/egg_owner, special) stage = 0 elapsed_time = 0 + if(egg_owner) + REMOVE_TRAIT(egg_owner, TRAIT_XENO_HOST, GENERIC_TRAIT) + egg_owner.med_hud_set_status() + . = ..() /obj/item/organ/internal/legion_tumour/attack(mob/living/target, mob/living/user, params) if(try_apply(target, user)) diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index b00546b6ca1..f378815904c 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -364,7 +364,7 @@ /obj/item/gun/magic/staff/spellblade, /obj/item/gun/magic/wand/death, /obj/item/gun/magic/wand/fireball, - /obj/item/stack/telecrystal/twenty, + /obj/item/stack/telecrystal/hundread, /obj/item/banhammer) /obj/item/fakeartefact/New() diff --git a/code/modules/mining/equipment/weather_radio.dm b/code/modules/mining/equipment/weather_radio.dm index 14190ab36d1..1c7937541f8 100644 --- a/code/modules/mining/equipment/weather_radio.dm +++ b/code/modules/mining/equipment/weather_radio.dm @@ -71,7 +71,7 @@ if(WEATHER_ALERT_CLEAR) return "Буря закончилась. Текущая погода не представляет угрозы." if(WEATHER_ALERT_INCOMING) - return "Приближающается буря. Преступите к поиску убежища." + return "Приближается буря. Приступите к поиску убежища." if(WEATHER_ALERT_IMMINENT_OR_ACTIVE) return "Буря неизбежна. Немедленно найдите убежище." return "Ошибка в просчёте погоды. Пожалуйста сообщите об ошибке в службу поддержки НТ." @@ -101,10 +101,10 @@ var/time_until_next = time_till_storm() if(isnull(time_until_next)) return // No problems if there are no mining z levels - if(time_until_next >= 2 MINUTES) + if(time_until_next >= 1 MINUTES) warning_level = WEATHER_ALERT_CLEAR return - if(time_until_next >= 30 SECONDS) + if(time_until_next >= 10 SECONDS) warning_level = WEATHER_ALERT_INCOMING return // Weather is here, now we need to figure out if it is dangerous diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 14a1e5626f4..9840225bb54 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -308,7 +308,7 @@ activation_sound = 'sound/magic/timeparadox2.ogg' var/list/banned_items_typecache = list(/obj/item/storage, /obj/item/implant, /obj/item/implanter, /obj/item/disk/nuclear, /obj/item/projectile, /obj/item/spellbook, /obj/item/clothing/mask/facehugger, /obj/item/contractor_uplink, - /obj/item/dice/d20/fate) + /obj/item/dice/d20/fate, /obj/item/gem) /obj/machinery/anomalous_crystal/refresher/New() ..() diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index d70de526b6d..ca8016d5e59 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -254,8 +254,9 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ QDEL_NULL(wires) return ..() -/obj/item/twohanded/required/gibtonite/can_be_pulled(user) - to_chat(user, "It's too heavy to be pulled!") +/obj/item/twohanded/required/gibtonite/can_be_pulled(atom/movable/user, force, show_message = FALSE) + if(show_message) + to_chat(user, span_warning("It's too heavy to be pulled!")) return FALSE // must be carried in two hands or be picked up with ripley /obj/item/twohanded/required/gibtonite/attackby(obj/item/I, mob/user, params) diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index baed069f0d6..9776af07f1f 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -675,19 +675,23 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp /mob/dead/observer/incapacitated(ignore_restraints = FALSE, ignore_grab = FALSE, ignore_lying = FALSE) return TRUE -//this is a mob verb instead of atom for performance reasons -//see /mob/verb/examinate() in mob.dm for more info -//overriden here and in /mob/living for different point span classes and sanity checks -/mob/dead/observer/run_pointed(atom/A as mob|obj|turf) + +/** + * This is a mob verb instead of atom for performance reasons. + * See /mob/verb/examinate() in mob.dm for more info. + * Overriden here and in /mob/living for different point span classes and sanity checks. + */ +/mob/dead/observer/run_pointed(atom/target) if(!..()) return FALSE var/follow_link if(invisibility) // Only show the button if the ghost is not visible to the living - follow_link = " ([ghost_follow_link(A, src)])" - usr.visible_message("[src] points to [A][follow_link].") - add_deadchat_logs(src, "point to [key_name(A)] [COORD(A)]") + follow_link = " ([ghost_follow_link(target, src)])" + usr.visible_message(span_deadsay("[src] points to [target][follow_link].")) + add_deadchat_logs(src, "point to [key_name(target)] [COORD(target)]") return TRUE + /mob/dead/observer/proc/incarnate_ghost() if(!client) return diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index 3326e035087..391e9799388 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -277,6 +277,13 @@ return FALSE +/** + * Specal proc for special mobs that use "hands" in weird ways. + */ +/mob/proc/special_hands_drop_action() + return + + /** * DO NO USE THIS PROC, there are plenty of helpers below: put_in_l_hand, put_in_active_hand, put_in_hands etc. * Puts an item into hand by `hand_id` ("HAND_LEFT" / "HAND_RIGHT") and calls all necessary triggers/updates. Returns `TRUE` on success. @@ -385,34 +392,42 @@ /** * Drops item in left hand. */ -/mob/proc/drop_l_hand(force = FALSE) - return drop_item_ground(l_hand, force) +/mob/proc/drop_l_hand(force = FALSE, silent = FALSE) + return drop_item_ground(l_hand, force, silent = silent) /** * Drops item in right hand. */ -/mob/proc/drop_r_hand(force = FALSE) - return drop_item_ground(r_hand, force) +/mob/proc/drop_r_hand(force = FALSE, silent = FALSE) + return drop_item_ground(r_hand, force, silent = silent) /** * Drops item in active hand. */ -/mob/proc/drop_from_active_hand(force = FALSE) +/mob/proc/drop_from_active_hand(force = FALSE, silent = FALSE) if(hand) - return drop_l_hand(force) + return drop_l_hand(force, silent) else - return drop_r_hand(force) + return drop_r_hand(force, silent) /** * Drops item in inactive hand. */ -/mob/proc/drop_from_inactive_hand(force = FALSE) +/mob/proc/drop_from_inactive_hand(force = FALSE, silent = FALSE) if(hand) - return drop_r_hand(force) + return drop_r_hand(force, silent) else - return drop_l_hand(force) + return drop_l_hand(force, silent) + + +/** + * Drops items in both hands. + */ +/mob/proc/drop_from_hands(force = FALSE, silent = FALSE) + drop_l_hand(force, silent) + drop_r_hand(force, silent) /** diff --git a/code/modules/mob/language.dm b/code/modules/mob/language.dm index 083f558aef5..bc8655124f0 100644 --- a/code/modules/mob/language.dm +++ b/code/modules/mob/language.dm @@ -349,8 +349,8 @@ /datum/language/grey/check_can_speak(mob/living/speaker) if(ishuman(speaker)) var/mob/living/carbon/human/S = speaker - var/obj/item/organ/external/rhand = S.get_organ("r_hand") - var/obj/item/organ/external/lhand = S.get_organ("l_hand") + var/obj/item/organ/external/rhand = S.get_organ(BODY_ZONE_PRECISE_R_HAND) + var/obj/item/organ/external/lhand = S.get_organ(BODY_ZONE_PRECISE_L_HAND) if((!rhand || !rhand.is_usable()) && (!lhand || !lhand.is_usable())) to_chat(speaker,"You can't communicate without the ability to use your hands!") return FALSE diff --git a/code/modules/mob/living/carbon/alien/alien.dm b/code/modules/mob/living/carbon/alien/alien.dm index e77084548e5..5fbb90133af 100644 --- a/code/modules/mob/living/carbon/alien/alien.dm +++ b/code/modules/mob/living/carbon/alien/alien.dm @@ -51,8 +51,7 @@ night_vision_action.Grant(src) for(var/organ_path in get_caste_organs()) - var/obj/item/organ/internal/organ = new organ_path() - organ.insert(src) + new organ_path(src) /mob/living/carbon/alien/Destroy() @@ -339,14 +338,14 @@ Des: Removes all infected images from the alien. if(A.update_remote_sight(src)) //returns 1 if we override all other sight updates. return - for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) - sight |= E.vision_flags - if(E.see_in_dark) - see_in_dark = max(see_in_dark, E.see_in_dark) - if(E.see_invisible) - see_invisible = min(see_invisible, E.see_invisible) - if(!isnull(E.lighting_alpha)) - lighting_alpha = min(lighting_alpha, E.lighting_alpha) + for(var/obj/item/organ/internal/cyberimp/eyes/cyber_eyes in internal_organs) + sight |= cyber_eyes.vision_flags + if(cyber_eyes.see_in_dark) + see_in_dark = max(see_in_dark, cyber_eyes.see_in_dark) + if(cyber_eyes.see_invisible) + see_invisible = min(see_invisible, cyber_eyes.see_invisible) + if(!isnull(cyber_eyes.lighting_alpha)) + lighting_alpha = min(lighting_alpha, cyber_eyes.lighting_alpha) SEND_SIGNAL(src, COMSIG_MOB_UPDATE_SIGHT) sync_lighting_plane_alpha() diff --git a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm index 06df9506980..02f24d8d5a1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/alien_powers.dm @@ -52,7 +52,7 @@ small_icon_state = "aliens_running" -/datum/action/innate/small_sprite_alien/Trigger() +/datum/action/innate/small_sprite_alien/Trigger(left_click = TRUE) . = ..() if(!.) return diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index d6cb246a519..355a0218e4b 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -103,7 +103,7 @@ /mob/living/carbon/alien/larva/show_inv(mob/user as mob) return -/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) +/mob/living/carbon/alien/larva/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) return FALSE /* Commented out because it's duplicated in life.dm diff --git a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm index b43f266e783..6bc10769e5a 100644 --- a/code/modules/mob/living/carbon/alien/special/alien_embryo.dm +++ b/code/modules/mob/living/carbon/alien/special/alien_embryo.dm @@ -58,7 +58,7 @@ if(stage == 5 && prob(50)) for(var/datum/surgery/S in owner.surgeries) - if(S.location == "chest" && istype(S.get_surgery_step(), /datum/surgery_step/internal/manipulate_organs)) + if(S.location == BODY_ZONE_CHEST && istype(S.get_surgery_step(), /datum/surgery_step/internal/manipulate_organs)) AttemptGrow(0) return AttemptGrow() diff --git a/code/modules/mob/living/carbon/brain/MMI.dm b/code/modules/mob/living/carbon/brain/MMI.dm index 3e65f47fe7a..5e6a36acf48 100644 --- a/code/modules/mob/living/carbon/brain/MMI.dm +++ b/code/modules/mob/living/carbon/brain/MMI.dm @@ -138,10 +138,10 @@ brainmob.dna = H.dna.Clone() brainmob.container = src - if(!istype(H.dna.species) || isnull(H.dna.species.return_organ("brain"))) // Diona/buggy people + if(!istype(H.dna.species) || isnull(H.dna.species.return_organ(INTERNAL_ORGAN_BRAIN))) // Diona/buggy people held_brain = new(src) else // We have a species, and it has a brain - var/brain_path = H.dna.species.return_organ("brain") + var/brain_path = H.dna.species.return_organ(INTERNAL_ORGAN_BRAIN) if(!ispath(brain_path, /obj/item/organ/internal/brain)) brain_path = /obj/item/organ/internal/brain held_brain = new brain_path(src) // Slime people will keep their slimy brains this way @@ -263,25 +263,25 @@ origin_tech = "biotech=4;programming=4;syndicate=2" syndiemmi = 1 -/obj/item/mmi/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H) + +/obj/item/mmi/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target) if(!brainmob) - return 0 + return FALSE if(!parent) log_debug("Attempting to insert into a null parent!") - return 0 - if(H.get_int_organ(/obj/item/organ/internal/brain)) - // one brain at a time - return 0 - var/obj/item/organ/internal/brain/mmi_holder/holder = new() - holder.parent_organ = parent.limb_name + return FALSE + if(target.get_organ_slot(INTERNAL_ORGAN_BRAIN)) // one brain at a time + return FALSE + var/obj/item/organ/internal/brain/mmi_holder/holder = new + holder.parent_organ_zone = parent.limb_zone forceMove(holder) holder.stored_mmi = src holder.update_from_mmi() if(brainmob && brainmob.mind) - brainmob.mind.transfer_to(H) - holder.insert(H) + brainmob.mind.transfer_to(target) + holder.insert(target) + return TRUE - return 1 // As a synthetic, the only limit on visibility is view range /obj/item/mmi/contents_ui_distance(src_object, mob/living/user) diff --git a/code/modules/mob/living/carbon/brain/brain_item.dm b/code/modules/mob/living/carbon/brain/brain_item.dm index 34f03bb4636..e5915dbedb0 100644 --- a/code/modules/mob/living/carbon/brain/brain_item.dm +++ b/code/modules/mob/living/carbon/brain/brain_item.dm @@ -10,9 +10,8 @@ origin_tech = "biotech=5" attack_verb = list("attacked", "slapped", "whacked") var/mob/living/carbon/brain/brainmob = null - organ_tag = "brain" - parent_organ = "head" - slot = "brain" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_BRAIN vital = TRUE hidden_pain = TRUE //the brain has no pain receptors, and brain damage is meant to be a stealthy damage type. var/mmi_icon = 'icons/obj/assemblies.dmi' @@ -65,29 +64,30 @@ . += "This one seems particularly lifeless. Perhaps it will regain some of its luster later.." -/obj/item/organ/internal/brain/remove(var/mob/living/user,special = 0) +/obj/item/organ/internal/brain/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT) if(dna) name = "[dna.real_name]'s [initial(name)]" if(!owner) return ..() // Probably a redundant removal; just bail - var/obj/item/organ/internal/brain/B = src + var/obj/item/organ/internal/brain/our_brain = src if(!special) var/mob/living/simple_animal/borer/borer = owner.has_brain_worms() if(borer) borer.leave_host() //Should remove borer if the brain is removed - RR - if(owner.mind && !non_primary && !decoy_brain) //don't transfer if the owner does not have a mind. - B.transfer_identity(user) + if(owner.mind && !decoy_brain) //don't transfer if the owner does not have a mind. + our_brain.transfer_identity(user) - if(istype(owner,/mob/living/carbon/human)) - var/mob/living/carbon/human/H = owner - H.update_hair() + if(ishuman(owner)) + owner.update_hair() + + owner.thought_bubble_image = initial(owner.thought_bubble_image) . = ..() -/obj/item/organ/internal/brain/insert(mob/living/target, special = FALSE) +/obj/item/organ/internal/brain/insert(mob/living/target, special = ORGAN_MANIPULATION_DEFAULT) name = "[initial(name)]" var/brain_already_exists = FALSE @@ -120,32 +120,29 @@ var/mob/living/carbon/human/H = target H.special_post_clone_handling() - ..(target, special = special) + ..(target, special) -/obj/item/organ/internal/brain/receive_damage(amount, silent = 0) //brains are special; if they receive damage by other means, we really just want the damage to be passed ot the owner and back onto the brain. +/obj/item/organ/internal/brain/receive_damage(amount, silent = FALSE) //brains are special; if they receive damage by other means, we really just want the damage to be passed ot the owner and back onto the brain. if(owner) owner.adjustBrainLoss(amount) -/obj/item/organ/internal/brain/necrotize(update_sprite = TRUE) //Brain also has special handling for when it necrotizes - damage = max_damage - status |= ORGAN_DEAD - STOP_PROCESSING(SSobj, src) - if(dead_icon && !is_robotic()) - icon_state = dead_icon - if(owner && vital) + +/obj/item/organ/internal/brain/necrotize(silent = FALSE) //Brain also has special handling for when it necrotizes + if(..() && owner && vital) owner.setBrainLoss(120) + /obj/item/organ/internal/brain/prepare_eat() return // Too important to eat. /obj/item/organ/internal/brain/slime + species_type = /datum/species/slime name = "slime core" desc = "A complex, organic knot of jelly and crystalline particles." icon = 'icons/mob/slimes.dmi' icon_state = "green slime extract" mmi_icon_state = "slime_mmi" -// parent_organ = "chest" Hello I am from the ministry of rubber forehead aliens how are you /obj/item/organ/internal/brain/golem name = "Runic mind" @@ -159,8 +156,8 @@ /obj/item/organ/internal/brain/cluwne -/obj/item/organ/internal/brain/cluwne/insert(mob/living/target, special = 0, make_cluwne = 1) - ..(target, special = special) +/obj/item/organ/internal/brain/cluwne/insert(mob/living/target, special = ORGAN_MANIPULATION_DEFAULT, make_cluwne = TRUE) + ..(target, special) if(ishuman(target) && make_cluwne) var/mob/living/carbon/human/H = target H.makeCluwne() //No matter where you go, no matter what you do, you cannot escape diff --git a/code/modules/mob/living/carbon/brain/robotic_brain.dm b/code/modules/mob/living/carbon/brain/robotic_brain.dm index 3ae894d1abe..2513a6882e5 100644 --- a/code/modules/mob/living/carbon/brain/robotic_brain.dm +++ b/code/modules/mob/living/carbon/brain/robotic_brain.dm @@ -126,10 +126,12 @@ if(radio) radio_action.ApplyIcon() -/obj/item/mmi/robotic_brain/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/H) - if(..()) - if(imprinted_master) - to_chat(H, "You are permanently imprinted to [imprinted_master], obey [imprinted_master]'s every order and assist [imprinted_master.p_them()] in completing [imprinted_master.p_their()] goals at any cost.") + +/obj/item/mmi/robotic_brain/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target) + . = ..() + if(. && imprinted_master) + to_chat(target, span_dangerbigger("You are permanently imprinted to [imprinted_master], obey [imprinted_master]'s every order and assist [imprinted_master.p_them()] in completing [imprinted_master.p_their()] goals at any cost.")) + /obj/item/mmi/robotic_brain/proc/transfer_personality(mob/candidate) searching = FALSE diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 935acc2a746..48432a075e1 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -72,7 +72,7 @@ if(istype(src, /mob/living/carbon/human)) var/mob/living/carbon/human/H = src - var/obj/item/organ/external/organ = H.get_organ("chest") + var/obj/item/organ/external/organ = H.get_organ(BODY_ZONE_CHEST) if(istype(organ)) if(organ.receive_damage(d, 0)) H.UpdateDamageIcon() @@ -136,18 +136,20 @@ return TRUE /mob/living/carbon/gib() - . = death(1) + . = death(TRUE) if(!.) return - for(var/obj/item/organ/internal/I in internal_organs) - if(isturf(loc)) - I.remove(src) - I.forceMove(get_turf(src)) - I.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),5) + var/drop_loc = drop_location() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + var/atom/movable/thing = organ.remove(src) + if(!QDELETED(thing)) + thing.forceMove(drop_loc) + if(isturf(thing.loc)) + thing.throw_at(get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1, 3), 5) for(var/mob/M in src) LAZYREMOVE(stomach_contents, M) - M.forceMove(drop_location()) + M.forceMove(drop_loc) visible_message("[M] вырыва[pluralize_ru(M.gender,"ет","ют")]ся из [src.name]!") /mob/living/carbon/electrocute_act(shock_damage, obj/source, siemens_coeff = 1, safety = FALSE, override = FALSE, tesla_shock = FALSE, illusion = FALSE, stun = TRUE) @@ -235,7 +237,7 @@ if((H.gloves?.max_heat_protection_temperature > 360) || (HEATRES in H.mutations)) protected = TRUE - var/obj/item/organ/external/active_hand = H.get_organ("[H.hand ? "l" : "r"]_hand") + var/obj/item/organ/external/active_hand = H.get_organ(H.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(active_hand && !protected) // Wouldn't really work without a hand active_hand.receive_damage(0, 5) self_message = "Вы обжигаете ваши руки пытаясь потушить [src.name]!" @@ -248,7 +250,7 @@ // BEGIN HUGCODE - N3X else playsound(get_turf(src), 'sound/weapons/thudswoosh.ogg', 50, 1, -1) - if(M.zone_selected == "head") + if(M.zone_selected == BODY_ZONE_HEAD) M.visible_message(\ "[M] глад[pluralize_ru(M.gender,"ит","ят")] [src.name] по голове.",\ "Вы погладили [src.name] по голове.",\ @@ -274,13 +276,23 @@ "Вы осмотрели себя на наличие травм.", \ ) - var/list/missing = list("head", "chest", "groin", "l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot") - for(var/X in H.bodyparts) - var/obj/item/organ/external/LB = X - missing -= LB.limb_name + var/list/missing = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_R_FOOT, + ) + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + missing -= bodypart.limb_zone var/status = "" - var/brutedamage = LB.brute_dam - var/burndamage = LB.burn_dam + var/brutedamage = bodypart.brute_dam + var/burndamage = bodypart.burn_dam if(brutedamage > 0) status = "bruised" @@ -297,14 +309,14 @@ status += "blistered" else if(burndamage > 0) status += "numb" - if(LB.status & ORGAN_MUTATED) + if(bodypart.is_mutated()) status = "weirdly shapen." if(status == "") status = "OK" - to_chat(src, "\t Your [LB.name] is [status].") + to_chat(src, "\t Your [bodypart.name] is [status].") - for(var/obj/item/I in LB.embedded_objects) - to_chat(src, "\t В твоем [LB.name] застрял [I]!") + for(var/obj/item/embedded as anything in bodypart.embedded_objects) + to_chat(src, "\t В твоем [bodypart.name] застрял [embedded]!") for(var/t in missing) to_chat(src, "У вас отсутствует [parse_zone(t)]!") @@ -629,9 +641,8 @@ /mob/living/carbon/emp_act(severity) ..() - for(var/X in internal_organs) - var/obj/item/organ/internal/O = X - O.emp_act(severity) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organ.emp_act(severity) /mob/living/carbon/Stat() ..() @@ -813,8 +824,8 @@ so that different stomachs can handle things in different ways VB*/ /mob/living/carbon/proc/shock_internal_organs(intensity) - for(var/obj/item/organ/O in internal_organs) - O.shock_organ(intensity) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organ.shock_organ(intensity) /mob/living/carbon/update_sight() @@ -830,14 +841,14 @@ so that different stomachs can handle things in different ways VB*/ sight = initial(sight) lighting_alpha = initial(lighting_alpha) - for(var/obj/item/organ/internal/cyberimp/eyes/E in internal_organs) - sight |= E.vision_flags - if(E.see_in_dark) - see_in_dark = max(see_in_dark, E.see_in_dark) - if(E.see_invisible) - see_invisible = min(see_invisible, E.see_invisible) - if(!isnull(E.lighting_alpha)) - lighting_alpha = min(lighting_alpha, E.lighting_alpha) + for(var/obj/item/organ/internal/cyberimp/eyes/cyber_eyes in internal_organs) + sight |= cyber_eyes.vision_flags + if(cyber_eyes.see_in_dark) + see_in_dark = max(see_in_dark, cyber_eyes.see_in_dark) + if(cyber_eyes.see_invisible) + see_invisible = min(see_invisible, cyber_eyes.see_invisible) + if(!isnull(cyber_eyes.lighting_alpha)) + lighting_alpha = min(lighting_alpha, cyber_eyes.lighting_alpha) if(client.eye != src) var/atom/A = client.eye diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 64073ab26d0..0810f233d46 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -52,7 +52,7 @@ for(var/datum/disease/virus/V in diseases) if(V.spread_flags & CONTACT) - V.Contract(user, act_type = CONTACT, need_protection_check = TRUE, zone = user.hand ? "l_hand" : "r_hand") + V.Contract(user, act_type = CONTACT, need_protection_check = TRUE, zone = user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) for(var/datum/disease/virus/V in user.diseases) if(V.spread_flags & CONTACT) @@ -91,10 +91,10 @@ //Called when drawing cult runes/using cult spells. Deal damage to a random arm/hand, or chest if not there. /mob/living/carbon/cult_self_harm(damage) - var/dam_zone = pick("l_arm", "l_hand", "r_arm", "r_hand") + var/dam_zone = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND) var/obj/item/organ/external/affecting = get_organ(dam_zone) if(!affecting) - affecting = get_organ("chest") + affecting = get_organ(BODY_ZONE_CHEST) if(!affecting) //bruh where's your chest return FALSE apply_damage(damage, BRUTE, affecting) diff --git a/code/modules/mob/living/carbon/carbon_emote.dm b/code/modules/mob/living/carbon/carbon_emote.dm index 2816a4f4b8d..2a042ba96c9 100644 --- a/code/modules/mob/living/carbon/carbon_emote.dm +++ b/code/modules/mob/living/carbon/carbon_emote.dm @@ -17,7 +17,7 @@ /datum/emote/living/carbon/cross key = "cross" key_third_person = "crosses" - message = "скрещива%(ет,,ют)% руки." + message = "скрещива%(ет,ют)% руки." hands_use_check = TRUE diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index 4c48ba41a70..e3a8643a746 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -56,5 +56,5 @@ process_toxin_damage_on_death(src) // applies TOXIN_TO_INTERNAL_DAMAGE_MULTIPLIER times toxin damage to internal organs - for(var/obj/item/organ/internal/I in internal_organs) - I.on_owner_death() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organ.on_owner_death() diff --git a/code/modules/mob/living/carbon/human/appearance.dm b/code/modules/mob/living/carbon/human/appearance.dm index 931a215f4d2..febee46a6f1 100644 --- a/code/modules/mob/living/carbon/human/appearance.dm +++ b/code/modules/mob/living/carbon/human/appearance.dm @@ -3,8 +3,8 @@ AC.flags = flags AC.ui_interact(user) -/mob/living/carbon/human/proc/change_gender(var/new_gender, var/update_dna = 1) - var/obj/item/organ/external/head/H = bodyparts_by_name["head"] +/mob/living/carbon/human/proc/change_gender(new_gender, update_dna = TRUE) + var/obj/item/organ/external/head/H = bodyparts_by_name[BODY_ZONE_HEAD] if(gender == new_gender || (gender == PLURAL && dna.species.has_gender)) return @@ -24,8 +24,8 @@ update_body() return 1 -/mob/living/carbon/human/proc/change_hair(var/hair_style, var/fluff) - var/obj/item/organ/external/head/H = get_organ("head") +/mob/living/carbon/human/proc/change_hair(hair_style, fluff) + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!hair_style || !H || H.h_style == hair_style) return @@ -38,8 +38,8 @@ update_inv_glasses() return 1 -/mob/living/carbon/human/proc/change_facial_hair(var/facial_hair_style) - var/obj/item/organ/external/head/H = get_organ("head") +/mob/living/carbon/human/proc/change_facial_hair(facial_hair_style) + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!facial_hair_style || !H || H.f_style == facial_hair_style || !(facial_hair_style in GLOB.facial_hair_styles_list)) return @@ -48,8 +48,8 @@ update_fhair() return 1 -/mob/living/carbon/human/proc/change_head_accessory(var/head_accessory_style) - var/obj/item/organ/external/head/H = get_organ("head") +/mob/living/carbon/human/proc/change_head_accessory(head_accessory_style) + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!head_accessory_style || !H || H.ha_style == head_accessory_style || !(head_accessory_style in GLOB.head_accessory_styles_list)) return if(SEND_SIGNAL(src, COMSIG_HUMAN_CHANGE_HEAD_ACCESSORY, head_accessory_style) & COMSIG_HUMAN_NO_CHANGE_APPEARANCE) @@ -60,7 +60,8 @@ update_head_accessory() return 1 -/mob/living/carbon/human/proc/change_markings(var/marking_style, var/location = "body") +/mob/living/carbon/human/proc/change_markings(marking_style, location = "body") + var/obj/item/organ/external/tail/bodypart_tail = get_organ(BODY_ZONE_TAIL) if(!marking_style || (location != "tail" && m_styles[location] == marking_style) || (location == "tail" && (!bodypart_tail || bodypart_tail.m_styles["tail"] == marking_style)) || !(marking_style in GLOB.marking_styles_list)) return @@ -68,7 +69,7 @@ if(marking.name != "None" && marking.marking_location != location) return - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(location == "head") if(!head_organ) return @@ -100,10 +101,13 @@ else m_styles[location] = marking_style update_markings() - return 1 -/mob/living/carbon/human/proc/change_body_accessory(var/body_accessory_style, H) + return TRUE + +/mob/living/carbon/human/proc/change_body_accessory(body_accessory_style, H) var/found + var/obj/item/organ/external/tail/bodypart_tail = get_organ(BODY_ZONE_TAIL) + var/obj/item/organ/external/wing/bodypart_wing = get_organ(BODY_ZONE_WING) if(!body_accessory_style || (!bodypart_tail && !bodypart_wing)) return if(SEND_SIGNAL(src, COMSIG_HUMAN_CHANGE_BODY_ACCESSORY, body_accessory_style) & COMSIG_HUMAN_NO_CHANGE_APPEARANCE) @@ -112,11 +116,11 @@ if(B == body_accessory_style) if(bodypart_wing) bodypart_wing.body_accessory = GLOB.body_accessory_by_name[body_accessory_style] - found = 1 + found = TRUE bodypart_wing.m_styles["wing"] = "None" if(bodypart_tail) bodypart_tail.body_accessory = GLOB.body_accessory_by_name[body_accessory_style] - found = 1 + found = TRUE bodypart_tail.m_styles["tail"] = "None" if(!found) return @@ -125,8 +129,8 @@ update_wing_layer() return TRUE -/mob/living/carbon/human/proc/change_alt_head(var/alternate_head) - var/obj/item/organ/external/head/H = get_organ("head") +/mob/living/carbon/human/proc/change_alt_head(alternate_head) + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H || H.alt_head == alternate_head || H.is_robotic() || (!(dna.species.bodyflags & HAS_ALT_HEADS) && alternate_head != "None") || !(alternate_head in GLOB.alt_heads_list)) return @@ -153,7 +157,7 @@ reset_markings("head") /mob/living/carbon/human/proc/reset_head_hair() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return var/list/valid_hairstyles = generate_valid_hairstyles() @@ -172,7 +176,7 @@ update_hair() /mob/living/carbon/human/proc/reset_facial_hair() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return var/list/valid_facial_hairstyles = generate_valid_facial_hairstyles() @@ -206,7 +210,7 @@ stop_tail_wagging() /mob/living/carbon/human/proc/reset_head_accessory() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return var/list/valid_head_accessories = generate_valid_head_accessories() @@ -226,7 +230,7 @@ eyes_organ.eye_colour = colour dna.eye_color_to_dna(eyes_organ) - eyes_organ.set_dna(dna) + eyes_organ.update_DNA(dna) if(update_dna) update_dna() @@ -242,7 +246,7 @@ return FALSE /mob/living/carbon/human/proc/change_hair_color(var/colour = "#000000", var/secondary) - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return @@ -261,7 +265,7 @@ return 1 /mob/living/carbon/human/proc/change_facial_hair_color(var/colour = "#000000", var/secondary) - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return @@ -280,7 +284,7 @@ return 1 /mob/living/carbon/human/proc/change_head_accessory_color(var/colour = "#000000") - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return @@ -328,7 +332,7 @@ return 1 /mob/living/carbon/human/proc/change_hair_gradient(style, offset_raw, color, alpha) - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return @@ -370,7 +374,7 @@ /mob/living/carbon/human/proc/generate_valid_hairstyles() var/list/valid_hairstyles = new() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return valid_hairstyles //No head, no hair. @@ -398,7 +402,7 @@ /mob/living/carbon/human/proc/generate_valid_facial_hairstyles() var/list/valid_facial_hairstyles = new() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return valid_facial_hairstyles //No head, no hair. @@ -427,7 +431,7 @@ /mob/living/carbon/human/proc/generate_valid_head_accessories() var/list/valid_head_accessories = new() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return valid_head_accessories //No head, no head accessory. @@ -442,7 +446,8 @@ /mob/living/carbon/human/proc/generate_valid_markings(var/location = "body") var/list/valid_markings = new() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) + var/obj/item/organ/external/tail/bodypart_tail = get_organ(BODY_ZONE_TAIL) if(!H && location == "head") return valid_markings //No head, no head markings. if(!bodypart_tail && location == "tail") @@ -497,7 +502,7 @@ /mob/living/carbon/human/proc/generate_valid_alt_heads() var/list/valid_alt_heads = list() - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H) return valid_alt_heads //No head, no alt heads. valid_alt_heads["None"] = GLOB.alt_heads_list["None"] //The only null entry should be the "None" option, and there should always be a "None" option. diff --git a/code/modules/mob/living/carbon/human/death.dm b/code/modules/mob/living/carbon/human/death.dm index ead977dfeaa..01a93b1eeeb 100644 --- a/code/modules/mob/living/carbon/human/death.dm +++ b/code/modules/mob/living/carbon/human/death.dm @@ -16,24 +16,25 @@ else playsound(src.loc, 'sound/goonstation/effects/robogib.ogg', 50, 1) - for(var/obj/item/organ/internal/I in internal_organs) - if(isturf(loc)) - var/atom/movable/thing = I.remove(src) - if(thing) - thing.forceMove(get_turf(src)) + var/drop_loc = drop_location() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + var/atom/movable/thing = organ.remove(src) + if(!QDELETED(thing)) + thing.forceMove(drop_loc) + if(isturf(thing.loc)) thing.throw_at(get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1,3), 5) - for(var/obj/item/organ/external/E in bodyparts) - if(istype(E, /obj/item/organ/external/chest)) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(istype(bodypart, /obj/item/organ/external/chest)) continue // Only make the limb drop if it's not too damaged - if(prob(100 - E.get_damage())) + if(prob(100 - bodypart.get_damage())) // Override the current limb status and don't cause an explosion - E.droplimb(DROPLIMB_SHARP) + bodypart.droplimb() for(var/mob/M in src) LAZYREMOVE(stomach_contents, M) - M.forceMove(drop_location()) + M.forceMove(drop_loc) visible_message("[M] bursts out of [src]!") if(!ismachineperson(src)) @@ -106,6 +107,7 @@ if(SSticker && SSticker.mode) SSblackbox.ReportDeath(src) + /mob/living/carbon/human/update_revive(updating, defib_revive) . = ..() if(. && healthdoll) @@ -117,22 +119,23 @@ if(dna.species) dna.species.update_sight(src) + /mob/living/carbon/human/proc/makeSkeleton() - var/obj/item/organ/external/head/H = get_organ("head") - if(SKELETON in src.mutations) + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) + if(SKELETON in mutations) return - if(istype(H)) - H.disfigured = TRUE - if(H.f_style) - H.f_style = initial(H.f_style) - if(H.h_style) - H.h_style = initial(H.h_style) - if(H.ha_style) - H.ha_style = initial(H.ha_style) - if(H.alt_head) - H.alt_head = initial(H.alt_head) - H.handle_alt_icon() + if(head_organ) + head_organ.disfigure() + if(head_organ.f_style) + head_organ.f_style = initial(head_organ.f_style) + if(head_organ.h_style) + head_organ.h_style = initial(head_organ.h_style) + if(head_organ.ha_style) + head_organ.ha_style = initial(head_organ.ha_style) + if(head_organ.alt_head) + head_organ.alt_head = initial(head_organ.alt_head) + head_organ.handle_alt_icon() m_styles = DEFAULT_MARKING_STYLES update_fhair() update_hair() @@ -143,7 +146,7 @@ mutations.Add(NOCLONE) update_body() update_mutantrace() - return + /mob/living/carbon/human/proc/ChangeToHusk() @@ -153,31 +156,31 @@ if(HUSK in mutations) return - var/obj/item/organ/external/head/H = bodyparts_by_name["head"] - if(istype(H)) - H.disfigured = TRUE //makes them unknown without fucking up other stuff like admintools - if(H.f_style) - H.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE - if(H.h_style) - H.h_style = "Bald" + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) + if(head_organ) + head_organ.disfigure() //makes them unknown without fucking up other stuff like admintools + if(head_organ.f_style) + head_organ.f_style = "Shaved" //we only change the icon_state of the hair datum, so it doesn't mess up their UI/UE + if(head_organ.h_style) + head_organ.h_style = "Bald" update_fhair() update_hair() mutations.Add(HUSK) update_body() update_mutantrace() - return + /mob/living/carbon/human/proc/Drain() ChangeToHusk() mutations |= NOCLONE - return + /mob/living/carbon/human/proc/cure_husk() mutations.Remove(HUSK) - var/obj/item/organ/external/head/H = bodyparts_by_name["head"] - if(istype(H)) - H.disfigured = FALSE + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) + head_organ?.disfigure() update_body() update_mutantrace() UpdateAppearance() // reset hair from DNA + diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index b162e6c83af..5031b400921 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -149,6 +149,9 @@ else if(blood_DNA) msg += "[p_they(TRUE)] [p_have()] [feet_blood_color != "#030303" ? "blood-stained":"oil-stained"] feet!\n" + //legcuffed? + if(legcuffed) + msg += "[p_they(TRUE)] [p_are()] [bicon(legcuffed)] restrained with [legcuffed]!\n" //mask if(wear_mask && !skipmask && !(wear_mask.flags & ABSTRACT)) @@ -215,57 +218,55 @@ msg += "" var/list/wound_flavor_text = list() - var/list/is_destroyed = list() - for(var/organ_tag in dna.species.has_limbs) + for(var/limb_zone in dna.species.has_limbs) - var/list/organ_data = dna.species.has_limbs[organ_tag] + var/list/organ_data = dna.species.has_limbs[limb_zone] var/organ_descriptor = organ_data["descriptor"] - is_destroyed["[organ_data["descriptor"]]"] = 1 - var/obj/item/organ/external/E = bodyparts_by_name[organ_tag] - if(!E) - wound_flavor_text["[organ_tag]"] = "[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].\n" + var/obj/item/organ/external/bodypart = bodyparts_by_name[limb_zone] + if(!bodypart) + wound_flavor_text[limb_zone] = "[p_they(TRUE)] [p_are()] missing [p_their()] [organ_descriptor].\n" else if(!ismachineperson(src) && !skipprostheses) - if(E.is_robotic()) - wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a robotic [E.name]!\n" + if(bodypart.is_robotic()) + wound_flavor_text[limb_zone] = "[p_they(TRUE)] [p_have()] a robotic [bodypart.name]!\n" - else if(E.status & ORGAN_SPLINTED) - wound_flavor_text["[E.limb_name]"] = "[p_they(TRUE)] [p_have()] a splint on [p_their()] [E.name]!\n" + else if(bodypart.is_splinted()) + wound_flavor_text[limb_zone] = "[p_they(TRUE)] [p_have()] a splint on [p_their()] [bodypart.name]!\n" - if(E.open) - if(E.is_robotic()) - msg += "The maintenance hatch on [p_their()] [ignore_limb_branding(E.limb_name)] is open!\n" + if(bodypart.open) + if(bodypart.is_robotic()) + msg += "The maintenance hatch on [p_their()] [ignore_limb_branding(limb_zone)] is open!\n" else - msg += "[p_their(TRUE)] [ignore_limb_branding(E.limb_name)] has an open incision!\n" + msg += "[p_their(TRUE)] [ignore_limb_branding(limb_zone)] has an open incision!\n" - for(var/obj/item/I in E.embedded_objects) - msg += "[p_they(TRUE)] [p_have()] \a [bicon(I)] [I] embedded in [p_their()] [E.name]!\n" + for(var/obj/item/embed in bodypart.embedded_objects) + msg += "[p_they(TRUE)] [p_have()] \a [bicon(embed)] [embed] embedded in [p_their()] [bodypart.name]!\n" //Handles the text strings being added to the actual description. //If they have something that covers the limb, and it is not missing, put flavortext. If it is covered but bleeding, add other flavortext. - if(wound_flavor_text["head"] && (is_destroyed["head"] || (!skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))))) - msg += wound_flavor_text["head"] - if(wound_flavor_text["chest"] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you. - msg += wound_flavor_text["chest"] - if(wound_flavor_text["l_arm"] && (is_destroyed["left arm"] || (!w_uniform && !skipjumpsuit))) - msg += wound_flavor_text["l_arm"] - if(wound_flavor_text["l_hand"] && (is_destroyed["left hand"] || (!gloves && !skipgloves))) - msg += wound_flavor_text["l_hand"] - if(wound_flavor_text["r_arm"] && (is_destroyed["right arm"] || (!w_uniform && !skipjumpsuit))) - msg += wound_flavor_text["r_arm"] - if(wound_flavor_text["r_hand"] && (is_destroyed["right hand"] || (!gloves && !skipgloves))) - msg += wound_flavor_text["r_hand"] - if(wound_flavor_text["groin"] && (is_destroyed["groin"] || (!w_uniform && !skipjumpsuit))) - msg += wound_flavor_text["groin"] - if(wound_flavor_text["l_leg"] && (is_destroyed["left leg"] || (!w_uniform && !skipjumpsuit))) - msg += wound_flavor_text["l_leg"] - if(wound_flavor_text["l_foot"]&& (is_destroyed["left foot"] || (!shoes && !skipshoes))) - msg += wound_flavor_text["l_foot"] - if(wound_flavor_text["r_leg"] && (is_destroyed["right leg"] || (!w_uniform && !skipjumpsuit))) - msg += wound_flavor_text["r_leg"] - if(wound_flavor_text["r_foot"]&& (is_destroyed["right foot"] || (!shoes && !skipshoes))) - msg += wound_flavor_text["r_foot"] + if(wound_flavor_text[BODY_ZONE_HEAD] && !skipmask && !(wear_mask && istype(wear_mask, /obj/item/clothing/mask/gas))) + msg += wound_flavor_text[BODY_ZONE_HEAD] + if(wound_flavor_text[BODY_ZONE_CHEST] && !w_uniform && !skipjumpsuit) //No need. A missing chest gibs you. + msg += wound_flavor_text[BODY_ZONE_CHEST] + if(wound_flavor_text[BODY_ZONE_L_ARM] && !w_uniform && !skipjumpsuit) + msg += wound_flavor_text[BODY_ZONE_L_ARM] + if(wound_flavor_text[BODY_ZONE_PRECISE_L_HAND] && !gloves && !skipgloves) + msg += wound_flavor_text[BODY_ZONE_PRECISE_L_HAND] + if(wound_flavor_text[BODY_ZONE_R_ARM] && !w_uniform && !skipjumpsuit) + msg += wound_flavor_text[BODY_ZONE_R_ARM] + if(wound_flavor_text[BODY_ZONE_PRECISE_R_HAND] && !gloves && !skipgloves) + msg += wound_flavor_text[BODY_ZONE_PRECISE_R_HAND] + if(wound_flavor_text[BODY_ZONE_PRECISE_GROIN] && !w_uniform && !skipjumpsuit) + msg += wound_flavor_text[BODY_ZONE_PRECISE_GROIN] + if(wound_flavor_text[BODY_ZONE_L_LEG] && !w_uniform && !skipjumpsuit) + msg += wound_flavor_text[BODY_ZONE_L_LEG] + if(wound_flavor_text[BODY_ZONE_PRECISE_L_FOOT] && !shoes && !skipshoes) + msg += wound_flavor_text[BODY_ZONE_PRECISE_L_FOOT] + if(wound_flavor_text[BODY_ZONE_R_LEG] && !w_uniform && !skipjumpsuit) + msg += wound_flavor_text[BODY_ZONE_R_LEG] + if(wound_flavor_text[BODY_ZONE_PRECISE_R_FOOT] && !shoes && !skipshoes) + msg += wound_flavor_text[BODY_ZONE_PRECISE_R_FOOT] var/damage = getBruteLoss() //no need to calculate each of these twice @@ -411,11 +412,9 @@ msg += "Physical status: \[[medical]\]\n" msg += "Medical records: \[View\] \[Add comment\]\n" - if(print_flavor_text() && !skipface) - if(get_organ("head")) - var/obj/item/organ/external/head/H = get_organ("head") - if(!H.disfigured) - msg += "[print_flavor_text()]\n" + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) + if(print_flavor_text() && !skipface && !head_organ?.is_disfigured()) + msg += "[print_flavor_text()]\n" if(pose) if( findtext(pose,".",length(pose)) == 0 && findtext(pose,"!",length(pose)) == 0 && findtext(pose,"?",length(pose)) == 0 ) @@ -463,27 +462,27 @@ return FALSE // Ignores robotic limb branding prefixes like "Morpheus Cybernetics" -/proc/ignore_limb_branding(limb_name) - switch(limb_name) - if("chest") +/proc/ignore_limb_branding(limb_zone) + switch(limb_zone) + if(BODY_ZONE_CHEST) . = "upper body" - if("groin") + if(BODY_ZONE_PRECISE_GROIN) . = "lower body" - if("head") + if(BODY_ZONE_HEAD) . = "head" - if("l_arm") + if(BODY_ZONE_L_ARM) . = "left arm" - if("r_arm") + if(BODY_ZONE_R_ARM) . = "right arm" - if("l_leg") + if(BODY_ZONE_L_LEG) . = "left leg" - if("r_leg") + if(BODY_ZONE_R_LEG) . = "right leg" - if("l_foot") + if(BODY_ZONE_PRECISE_L_FOOT) . = "left foot" - if("r_foot") + if(BODY_ZONE_PRECISE_R_FOOT) . = "right foot" - if("l_hand") + if(BODY_ZONE_PRECISE_L_HAND) . = "left hand" - if("r_hand") + if(BODY_ZONE_PRECISE_R_HAND) . = "right hand" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index e5f1e3d0181..27e1ac04430 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -48,7 +48,6 @@ . = ..() SSmobs.cubemonkeys -= src QDEL_LIST(bodyparts) - splinted_limbs.Cut() GLOB.human_list -= src /mob/living/carbon/human/dummy @@ -111,12 +110,12 @@ . = ..() rename_character(null, "Integrated Robotic Chassis ([rand(1, 9999)])") update_dna() - for(var/obj/item/organ/external/E in bodyparts) - if(istype(E, /obj/item/organ/external/chest) || istype(E, /obj/item/organ/external/groin)) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(istype(bodypart, /obj/item/organ/external/chest) || istype(bodypart, /obj/item/organ/external/groin)) continue - qdel(E) - for(var/obj/item/organ/O in internal_organs) - qdel(O) + qdel(bodypart) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + qdel(organ) regenerate_icons() death() @@ -257,10 +256,10 @@ /mob/living/carbon/human/proc/process_dismember(limbs_affected) var/list/valid_limbs = bodyparts.Copy() - while(limbs_affected && valid_limbs.len) + while(limbs_affected && length(valid_limbs)) var/obj/item/organ/external/processing_dismember = pick_n_take(valid_limbs) - if(processing_dismember.limb_name != "chest" && processing_dismember.limb_name != "head" && processing_dismember.limb_name != "groin") - processing_dismember.droplimb(1,DROPLIMB_SHARP,0,1) + if(processing_dismember.limb_zone != BODY_ZONE_CHEST && processing_dismember.limb_zone != BODY_ZONE_HEAD && processing_dismember.limb_zone != BODY_ZONE_PRECISE_GROIN) + processing_dismember.droplimb(TRUE, DROPLIMB_SHARP, FALSE, TRUE) limbs_affected-- #undef ex_armor_reduction @@ -270,7 +269,19 @@ return SEND_SIGNAL(src, COMSIG_ATOM_BLOB_ACT, B) show_message("The blob attacks you!") - var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") + var/dam_zone = list( + BODY_ZONE_CHEST, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_R_FOOT, + ) var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) apply_damage(5, BRUTE, affecting, run_armor_check(affecting, "melee")) @@ -284,7 +295,7 @@ /mob/living/carbon/human/show_inv(mob/user) user.set_machine(src) - var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask) || get_organ_slot("breathing_tube") + var/has_breathable_mask = istype(wear_mask, /obj/item/clothing/mask) || get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE) var/list/obscured = check_obscured_slots() var/dat = {" @@ -472,8 +483,8 @@ //Returns "Unknown" if facially disfigured and real_name if not. Useful for setting name when polyacided or when updating a human's name variable /mob/living/carbon/human/proc/get_face_name() - var/obj/item/organ/external/head = get_organ("head") - if(!head || head.disfigured || cloneloss > 50 || !real_name || (HUSK in mutations)) //disfigured. use id-name if possible + var/obj/item/organ/external/head_organ = get_organ(BODY_ZONE_HEAD) + if(!head_organ || head_organ.is_disfigured() || cloneloss > 50 || !real_name || (HUSK in mutations)) //disfigured. use id-name if possible return "Unknown" return real_name @@ -563,25 +574,31 @@ thief_mode = 1 if(href_list["embedded_object"]) - var/obj/item/organ/external/L = locate(href_list["embedded_limb"]) in bodyparts - if(!L) + var/obj/item/organ/external/bodypart = locate(href_list["embedded_limb"]) in bodyparts + if(QDELETED(bodypart) || !LAZYLEN(bodypart.embedded_objects)) return - var/obj/item/I = locate(href_list["embedded_object"]) in L.embedded_objects - if(!I || I.loc != src) //no item, no limb, or item is not in limb or in the person anymore + var/obj/item/thing = locate(href_list["embedded_object"]) in bodypart.embedded_objects + if(QDELETED(thing) || thing.loc != bodypart) //no item, no limb, or item is not in limb or in the person anymore return - var/time_taken = I.embedded_unsafe_removal_time*I.w_class - usr.visible_message("[usr] attempts to remove [I] from [usr.p_their()] [L.name].","You attempt to remove [I] from your [L.name]... (It will take [time_taken/10] seconds.)") - if(do_after(usr, time_taken, needhand = 1, target = src)) - if(!I || !L || I.loc != src || !(I in L.embedded_objects)) + var/time_taken = thing.embedded_unsafe_removal_time * thing.w_class + usr.visible_message( + span_warning("[usr] attempts to remove [thing] from [usr.p_their()] [bodypart.name]."), + span_notice("You attempt to remove [thing] from your [bodypart.name]... (It will take [time_taken/10] seconds.)"), + ) + if(do_after(usr, time_taken, needhand = TRUE, target = src)) + if(QDELETED(thing) || QDELETED(bodypart) || thing.loc != bodypart || !LAZYIN(bodypart.embedded_objects, thing)) return - L.embedded_objects -= I - L.receive_damage(I.embedded_unsafe_removal_pain_multiplier*I.w_class)//It hurts to rip it out, get surgery you dingus. - I.forceMove(get_turf(src)) - usr.put_in_hands(I) - usr.emote("scream") - usr.visible_message("[usr] successfully rips [I] out of [usr.p_their()] [L.name]!","You successfully remove [I] from your [L.name].") - if(!has_embedded_objects()) - clear_alert("embeddedobject") + bodypart.remove_embedded_object(thing) + bodypart.receive_damage(thing.embedded_unsafe_removal_pain_multiplier * thing.w_class)//It hurts to rip it out, get surgery you dingus. + usr.put_in_hands(thing) + if(ishuman(usr)) + var/mob/living/carbon/human/h_user = usr + if(h_user.has_pain()) + h_user.emote("scream") + usr.visible_message( + span_warning("[usr] successfully rips [thing] out of [usr.p_their()] [bodypart.name]!"), + span_notice("You successfully remove [thing] from your [bodypart.name]."), + ) return if(href_list["item"]) @@ -966,7 +983,7 @@ fail_msg = "That limb is robotic." else switch(target_zone) - if("head") + if(BODY_ZONE_HEAD) if(head && head.flags & THICKMATERIAL && !penetrate_thick) . = FALSE else @@ -974,7 +991,7 @@ . = FALSE if(!. && error_msg && user) if(!fail_msg) - fail_msg = "There is no exposed flesh or thin material [target_zone == "head" ? "on [p_their()] head" : "on [p_their()] body"] to inject into." + fail_msg = "There is no exposed flesh or thin material [target_zone == BODY_ZONE_HEAD ? "on [p_their()] head" : "on [p_their()] body"] to inject into." to_chat(user, "[fail_msg]") /mob/living/carbon/human/proc/check_obscured_slots() @@ -1004,7 +1021,7 @@ /mob/living/carbon/human/proc/check_has_mouth() // Todo, check stomach organ when implemented. - var/obj/item/organ/external/head/H = get_organ("head") + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) if(!H || !H.can_intake_reagents) return 0 return 1 @@ -1022,55 +1039,34 @@ else germ_level += n -/mob/living/carbon/human/proc/check_and_regenerate_organs(var/mob/living/carbon/human/H) //Regenerates missing limbs/organs. - var/list/types_of_int_organs = list() //This will hold all the types of organs in the mob before rejuvenation. - for(var/obj/item/organ/internal/I in H.internal_organs) - types_of_int_organs |= I.type //Compiling the list of organ types. It is possible for organs to be missing from this list if they are absent from the mob. - - //Clean up limbs - for(var/organ_name in H.bodyparts_by_name) - var/obj/item/organ/organ = H.bodyparts_by_name[organ_name] - if(!organ) //The !organ check is to account for mechanical limb (prostheses) losses, since those are handled in a way that leaves indexed but null list entries instead of stumps. - qdel(organ) - H.bodyparts_by_name -= organ_name //Making sure the list entry is removed. - - //Replacing lost limbs with the species default. - var/mob/living/carbon/human/temp_holder - for(var/limb_type in H.dna.species.has_limbs) - if(!(limb_type in H.bodyparts_by_name)) - var/list/organ_data = H.dna.species.has_limbs[limb_type] + +/** + * Regenerate missing limbs/organs with defined in species datum. + */ +/mob/living/carbon/human/proc/check_and_regenerate_organs() + var/datum/species/species = dna?.species + if(!species) + return FALSE + + for(var/limb_zone in species.has_limbs) + if(!bodyparts_by_name[limb_zone]) + var/list/organ_data = species.has_limbs[limb_zone] var/limb_path = organ_data["path"] - var/obj/item/organ/external/O = new limb_path(temp_holder) - if(H.get_limb_by_name(O.name)) //Check to see if the user already has an limb with the same name as the 'missing limb'. If they do, skip regrowth. - continue //In an example, this will prevent duplication of the mob's right arm if the mob is a Human and they have a Diona right arm, since, - //while the limb with the name 'right_arm' the mob has may not be listed in their species' bodyparts definition, it is still viable and has the appropriate limb name. - else - O = new limb_path(H) //Create the limb on the player. - O.owner = H - H.bodyparts |= H.bodyparts_by_name[O.limb_name] - if(O.body_part == HEAD) //They're sprouting a fresh head so lets hook them up with their genetic stuff so their new head looks like the original. - H.UpdateAppearance() - - //Replacing lost organs with the species default. - temp_holder = new /mob/living/carbon/human() - var/list/species_organs = H.dna.species.has_organ.Copy() //Compile a list of species organs and tack on the mutantears afterward. - if(H.dna.species.mutantears) - species_organs["ears"] = H.dna.species.mutantears - for(var/index in species_organs) - var/organ = species_organs[index] - if(!(organ in types_of_int_organs)) //If the mob is missing this particular organ... - var/obj/item/organ/internal/I = new organ(temp_holder) //Create the organ inside our holder so we can check it before implantation. - if(H.get_organ_slot(I.slot)) //Check to see if the user already has an organ in the slot the 'missing organ' belongs to. If they do, skip implantation. - continue //In an example, this will prevent duplication of the mob's eyes if the mob is a Human and they have Nucleation eyes, since, - //while the organ in the eyes slot may not be listed in the mob's species' organs definition, it is still viable and fits in the appropriate organ slot. - else - I = new organ(H) //Create the organ inside the player. - I.insert(H) + var/obj/item/organ/new_organ = new limb_path(src) + organ_data["descriptor"] = new_organ.name + + for(var/organ_slot in species.has_organ) + if(!internal_organs_slot[organ_slot]) + var/organ_path = species.has_organ[organ_slot] + new organ_path(src) + + return TRUE + /mob/living/carbon/human/revive() //Fix up all organs and replace lost ones. restore_all_organs() //Rejuvenate and reset all existing organs. - check_and_regenerate_organs(src) //Regenerate limbs and organs only if they're really missing. + check_and_regenerate_organs() //Regenerate limbs and organs only if they're really missing. surgeries.Cut() //End all surgeries. if(!isskeleton(src) && (SKELETON in mutations)) @@ -1279,22 +1275,17 @@ if(!oldspecies) stack_trace("Keep missing bodypart argument set to true, [src] has no original species to compare.") - for(var/organ_name in bodyparts_by_name) - if(isnull(bodyparts_by_name[organ_name])) - missing_bodyparts |= organ_name + for(var/limb_zone in dna.species.has_limbs) + if(!(limb_zone in oldspecies.has_limbs)) // we are good with species specific new bodyparts (tail/wings etc.) + continue + if(isnull(bodyparts_by_name[limb_zone])) + missing_bodyparts += limb_zone - for(var/index in dna.species.has_organ) - if(!(index in oldspecies.has_organ)) // new species organs are fine to create + for(var/organ_slot in dna.species.has_organ) + if(!(organ_slot in oldspecies.has_organ)) // species specific new internals are also fine continue - var/obj/item/organ/internal/organ_check = dna.species.has_organ[index] - var/organ_found - for(var/O in internal_organs) - var/obj/item/organ/internal/organ = O - organ_found = (organ.slot == initial(organ_check.slot)) - if(organ_found) - break - if(!organ_found) - missing_bodyparts |= index + if(isnull(internal_organs_slot[organ_slot])) + missing_bodyparts += organ_slot var/list/additional_organs = list() if(transfer_special_internals) @@ -1302,16 +1293,15 @@ stack_trace("Transfer special internals argument set to true, [src] has no original species to compare.") var/list/racial_organs = (oldspecies.has_organ|dna.species.has_organ) // all internal organs, except racial, will be recreated - for(var/O in internal_organs) - var/obj/item/organ/internal/organ_check = O - var/organ_found - for(var/index in racial_organs) - var/obj/item/organ/internal/organ = racial_organs[index] - organ_found = (initial(organ.slot) == organ_check.slot) + for(var/obj/item/organ/internal/existing_organ as anything in internal_organs) + var/organ_found = FALSE + for(var/organ_slot in racial_organs) + var/obj/item/organ/internal/racial_organ = racial_organs[organ_slot] + organ_found = (existing_organ.slot == initial(racial_organ.slot)) if(organ_found) break if(!organ_found) - additional_organs |= organ_check.type + additional_organs += existing_organ.type var/list/old_bodyparts if(save_appearance) @@ -1321,62 +1311,56 @@ //Create a list of body parts which are damaged by burn or brute and save them to apply after new organs are generated. First we just handle external organs. var/bodypart_damages = list() //Loop through all external organs and save the damage states for brute and burn - for(var/obj/item/organ/external/E in bodyparts) - if(E.brute_dam == 0 && E.burn_dam == 0 && E.internal_bleeding == FALSE) //If there's no damage we don't bother remembering it. - continue - var/brute = E.brute_dam - var/burn = E.burn_dam - var/IB = E.internal_bleeding - var/obj/item/organ/external/OE = new E.type() - var/stats = list(OE, brute, burn, IB) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + var/list/stats = list() + stats["zone"] = bodypart.limb_zone + stats["brute"] = bodypart.brute_dam + stats["burn"] = bodypart.burn_dam + stats["status"] = bodypart.status bodypart_damages += list(stats) //Now we do the same for internal organs via the same proceedure. var/internal_damages = list() - for(var/obj/item/organ/internal/I in internal_organs) - if(I.damage == 0) - continue - var/obj/item/organ/internal/OI = new I.type() - var/damage = I.damage - var/broken = I.is_broken() - var/stats = list(OI, damage, broken) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + var/list/stats = list() + stats["slot"] = organ.slot + stats["damage"] = organ.damage + stats["status"] = organ.status internal_damages += list(stats) //Create the new organs for the species change dna.species.create_organs(src, missing_bodyparts, additional_organs) //Apply relevant damages and variables to the new organs. - for(var/B in bodyparts) - var/obj/item/organ/external/E = B - for(var/list/part in bodypart_damages) - var/obj/item/organ/external/OE = part[1] - if((E.type == OE.type)) // Type has to be explicit, as right limbs are a child of left ones etc. - var/brute = part[2] - var/burn = part[3] - var/IB = part[4] - //Deal the damage to the new organ and then delete the entry to prevent duplicate checks - E.receive_damage(brute, burn, ignore_resists = TRUE) - E.internal_bleeding = IB - qdel(part) - - for(var/O in internal_organs) - var/obj/item/organ/internal/I = O - for(var/list/part in internal_damages) - var/obj/item/organ/internal/OI = part[1] - var/organ_type - - if(OI.parent_type == /obj/item/organ/internal) //Dealing with species organs - organ_type = OI.type - else - organ_type = OI.parent_type + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + for(var/stats in bodypart_damages) + if(bodypart.limb_zone == stats["zone"]) + var/brute_dmg = stats["brute"] + var/burn_dmg = stats["burn"] + if(brute_dmg || burn_dmg) + bodypart.receive_damage(brute_dmg, burn_dmg, ignore_resists = TRUE, silent = TRUE) + var/status = stats["status"] + if(status & ORGAN_INT_BLEED) + bodypart.internal_bleeding(silent = TRUE) + if(status & ORGAN_BROKEN) + bodypart.fracture(silent = TRUE) + if(status & ORGAN_SPLINTED) + bodypart.apply_splint() + if(status & ORGAN_DEAD) + bodypart.necrotize(silent = TRUE) + if(status & ORGAN_MUTATED) + bodypart.mutate(silent = TRUE) + break - if(istype(I, organ_type)) - var/damage = part[2] - var/broken = part[3] - I.receive_damage(damage, TRUE) - if(broken && !(I.status & ORGAN_BROKEN)) - I.status |= ORGAN_BROKEN - qdel(part) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + for(var/stats in internal_damages) + if(organ.slot == stats["slot"]) + var/damage = stats["damage"] + if(damage) + organ.receive_damage(damage, silent = TRUE) + if(stats["status"] & ORGAN_DEAD) + organ.necrotize(silent = TRUE) + break else dna.species.create_organs(src, missing_bodyparts, additional_organs) @@ -1388,9 +1372,9 @@ thing.dropped() // Ensures items know they are dropped. Using their original flags //Handle hair/head accessories for created mobs. - var/obj/item/organ/external/head/H = get_organ("head") - if(istype(H) && save_appearance && old_bodyparts) - var/obj/item/organ/external/head/old_head = old_bodyparts["head"] + var/obj/item/organ/external/head/H = get_organ(BODY_ZONE_HEAD) + if(save_appearance && old_bodyparts) + var/obj/item/organ/external/head/old_head = old_bodyparts[BODY_ZONE_HEAD] if(istype(old_head)) if(old_head.h_style) H.h_style = old_head.h_style @@ -1541,7 +1525,7 @@ return eyes_icon /mob/living/carbon/human/proc/get_eye_shine() //Referenced cult constructs for shining in the dark. Needs to be above lighting effects such as shading. - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(!istype(head_organ)) return var/datum/sprite_accessory/hair/hair_style = GLOB.hair_styles_full_list[head_organ.h_style] @@ -1555,7 +1539,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X /mob/living/carbon/human/proc/eyes_shine() var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) var/obj/item/organ/internal/cyberimp/eyes/eye_implant = get_int_organ(/obj/item/organ/internal/cyberimp/eyes) - if(!get_location_accessible(src, "eyes")) + if(!get_location_accessible(src, BODY_ZONE_PRECISE_EYES)) return FALSE // Natural eyeshine, any implants, and XRAY - all give shiny appearance. if((istype(eyes) && eyes.shine()) || istype(eye_implant) || (XRAY in mutations)) @@ -1702,13 +1686,10 @@ Eyes need to have significantly high darksight to shine unless the mob has the X to_chat(src, "You need to stay still while performing CPR!") /mob/living/carbon/human/canBeHandcuffed() - if(get_num_arms() >= 2) - return TRUE - else - return FALSE + return get_num_arms() >= 2 /mob/living/carbon/human/has_mutated_organs() - for(var/obj/item/organ/external/E in bodyparts) + for(var/obj/item/organ/external/E as anything in bodyparts) if(E.status & ORGAN_MUTATED) return TRUE return FALSE @@ -1754,8 +1735,8 @@ Eyes need to have significantly high darksight to shine unless the mob has the X return TRUE /mob/living/carbon/human/can_see_food() - for(var/obj/item/organ/internal/I in src.internal_organs) - if(I.can_see_food) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(organ.can_see_food) return TRUE /mob/living/carbon/human/selfFeed(var/obj/item/reagent_containers/food/toEat, fullness) @@ -1831,7 +1812,7 @@ Eyes need to have significantly high darksight to shine unless the mob has the X /mob/living/carbon/human/proc/change_icobase(var/new_icobase, var/new_deform, var/owner_sensitive) - for(var/obj/item/organ/external/O in bodyparts) + for(var/obj/item/organ/external/O as anything in bodyparts) O.change_organ_icobase(new_icobase, new_deform, owner_sensitive) //Change the icobase/deform of all our organs. If owner_sensitive is set, that means the proc won't mess with frankenstein limbs. /mob/living/carbon/human/serialize() @@ -1853,18 +1834,17 @@ Eyes need to have significantly high darksight to shine unless the mob has the X data["uwear"] = underwear // Limbs - for(var/limb in bodyparts_by_name) - var/obj/item/organ/O = bodyparts_by_name[limb] - if(!O) - limbs_list[limb] = "missing" + for(var/index in bodyparts_by_name) + var/obj/item/organ/external/bodypart = bodyparts_by_name[index] + if(!bodypart) + limbs_list[index] = "missing" continue - limbs_list[limb] = O.serialize() + limbs_list[index] = bodypart.serialize() // Internal organs/augments - for(var/organ in internal_organs) - var/obj/item/organ/O = organ - organs_list[O.name] = O.serialize() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organs_list[organ.name] = organ.serialize() // Equipment equip_list.len = slots_amt @@ -1892,19 +1872,19 @@ Eyes need to have significantly high darksight to shine unless the mob has the X undershirt = data["ushirt"] underwear = data["uwear"] socks = data["socks"] - for(var/obj/item/organ/internal/iorgan in internal_organs) - qdel(iorgan) - - for(var/obj/item/organ/external/organ in bodyparts) + for(var/obj/item/organ/internal/organ as anything in internal_organs) qdel(organ) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + qdel(bodypart) + for(var/limb in limbs_list) // Missing means skip this part - it's missing if(limbs_list[limb] == "missing") continue // "New" code handles insertion and DNA sync'ing - var/obj/item/organ/external/E = list_to_object(limbs_list[limb], src) - E.sync_colour_to_dna() + var/obj/item/organ/external/bodypart = list_to_object(limbs_list[limb], src) + bodypart.sync_colour_to_dna() for(var/organ in organs_list) // As above, "New" code handles insertion, DNA sync diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index 6c5ee24dfae..744514bd01a 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -6,9 +6,9 @@ var/total_burn = 0 var/total_brute = 0 - for(var/obj/item/organ/external/O in bodyparts) //hardcoded to streamline things a bit - total_brute += O.brute_dam //calculates health based on organ brute and burn - total_burn += O.burn_dam + for(var/obj/item/organ/external/bodypart as anything in bodyparts) //hardcoded to streamline things a bit + total_brute += bodypart.brute_dam //calculates health based on organ brute and burn + total_burn += bodypart.burn_dam health = maxHealth - getOxyLoss() - getToxLoss() - getCloneLoss() - total_burn - total_brute @@ -21,7 +21,7 @@ if(status_flags & GODMODE) return STATUS_UPDATE_NONE //godmode - if(dna.species && dna.species.has_organ["brain"]) + if(dna.species && dna.species.has_organ[INTERNAL_ORGAN_BRAIN]) var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain) if(sponge) if(dna.species && amount > 0) @@ -39,7 +39,7 @@ if(status_flags & GODMODE) return STATUS_UPDATE_NONE //godmode - if(dna.species && dna.species.has_organ["brain"]) + if(dna.species && dna.species.has_organ[INTERNAL_ORGAN_BRAIN]) var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain) if(sponge) if(dna.species && amount > 0) @@ -57,7 +57,7 @@ if(status_flags & GODMODE) return 0 //godmode - if(dna.species && dna.species.has_organ["brain"]) + if(dna.species && dna.species.has_organ[INTERNAL_ORGAN_BRAIN]) var/obj/item/organ/internal/brain/sponge = get_int_organ(/obj/item/organ/internal/brain) if(sponge) return min(sponge.damage,maxHealth*2) @@ -75,7 +75,7 @@ if(status_flags & GODMODE) return STATUS_UPDATE_NONE //godmode - if(dna.species && dna.species.has_organ["heart"]) + if(dna.species && dna.species.has_organ[INTERNAL_ORGAN_HEART]) var/obj/item/organ/internal/heart/hearty = get_int_organ(/obj/item/organ/internal/heart) if(hearty) hearty.damage = clamp(hearty.damage + amount, 0, 60) @@ -87,7 +87,7 @@ if(status_flags & GODMODE) return STATUS_UPDATE_NONE //godmode - if(dna.species && dna.species.has_organ["heart"]) + if(dna.species && dna.species.has_organ[INTERNAL_ORGAN_HEART]) var/obj/item/organ/internal/heart/hearty = get_int_organ(/obj/item/organ/internal/heart) if(hearty) hearty.damage = clamp(amount, 0, 60) @@ -99,7 +99,7 @@ if(status_flags & GODMODE) return 0 //godmode - if(dna.species && dna.species.has_organ["heart"]) + if(dna.species && dna.species.has_organ[INTERNAL_ORGAN_HEART]) var/obj/item/organ/internal/heart/hearty = get_int_organ(/obj/item/organ/internal/heart) if(hearty) return min(hearty.damage,maxHealth*2) @@ -123,7 +123,7 @@ if(status_flags & GODMODE) return 0 var/amount = 0 - for(var/obj/item/organ/external/O in bodyparts) + for(var/obj/item/organ/external/O as anything in bodyparts) amount += O.brute_dam return amount @@ -131,7 +131,7 @@ if(status_flags & GODMODE) return 0 var/amount = 0 - for(var/obj/item/organ/external/O in bodyparts) + for(var/obj/item/organ/external/O as anything in bodyparts) amount += O.burn_dam return amount @@ -165,7 +165,7 @@ O.receive_damage(amount, 0, sharp=is_sharp(damage_source), used_weapon=damage_source, forbidden_limbs = list(), ignore_resists=FALSE, updating_health=updating_health) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(-amount, 0, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health) + O.heal_damage(-amount, 0, internal = FALSE, robo_repair = O.is_robotic(), updating_health = updating_health) return STATUS_UPDATE_HEALTH /mob/living/carbon/human/proc/adjustFireLossByPart(amount, organ_name, obj/damage_source = null, updating_health = TRUE) @@ -179,7 +179,7 @@ O.receive_damage(0, amount, sharp=is_sharp(damage_source), used_weapon=damage_source, forbidden_limbs = list(), ignore_resists = FALSE, updating_health = updating_health) else //if you don't want to heal robot organs, they you will have to check that yourself before using this proc. - O.heal_damage(0, -amount, internal = 0, robo_repair = O.is_robotic(), updating_health = updating_health) + O.heal_damage(0, -amount, internal = FALSE, robo_repair = O.is_robotic(), updating_health = updating_health) return STATUS_UPDATE_HEALTH /mob/living/carbon/human/adjustCloneLoss(amount, updating_health) @@ -192,33 +192,28 @@ if(amount > 0) //cloneloss is being added if(prob(mut_prob)) var/list/obj/item/organ/external/candidates = list() //TYPECASTED LISTS ARE NOT A FUCKING THING WHAT THE FUCK - for(var/obj/item/organ/external/O in bodyparts) - if(O.is_robotic()) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(bodypart.is_robotic()) continue - if(!(O.status & ORGAN_MUTATED)) - candidates |= O - - if(candidates.len) - var/obj/item/organ/external/O = pick(candidates) - O.mutate() - to_chat(src, "Something is not right with your [O.name]...") - O.add_autopsy_data("Mutation", amount) + if(!bodypart.is_mutated()) + candidates += bodypart + + var/obj/item/organ/external/chosen_bodypart = safepick(candidates) + if(chosen_bodypart) + chosen_bodypart.mutate() + chosen_bodypart.add_autopsy_data("Mutation", amount) return else //cloneloss is being subtracted if(prob(heal_prob)) - for(var/obj/item/organ/external/O in bodyparts) - if(O.status & ORGAN_MUTATED) - O.unmutate() - to_chat(src, "Your [O.name] is shaped normally again.") + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(bodypart.unmutate()) return if(getCloneLoss() < 1) //no cloneloss, fixes organs - for(var/obj/item/organ/external/O in bodyparts) - if(O.status & ORGAN_MUTATED) - O.unmutate() - to_chat(src, "Your [O.name] is shaped normally again.") + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + bodypart.unmutate() // Defined here solely to take species flags into account without having to recast at mob/living level. @@ -268,32 +263,31 @@ //Returns a list of damaged organs /mob/living/carbon/human/proc/get_damaged_organs(brute, burn, flags = AFFECT_ALL_ORGANS) var/list/obj/item/organ/external/parts = list() - for(var/obj/item/organ/external/O in bodyparts) - if((brute && O.brute_dam) || (burn && O.burn_dam)) - if(!(flags & AFFECT_ROBOTIC_ORGAN) && O.is_robotic()) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if((brute && bodypart.brute_dam) || (burn && bodypart.burn_dam)) + if(!(flags & AFFECT_ROBOTIC_ORGAN) && bodypart.is_robotic()) continue - if(!(flags & AFFECT_ORGANIC_ORGAN) && !O.is_robotic()) + if(!(flags & AFFECT_ORGANIC_ORGAN) && !bodypart.is_robotic()) continue - parts += O + parts += bodypart return parts //Returns a list of damageable organs -/mob/living/carbon/human/proc/get_damageable_organs() +/mob/living/carbon/human/proc/get_damageable_organs(affect_robotic = TRUE) var/list/obj/item/organ/external/parts = list() - for(var/obj/item/organ/external/O in bodyparts) - if(O.brute_dam + O.burn_dam < O.max_damage) - parts += O + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(!affect_robotic && bodypart.is_robotic()) + continue + if(bodypart.brute_dam + bodypart.burn_dam < bodypart.max_damage) + parts += bodypart return parts //Heals ONE external organ, organ gets randomly selected from damaged ones. //It automatically updates damage overlays if necesary //It automatically updates health status /mob/living/carbon/human/heal_organ_damage(brute, burn, updating_health = TRUE) - var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn) - if(!parts.len) - return - var/obj/item/organ/external/picked = pick(parts) - if(picked.heal_damage(brute,burn, updating_health)) + var/obj/item/organ/external/picked = safepick(get_damaged_organs(brute, burn)) + if(picked?.heal_damage(brute, burn, updating_health = updating_health)) UpdateDamageIcon() //Damages ONE external organ, organ gets randomly selected from damagable ones. @@ -311,11 +305,11 @@ //Heal MANY external organs, in random order -/mob/living/carbon/human/heal_overall_damage(brute, burn, updating_health = TRUE, internal=0, robotic=0) +/mob/living/carbon/human/heal_overall_damage(brute, burn, updating_health = TRUE, internal = FALSE, robotic = FALSE) var/list/obj/item/organ/external/parts = get_damaged_organs(brute,burn) var/update = 0 - while(parts.len && ( brute > 0 || burn > 0) ) + while(length(parts) && (brute > 0 || burn > 0)) var/obj/item/organ/external/picked = pick(parts) var/brute_was = picked.brute_dam @@ -330,14 +324,16 @@ if(updating_health) updatehealth("heal overall damage") + if(update) UpdateDamageIcon() + // damage MANY external organs, in random order -/mob/living/carbon/human/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null, sharp = 0, edge = 0) +/mob/living/carbon/human/take_overall_damage(brute, burn, updating_health = TRUE, used_weapon = null, sharp = 0, edge = 0, affect_robotic = 1) if(status_flags & GODMODE) return ..() //godmode - var/list/obj/item/organ/external/parts = get_damageable_organs() + var/list/obj/item/organ/external/parts = get_damageable_organs(affect_robotic) var/update = 0 while(parts.len && (brute>0 || burn>0) ) @@ -369,7 +365,7 @@ This function restores all organs. */ /mob/living/carbon/human/restore_all_organs() - for(var/obj/item/organ/external/current_organ in bodyparts) + for(var/obj/item/organ/external/current_organ as anything in bodyparts) current_organ.rejuvenate() /mob/living/carbon/human/proc/HealDamage(zone, brute, burn) @@ -383,12 +379,12 @@ This function restores all organs. /mob/living/carbon/human/get_organ(zone) if(!zone) - zone = "chest" - if(zone in list("eyes", "mouth")) - zone = "head" - + zone = BODY_ZONE_CHEST + if(zone in list(BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH)) + zone = BODY_ZONE_HEAD return bodyparts_by_name[zone] + /mob/living/carbon/human/apply_damage(damage = 0, damagetype = BRUTE, def_zone = null, blocked = 0, sharp = 0, obj/used_weapon = null) SEND_SIGNAL(src, COMSIG_MOB_APPLY_DAMAGE, damage, damagetype, def_zone) //Handle other types of damage diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index f2da636a9be..ac07d9ab1a7 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -72,7 +72,7 @@ emp_act var/obj/item/organ/external/organ = get_organ(check_zone(def_zone)) if(isnull(organ)) - return bullet_act(P, "chest") //act on chest instead + return bullet_act(P, BODY_ZONE_CHEST) //act on chest instead organ.add_autopsy_data(P.name, P.damage) // Add the bullet's name to the autopsy data SEND_SIGNAL(src, COMSIG_ATOM_BULLET_ACT, P, def_zone) @@ -106,7 +106,7 @@ emp_act var/rembrute = HEALPERWELD var/nrembrute = 0 var/childlist - if(!isnull(S.children)) + if(LAZYLEN(S.children)) childlist = S.children.Copy() var/parenthealed = FALSE while(rembrute > 0) @@ -125,7 +125,7 @@ emp_act else break nrembrute = max(rembrute - E.brute_dam, 0) - E.heal_damage(rembrute,0,0,1) + E.heal_damage(rembrute, 0, FALSE, TRUE) rembrute = nrembrute H.UpdateDamageIcon() user.visible_message("[user] patches some dents on [src]'s [E.name] with [I].") @@ -150,12 +150,13 @@ emp_act damtype = DROPLIMB_SHARP affecting.droplimb(FALSE, damtype) -/mob/living/carbon/human/getarmor(var/def_zone, var/type) + +/mob/living/carbon/human/getarmor(def_zone, type) var/armorval = 0 var/organnum = 0 if(def_zone) - if(isorgan(def_zone)) + if(isexternalorgan(def_zone)) return getarmor_organ(def_zone, type) var/obj/item/organ/external/affecting = get_organ(def_zone) if(affecting) @@ -163,7 +164,7 @@ emp_act //If a specific bodypart is targetted, check how that bodypart is protected and return the value. //If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values - for(var/obj/item/organ/external/organ in bodyparts) + for(var/obj/item/organ/external/organ as anything in bodyparts) armorval += getarmor_organ(organ, type) organnum++ @@ -171,61 +172,47 @@ emp_act //this proc returns the armour value for a particular external organ. -/mob/living/carbon/human/proc/getarmor_organ(var/obj/item/organ/external/def_zone, var/type) - if(!type || !def_zone) return 0 +/mob/living/carbon/human/proc/getarmor_organ(obj/item/organ/external/def_zone, type) + if(!type || !def_zone) + return 0 var/protection = 0 - var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id, neck) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor) - for(var/bp in body_parts) - if(!bp) continue - if(bp && istype(bp ,/obj/item/clothing)) - var/obj/item/clothing/C = bp - if(C.body_parts_covered & def_zone.body_part) - protection += C.armor.getRating(type) + var/list/clothing_items = list(head, wear_mask, wear_suit, w_uniform, back, gloves, shoes, belt, s_store, glasses, l_ear, r_ear, wear_id, neck) //Everything but pockets. Pockets are l_store and r_store. (if pockets were allowed, putting something armored, gloves or hats for example, would double up on the armor) + for(var/obj/item/clothing/cloth in clothing_items) + if(cloth.body_parts_covered & def_zone.limb_body_flag) + protection += cloth.armor.getRating(type) return protection + //this proc returns the Siemens coefficient of electrical resistivity for a particular external organ. -/mob/living/carbon/human/proc/get_siemens_coefficient_organ(var/obj/item/organ/external/def_zone) +/mob/living/carbon/human/proc/get_siemens_coefficient_organ(obj/item/organ/external/def_zone) if(!def_zone) return 1.0 var/siemens_coefficient = 1.0 var/list/clothing_items = list(head, wear_mask, wear_suit, w_uniform, gloves, shoes) // What all are we checking? - for(var/obj/item/clothing/C in clothing_items) - if(istype(C) && (C.body_parts_covered & def_zone.body_part)) // Is that body part being targeted covered? - siemens_coefficient *= C.siemens_coefficient + for(var/obj/item/clothing/cloth in clothing_items) + if(cloth.body_parts_covered & def_zone.limb_body_flag) // Is that body part being targeted covered? + siemens_coefficient *= cloth.siemens_coefficient return siemens_coefficient -/mob/living/carbon/human/proc/check_head_coverage() - var/list/body_parts = list(head, wear_mask, wear_suit, w_uniform) - for(var/bp in body_parts) - if(!bp) continue - if(bp && istype(bp ,/obj/item/clothing)) - var/obj/item/clothing/C = bp - if(C.body_parts_covered & HEAD) - return 1 - return 0 +/mob/living/carbon/human/proc/check_reflect(def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on the reflection chance var of the object + if(wear_suit?.IsReflect(def_zone) == 1) + return 1 + + if(l_hand) + var/result = l_hand.IsReflect(def_zone) + if(result) + return result + + if(r_hand) + var/result = r_hand.IsReflect(def_zone) + if(result) + return result -/mob/living/carbon/human/proc/check_reflect(var/def_zone) //Reflection checks for anything in your l_hand, r_hand, or wear_suit based on the reflection chance var of the object - if(wear_suit && istype(wear_suit, /obj/item/)) - var/obj/item/I = wear_suit - if(I.IsReflect(def_zone) == 1) - return 1 - if(l_hand && istype(l_hand, /obj/item/)) - var/obj/item/I = l_hand - if(I.IsReflect(def_zone) == 1) - return 1 - if(I.IsReflect(def_zone) == 2) //Toy swords - return 2 - if(r_hand && istype(r_hand, /obj/item/)) - var/obj/item/I = r_hand - if(I.IsReflect(def_zone) == 1) - return 1 - if(I.IsReflect(def_zone) == 2) //Toy swords - return 2 return 0 @@ -265,7 +252,7 @@ emp_act var/list/inventory_items_to_kill = list() var/acidity = acidpwr * min(acid_volume * 0.005, 0.1) //HEAD// - if(!bodyzone_hit || bodyzone_hit == "head") //only if we didn't specify a zone or if that zone is the head. + if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_HEAD) //only if we didn't specify a zone or if that zone is the head. var/obj/item/clothing/head_clothes = null if(glasses) head_clothes = glasses @@ -282,7 +269,7 @@ emp_act else to_chat(src, "Your [head_clothes.name] protects your head and face from the acid!") else - . = get_organ("head") + . = get_organ(BODY_ZONE_HEAD) if(.) damaged += . if(l_ear) @@ -291,7 +278,7 @@ emp_act inventory_items_to_kill += r_ear //CHEST// - if(!bodyzone_hit || bodyzone_hit == "chest") + if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_CHEST) var/obj/item/clothing/chest_clothes = null if(w_uniform) chest_clothes = w_uniform @@ -305,7 +292,7 @@ emp_act else to_chat(src, "Your [chest_clothes.name] protects your body from the acid!") else - . = get_organ("chest") + . = get_organ(BODY_ZONE_CHEST) if(.) damaged += . if(wear_id) @@ -321,7 +308,7 @@ emp_act //ARMS & HANDS// - if(!bodyzone_hit || bodyzone_hit == "l_arm" || bodyzone_hit == "r_arm") + if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_L_ARM || bodyzone_hit == BODY_ZONE_R_ARM) var/obj/item/clothing/arm_clothes = null if(gloves) arm_clothes = gloves @@ -339,16 +326,16 @@ emp_act else to_chat(src, "Your [arm_clothes.name] protects your arms and hands from the acid!") else - . = get_organ("r_arm") + . = get_organ(BODY_ZONE_R_ARM) if(.) damaged += . - . = get_organ("l_arm") + . = get_organ(BODY_ZONE_L_ARM) if(.) damaged += . //LEGS & FEET// - if(!bodyzone_hit || bodyzone_hit == "l_leg" || bodyzone_hit =="r_leg" || bodyzone_hit == "feet") + if(!bodyzone_hit || bodyzone_hit == BODY_ZONE_L_LEG || bodyzone_hit == BODY_ZONE_R_LEG || bodyzone_hit == "feet") var/obj/item/clothing/leg_clothes = null if(shoes) leg_clothes = shoes @@ -365,16 +352,16 @@ emp_act else to_chat(src, "Your [leg_clothes.name] protects your legs and feet from the acid!") else - . = get_organ("r_leg") + . = get_organ(BODY_ZONE_R_LEG) if(.) damaged += . - . = get_organ("l_leg") + . = get_organ(BODY_ZONE_L_LEG) if(.) damaged += . //DAMAGE// - for(var/obj/item/organ/external/affecting in damaged) + for(var/obj/item/organ/external/affecting as anything in damaged) affecting.receive_damage(acidity, 2 * acidity) if(istype(affecting, /obj/item/organ/external/head)) @@ -448,7 +435,7 @@ emp_act if(!affecting) to_chat(user, "They are missing that limb!") return 1 - var/hit_area = parse_zone(affecting.limb_name) + var/hit_area = parse_zone(affecting.limb_zone) if(user != src) user.do_attack_animation(src) @@ -499,7 +486,7 @@ emp_act if(!stat) switch(hit_area) - if("head")//Harder to score a stun but if you do it lasts a bit longer + if(BODY_ZONE_HEAD)//Harder to score a stun but if you do it lasts a bit longer if(stat == CONSCIOUS && armor < 50) if(prob(I.force)) visible_message("[src] has been knocked down!", \ @@ -521,7 +508,7 @@ emp_act update_inv_glasses() - if("chest")//Easier to score a stun but lasts less time + if(BODY_ZONE_CHEST)//Easier to score a stun but lasts less time if(stat == CONSCIOUS && I.force && prob(I.force + 10)) visible_message("[src] has been knocked down!", \ "[src] has been knocked down!") @@ -578,20 +565,6 @@ emp_act return ..(AM, skipcatch, hitpush, blocked, throwingdatum) -/mob/living/carbon/human/proc/embed_item_inside(obj/item/I) - if(ismob(I.loc)) - var/mob/M = I.loc - M.drop_item_ground(I) - throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) - var/obj/item/organ/external/L = pick(bodyparts) - L.embedded_objects |= I - I.add_mob_blood(src)//it embedded itself in you, of course it's bloody! - I.forceMove(src) - L.receive_damage(I.w_class*I.embedded_impact_pain_multiplier) - visible_message(span_danger("[I] embeds itself in [src]'s [L.name]!"), - span_userdanger("[I] embeds itself in your [L.name]!")) - - /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) if(gloves) @@ -685,12 +658,24 @@ emp_act var/damage = rand(M.melee_damage_lower, M.melee_damage_upper) if(check_shields(M, damage, "the [M.name]", MELEE_ATTACK, M.armour_penetration)) return FALSE - var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") + var/dam_zone = pick( + BODY_ZONE_CHEST, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_R_FOOT, + ) var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) if(!affecting) - affecting = get_organ("chest") + affecting = get_organ(BODY_ZONE_CHEST) affecting.add_autopsy_data(M.name, damage) // Add the mob's name to the autopsy data - var/armor = run_armor_check(affecting, "melee", armour_penetration = M.armour_penetration) + var/armor = run_armor_check(affecting, MELEE, armour_penetration = M.armour_penetration) apply_damage(damage, M.melee_damage_type, affecting, armor) updatehealth("animal attack") var/all_objectives = M?.mind?.get_all_objectives() @@ -711,12 +696,24 @@ emp_act if(check_shields(M, damage, "the [M.name]")) return FALSE - var/dam_zone = pick("head", "chest", "groin", "l_arm", "l_hand", "r_arm", "r_hand", "l_leg", "l_foot", "r_leg", "r_foot") + var/dam_zone = pick( + BODY_ZONE_CHEST, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_R_FOOT, + ) var/obj/item/organ/external/affecting = get_organ(ran_zone(dam_zone)) if(!affecting) - affecting = get_organ("chest") - var/armor_block = run_armor_check(affecting, "melee") + affecting = get_organ(BODY_ZONE_CHEST) + var/armor_block = run_armor_check(affecting, MELEE) apply_damage(damage, BRUTE, affecting, armor_block) var/all_objectives = M?.mind?.get_all_objectives() if(mind && all_objectives) diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 15875df4d2a..9d1f6e03cb2 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -70,6 +70,6 @@ var/tail /// Same as tail but wing var/wing - - var/list/splinted_limbs = list() //limbs we know are splinted + /// Lazy list of all limbs we know are splinted. + var/list/splinted_limbs var/original_eye_color = "#000000" diff --git a/code/modules/mob/living/carbon/human/human_emote.dm b/code/modules/mob/living/carbon/human/human_emote.dm index 1e3ef5a2e1d..d8e2e9e0533 100644 --- a/code/modules/mob/living/carbon/human/human_emote.dm +++ b/code/modules/mob/living/carbon/human/human_emote.dm @@ -67,9 +67,9 @@ var/obj/item/organ/external/right_arm = user.bodyparts_by_name[BODY_ZONE_R_ARM] var/left_hand_good = FALSE var/right_hand_good = FALSE - if(left_arm && !(left_arm.status & (ORGAN_SPLINTED|ORGAN_BROKEN))) + if(!left_arm?.has_fracture_or_splint()) left_hand_good = TRUE - if(right_arm && !(right_arm.status & (ORGAN_SPLINTED|ORGAN_BROKEN))) + if(!right_arm?.has_fracture_or_splint()) right_hand_good = TRUE if(!left_hand_good || !right_hand_good) @@ -503,9 +503,9 @@ var/obj/item/organ/external/right_arm = user.bodyparts_by_name[BODY_ZONE_R_ARM] var/left_hand_good = FALSE var/right_hand_good = FALSE - if(left_arm && !(left_arm.status & (ORGAN_SPLINTED|ORGAN_BROKEN))) + if(!left_arm?.has_fracture_or_splint()) left_hand_good = TRUE - if(right_arm && !(right_arm.status & (ORGAN_SPLINTED|ORGAN_BROKEN))) + if(!right_arm?.has_fracture_or_splint()) right_hand_good = TRUE if(!left_hand_good && !right_hand_good) @@ -1152,8 +1152,8 @@ return FALSE if(isslimeperson(user)) return TRUE - for(var/obj/item/organ/external/limb in user.bodyparts) // if your limbs are squishy you can squish too! - if(istype(limb.dna?.species, /datum/species/slime)) + for(var/obj/item/organ/external/bodypart as anything in user.bodyparts) // if your limbs are squishy you can squish too! + if(bodypart.dna && istype(bodypart.dna.species, /datum/species/slime)) return TRUE return FALSE @@ -1328,8 +1328,8 @@ message = initial(message) return ..() - var/translated = bodypart.limb_name - switch(bodypart.limb_name) + var/translated = bodypart.limb_zone + switch(bodypart.limb_zone) if(BODY_ZONE_HEAD) translated = "костями черепа" if(BODY_ZONE_CHEST) diff --git a/code/modules/mob/living/carbon/human/human_interaction.dm b/code/modules/mob/living/carbon/human/human_interaction.dm index f1934886e71..d5232d68abf 100644 --- a/code/modules/mob/living/carbon/human/human_interaction.dm +++ b/code/modules/mob/living/carbon/human/human_interaction.dm @@ -9,15 +9,15 @@ var/mob/living/carbon/human/P = H.partner if (!(P in view(H.loc))) return - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] var/hashands = (temp?.is_usable()) if (!hashands) - temp = H.bodyparts_by_name["l_hand"] + temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] hashands = (temp?.is_usable()) - temp = P.bodyparts_by_name["r_hand"] + temp = P.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] var/hashands_p = (temp?.is_usable()) if (!hashands_p) - temp = P.bodyparts_by_name["l_hand"] + temp = P.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] hashands = (temp?.is_usable()) var/mouthfree = !((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH))) var/mouthfree_p = !((P.head && (P.head.flags_cover & HEADCOVERSMOUTH)) || (P.wear_mask && (P.wear_mask.flags_cover & MASKCOVERSMOUTH))) @@ -40,7 +40,7 @@ else if (href_list["interaction"] == "scratch") if(((!istype(P.loc, /obj/structure/closet)) || (H.loc == P.loc)) && hashands && H.Adjacent(P)) - if(H.zone_selected == "head" && !((P.dna.species.name == "Machine") || (P.dna.species.name == "Grey") || (P.dna.species.name == "Unathi"))) + if(H.zone_selected == BODY_ZONE_HEAD && !((P.dna.species.name == "Machine") || (P.dna.species.name == "Grey") || (P.dna.species.name == "Unathi"))) H.custom_emote(message = "[pick("чеш[pluralize_ru(H.gender,"ет","ут")] за ухом", "чеш[pluralize_ru(H.gender,"ет","ут")] голову")] [P].") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "[pick("чеш[pluralize_ru(H.gender,"ет","ут")] за ухом", "чеш[pluralize_ru(H.gender,"ет","ут")] голову")] [P].") @@ -114,27 +114,27 @@ else if (href_list["interaction"] == "slap") if(((H.Adjacent(P) && !istype(P.loc, /obj/structure/closet)) || (H.loc == P.loc)) && hashands) switch(H.zone_selected) - if("head") + if(BODY_ZONE_HEAD) H.custom_emote(message = "да[pluralize_ru(H.gender,"ет","ют")] [P] пощечину!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "да[pluralize_ru(H.gender,"ет","ют")] [P] пощечину!") playsound(loc, 'sound/effects/snap.ogg', 50, 1, -1) - var/obj/item/organ/external/head/O = P.get_organ("head") + var/obj/item/organ/external/head/O = P.get_organ(BODY_ZONE_HEAD) if(O.brute_dam < 5) O.receive_damage(1) H.do_attack_animation(P) - if("groin") + if(BODY_ZONE_PRECISE_GROIN) H.custom_emote(message = "шлёпа[pluralize_ru(H.gender,"ет","ют")] [P] по заднице!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "шлёпа[pluralize_ru(H.gender,"ет","ют")] [P] по заднице!") playsound(loc, 'sound/effects/snap.ogg', 50, 1, -1) - var/obj/item/organ/external/groin/G = P.get_organ("groin") + var/obj/item/organ/external/groin/G = P.get_organ(BODY_ZONE_PRECISE_GROIN) if(G.brute_dam < 5) G.receive_damage(1) H.do_attack_animation(P) - if("mouth") + if(BODY_ZONE_PRECISE_MOUTH) H.custom_emote(message = "да[pluralize_ru(H.gender,"ет","ют")] [P] по губе!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "да[pluralize_ru(H.gender,"ет","ют")] [P] по губе!") @@ -153,7 +153,7 @@ if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "да[pluralize_ru(H.gender,"ет","ют")] [P] подзатыльник!") playsound(loc, 'sound/weapons/throwtap.ogg', 50, 1, -1) - var/obj/item/organ/external/head/O = P.get_organ("head") + var/obj/item/organ/external/head/O = P.get_organ(BODY_ZONE_HEAD) if(O.brute_dam < 3) O.receive_damage(1) H.do_attack_animation(P) @@ -180,24 +180,24 @@ else if (href_list["interaction"] == "pullwing") if(((H.Adjacent(P) && !istype(P.loc, /obj/structure/closet)) || (H.loc == P.loc)) && hashands && !H.restrained()) - if(!P.bodyparts_by_name["wing"]) + if(!P.bodyparts_by_name[BODY_ZONE_WING]) H.custom_emote(message = "пыта[pluralize_ru(H.gender,"ет","ют")]ся поймать [P] за крылья КОТОРЫХ НЕТ!!!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "пыта[pluralize_ru(H.gender,"ет","ют")]ся поймать [P] за крылья КОТОРЫХ НЕТ!!!") return if (prob(30)) - var/obj/item/organ/external/wing/O = P.get_organ("wing") - if (((O.brute_dam == O.max_damage)||(O.status & ORGAN_DEAD)||(O.status & ORGAN_BROKEN)) && prob(20)) + var/obj/item/organ/external/wing/wing = P.get_organ(BODY_ZONE_WING) + if ((wing.brute_dam == wing.max_damage || wing.is_dead() || wing.has_fracture()) && prob(20)) H.custom_emote(message = "отрыва[pluralize_ru(H.gender,"ет","ют")] [P] крылья!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "отрыва[pluralize_ru(H.gender,"ет","ют")] [P] крылья!") - O.droplimb() + wing.droplimb() return H.custom_emote(message = "дёрга[pluralize_ru(H.gender,"ет","ют")] [P] за крылья!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "дёрга[pluralize_ru(H.gender,"ет","ют")] [P] за крылья!") - if(O.brute_dam < 10) - O.receive_damage(1) + if(wing.brute_dam < 10) + wing.receive_damage(1) else H.custom_emote(message = "пыта[pluralize_ru(H.gender,"ет","ют")]ся поймать [P] за крылья!") if (istype(P.loc, /obj/structure/closet)) @@ -205,24 +205,24 @@ else if (href_list["interaction"] == "pull") if(((H.Adjacent(P) && !istype(P.loc, /obj/structure/closet)) || (H.loc == P.loc)) && hashands && !H.restrained()) - if(!P.bodyparts_by_name["tail"]) + if(!P.bodyparts_by_name[BODY_ZONE_TAIL]) H.custom_emote(message = "пыта[pluralize_ru(H.gender,"ет","ют")]ся поймать [P] за хвост КОТОРОГО НЕТ!!!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "пыта[pluralize_ru(H.gender,"ет","ют")]ся поймать [P] за хвост КОТОРОГО НЕТ!!!") return if (prob(30)) - var/obj/item/organ/external/tail/O = P.get_organ("tail") - if (((O.brute_dam == O.max_damage)||(O.status & ORGAN_DEAD)||(O.status & ORGAN_BROKEN)) && prob(20)) + var/obj/item/organ/external/tail/tail = P.get_organ(BODY_ZONE_TAIL) + if ((tail.brute_dam == tail.max_damage || tail.is_dead() || tail.has_fracture()) && prob(20)) H.custom_emote(message = "отрыва[pluralize_ru(H.gender,"ет","ют")] [P] хвост!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "отрыва[pluralize_ru(H.gender,"ет","ют")] [P] хвост!") - O.droplimb() + tail.droplimb() return H.custom_emote(message = "дёрга[pluralize_ru(H.gender,"ет","ют")] [P] за хвост!") if (istype(P.loc, /obj/structure/closet)) P.custom_emote(message = "дёрга[pluralize_ru(H.gender,"ет","ют")] [P] за хвост!") - if(O.brute_dam < 10) - O.receive_damage(1) + if(tail.brute_dam < 10) + tail.receive_damage(1) else H.custom_emote(message = "пыта[pluralize_ru(H.gender,"ет","ют")]ся поймать [P] за хвост!") if (istype(P.loc, /obj/structure/closet)) diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index 0be6468cc8c..4c37e530cda 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -39,20 +39,19 @@ . = ..() if(.) // did we actually move? if(!lying && !buckled && !throwing) - for(var/obj/item/organ/external/splinted in splinted_limbs) - splinted.update_splints() + update_splints() if(dna.species.fragile_bones_chance > 0 && (m_intent != MOVE_INTENT_WALK || pulling)) if(prob(dna.species.fragile_bones_chance)) - for(var/zone in list("l_leg", "l_foot", "r_leg", "r_foot")) + for(var/zone in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT)) var/obj/item/organ/external/leg = get_organ(zone) - if(leg.status & ORGAN_BROKEN) + if(leg.has_fracture()) continue else leg.fracture() break else if(dna.species.fragile_bones_chance && prob(30)) - playsound(src, "bonebreak", 10, 1) + playsound(src, "bonebreak", 10, TRUE) if(!has_gravity(loc)) return @@ -64,8 +63,8 @@ //Bloody footprints var/turf/T = get_turf(src) - var/obj/item/organ/external/l_foot = get_organ("l_foot") - var/obj/item/organ/external/r_foot = get_organ("r_foot") + var/obj/item/organ/external/l_foot = get_organ(BODY_ZONE_PRECISE_L_FOOT) + var/obj/item/organ/external/r_foot = get_organ(BODY_ZONE_PRECISE_R_FOOT) var/hasfeet = TRUE if(!l_foot && !r_foot) hasfeet = FALSE diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 2847b4c7a8f..9af176e3f31 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -1,34 +1,33 @@ +/mob/living/carbon/human + /// All external organs in src. + var/list/bodyparts = list() + /// Map organ zones to external organs. + var/list/bodyparts_by_name = list() + + /mob/living/carbon/human/proc/update_eyes() var/obj/item/organ/internal/eyes/eyes = get_int_organ(/obj/item/organ/internal/eyes) if(eyes) eyes.update_colour() update_body() -/mob/living/carbon/human/var/list/bodyparts = list() -/mob/living/carbon/human/var/list/bodyparts_by_name = list() // map organ names to organs -/mob/living/carbon/human/var/obj/item/organ/external/tail/bodypart_tail = null -/mob/living/carbon/human/var/obj/item/organ/external/wing/bodypart_wing = null // Takes care of organ related updates, such as broken and missing limbs /mob/living/carbon/human/handle_organs() ..() //processing internal organs is pretty cheap, do that first. - for(var/X in internal_organs) - var/obj/item/organ/internal/I = X - I.process() - - for(var/Y in bodyparts) - var/obj/item/organ/external/E = Y - E.process() - - if(!lying && world.time - l_move_time < 15) - //Moving around with fractured ribs won't do you any good - if(E.is_broken() && E.internal_organs && E.internal_organs.len && prob(15)) - var/obj/item/organ/internal/I = pick(E.internal_organs) - custom_pain("Вы чувствуете как в вашей [E.declent_ru(PREPOSITIONAL)] двигаются сломанные кости!") - I.receive_damage(rand(3,5)) - - //handle_stance() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organ.process() + + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + bodypart.process() + + if(!lying && world.time - l_move_time < 15) //Moving around with fractured ribs won't do you any good + if(bodypart.is_traumatized() && LAZYLEN(bodypart.internal_organs) && prob(15)) + var/obj/item/organ/internal/organ = pick(bodypart.internal_organs) + custom_pain("Вы чувствуете как в вашей [bodypart.declent_ru(PREPOSITIONAL)] двигаются сломанные кости!") + organ.receive_damage(rand(3,5)) + handle_grasp() handle_stance() @@ -46,11 +45,11 @@ if(istype(buckled, /obj/structure/chair) || !isturf(loc)) return - for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot")) - var/obj/item/organ/external/E = bodyparts_by_name[limb_tag] - if(!E || (E.status & ORGAN_DEAD) || E.is_malfunctioning()) + for(var/limb_zone in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT)) + var/obj/item/organ/external/bodypart = bodyparts_by_name[limb_zone] + if(!bodypart || bodypart.is_dead() || bodypart.is_malfunctioning()) stance_damage += 2 // let it fail even if just foot&leg. Also malfunctioning happens sporadically so it should impact more when it procs - else if(E.is_broken() || !E.is_usable()) + else if(bodypart.is_traumatized() || !bodypart.is_usable()) stance_damage += 1 // Canes and crutches help you stand (if the latter is ever added) @@ -69,8 +68,7 @@ if(!(lying || resting)) if(has_pain()) emote("scream") - emote("collapses") - Weaken(10 SECONDS) //can't emote while weakened, apparently. + emote("collapses", ignore_cooldowns = TRUE) /mob/living/carbon/human/proc/handle_grasp() @@ -78,12 +76,12 @@ if(!l_hand && !r_hand) return - for(var/obj/item/organ/external/E in bodyparts) - if(!E || !E.can_grasp || (E.status & ORGAN_SPLINTED)) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(!bodypart.can_grasp || bodypart.is_splinted()) continue - if(E.is_broken()) - if((E.body_part == HAND_LEFT) || (E.body_part == ARM_LEFT)) + if(bodypart.is_traumatized()) + if(bodypart.limb_zone == BODY_ZONE_L_ARM || bodypart.limb_zone == BODY_ZONE_PRECISE_L_HAND) if(!l_hand) continue if(!drop_item_ground(l_hand)) @@ -94,12 +92,12 @@ if(!drop_item_ground(r_hand)) continue - var/emote_scream = pick("крич[pluralize_ru(src.gender,"ит","ат")] от боли и ", "изда[pluralize_ru(src.gender,"ёт","ют")] резкий крик и ", "вскрикива[pluralize_ru(src.gender,"ет","ют")] и ") - custom_emote(EMOTE_VISIBLE, "[(has_pain()) ? emote_scream : "" ]броса[pluralize_ru(src.gender,"ет","ют")] предмет, который держал[genderize_ru(src.gender,"","а","о","и")] в [E.declent_ru(PREPOSITIONAL)]!") + var/emote_scream = pick("крич[pluralize_ru(gender,"ит","ат")] от боли и ", "изда[pluralize_ru(gender,"ёт","ют")] резкий крик и ", "вскрикива[pluralize_ru(gender,"ет","ют")] и ") + custom_emote(EMOTE_VISIBLE, "[(has_pain()) ? emote_scream : "" ]броса[pluralize_ru(gender,"ет","ют")] предмет, который держал[genderize_ru(gender,"","а","о","и")] в [bodypart.declent_ru(PREPOSITIONAL)]!") - else if(E.is_malfunctioning()) + else if(bodypart.is_malfunctioning()) - if((E.body_part == HAND_LEFT) || (E.body_part == ARM_LEFT)) + if(bodypart.limb_zone == BODY_ZONE_L_ARM || bodypart.limb_zone == BODY_ZONE_PRECISE_L_HAND) if(!l_hand) continue if(!drop_item_ground(l_hand)) @@ -110,29 +108,36 @@ if(!drop_item_ground(r_hand)) continue - custom_emote(EMOTE_VISIBLE, "броса[pluralize_ru(src.gender,"ет","ют")] предмет, который держал[genderize_ru(src.gender,"","а","о","и")] держали, [genderize_ru(src.gender,"его","её","его","их")] [E.declent_ru(NOMINATIVE)] выход[pluralize_ru(E.gender,"ит","ят")] из строя!") + custom_emote(EMOTE_VISIBLE, "броса[pluralize_ru(gender,"ет","ют")] предмет, который держал[genderize_ru(gender,"","а","о","и")] держали, [genderize_ru(gender,"его","её","его","их")] [bodypart.declent_ru(NOMINATIVE)] выход[pluralize_ru(bodypart.gender,"ит","ят")] из строя!") + + do_sparks(5, FALSE, src) - do_sparks(5, 0, src) /mob/living/carbon/human/handle_germs() ..() if(gloves && germ_level > gloves.germ_level && prob(10)) gloves.germ_level += 1 + /mob/living/carbon/human/proc/becomeSlim() - to_chat(src, "[pluralize_ru(src.gender,"Ты","Вы")] снова чувствуе[pluralize_ru(src.gender,"шь","те")] себя в форме!") + to_chat(src, span_notice("[pluralize_ru(src.gender,"Ты","Вы")] снова чувствуе[pluralize_ru(src.gender,"шь","те")] себя в форме!")) mutations.Remove(FAT) + /mob/living/carbon/human/proc/becomeFat() - to_chat(src, "[pluralize_ru(src.gender,"Ты","Вы")] вдруг чувствуе[pluralize_ru(src.gender,"шь","те")] себя пухлым!") + to_chat(src, span_alert("[pluralize_ru(src.gender,"Ты","Вы")] вдруг чувствуе[pluralize_ru(src.gender,"шь","те")] себя пухлым!")) mutations.Add(FAT) -//Handles chem traces + +/** + * Handles chem traces + */ /mob/living/carbon/human/proc/handle_trace_chems() //New are added for reagents to random organs. - for(var/datum/reagent/A in reagents.reagent_list) - var/obj/item/organ/internal/O = pick(bodyparts) - O.trace_chemicals[A.name] = 100 + for(var/datum/reagent/reagent in reagents.reagent_list) + var/obj/item/organ/external/bodypart = safepick(bodyparts) + if(bodypart) + LAZYSET(bodypart.trace_chemicals, reagent.name, 100) /** @@ -145,52 +150,115 @@ /mob/living/carbon/human/proc/sync_organ_dna(assimilate = TRUE, old_ue = null) var/ue_to_compare = (old_ue) ? old_ue : dna.unique_enzymes var/list/all_bits = internal_organs|bodyparts - for(var/obj/item/organ/O in all_bits) - if(assimilate || O.dna.unique_enzymes == ue_to_compare) - O.set_dna(dna) - - -/* -Given the name of an organ, returns the external organ it's contained in -I use this to standardize shadowling dethrall code --- Crazylemon -*/ -/mob/living/carbon/human/proc/named_organ_parent(var/organ_name) - if(!get_int_organ_tag(organ_name)) - return null - var/obj/item/organ/internal/O = get_int_organ_tag(organ_name) - return O.parent_organ + for(var/obj/item/organ/organ as anything in all_bits) + if(assimilate || organ.dna.unique_enzymes == ue_to_compare) + organ.update_DNA(dna) + /mob/living/carbon/human/has_organic_damage() - var/odmg = 0 - for(var/obj/item/organ/external/O in bodyparts) - if(O.is_robotic()) - odmg += O.brute_dam - odmg += O.burn_dam - return (health < (100 - odmg)) - -/mob/living/carbon/human/proc/handle_splints() //proc that rebuilds the list of splints on this person, for ease of processing - splinted_limbs.Cut() - for(var/obj/item/organ/external/limb in bodyparts) - if(limb.status & ORGAN_SPLINTED) - splinted_limbs += limb - -/mob/living/carbon/human/proc/update_tail() - if(bodyparts_by_name["tail"]) - bodypart_tail = bodyparts_by_name["tail"] - else - bodypart_tail = null -/mob/living/carbon/human/proc/update_wing() - if(bodyparts_by_name["wing"]) - bodypart_wing = bodyparts_by_name["wing"] - else - bodypart_wing = null - -/mob/living/carbon/human/proc/count_of_infected_organs() + var/total_dmg = 0 + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(bodypart.is_robotic()) + total_dmg += bodypart.brute_dam + total_dmg += bodypart.burn_dam + return (health < (100 - total_dmg)) + + +/mob/living/carbon/human/proc/count_infected_organs() . = 0 - for(var/obj/item/organ/external/E in bodyparts + bodypart_wing + bodypart_tail) - for(var/obj/item/organ/internal/I in E.internal_organs) - if(I.germ_level >= INFECTION_LEVEL_ONE) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + for(var/obj/item/organ/internal/organ as anything in bodypart.internal_organs) + if(organ.germ_level >= INFECTION_LEVEL_ONE) .++ - if(E.germ_level >= INFECTION_LEVEL_ONE) + if(bodypart.germ_level >= INFECTION_LEVEL_ONE) .++ + + +/** + * Returns a list with all fractured bodyparts. + */ +/mob/living/carbon/human/proc/check_fractures() + var/list/fractured_bodyparts = list() + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(bodypart.has_fracture()) + fractured_bodyparts += bodypart + return fractured_bodyparts + + +/** + * Returns a list with all bodyparts affected by internal bleeding. + */ +/mob/living/carbon/human/proc/check_internal_bleedings() + var/list/bleeding_bodyparts = list() + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(bodypart.has_internal_bleeding()) + bleeding_bodyparts += bodypart + return bleeding_bodyparts + + +/mob/living/carbon/human/proc/update_splints() + for(var/obj/item/organ/external/bodypart as anything in splinted_limbs) + if(step_count >= bodypart.splinted_count + SPLINT_LIFE) + bodypart.remove_splint(splint_break = TRUE) // oh no, we actually need surgery now! + + +/mob/living/carbon/human/proc/embed_item_inside(obj/item/thing, embedded_zone, silent = FALSE) + if(isliving(thing.loc)) + var/mob/living/holder = thing.loc + holder.drop_item_ground(thing) + + if(embedded_zone && !get_organ(embedded_zone)) + embedded_zone = BODY_ZONE_CHEST + + var/obj/item/organ/external/bodypart = embedded_zone ? embedded_zone : safepick(bodyparts) + if(!bodypart) + return FALSE + + bodypart.add_embedded_object(thing) + thing.add_mob_blood(src) // it embedded itself in you, of course it's bloody! + bodypart.receive_damage(thing.w_class * thing.embedded_impact_pain_multiplier, silent = silent) + if(!silent) + visible_message( + span_danger("[thing] embeds itself in [src]'s [bodypart.name]!"), + span_userdanger("[thing] embeds itself in your [bodypart.name]!"), + ) + return TRUE + + +/mob/living/carbon/human/proc/remove_embedded_object(obj/item/thing, atom/drop_loc, clear_alert = TRUE) + var/obj/item/organ/external/bodypart = thing.loc + if(!istype(bodypart)) + return FALSE + return bodypart.remove_embedded_object(thing, drop_loc, clear_alert) + + +/mob/living/carbon/human/proc/remove_all_embedded_objects(atom/drop_loc) + var/counter = 0 + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + counter += bodypart.remove_all_embedded_objects(drop_loc, clear_alert = FALSE) + clear_alert("embeddedobject") + return counter + + +/mob/living/carbon/human/proc/has_embedded_objects() + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(LAZYLEN(bodypart.embedded_objects)) + return TRUE + return FALSE + + +/mob/living/carbon/human/proc/check_limbs_with_embedded_objects() + var/list/bodyparts_with_embedded = list() + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if(LAZYLEN(bodypart.embedded_objects)) + bodyparts_with_embedded += bodypart + return bodyparts_with_embedded + + +/mob/living/carbon/human/proc/check_embedded_objects() + var/list/embedded_items = list() + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + for(var/obj/item/thing as anything in bodypart.embedded_objects) + embedded_items += thing + return embedded_items + diff --git a/code/modules/mob/living/carbon/human/human_say.dm b/code/modules/mob/living/carbon/human/human_say.dm index ff4c2c4fdee..53cd51ae04c 100644 --- a/code/modules/mob/living/carbon/human/human_say.dm +++ b/code/modules/mob/living/carbon/human/human_say.dm @@ -92,8 +92,8 @@ return FALSE // how do species that don't breathe talk? magic, that's what. var/breathes = (!(NO_BREATHE in dna?.species?.species_traits)) - var/obj/item/organ/internal/lungs = get_organ_slot("lungs") - if((breathes && !lungs) || (breathes && lungs && (lungs.status & ORGAN_DEAD))) + var/obj/item/organ/internal/lungs = get_organ_slot(INTERNAL_ORGAN_LUNGS) + if((breathes && !lungs) || (breathes && lungs && lungs.is_dead())) return FALSE if(getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS) emote("gasp") diff --git a/code/modules/mob/living/carbon/human/interactions.dm b/code/modules/mob/living/carbon/human/interactions.dm index bb1c9e5aa83..6e71e0bcabe 100644 --- a/code/modules/mob/living/carbon/human/interactions.dm +++ b/code/modules/mob/living/carbon/human/interactions.dm @@ -28,15 +28,15 @@ var/mob/living/carbon/human/H = usr var/mob/living/carbon/human/P = H.partner - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] var/hashands = (temp?.is_usable()) if (!hashands) - temp = H.bodyparts_by_name["l_hand"] + temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] hashands = (temp?.is_usable()) - temp = P.bodyparts_by_name["r_hand"] + temp = P.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] var/hashands_p = (temp?.is_usable()) if (!hashands_p) - temp = P.bodyparts_by_name["l_hand"] + temp = P.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] hashands = (temp?.is_usable()) var/mouthfree = !((H.head && (H.head.flags_cover & HEADCOVERSMOUTH)) || (H.wear_mask && (H.wear_mask.flags_cover & MASKCOVERSMOUTH))) var/mouthfree_p = !((P.head && (P.head.flags_cover & HEADCOVERSMOUTH)) || (P.wear_mask && (P.wear_mask.flags_cover & MASKCOVERSMOUTH))) diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 5f0816c30ca..d2e52d9ac8f 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -13,60 +13,24 @@ return FALSE -/mob/living/carbon/human/has_organ(name) - var/obj/item/organ/external/O = bodyparts_by_name[name] - return O - - /mob/living/carbon/human/has_organ_for_slot(slot) switch(slot) - if(slot_back) - return has_organ("chest") - if(slot_wear_mask) - return has_organ("head") - if(slot_neck) - return has_organ("chest") - if(slot_handcuffed) - return has_organ("l_hand") && has_organ("r_hand") + if(slot_in_backpack, slot_wear_pda, slot_wear_id, slot_tie) + return TRUE + if(slot_back, slot_belt, slot_wear_suit, slot_w_uniform, slot_l_store, slot_r_store, slot_s_store, slot_neck) + return get_organ(BODY_ZONE_CHEST) + if(slot_head, slot_wear_mask, slot_l_ear, slot_r_ear, slot_glasses) + return get_organ(BODY_ZONE_HEAD) + if(slot_handcuffed, slot_gloves) + return get_organ(BODY_ZONE_PRECISE_L_HAND) && get_organ(BODY_ZONE_PRECISE_R_HAND) if(slot_legcuffed) - return has_organ("l_leg") && has_organ("r_leg") + return get_organ(BODY_ZONE_L_LEG) && get_organ(BODY_ZONE_R_LEG) if(slot_l_hand) - return has_organ("l_hand") + return get_organ(BODY_ZONE_PRECISE_L_HAND) if(slot_r_hand) - return has_organ("r_hand") - if(slot_belt) - return has_organ("chest") - if(slot_wear_id) - // the only relevant check for this is the uniform check - return TRUE - if(slot_wear_pda) - return TRUE - if(slot_l_ear) - return has_organ("head") - if(slot_r_ear) - return has_organ("head") - if(slot_glasses) - return has_organ("head") - if(slot_gloves) - return has_organ("l_hand") && has_organ("r_hand") - if(slot_head) - return has_organ("head") + return get_organ(BODY_ZONE_PRECISE_R_HAND) if(slot_shoes) - return has_organ("r_foot") && has_organ("l_foot") - if(slot_wear_suit) - return has_organ("chest") - if(slot_w_uniform) - return has_organ("chest") - if(slot_l_store) - return has_organ("chest") - if(slot_r_store) - return has_organ("chest") - if(slot_s_store) - return has_organ("chest") - if(slot_in_backpack) - return TRUE - if(slot_tie) - return TRUE + return get_organ(BODY_ZONE_PRECISE_L_FOOT) && get_organ(BODY_ZONE_PRECISE_R_FOOT) /** @@ -96,7 +60,7 @@ update_fhair() update_head_accessory() - if(toggle_off && internal && !get_organ_slot("breathing_tube")) + if(toggle_off && internal && !get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) internal = null update_action_buttons_icon() diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index bba88872e6a..ec3125614c7 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -107,7 +107,7 @@ SetEyeBlind(0) SetEyeBlurry(0) - else if(!vision || vision.is_broken()) // Vision organs cut out or broken? Permablind. + else if(!vision || vision.is_traumatized()) // Vision organs cut out or broken? Permablind. EyeBlind(4 SECONDS) if(getBrainLoss() >= 60 && stat != DEAD) @@ -254,7 +254,7 @@ domutcheck(src, null) if(autopsy_damage) - var/obj/item/organ/external/chest/chest = get_organ("chest") + var/obj/item/organ/external/chest/chest = get_organ(BODY_ZONE_CHEST) if(chest) chest.add_autopsy_data("Radiation Poisoning", autopsy_damage) @@ -262,33 +262,34 @@ if(!dna.species.breathe(src)) ..() + /mob/living/carbon/human/check_breath(datum/gas_mixture/breath) - var/obj/item/organ/internal/L = get_organ_slot("lungs") + var/obj/item/organ/internal/lungs = get_organ_slot(INTERNAL_ORGAN_LUNGS) - if(!L || L && (L.status & ORGAN_DEAD)) + if(!lungs || (lungs && lungs.is_dead())) if(health >= HEALTH_THRESHOLD_CRIT) adjustOxyLoss(HUMAN_MAX_OXYLOSS + 1) else if(!(NOCRITDAMAGE in dna.species.species_traits)) adjustOxyLoss(HUMAN_MAX_OXYLOSS) if(dna.species) - var/datum/species/S = dna.species + var/datum/species/species = dna.species - if(S.breathid == "o2") + if(species.breathid == "o2") throw_alert("not_enough_oxy", /obj/screen/alert/not_enough_oxy) - else if(S.breathid == "tox") + else if(species.breathid == "tox") throw_alert("not_enough_tox", /obj/screen/alert/not_enough_tox) - else if(S.breathid == "co2") + else if(species.breathid == "co2") throw_alert("not_enough_co2", /obj/screen/alert/not_enough_co2) - else if(S.breathid == "n2") + else if(species.breathid == "n2") throw_alert("not_enough_nitro", /obj/screen/alert/not_enough_nitro) return FALSE - else - if(istype(L, /obj/item/organ/internal/lungs)) - var/obj/item/organ/internal/lungs/lun = L - lun.check_breath(breath, src) + else if(istype(lungs, /obj/item/organ/internal/lungs)) + var/obj/item/organ/internal/lungs/really_lungs = lungs + really_lungs.check_breath(breath, src) + // USED IN DEATHWHISPERS /mob/living/carbon/human/proc/isInCrit() @@ -301,7 +302,7 @@ var/null_internals = 0 //internals are invalid, therefore turn them off var/skip_contents_check = 0 //rigsuit snowflake, oxygen tanks aren't stored inside the mob, so the 'contents.Find' check has to be skipped. - if(!get_organ_slot("breathing_tube")) + if(!get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) if(!(wear_mask && wear_mask.flags & AIRTIGHT)) //if NOT (wear_mask AND wear_mask.flags CONTAIN AIRTIGHT) if(!(head && head.flags & AIRTIGHT)) //if NOT (head AND head.flags CONTAIN AIRTIGHT) null_internals = 1 //not wearing a mask or suitable helmet @@ -380,7 +381,7 @@ if(!istype(loc, /obj/machinery/atmospherics/unary/cryo_cell)) var/mult = dna.species.coldmod if(mult>0) - if(bodytemperature < dna.species.cold_level_2 && prob(1)) + if(bodytemperature < dna.species.cold_level_2 && prob(0.3)) var/datum/disease/virus/cold/D = new D.Contract(src) if(bodytemperature >= dna.species.cold_level_2 && bodytemperature <= dna.species.cold_level_1) @@ -813,17 +814,18 @@ healthdoll.icon_state = "healthdoll_DEAD" if(healthdoll.overlays.len) healthdoll.overlays.Cut() - if(bodypart_tail && bodypart_tail.dna.species.tail) + var/obj/item/organ/external/tail/bodypart_tail = get_organ(BODY_ZONE_TAIL) + if(bodypart_tail?.dna?.species?.tail) healthdoll.overlays += "[bodypart_tail.dna.species.tail]_DEAD" else var/list/new_overlays = list() var/list/cached_overlays = healthdoll.cached_healthdoll_overlays // Use the dead health doll as the base, since we have proper "healthy" overlays now healthdoll.icon_state = "healthdoll_DEAD" - for(var/obj/item/organ/external/O in bodyparts) - var/damage = O.burn_dam + O.brute_dam + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + var/damage = bodypart.burn_dam + bodypart.brute_dam damage -= shock_reduction / BODYPART_PAIN_REDUCTION - var/comparison = (O.max_damage/5) + var/comparison = (bodypart.max_damage/5) var/icon_num = 0 if(damage > 0) icon_num = 1 @@ -835,12 +837,12 @@ icon_num = 4 if(damage > (comparison*4)) icon_num = 5 - if(istype(O, /obj/item/organ/external/tail) && O.dna.species.tail) - new_overlays += "[O.dna.species.tail][icon_num]" - if(istype(O, /obj/item/organ/external/wing) && O.dna.species.tail) - new_overlays += "[O.dna.species.wing][icon_num]" + if(istype(bodypart, /obj/item/organ/external/tail) && bodypart.dna?.species.tail) + new_overlays += "[bodypart.dna.species.tail][icon_num]" + if(istype(bodypart, /obj/item/organ/external/wing) && bodypart.dna?.species.tail) + new_overlays += "[bodypart.dna.species.wing][icon_num]" else - new_overlays += "[O.limb_name][icon_num]" + new_overlays += "[bodypart.limb_zone][icon_num]" healthdoll.overlays += (new_overlays - cached_overlays) healthdoll.overlays -= (cached_overlays - new_overlays) healthdoll.cached_healthdoll_overlays = new_overlays @@ -885,21 +887,21 @@ adjustToxLoss(-3) lastpuke = 0 + /mob/living/carbon/human/proc/handle_embedded_objects() - for(var/X in bodyparts) - var/obj/item/organ/external/BP = X - for(var/obj/item/I in BP.embedded_objects) - if(prob(I.embedded_pain_chance)) - BP.receive_damage(I.w_class*I.embedded_pain_multiplier) - to_chat(src, "[I] embedded in your [BP.name] hurts!") - - if(prob(I.embedded_fall_chance)) - BP.receive_damage(I.w_class*I.embedded_fall_pain_multiplier) - BP.embedded_objects -= I - I.forceMove(get_turf(src)) - visible_message("[I] falls out of [name]'s [BP.name]!","[I] falls out of your [BP.name]!") - if(!has_embedded_objects()) - clear_alert("embeddedobject") + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + for(var/obj/item/thing in bodypart.embedded_objects) + if(prob(thing.embedded_pain_chance)) + bodypart.receive_damage(thing.w_class * thing.embedded_pain_multiplier) + to_chat(src, span_userdanger("[thing] embedded in your [bodypart.name] hurts!")) + + if(prob(thing.embedded_fall_chance)) + bodypart.remove_embedded_object(thing) + bodypart.receive_damage(thing.w_class * thing.embedded_fall_pain_multiplier) + visible_message( + span_danger("[thing] falls out of [name]'s [bodypart.name]!"), + span_userdanger("[thing] falls out of your [bodypart.name]!"), + ) /mob/living/carbon/human/proc/handle_pulse(times_fired) @@ -1042,7 +1044,7 @@ return FALSE var/obj/item/organ/internal/heart/heart = get_int_organ(/obj/item/organ/internal/heart) if(istype(heart)) - if(heart.status & ORGAN_DEAD) + if(heart.is_dead()) return TRUE if(heart.beating) return FALSE diff --git a/code/modules/mob/living/carbon/human/species/_species.dm b/code/modules/mob/living/carbon/human/species/_species.dm index d7c3995e02e..2d48f3281cc 100644 --- a/code/modules/mob/living/carbon/human/species/_species.dm +++ b/code/modules/mob/living/carbon/human/species/_species.dm @@ -178,32 +178,34 @@ //Defining lists of icon skin tones for species that have them. var/list/icon_skin_tones = list() - // Determines the organs that the species spawns with and - var/list/has_organ = list( // which required-organ checks are conducted. - "heart" = /obj/item/organ/internal/heart, - "lungs" = /obj/item/organ/internal/lungs, - "liver" = /obj/item/organ/internal/liver, - "kidneys" = /obj/item/organ/internal/kidneys, - "brain" = /obj/item/organ/internal/brain, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes - ) - var/vision_organ // If set, this organ is required for vision. Defaults to "eyes" if the species has them. + /// Determines internal organs that the species spawns with and which required-organ checks are conducted. + var/list/has_organ = list( + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) + + /// If set, this organ is required for vision. Defaults to "eyes" if the species has them. + var/vision_organ + var/list/has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right)) - - // Mutant pieces - var/obj/item/organ/internal/ears/mutantears = /obj/item/organ/internal/ears + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + ) // Species specific boxes var/speciesbox @@ -222,7 +224,7 @@ /datum/species/New() //If the species has eyes, they are the default vision organ - if(!vision_organ && has_organ["eyes"]) + if(!vision_organ && has_organ[INTERNAL_ORGAN_EYES]) vision_organ = /obj/item/organ/internal/eyes unarmed = new unarmed_type() @@ -236,31 +238,33 @@ * Handles creation of mob organs. * * Arguments: - * * H - The human to create organs inside of + * * target - The human to create organs inside of * * bodyparts_to_omit - Any bodyparts in this list (and organs within them) should not be added. - * * additional_organs - List of paths to generate additional internal organs. + * * additional_organs - List of organ paths, used to generate additional organs. */ -/datum/species/proc/create_organs(mob/living/carbon/human/H, list/bodyparts_to_omit, list/additional_organs) - QDEL_LIST(H.internal_organs) - QDEL_LIST(H.bodyparts) - - LAZYREINITLIST(H.bodyparts) - LAZYREINITLIST(H.bodyparts_by_name) - LAZYREINITLIST(H.internal_organs) - - for(var/limb_name in has_limbs) - if(limb_name in bodyparts_to_omit) - H.bodyparts_by_name[limb_name] = null // Null it out, but leave the name here so it's still "there" +/datum/species/proc/create_organs(mob/living/carbon/human/target, list/bodyparts_to_omit, list/additional_organs) + QDEL_LIST(target.internal_organs) + QDEL_LIST(target.bodyparts) + + LAZYREINITLIST(target.bodyparts) + LAZYREINITLIST(target.bodyparts_by_name) + LAZYREINITLIST(target.internal_organs) + LAZYREINITLIST(target.internal_organs_slot) + + for(var/limb_zone in has_limbs) + if(limb_zone in bodyparts_to_omit) + target.bodyparts_by_name[limb_zone] = null // Null it out, but leave the name here so it's still "there" continue - var/list/organ_data = has_limbs[limb_name] + var/list/organ_data = has_limbs[limb_zone] var/limb_path = organ_data["path"] - var/obj/item/organ/O = new limb_path(H) - organ_data["descriptor"] = O.name + var/obj/item/organ/new_organ = new limb_path(target) + organ_data["descriptor"] = new_organ.name - for(var/index in has_organ) - var/obj/item/organ/internal/organ_path = has_organ[index] - if((initial(organ_path.parent_organ) in bodyparts_to_omit) || (index in bodyparts_to_omit)) + for(var/organ_slot in has_organ) + var/obj/item/organ/internal/organ_path = has_organ[organ_slot] + if((initial(organ_path.parent_organ_zone) in bodyparts_to_omit) || (organ_slot in bodyparts_to_omit)) + target.internal_organs_slot[organ_slot] = null continue // heads up for any brave future coders: @@ -268,42 +272,16 @@ // not doing so (as of now) causes weird issues for some organs like posibrains, which need a mob on init or they'll qdel themselves. // for the record: this caused every single IPC's brain to be deleted randomly throughout a round, killing them instantly. - new organ_path(H) + new organ_path(target) - for(var/organ_path in additional_organs) - var/obj/item/organ/internal/check_organ = organ_path - if((initial(check_organ.parent_organ) in bodyparts_to_omit)) + for(var/obj/item/organ/internal/organ_path as anything in additional_organs) + var/organ_slot = initial(organ_path.slot) + if((initial(organ_path.parent_organ_zone) in bodyparts_to_omit) || (organ_slot in bodyparts_to_omit)) + target.internal_organs_slot[organ_slot] = null continue - var/organ_found - for(var/O in H.internal_organs) - var/obj/item/organ/internal/organ = O - organ_found = (initial(check_organ.slot) == organ.slot) - if(organ_found) - break - if(!organ_found) - new organ_path(H) - - create_mutant_organs(H) - - for(var/name in H.bodyparts_by_name) - var/part_type = H.bodyparts_by_name[name] - if(!isnull(part_type)) - H.bodyparts |= part_type // we do not want nulls here, even though it's alright to have them in bodyparts_by_name - for(var/obj/item/organ/external/O in H.bodyparts) - O.owner = H - - H.update_tail() - H.update_wing() - - -/datum/species/proc/create_mutant_organs(mob/living/carbon/human/H) - var/obj/item/organ/internal/ears/ears = H.get_int_organ(/obj/item/organ/internal/ears) - if(ears) - qdel(ears) + new organ_path(target) - if(mutantears) - ears = new mutantears(H) /datum/species/proc/breathe(mob/living/carbon/human/H) if((NO_BREATHE in species_traits) || (BREATHLESS in H.mutations)) @@ -432,7 +410,7 @@ return 0 var/obj/item/organ/external/organ = null - if(isorgan(def_zone)) + if(isexternalorgan(def_zone)) organ = def_zone else if(!def_zone) @@ -503,7 +481,7 @@ //Vampire code var/datum/antagonist/vampire/vamp = user?.mind?.has_antag_datum(/datum/antagonist/vampire) - if(vamp && !vamp.draining && user.zone_selected == "head" && target != user) + if(vamp && !vamp.draining && user.zone_selected == BODY_ZONE_HEAD && target != user) if((NO_BLOOD in target.dna.species.species_traits) || target.dna.species.exotic_blood || !target.blood_volume) to_chat(user, "They have no blood!") return @@ -520,7 +498,7 @@ //Goon Vampire Dupe code var/datum/antagonist/goon_vampire/g_vamp = user?.mind?.has_antag_datum(/datum/antagonist/goon_vampire) - if(g_vamp && !g_vamp.draining && user.zone_selected == "head" && target != user) + if(g_vamp && !g_vamp.draining && user.zone_selected == BODY_ZONE_HEAD && target != user) if((NO_BLOOD in target.dna.species.species_traits) || target.dna.species.exotic_blood || !target.blood_volume) to_chat(user, "Отсутствует кровь!") return @@ -594,7 +572,7 @@ //infected blood contacts with mouth, ignore protection & spread_flags is_infected = V.Contract(user, need_protection_check = FALSE) if(!is_infected && (V.spread_flags & CONTACT)) - V.Contract(user, act_type = CONTACT, need_protection_check = TRUE, zone = user.hand ? "l_hand" : "r_hand") + V.Contract(user, act_type = CONTACT, need_protection_check = TRUE, zone = user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) playsound(target.loc, attack.attack_sound, 25, 1, -1) @@ -686,9 +664,9 @@ return if(istype(M)) - var/obj/item/organ/external/temp = M.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = M.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] if(M.hand) - temp = M.bodyparts_by_name["l_hand"] + temp = M.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(!temp || !temp.is_usable()) to_chat(M, "[pluralize_ru(M.gender,"Ты не можешь","Вы не можете")] пользоваться своей рукой.") return @@ -860,9 +838,9 @@ return FALSE var/obj/item/organ/external/O = user.get_organ(BODY_ZONE_CHEST) - if(!user.w_uniform && !nojumpsuit && (!O || !(O.status & ORGAN_ROBOT))) + if(!user.w_uniform && !nojumpsuit && (!O || !O.is_robotic())) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) return FALSE return equip_delay_self_obscured_check(I, slot, user, disable_warning, bypass_equip_delay_self, bypass_obscured) @@ -918,9 +896,9 @@ return FALSE var/obj/item/organ/external/O = user.get_organ(BODY_ZONE_CHEST) - if(!user.w_uniform && !nojumpsuit && (!O || !(O.status & ORGAN_ROBOT))) + if(!user.w_uniform && !nojumpsuit && (!O || !O.is_robotic())) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) return FALSE return equip_delay_self_obscured_check(I, slot, user, disable_warning, bypass_equip_delay_self, bypass_obscured) @@ -933,9 +911,9 @@ return FALSE var/obj/item/organ/external/O = user.get_organ(BODY_ZONE_CHEST) - if(!user.w_uniform && !nojumpsuit && (!O || !(O.status & ORGAN_ROBOT))) + if(!user.w_uniform && !nojumpsuit && (!O || !O.is_robotic())) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) return FALSE return equip_delay_self_obscured_check(I, slot, user, disable_warning, bypass_equip_delay_self, bypass_obscured) @@ -950,9 +928,9 @@ return FALSE var/obj/item/organ/external/O = user.get_organ(BODY_ZONE_L_LEG) - if(!user.w_uniform && !nojumpsuit && (!O || !(O.status & ORGAN_ROBOT))) + if(!user.w_uniform && !nojumpsuit && (!O || !O.is_robotic())) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) return FALSE return I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET) @@ -966,9 +944,9 @@ return FALSE var/obj/item/organ/external/O = user.get_organ(BODY_ZONE_R_LEG) - if(!user.w_uniform && !nojumpsuit && (!O || !(O.status & ORGAN_ROBOT))) + if(!user.w_uniform && !nojumpsuit && (!O || !O.is_robotic())) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) return FALSE return I.w_class <= WEIGHT_CLASS_SMALL || (I.slot_flags & SLOT_POCKET) @@ -979,11 +957,11 @@ return FALSE if(!user.wear_suit) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен костюм перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен костюм перед тем как вы сможете прикрепить [I].")) return FALSE if(!user.wear_suit.can_store_weighted(I)) if(!disable_warning) - to_chat(user, SPAN_WARNING("Размер [I] слишком большой, чтобы прикрепить.")) + to_chat(user, span_warning("Размер [I] слишком большой, чтобы прикрепить.")) return FALSE if(istype(I, /obj/item/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, user.wear_suit.allowed)) @@ -992,7 +970,7 @@ if(!user.wear_suit.allowed) if(!disable_warning) user << 'sound/machines/chime.ogg' - to_chat(user, SPAN_DANGER("Откуда у Вас этот костюм? Срочно сообщите о находке в высшие инстанции!")) + to_chat(user, span_danger("Откуда у Вас этот костюм? Срочно сообщите о находке в высшие инстанции!")) return FALSE return FALSE @@ -1018,13 +996,13 @@ return FALSE if(!user.w_uniform) if(!disable_warning) - to_chat(user, SPAN_WARNING("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) + to_chat(user, span_warning("Вам нужен комбинезон перед тем как вы сможете прикрепить [I].")) return FALSE var/obj/item/clothing/under/uniform = user.w_uniform if(uniform.accessories.len && !uniform.can_attach_accessory(user)) if(!disable_warning) - to_chat(user, SPAN_WARNING("У вас уже есть аксессуар этого типа на [uniform].")) + to_chat(user, span_warning("У вас уже есть аксессуар этого типа на [uniform].")) return FALSE return TRUE @@ -1105,14 +1083,14 @@ It'll return null if the organ doesn't correspond, so include null checks when u H.sight |= SEE_MOBS H.lighting_alpha = LIGHTING_PLANE_ALPHA_MOSTLY_VISIBLE - for(var/obj/item/organ/internal/cyberimp/eyes/E in H.internal_organs) - H.sight |= E.vision_flags - if(E.see_in_dark) - H.see_in_dark = max(H.see_in_dark, E.see_in_dark) - if(E.see_invisible) - H.see_invisible = min(H.see_invisible, E.see_invisible) - if(E.lighting_alpha) - H.lighting_alpha = min(H.lighting_alpha, E.lighting_alpha) + for(var/obj/item/organ/internal/cyberimp/eyes/cyber_eyes in H.internal_organs) + H.sight |= cyber_eyes.vision_flags + if(cyber_eyes.see_in_dark) + H.see_in_dark = max(H.see_in_dark, cyber_eyes.see_in_dark) + if(cyber_eyes.see_invisible) + H.see_invisible = min(H.see_invisible, cyber_eyes.see_invisible) + if(cyber_eyes.lighting_alpha) + H.lighting_alpha = min(H.lighting_alpha, cyber_eyes.lighting_alpha) // my glasses, I can't see without my glasses if(H.glasses) @@ -1208,5 +1186,5 @@ It'll return null if the organ doesn't correspond, so include null checks when u if(bodyflags & HAS_SKIN_COLOR) return H.skin_colour else - var/obj/item/organ/external/head/HD = H.get_organ("head") + var/obj/item/organ/external/head/HD = H.get_organ(BODY_ZONE_HEAD) return HD.hair_colour diff --git a/code/modules/mob/living/carbon/human/species/abductor.dm b/code/modules/mob/living/carbon/human/species/abductor.dm index 72902ab563f..5155d8f4f99 100644 --- a/code/modules/mob/living/carbon/human/species/abductor.dm +++ b/code/modules/mob/living/carbon/human/species/abductor.dm @@ -8,13 +8,13 @@ default_language = "Abductor Mindlink" eyes = "blank_eyes" has_organ = list( - "heart" = /obj/item/organ/internal/heart, - "liver" = /obj/item/organ/internal/liver, - "kidneys" = /obj/item/organ/internal/kidneys, - "brain" = /obj/item/organ/internal/brain/abductor, - "eyes" = /obj/item/organ/internal/eyes/abductor //3 darksight. - ) - + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/abductor, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/abductor, //3 darksight. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) species_traits = list(NO_BLOOD, NO_BREATHE, VIRUSIMMUNE, NOGUNS, NO_HUNGER, NO_EXAMINE) dies_at_threshold = TRUE diff --git a/code/modules/mob/living/carbon/human/species/diona.dm b/code/modules/mob/living/carbon/human/species/diona.dm index 526e735332f..643b9724526 100644 --- a/code/modules/mob/living/carbon/human/species/diona.dm +++ b/code/modules/mob/living/carbon/human/species/diona.dm @@ -36,29 +36,29 @@ reagent_tag = PROCESS_ORG has_organ = list( - "liver" = /obj/item/organ/internal/liver/diona, - "kidneys" = /obj/item/organ/internal/kidneys/diona, - "brain" = /obj/item/organ/internal/brain/diona, - "eyes" = /obj/item/organ/internal/eyes/diona, //Default darksight of 2. - "lungs" = /obj/item/organ/internal/lungs/diona, - "appendix" = /obj/item/organ/internal/appendix/diona, - "heart" = /obj/item/organ/internal/heart/diona - ) - - mutantears = /obj/item/organ/internal/ears/diona + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/diona, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/diona, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/diona, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/diona, //Default darksight of 2. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears/diona, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/diona, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix/diona, + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/diona, + ) + has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/diona), - "groin" = list("path" = /obj/item/organ/external/groin/diona), - "head" = list("path" = /obj/item/organ/external/head/diona), - "l_arm" = list("path" = /obj/item/organ/external/arm/diona), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/diona), - "l_leg" = list("path" = /obj/item/organ/external/leg/diona), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/diona), - "l_hand" = list("path" = /obj/item/organ/external/hand/diona), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/diona), - "l_foot" = list("path" = /obj/item/organ/external/foot/diona), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/diona) - ) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest/diona), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin/diona), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head/diona), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm/diona), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right/diona), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg/diona), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right/diona), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand/diona), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right/diona), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot/diona), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right/diona), + ) suicide_messages = list( "теряет ветви!", diff --git a/code/modules/mob/living/carbon/human/species/drask.dm b/code/modules/mob/living/carbon/human/species/drask.dm index 67f1fdb005b..d94700c08c1 100644 --- a/code/modules/mob/living/carbon/human/species/drask.dm +++ b/code/modules/mob/living/carbon/human/species/drask.dm @@ -61,12 +61,13 @@ butt_sprite = "drask" has_organ = list( - "heart" = /obj/item/organ/internal/heart/drask, - "lungs" = /obj/item/organ/internal/lungs/drask, - "metabolic strainer" = /obj/item/organ/internal/liver/drask, - "eyes" = /obj/item/organ/internal/eyes/drask, //5 darksight. - "brain" = /obj/item/organ/internal/brain/drask - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/drask, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/drask, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/drask, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/drask, //5 darksight. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/drask, + ) disliked_food = SUGAR | GROSS liked_food = DAIRY @@ -93,9 +94,9 @@ H.adjustToxLoss(-0.5) H.adjustBruteLoss(-2) H.adjustFireLoss(-4) - var/obj/item/organ/external/head/head = H.get_organ("head") - if(head) - head.disfigured = FALSE + var/obj/item/organ/external/head/head = H.get_organ(BODY_ZONE_HEAD) + head?.undisfigure() + /datum/species/drask/handle_reagents(mob/living/carbon/human/H, datum/reagent/R) if(R.id == "iron") diff --git a/code/modules/mob/living/carbon/human/species/golem.dm b/code/modules/mob/living/carbon/human/species/golem.dm index eb48f94a5ea..133308e84d1 100644 --- a/code/modules/mob/living/carbon/human/species/golem.dm +++ b/code/modules/mob/living/carbon/human/species/golem.dm @@ -44,22 +44,24 @@ dangerous_existence = TRUE has_organ = list( - "brain" = /obj/item/organ/internal/brain/golem, - "adamantine_resonator" = /obj/item/organ/internal/adamantine_resonator - ) //Has standard darksight of 2. + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/golem, + INTERNAL_ORGAN_RESONATOR = /obj/item/organ/internal/adamantine_resonator, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/unbreakable/sturdy), - "groin" = list("path" = /obj/item/organ/external/groin/unbreakable/sturdy), - "head" = list("path" = /obj/item/organ/external/head/unbreakable/sturdy), - "l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable/sturdy), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable/sturdy), - "l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable/sturdy), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable/sturdy), - "l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable/sturdy), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable/sturdy), - "l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable/sturdy), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable/sturdy)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable/sturdy), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable/sturdy), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head/unbreakable/sturdy), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable/sturdy), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable/sturdy), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable/sturdy), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable/sturdy), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable/sturdy), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable/sturdy), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable/sturdy), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable/sturdy), + ) suicide_messages = list( "рассыпается в прах!", @@ -186,11 +188,14 @@ /datum/species/golem/adamantine name = "Адамантиновый Голем" skinned_type = /obj/item/stack/sheet/mineral/adamantine + has_organ = list( - "brain" = /obj/item/organ/internal/brain/golem, - "adamantine_resonator" = /obj/item/organ/internal/adamantine_resonator, - "vocal_cords" = /obj/item/organ/internal/vocal_cords/adamantine - ) + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/golem, + INTERNAL_ORGAN_RESONATOR = /obj/item/organ/internal/adamantine_resonator, + INTERNAL_ORGAN_VOCALCORDS = /obj/item/organ/internal/vocal_cords/adamantine, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) + golem_colour = rgb(68, 238, 221) info_text = "Будучи адамантиновым големом, вы обладаете особыми голосовыми связками, позволяющие вам «резонировать» послания всем големам." prefix = "Адамантинов" //неполное окончание т.к. гендеризация идет через другую функцию (/datum/species/golem/get_random_name()) diff --git a/code/modules/mob/living/carbon/human/species/grey.dm b/code/modules/mob/living/carbon/human/species/grey.dm index e8a88e9e4e5..0dd88292f69 100644 --- a/code/modules/mob/living/carbon/human/species/grey.dm +++ b/code/modules/mob/living/carbon/human/species/grey.dm @@ -8,14 +8,15 @@ butt_sprite = "grey" has_organ = list( - "heart" = /obj/item/organ/internal/heart/grey, - "lungs" = /obj/item/organ/internal/lungs/grey, - "liver" = /obj/item/organ/internal/liver/grey, - "kidneys" = /obj/item/organ/internal/kidneys/grey, - "brain" = /obj/item/organ/internal/brain/grey, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/grey //5 darksight. - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/grey, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/grey, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/grey, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/grey, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/grey, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/grey, //5 darksight. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) total_health = 90 oxy_mod = 1.2 //greys are fragile @@ -74,7 +75,7 @@ if(prob(75)) H.take_organ_damage(5, 10) H.emote("scream") - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting) affecting.disfigure() else diff --git a/code/modules/mob/living/carbon/human/species/kidan.dm b/code/modules/mob/living/carbon/human/species/kidan.dm index 0f43bc04df7..15b637dc698 100644 --- a/code/modules/mob/living/carbon/human/species/kidan.dm +++ b/code/modules/mob/living/carbon/human/species/kidan.dm @@ -23,29 +23,30 @@ butt_sprite = "kidan" has_organ = list( - "heart" = /obj/item/organ/internal/heart/kidan, - "lungs" = /obj/item/organ/internal/lungs/kidan, - "liver" = /obj/item/organ/internal/liver/kidan, - "kidneys" = /obj/item/organ/internal/kidneys/kidan, - "brain" = /obj/item/organ/internal/brain/kidan, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/kidan, //Default darksight of 2. - "lantern" = /obj/item/organ/internal/lantern - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/kidan, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/kidan, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/kidan, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/kidan, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/kidan, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/kidan, //Default darksight of 2. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + INTERNAL_ORGAN_LANTERN = /obj/item/organ/internal/lantern, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/kidan), - "groin" = list("path" = /obj/item/organ/external/groin/kidan), - "head" = list("path" = /obj/item/organ/external/head/kidan), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right) - ) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest/kidan), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin/kidan), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head/kidan), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + ) allowed_consumed_mobs = list(/mob/living/simple_animal/diona) diff --git a/code/modules/mob/living/carbon/human/species/machine.dm b/code/modules/mob/living/carbon/human/species/machine.dm index d8b215ec58c..5131079a443 100644 --- a/code/modules/mob/living/carbon/human/species/machine.dm +++ b/code/modules/mob/living/carbon/human/species/machine.dm @@ -47,27 +47,28 @@ hunger_type = "machine" has_organ = list( - "brain" = /obj/item/organ/internal/brain/mmi_holder/posibrain, - "cell" = /obj/item/organ/internal/cell, - "optics" = /obj/item/organ/internal/eyes/optical_sensor, //Default darksight of 2. - "charger" = /obj/item/organ/internal/cyberimp/arm/power_cord - ) + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/mmi_holder/posibrain, + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/cell, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/optical_sensor, //Default darksight of 2. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears/microphone, //Default darksight of 2. + INTERNAL_ORGAN_R_ARM_DEVICE = /obj/item/organ/internal/cyberimp/arm/power_cord, + ) vision_organ = /obj/item/organ/internal/eyes/optical_sensor - mutantears = /obj/item/organ/internal/ears/microphone + has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/ipc), - "groin" = list("path" = /obj/item/organ/external/groin/ipc), - "head" = list("path" = /obj/item/organ/external/head/ipc), - "l_arm" = list("path" = /obj/item/organ/external/arm/ipc), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/ipc), - "l_leg" = list("path" = /obj/item/organ/external/leg/ipc), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/ipc), - "l_hand" = list("path" = /obj/item/organ/external/hand/ipc), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/ipc), - "l_foot" = list("path" = /obj/item/organ/external/foot/ipc), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/ipc) - ) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest/ipc), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin/ipc), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head/ipc), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm/ipc), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right/ipc), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg/ipc), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right/ipc), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand/ipc), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right/ipc), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot/ipc), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right/ipc), + ) suicide_messages = list( "is powering down!", @@ -115,7 +116,7 @@ /datum/action/innate/change_monitor/Activate() var/mob/living/carbon/human/H = owner - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) if(!head_organ) //If the rock'em-sock'em robot's head came off during a fight, they shouldn't be able to change their screen/optics. to_chat(H, "Куда делась голова? Невозможно сменить дисплей без неё.") diff --git a/code/modules/mob/living/carbon/human/species/monkey.dm b/code/modules/mob/living/carbon/human/species/monkey.dm index b81660e7958..45ef29ed8e4 100644 --- a/code/modules/mob/living/carbon/human/species/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/monkey.dm @@ -41,18 +41,19 @@ burn_mod = 1.5 has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "tail" = list("path" = /obj/item/organ/external/tail/monkey)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/monkey), + ) /datum/species/monkey/handle_npc(mob/living/carbon/human/H) if(H.stat != CONSCIOUS) @@ -91,29 +92,32 @@ base_color = "#000000" tail = "farwatail" reagent_tag = PROCESS_ORG + has_organ = list( - "heart" = /obj/item/organ/internal/heart/tajaran, - "lungs" = /obj/item/organ/internal/lungs/tajaran, - "liver" = /obj/item/organ/internal/liver/tajaran, - "kidneys" = /obj/item/organ/internal/kidneys/tajaran, - "brain" = /obj/item/organ/internal/brain/tajaran, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/tajaran/farwa //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ.. - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/tajaran, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/tajaran, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/tajaran, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/tajaran, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/tajaran, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/tajaran/farwa, //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ.. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "tail" = list("path" = /obj/item/organ/external/tail/monkey/tajaran), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/monkey/tajaran), + ) /datum/species/monkey/vulpkanin @@ -130,29 +134,32 @@ base_color = "#000000" tail = "wolpintail" reagent_tag = PROCESS_ORG + has_organ = list( - "heart" = /obj/item/organ/internal/heart/vulpkanin, - "lungs" = /obj/item/organ/internal/lungs/vulpkanin, - "liver" = /obj/item/organ/internal/liver/vulpkanin, - "kidneys" = /obj/item/organ/internal/kidneys/vulpkanin, - "brain" = /obj/item/organ/internal/brain/vulpkanin, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/vulpkanin/wolpin //Vulpkanin monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ.. - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/vulpkanin, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/vulpkanin, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/vulpkanin, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/vulpkanin, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/vulpkanin, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/vulpkanin/wolpin, // Vulpkanin monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ.. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head/vulpkanin/wolpin), - "tail" = list("path" = /obj/item/organ/external/tail/monkey/vulpkanin), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/monkey/vulpkanin), + ) /datum/species/monkey/skrell name = "Neara" @@ -170,14 +177,31 @@ tail = null has_organ = list( - "heart" = /obj/item/organ/internal/heart/skrell, - "lungs" = /obj/item/organ/internal/lungs/skrell, - "liver" = /obj/item/organ/internal/liver/skrell, - "kidneys" = /obj/item/organ/internal/kidneys/skrell, - "brain" = /obj/item/organ/internal/brain/skrell, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/skrell //Tajara monkey-forms are uniquely colourblind and have excellent darksight, which is why they need a subtype of their greater-form's organ.. - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/skrell, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/skrell, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/skrell, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/skrell, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/skrell, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/skrell, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) + + has_limbs = list( + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + ) + + /datum/species/monkey/skrell/on_species_gain(mob/living/carbon/human/H) ..() ADD_TRAIT(H, TRAIT_WATERBREATH, "species") @@ -204,25 +228,27 @@ bodyflags = HAS_TAIL has_organ = list( - "heart" = /obj/item/organ/internal/heart/unathi, - "lungs" = /obj/item/organ/internal/lungs/unathi, - "liver" = /obj/item/organ/internal/liver/unathi, - "kidneys" = /obj/item/organ/internal/kidneys/unathi, - "brain" = /obj/item/organ/internal/brain/unathi, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/unathi - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/unathi, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/unathi, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/unathi, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/unathi, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/unathi, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/unathi, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "tail" = list("path" = /obj/item/organ/external/tail/monkey/unathi), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/monkey/unathi), + ) diff --git a/code/modules/mob/living/carbon/human/species/moth.dm b/code/modules/mob/living/carbon/human/species/moth.dm index 15cac1c2e5c..c62934ef6dd 100644 --- a/code/modules/mob/living/carbon/human/species/moth.dm +++ b/code/modules/mob/living/carbon/human/species/moth.dm @@ -40,27 +40,29 @@ siemens_coeff = 1.5 has_organ = list( - "heart" = /obj/item/organ/internal/heart/nian, - "lungs" = /obj/item/organ/internal/lungs/nian, - "liver" = /obj/item/organ/internal/liver/nian, - "kidneys" = /obj/item/organ/internal/kidneys/nian, - "brain" = /obj/item/organ/internal/brain/nian, - "eyes" = /obj/item/organ/internal/eyes/nian + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/nian, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/nian, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/nian, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/nian, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/nian, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/nian, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "wing" = list("path" = /obj/item/organ/external/wing/nian)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_WING = list("path" = /obj/item/organ/external/wing/nian), + ) optional_body_accessory = FALSE @@ -123,7 +125,7 @@ var/turf/A = get_turf(H) if(isspaceturf(A)) return FALSE - if(H.has_status_effect(STATUS_EFFECT_BURNT_WINGS) || !H.bodypart_wing) + if(H.has_status_effect(STATUS_EFFECT_BURNT_WINGS) || !H.get_organ(BODY_ZONE_WING)) return FALSE var/datum/gas_mixture/current = A.return_air() if(current && (current.return_pressure() >= ONE_ATMOSPHERE*0.85))//as long as there's reasonable pressure and no gravity, flight is possible diff --git a/code/modules/mob/living/carbon/human/species/nucleation.dm b/code/modules/mob/living/carbon/human/species/nucleation.dm index ac1acd6ab28..93a9c156876 100644 --- a/code/modules/mob/living/carbon/human/species/nucleation.dm +++ b/code/modules/mob/living/carbon/human/species/nucleation.dm @@ -21,11 +21,13 @@ reagent_tag = PROCESS_ORG has_organ = list( - "heart" = /obj/item/organ/internal/heart, - "brain" = /obj/item/organ/internal/brain/crystal, - "eyes" = /obj/item/organ/internal/eyes/luminescent_crystal, //Standard darksight of 2. - "strange crystal" = /obj/item/organ/internal/nucleation/strange_crystal - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/crystal, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/luminescent_crystal, //Standard darksight of 2. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + INTERNAL_ORGAN_STRANGE_CRYSTAL = /obj/item/organ/internal/nucleation/strange_crystal, + INTERNAL_ORGAN_RESONANT_CRYSTAL = /obj/item/organ/internal/nucleation/resonant_crystal, + ) vision_organ = /obj/item/organ/internal/eyes/luminescent_crystal /datum/species/nucleation/on_species_gain(mob/living/carbon/human/H) diff --git a/code/modules/mob/living/carbon/human/species/plasmaman.dm b/code/modules/mob/living/carbon/human/species/plasmaman.dm index dc758113734..86c45e7a33c 100644 --- a/code/modules/mob/living/carbon/human/species/plasmaman.dm +++ b/code/modules/mob/living/carbon/human/species/plasmaman.dm @@ -34,13 +34,14 @@ "показывает свою истинную природу, которая оказывается плазмой!") has_organ = list( - "heart" = /obj/item/organ/internal/heart/plasmaman, - "lungs" = /obj/item/organ/internal/lungs/plasmaman, - "liver" = /obj/item/organ/internal/liver/plasmaman, - "kidneys" = /obj/item/organ/internal/kidneys/plasmaman, - "brain" = /obj/item/organ/internal/brain/plasmaman, - "eyes" = /obj/item/organ/internal/eyes/plasmaman - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/plasmaman, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/plasmaman, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/plasmaman, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/plasmaman, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/plasmaman, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/plasmaman, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) speciesbox = /obj/item/storage/box/survival_plasmaman flesh_color = "#8b3fba" diff --git a/code/modules/mob/living/carbon/human/species/shadow.dm b/code/modules/mob/living/carbon/human/species/shadow.dm index 75c758e7bdc..10cde594d7b 100644 --- a/code/modules/mob/living/carbon/human/species/shadow.dm +++ b/code/modules/mob/living/carbon/human/species/shadow.dm @@ -11,10 +11,12 @@ blood_color = "#CCCCCC" flesh_color = "#AAAAAA" + has_organ = list( - "brain" = /obj/item/organ/internal/brain, - "eyes" = /obj/item/organ/internal/eyes/shadow //8 darksight. - ) + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/shadow, //8 darksight. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) species_traits = list(NO_BREATHE, NO_BLOOD, RADIMMUNE, VIRUSIMMUNE) dies_at_threshold = TRUE diff --git a/code/modules/mob/living/carbon/human/species/shadowling.dm b/code/modules/mob/living/carbon/human/species/shadowling.dm index dd523c1cdf5..cfc53b40de8 100644 --- a/code/modules/mob/living/carbon/human/species/shadowling.dm +++ b/code/modules/mob/living/carbon/human/species/shadowling.dm @@ -17,8 +17,10 @@ grant_vision_toggle = 0 has_organ = list( - "brain" = /obj/item/organ/internal/brain, - "eyes" = /obj/item/organ/internal/eyes) + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) disliked_food = NONE diff --git a/code/modules/mob/living/carbon/human/species/skeleton.dm b/code/modules/mob/living/carbon/human/species/skeleton.dm index 55ac8cbf104..8c48b003f88 100644 --- a/code/modules/mob/living/carbon/human/species/skeleton.dm +++ b/code/modules/mob/living/carbon/human/species/skeleton.dm @@ -36,9 +36,11 @@ "сваливается в кучу!", "разваливается!", "откручивает себе череп!") + has_organ = list( - "brain" = /obj/item/organ/internal/brain/golem, - ) //Has default darksight of 2. + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/golem, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) toxic_food = NONE disliked_food = NONE @@ -62,8 +64,8 @@ if(prob(5)) // 5% chance per proc to find a random limb, and mend it var/list/our_organs = H.bodyparts.Copy() shuffle(our_organs) - for(var/obj/item/organ/external/L in our_organs) - if(L.mend_fracture()) + for(var/obj/item/organ/external/bodypart as anything in our_organs) + if(bodypart.mend_fracture()) break // We're only checking one limb here, bucko if(prob(25)) //25% шанс на случайную шутливую фразу H.say(pick("Спасибо Мистеру Скелтал!", "От такого молока челюсть отвисает!", "Я вижу четКость своих решений!", "Надо не забыть пересчитать косточки...", "Маленькие скелеты паКостят!", "Хорошо что у меня язык без костей!", "Теперь я не буду ЧЕРЕПашкой!", "Теперь мне не нужны костыли!", "Костян плохого не посоветует!", "Ощущаешь мою ловКость?", "Я чувствую такую лёгКость!", "Большая редКость найти любимую жидКость!", "Моя любимая жидКость!", "Аж закостенел!", "Теперь я вешу скелетонну!", "Спасибо за крепкие кости!", "Ду-ду!", "Вы замечали что мы все в одной плосКости?")) diff --git a/code/modules/mob/living/carbon/human/species/skrell.dm b/code/modules/mob/living/carbon/human/species/skrell.dm index 1b5955ad7c6..ed6f6562901 100644 --- a/code/modules/mob/living/carbon/human/species/skrell.dm +++ b/code/modules/mob/living/carbon/human/species/skrell.dm @@ -40,15 +40,16 @@ liked_food = VEGETABLES | FRUIT has_organ = list( - "heart" = /obj/item/organ/internal/heart/skrell, - "lungs" = /obj/item/organ/internal/lungs/skrell, - "liver" = /obj/item/organ/internal/liver/skrell, - "kidneys" = /obj/item/organ/internal/kidneys/skrell, - "brain" = /obj/item/organ/internal/brain/skrell, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/skrell, //Default darksight of 5. - "headpocket" = /obj/item/organ/internal/headpocket - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/skrell, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/skrell, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/skrell, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/skrell, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/skrell, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/skrell, //Default darksight of 5. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + INTERNAL_ORGAN_HEADPOCKET = /obj/item/organ/internal/headpocket, + ) suicide_messages = list( "пытается откусить себе язык!", diff --git a/code/modules/mob/living/carbon/human/species/slime.dm b/code/modules/mob/living/carbon/human/species/slime.dm index 10f974ae9ec..a3bfb99abbd 100644 --- a/code/modules/mob/living/carbon/human/species/slime.dm +++ b/code/modules/mob/living/carbon/human/species/slime.dm @@ -38,27 +38,27 @@ exotic_blood = "slimejelly" butt_sprite = "slime" - //Has default darksight of 2. has_organ = list( - "brain" = /obj/item/organ/internal/brain/slime, - "heart" = /obj/item/organ/internal/heart/slime, - "lungs" = /obj/item/organ/internal/lungs/slime - ) - mutantears = null + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/slime, + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/slime, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/slime, + ) + has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/unbreakable), - "groin" = list("path" = /obj/item/organ/external/groin/unbreakable), - "head" = list("path" = /obj/item/organ/external/head/unbreakable), - "l_arm" = list("path" = /obj/item/organ/external/arm/unbreakable), - "r_arm" = list("path" = /obj/item/organ/external/arm/right/unbreakable), - "l_leg" = list("path" = /obj/item/organ/external/leg/unbreakable), - "r_leg" = list("path" = /obj/item/organ/external/leg/right/unbreakable), - "l_hand" = list("path" = /obj/item/organ/external/hand/unbreakable), - "r_hand" = list("path" = /obj/item/organ/external/hand/right/unbreakable), - "l_foot" = list("path" = /obj/item/organ/external/foot/unbreakable), - "r_foot" = list("path" = /obj/item/organ/external/foot/right/unbreakable) - ) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head/unbreakable), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right/unbreakable), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand/unbreakable), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right/unbreakable), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot/unbreakable), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right/unbreakable), + ) + suicide_messages = list( "тает в лужу!", "растекается в лужу!", @@ -181,7 +181,7 @@ if(!istype(E)) var/list/limblist = H.dna.species.has_limbs[l] var/obj/item/organ/external/limb = limblist["path"] - var/parent_organ = initial(limb.parent_organ) + var/parent_organ = initial(limb.parent_organ_zone) var/obj/item/organ/external/parentLimb = H.bodyparts_by_name[parent_organ] if(!istype(parentLimb)) continue @@ -198,16 +198,25 @@ //перевод конечности со склонением var/chosen_limb_rus = chosen_limb - switch (chosen_limb_rus) - if ("l_leg", "left leg", "the left leg") chosen_limb_rus = "левой ноги" - if ("r_leg", "right leg", "the right leg") chosen_limb_rus = "правой ноги" - if ("l_foot", "left foot", "the left foot") chosen_limb_rus = "левой ступни" - if ("r_foot", "right foot", "the right foot") chosen_limb_rus = "правой ступни" - if ("groin", "lower body", "the lower body") chosen_limb_rus = "нижней части тела" - if ("l_arm", "left arm", "the left arm") chosen_limb_rus = "левой руки" - if ("r_arm", "right arm", "the right arm") chosen_limb_rus = "правой руки" - if ("l_hand", "left hand", "the left hand") chosen_limb_rus = "левой кисти" - if ("r_hand", "right hand", "the right hand") chosen_limb_rus = "правой кисти" + switch(chosen_limb_rus) + if(BODY_ZONE_L_LEG, "left leg", "the left leg") + chosen_limb_rus = "левой ноги" + if(BODY_ZONE_R_LEG, "right leg", "the right leg") + chosen_limb_rus = "правой ноги" + if(BODY_ZONE_PRECISE_L_FOOT, "left foot", "the left foot") + chosen_limb_rus = "левой ступни" + if(BODY_ZONE_PRECISE_R_FOOT, "right foot", "the right foot") + chosen_limb_rus = "правой ступни" + if(BODY_ZONE_PRECISE_GROIN, "lower body", "the lower body") + chosen_limb_rus = "нижней части тела" + if(BODY_ZONE_L_ARM, "left arm", "the left arm") + chosen_limb_rus = "левой руки" + if(BODY_ZONE_R_ARM, "right arm", "the right arm") + chosen_limb_rus = "правой руки" + if(BODY_ZONE_PRECISE_L_HAND, "left hand", "the left hand") + chosen_limb_rus = "левой кисти" + if(BODY_ZONE_PRECISE_R_HAND, "right hand", "the right hand") + chosen_limb_rus = "правой кисти" H.visible_message("[H] замирает и концентрируется на [genderize_ru(H.gender,"его","её","своей","их")] потерянной [chosen_limb_rus]...", "Вы концентрируетесь на отращивании [chosen_limb_rus]... (Это займет [round(SLIMEPERSON_REGROWTHDELAY/10)] секунд, нужно подождать в спокойствии.)") if(do_after(H, SLIMEPERSON_REGROWTHDELAY, FALSE, H, extra_checks = list(CALLBACK(H, TYPE_PROC_REF(/mob/living, IsStunned))), use_default_checks = FALSE)) // Override the check for weakness, only check for stunned @@ -233,7 +242,7 @@ var/limb_list = H.dna.species.has_limbs[chosen_limb] var/obj/item/organ/external/limb_path = limb_list["path"] // Parent check - var/obj/item/organ/external/potential_parent = H.bodyparts_by_name[initial(limb_path.parent_organ)] + var/obj/item/organ/external/potential_parent = H.bodyparts_by_name[initial(limb_path.parent_organ_zone)] if(!istype(potential_parent)) to_chat(H, "Вы потеряли орган, на котором выращивали новую конечность!") return // No rayman for you @@ -250,16 +259,25 @@ //перевод конечности со склонением var/new_limb_rus = new_limb.name - switch (new_limb_rus) - if ("l_leg", "left leg", "the left leg") new_limb_rus = "левую ногу" - if ("r_leg", "right leg", "the right leg") new_limb_rus = "правую ногу" - if ("l_foot", "left foot", "the left foot") new_limb_rus = "левую ступню" - if ("r_foot", "right foot", "the right foot") new_limb_rus = "правую ступню" - if ("groin", "lower body", "the lower body") new_limb_rus = "нижнюю часть тела" - if ("l_arm", "left arm", "the left arm") new_limb_rus = "левую руку" - if ("r_arm", "right arm", "the right arm") new_limb_rus = "правую руку" - if ("l_hand", "left hand", "the left hand") new_limb_rus = "левую кисть" - if ("r_hand", "right hand", "the right hand") new_limb_rus = "правую кисть" + switch(new_limb_rus) + if(BODY_ZONE_L_LEG, "left leg", "the left leg") + chosen_limb_rus = "левую ногу" + if(BODY_ZONE_R_LEG, "right leg", "the right leg") + chosen_limb_rus = "правую ногу" + if(BODY_ZONE_PRECISE_L_FOOT, "left foot", "the left foot") + chosen_limb_rus = "левую ступню" + if(BODY_ZONE_PRECISE_R_FOOT, "right foot", "the right foot") + chosen_limb_rus = "правую ступню" + if(BODY_ZONE_PRECISE_GROIN, "lower body", "the lower body") + chosen_limb_rus = "нижнюю часть тела" + if(BODY_ZONE_L_ARM, "left arm", "the left arm") + chosen_limb_rus = "левую руку" + if(BODY_ZONE_R_ARM, "right arm", "the right arm") + chosen_limb_rus = "правую руку" + if(BODY_ZONE_PRECISE_L_HAND, "left hand", "the left hand") + chosen_limb_rus = "левую кисть" + if(BODY_ZONE_PRECISE_R_HAND, "right hand", "the right hand") + chosen_limb_rus = "правую кисть" H.visible_message("[H] отращивает [genderize_ru(H.gender,"его","её","своей","их")] потерянную [new_limb_rus]!", "Вы отрастили [new_limb_rus]") else @@ -274,7 +292,7 @@ /datum/action/innate/slimehair/Activate() var/mob/living/carbon/human/H = owner var/list/valid_hairstyles = H.generate_valid_hairstyles() - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) var/new_style = input("Please select hair style", "Character Generation", head_organ.h_style) as null|anything in valid_hairstyles if(new_style) H.visible_message("Волосы на голове [H] начинают шевелиться!.", "Вы концентрируетесь на своей прическе.") @@ -294,7 +312,7 @@ /datum/action/innate/slimebeard/Activate() var/mob/living/carbon/human/H = owner var/list/valid_facial_hairstyles = H.generate_valid_facial_hairstyles() - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) if(H.gender == FEMALE) to_chat(H, " Вы не можете изменить бороду.") return diff --git a/code/modules/mob/living/carbon/human/species/tajaran.dm b/code/modules/mob/living/carbon/human/species/tajaran.dm index 6f69020978d..b8ad91b1dbb 100644 --- a/code/modules/mob/living/carbon/human/species/tajaran.dm +++ b/code/modules/mob/living/carbon/human/species/tajaran.dm @@ -36,28 +36,30 @@ butt_sprite = "tajaran" has_organ = list( - "heart" = /obj/item/organ/internal/heart/tajaran, - "lungs" = /obj/item/organ/internal/lungs/tajaran, - "liver" = /obj/item/organ/internal/liver/tajaran, - "kidneys" = /obj/item/organ/internal/kidneys/tajaran, - "brain" = /obj/item/organ/internal/brain/tajaran, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/tajaran - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/tajaran, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/tajaran, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/tajaran, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/tajaran, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/tajaran, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/tajaran, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "tail" = list("path" = /obj/item/organ/external/tail/tajaran)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/tajaran), + ) allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/chick, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble) diff --git a/code/modules/mob/living/carbon/human/species/unathi.dm b/code/modules/mob/living/carbon/human/species/unathi.dm index f6998fd00d8..0245015d88c 100644 --- a/code/modules/mob/living/carbon/human/species/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/unathi.dm @@ -50,28 +50,30 @@ female_sneeze_sound = list('sound/voice/unathi/f_u_sneeze.ogg') has_organ = list( - "heart" = /obj/item/organ/internal/heart/unathi, - "lungs" = /obj/item/organ/internal/lungs/unathi, - "liver" = /obj/item/organ/internal/liver/unathi, - "kidneys" = /obj/item/organ/internal/kidneys/unathi, - "brain" = /obj/item/organ/internal/brain/unathi, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/unathi //3 darksight. - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/unathi, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/unathi, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/unathi, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/unathi, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/unathi, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/unathi, // 3 darksight. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "tail" = list("path" = /obj/item/organ/external/tail/unathi)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/unathi), + ) allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken, /mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble) @@ -92,7 +94,7 @@ button_icon_state = "tail" check_flags = AB_CHECK_LYING | AB_CHECK_CONSCIOUS | AB_CHECK_STUNNED -/datum/action/innate/tail_lash/Trigger() +/datum/action/innate/tail_lash/Trigger(left_click = TRUE) if(IsAvailable(show_message = TRUE)) ..() @@ -105,7 +107,7 @@ to_chat(user, "Передохните перед повторным взмахом хвоста!") return for(var/mob/living/carbon/human/C in orange(1)) - var/obj/item/organ/external/E = C.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin")) + var/obj/item/organ/external/E = C.get_organ(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT, BODY_ZONE_PRECISE_GROIN)) if(E) user.changeNext_move(CLICK_CD_MELEE) //User бьет С в Е. Сука... С - это цель. Е - это орган. @@ -128,11 +130,11 @@ /datum/action/innate/tail_lash/IsAvailable(show_message = FALSE) . = ..() var/mob/living/carbon/human/user = owner - if(!user.bodyparts_by_name["tail"]) + if(!user.bodyparts_by_name[BODY_ZONE_TAIL]) if(show_message) to_chat(user, "У вас НЕТ ХВОСТА!") return FALSE - if(!istype(user.bodyparts_by_name["tail"], /obj/item/organ/external/tail/unathi)) + if(!istype(user.bodyparts_by_name[BODY_ZONE_TAIL], /obj/item/organ/external/tail/unathi)) if(show_message) to_chat(user, "У вас слабый хвост!") return FALSE @@ -155,14 +157,15 @@ species_traits = list(NOGUNS, LIPS, PIERCEIMMUNE) has_organ = list( - "heart" = /obj/item/organ/internal/heart/unathi, - "lungs" = /obj/item/organ/internal/lungs/unathi/ash_walker, - "liver" = /obj/item/organ/internal/liver/unathi, - "kidneys" = /obj/item/organ/internal/kidneys/unathi, - "brain" = /obj/item/organ/internal/brain/unathi, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/unathi - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/unathi, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/unathi/ash_walker, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/unathi, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/unathi, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/unathi, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/unathi, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) /datum/species/unathi/ashwalker/on_species_gain(mob/living/carbon/human/H) ..() @@ -340,7 +343,7 @@ They're basically just lizards with all-around marginally better stats and fire var/obj/shoes = C.get_item_by_slot(slot_shoes) if(shoes && C.can_unEquip(shoes)) C.drop_item_ground(shoes) - var/obj/item/organ/external/head/head_organ = C.get_organ("head") + var/obj/item/organ/external/head/head_organ = C.get_organ(BODY_ZONE_HEAD) head_organ?.ha_style = "Drake" C.change_eye_color("#A02720") C.update_dna() diff --git a/code/modules/mob/living/carbon/human/species/vox.dm b/code/modules/mob/living/carbon/human/species/vox.dm index 9e0b8f71674..0584cb6395e 100644 --- a/code/modules/mob/living/carbon/human/species/vox.dm +++ b/code/modules/mob/living/carbon/human/species/vox.dm @@ -57,28 +57,30 @@ ) has_organ = list( - "heart" = /obj/item/organ/internal/heart/vox, - "lungs" = /obj/item/organ/internal/lungs/vox, - "liver" = /obj/item/organ/internal/liver/vox, - "kidneys" = /obj/item/organ/internal/kidneys/vox, - "brain" = /obj/item/organ/internal/brain/vox, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/vox, //Default darksight of 2. - ) //for determining the success of the heist game-mode's 'leave nobody behind' objective, while this is just an organ. + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/vox, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/vox, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/vox, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/vox, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/vox, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/vox, // Default darksight of 2. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "tail" = list("path" = /obj/item/organ/external/tail/vox)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/vox), + ) suicide_messages = list( "пытается откусить себе язык!", @@ -210,13 +212,14 @@ icon_template = 'icons/mob/human_races/r_armalis.dmi' has_organ = list( - "heart" = /obj/item/organ/internal/heart, - "lungs" = /obj/item/organ/internal/lungs/vox, - "liver" = /obj/item/organ/internal/liver, - "kidneys" = /obj/item/organ/internal/kidneys, - "cortical stack" = /obj/item/organ/internal/brain/vox, - "eyes" = /obj/item/organ/internal/eyes, //Default darksight of 2. - ) //for determining the success of the heist game-mode's 'leave nobody behind' objective, while this is just an organ. + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/vox, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/vox, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) suicide_messages = list( "пытается откусить себе язык!", diff --git a/code/modules/mob/living/carbon/human/species/vulpkanin.dm b/code/modules/mob/living/carbon/human/species/vulpkanin.dm index 5f3f5ee8579..c77ccd687e8 100644 --- a/code/modules/mob/living/carbon/human/species/vulpkanin.dm +++ b/code/modules/mob/living/carbon/human/species/vulpkanin.dm @@ -29,28 +29,30 @@ scream_verb = "скул%(ит,ят)%" has_organ = list( - "heart" = /obj/item/organ/internal/heart/vulpkanin, - "lungs" = /obj/item/organ/internal/lungs/vulpkanin, - "liver" = /obj/item/organ/internal/liver/vulpkanin, - "kidneys" = /obj/item/organ/internal/kidneys/vulpkanin, - "brain" = /obj/item/organ/internal/brain/vulpkanin, - "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes/vulpkanin - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart/vulpkanin, + INTERNAL_ORGAN_LUNGS = /obj/item/organ/internal/lungs/vulpkanin, + INTERNAL_ORGAN_LIVER = /obj/item/organ/internal/liver/vulpkanin, + INTERNAL_ORGAN_KIDNEYS = /obj/item/organ/internal/kidneys/vulpkanin, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain/vulpkanin, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/vulpkanin, + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest), - "groin" = list("path" = /obj/item/organ/external/groin), - "head" = list("path" = /obj/item/organ/external/head/vulpkanin), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "tail" = list("path" = /obj/item/organ/external/tail/vulpkanin)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/vulpkanin), + ) allowed_consumed_mobs = list(/mob/living/simple_animal/mouse, /mob/living/simple_animal/lizard, /mob/living/simple_animal/chick, /mob/living/simple_animal/chicken, /mob/living/simple_animal/crab, /mob/living/simple_animal/butterfly, /mob/living/simple_animal/parrot, /mob/living/simple_animal/tribble) diff --git a/code/modules/mob/living/carbon/human/species/wryn.dm b/code/modules/mob/living/carbon/human/species/wryn.dm index 5fd628a152e..6499c5192d3 100644 --- a/code/modules/mob/living/carbon/human/species/wryn.dm +++ b/code/modules/mob/living/carbon/human/species/wryn.dm @@ -28,27 +28,29 @@ body_temperature = 286 has_organ = list( - "heart" = /obj/item/organ/internal/heart, - "brain" = /obj/item/organ/internal/brain, - "eyes" = /obj/item/organ/internal/eyes/wryn, //3 darksight. - "appendix" = /obj/item/organ/internal/appendix, - "antennae" = /obj/item/organ/internal/wryn/hivenode, - "glands" = /obj/item/organ/internal/wryn/glands - ) + INTERNAL_ORGAN_HEART = /obj/item/organ/internal/heart, + INTERNAL_ORGAN_BRAIN = /obj/item/organ/internal/brain, + INTERNAL_ORGAN_EYES = /obj/item/organ/internal/eyes/wryn, //3 darksight. + INTERNAL_ORGAN_EARS = /obj/item/organ/internal/ears, + INTERNAL_ORGAN_APPENDIX = /obj/item/organ/internal/appendix, + INTERNAL_ORGAN_HIVENODE = /obj/item/organ/internal/wryn/hivenode, + INTERNAL_ORGAN_WAX_GLANDS = /obj/item/organ/internal/wryn/glands, + ) has_limbs = list( - "chest" = list("path" = /obj/item/organ/external/chest/wryn), - "groin" = list("path" = /obj/item/organ/external/groin/wryn), - "head" = list("path" = /obj/item/organ/external/head/wryn), - "l_arm" = list("path" = /obj/item/organ/external/arm), - "r_arm" = list("path" = /obj/item/organ/external/arm/right), - "l_leg" = list("path" = /obj/item/organ/external/leg), - "r_leg" = list("path" = /obj/item/organ/external/leg/right), - "l_hand" = list("path" = /obj/item/organ/external/hand), - "r_hand" = list("path" = /obj/item/organ/external/hand/right), - "l_foot" = list("path" = /obj/item/organ/external/foot), - "r_foot" = list("path" = /obj/item/organ/external/foot/right), - "tail" = list("path" = /obj/item/organ/external/tail/wryn)) + BODY_ZONE_CHEST = list("path" = /obj/item/organ/external/chest/wryn), + BODY_ZONE_PRECISE_GROIN = list("path" = /obj/item/organ/external/groin/wryn), + BODY_ZONE_HEAD = list("path" = /obj/item/organ/external/head/wryn), + BODY_ZONE_L_ARM = list("path" = /obj/item/organ/external/arm), + BODY_ZONE_R_ARM = list("path" = /obj/item/organ/external/arm/right), + BODY_ZONE_L_LEG = list("path" = /obj/item/organ/external/leg), + BODY_ZONE_R_LEG = list("path" = /obj/item/organ/external/leg/right), + BODY_ZONE_PRECISE_L_HAND = list("path" = /obj/item/organ/external/hand), + BODY_ZONE_PRECISE_R_HAND = list("path" = /obj/item/organ/external/hand/right), + BODY_ZONE_PRECISE_L_FOOT = list("path" = /obj/item/organ/external/foot), + BODY_ZONE_PRECISE_R_FOOT = list("path" = /obj/item/organ/external/foot/right), + BODY_ZONE_TAIL = list("path" = /obj/item/organ/external/tail/wryn), + ) species_traits = list(LIPS, IS_WHITELISTED, NO_BREATHE, NO_SCAN, HIVEMIND) clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS @@ -88,7 +90,7 @@ var/button_on = FALSE //What happens when you click the Button? -/datum/action/innate/wryn_sting/Trigger() +/datum/action/innate/wryn_sting/Trigger(left_click = TRUE) if(!..()) return var/mob/living/carbon/user = owner @@ -144,7 +146,7 @@ UpdateButtonIcon() return else //Nah, that chump is still here! Sting 'em! Sting 'em good! - var/obj/item/organ/external/organ = target.get_organ(pick("l_leg", "r_leg", "l_foot", "r_foot", "groin")) + var/obj/item/organ/external/organ = target.get_organ(pick(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT, BODY_ZONE_PRECISE_GROIN)) to_chat(user, " Вы жалите [target] в [organ]!") user.visible_message("[user] жалит [target] в [organ]! ") user.adjustStaminaLoss(20) //You can't sting infinitely, Wryn - take some Stamina loss @@ -170,7 +172,7 @@ /datum/species/wryn/harm(mob/living/carbon/human/user, mob/living/carbon/human/target, datum/martial_art/attacker_style) var/obj/item/organ/internal/wryn/hivenode/node = target.get_int_organ(/obj/item/organ/internal/wryn/hivenode) - if(target.handcuffed && node && user.zone_selected == "head") + if(target.handcuffed && node && user.zone_selected == BODY_ZONE_HEAD) switch(alert(user, "Вы хотите вырвать усики этому существу?", "OH SHIT", "Да", "Нет")) if("Да") user.visible_message("[user] начина[pluralize_ru(user.gender,"ет","ют")] яростно отрывать усики [target].") @@ -182,7 +184,7 @@ to_chat(user, "Вы слышите громкий хруст, когда безжалостно отрываете усики [target].") to_chat(target, "Вы слышите невыносимый хруст, когда [user] вырыва[pluralize_ru(user.gender,"ет","ют")] усики из вашей головы.") to_chat(target, "Стало так тихо...") - var/obj/item/organ/external/head/head_organ = target.get_organ("head") + var/obj/item/organ/external/head/head_organ = target.get_organ(BODY_ZONE_HEAD) head_organ.h_style = "Bald" target.update_hair() diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 2b00e5221b1..e69990a142a 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -129,8 +129,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) // first check whether something actually changed about damage appearance var/damage_appearance = "" - for(var/obj/item/organ/external/O in bodyparts) - damage_appearance += O.damage_state + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + damage_appearance += bodypart.damage_state if(damage_appearance == previous_damage_appearance) // nothing to do here @@ -143,18 +143,17 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) overlays_standing[H_DAMAGE_LAYER] = damage_overlay // blend the individual damage states with our icons - for(var/D in bodyparts) - var/obj/item/organ/external/E = D - E.update_icon() - if(E.damage_state == "00") + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + bodypart.update_icon() + if(bodypart.damage_state == "00") continue var/icon/DI - var/cache_index = "[E.damage_state]/[E.icon_name]/[dna.species.blood_color]/[dna.species.name]" + var/cache_index = "[bodypart.damage_state]/[bodypart.icon_name]/[dna.species.blood_color]/[dna.species.name]" if(GLOB.damage_icon_parts[cache_index] == null) - DI = new /icon(dna.species.damage_overlays, E.damage_state) // the damage icon for whole human - DI.Blend(new /icon(dna.species.damage_mask, E.icon_name), ICON_MULTIPLY) // mask with this organ's pixels + DI = new /icon(dna.species.damage_overlays, bodypart.damage_state) // the damage icon for whole human + DI.Blend(new /icon(dna.species.damage_mask, bodypart.icon_name), ICON_MULTIPLY) // mask with this organ's pixels DI.Blend(dna.species.blood_color, ICON_MULTIPLY) GLOB.damage_icon_parts[cache_index] = DI else @@ -198,13 +197,11 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) else var/icon/base_icon //BEGIN CACHED ICON GENERATION. - var/obj/item/organ/external/chest = get_organ("chest") + var/obj/item/organ/external/chest = get_organ(BODY_ZONE_CHEST) base_icon = chest.get_icon(skeleton) - for(var/obj/item/organ/external/part in bodyparts) - if(istype(part,/obj/item/organ/external/tail)) - continue - if(istype(part,/obj/item/organ/external/wing)) + for(var/obj/item/organ/external/part as anything in bodyparts) + if(part.limb_zone == BODY_ZONE_TAIL || part.limb_zone == BODY_ZONE_WING) continue var/icon/temp = part.get_icon(skeleton) //That part makes left and right legs drawn topmost and lowermost when human looks WEST or EAST @@ -286,10 +283,9 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) overlays_standing[BODY_LAYER] = standing apply_overlay(BODY_LAYER) - //tail - update_tail() - update_wing() + //wings update_wing_layer() + //tail update_tail_layer() update_int_organs() //head accessory @@ -310,7 +306,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) var/icon/markings_standing = icon("icon" = 'icons/mob/clothing/body_accessory.dmi', "icon_state" = "accessory_none_s") //Body markings. - var/obj/item/organ/external/chest/chest_organ = get_organ("chest") + var/obj/item/organ/external/chest/chest_organ = get_organ(BODY_ZONE_CHEST) if(chest_organ && m_styles["body"]) var/body_marking = m_styles["body"] var/datum/sprite_accessory/body_marking_style = GLOB.marking_styles_list[body_marking] @@ -320,7 +316,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) b_marking_s.Blend(m_colours["body"], ICON_ADD) markings_standing.Blend(b_marking_s, ICON_OVERLAY) //Head markings. - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(head_organ && m_styles["head"]) //If the head is destroyed, forget the head markings. This prevents floating optical markings on decapitated IPCs, for example. var/head_marking = m_styles["head"] var/datum/sprite_accessory/head_marking_style = GLOB.marking_styles_list[head_marking] @@ -339,7 +335,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) remove_overlay(HEAD_ACCESSORY_LAYER) remove_overlay(HEAD_ACC_OVER_LAYER) - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(!head_organ) return @@ -375,7 +371,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //Reset our hair remove_overlay(HAIR_LAYER) - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(!head_organ) return @@ -430,7 +426,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) remove_overlay(FHAIR_LAYER) remove_overlay(FHAIR_OVER_LAYER) - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(!head_organ) return @@ -703,7 +699,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) if(glasses) var/mutable_appearance/new_glasses - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(client && hud_used && hud_used.hud_shown) if(hud_used.inventory_shown) //if the inventory is open ... glasses.screen_loc = ui_glasses //...draw the item in the inventory screen @@ -973,7 +969,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) inv.update_icon() if(wear_mask && (istype(wear_mask, /obj/item/clothing/mask) || istype(wear_mask, /obj/item/clothing/accessory))) if(!(slot_wear_mask in check_obscured_slots())) - var/obj/item/organ/external/head/head_organ = get_organ("head") + var/obj/item/organ/external/head/head_organ = get_organ(BODY_ZONE_HEAD) if(!head_organ) return // Nothing to update here var/datum/sprite_accessory/alt_heads/alternate_head @@ -1130,6 +1126,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) remove_overlay(WING_UNDERLIMBS_LAYER) remove_overlay(WING_LAYER) + var/obj/item/organ/external/wing/bodypart_wing = get_organ(BODY_ZONE_WING) if(!bodypart_wing) return if(!istype(bodypart_wing.body_accessory, /datum/body_accessory/wing)) @@ -1166,6 +1163,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) can still appear on the outside of uniforms and such. Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */ + var/obj/item/organ/external/tail/bodypart_tail = get_organ(BODY_ZONE_TAIL) if(!bodypart_tail) // No tail - no overlay! return @@ -1273,6 +1271,7 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) can still appear on the outside of uniforms and such. Otherwise, since the user's tail isn't overlapped by limbs, it will be a full icon with all directions. */ + var/obj/item/organ/external/tail/bodypart_tail = get_organ(BODY_ZONE_TAIL) if(!bodypart_tail) // No tail - no overlay! return @@ -1365,9 +1364,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) remove_overlay(INTORGAN_LAYER) var/list/standing = list() - for(var/organ in internal_organs) - var/obj/item/organ/internal/I = organ - var/render = I.render() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + var/render = organ.render() if(render) standing += render @@ -1442,8 +1440,8 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) remove_overlay(FROZEN_LAYER) /mob/living/carbon/human/proc/force_update_limbs() - for(var/obj/item/organ/external/O in bodyparts) - O.sync_colour_to_human(src) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + bodypart.sync_colour_to_human(src) update_body() /mob/living/carbon/human/proc/get_overlays_copy(list/unwantedLayers) @@ -1476,13 +1474,13 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) else . += "#000000" - for(var/organ_tag in dna.species.has_limbs) - var/obj/item/organ/external/part = bodyparts_by_name[organ_tag] + for(var/limb_zone in dna.species.has_limbs) + var/obj/item/organ/external/part = bodyparts_by_name[limb_zone] if(isnull(part)) . += "0" else if(part.is_robotic()) . += "2[part.model ? "-[part.model]" : ""]" - else if(part.status & ORGAN_DEAD) + else if(part.is_dead()) . += "3" else . += "1" diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 5765eb5ef6e..8c29c0d14bb 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -272,7 +272,7 @@ "[usr] tries to [internal ? "close" : "open"] the valve on [src]'s [ITEM].") var/no_mask - if(!get_organ_slot("breathing_tube")) + if(!get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) if(!(wear_mask && wear_mask.flags & AIRTIGHT)) if(!(head && head.flags & AIRTIGHT)) no_mask = 1 @@ -286,7 +286,7 @@ update_action_buttons_icon() else var/no_mask2 - if(!get_organ_slot("breathing_tube")) + if(!get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) if(!(wear_mask && wear_mask.flags & AIRTIGHT)) if(!(head && head.flags & AIRTIGHT)) no_mask2 = 1 @@ -300,10 +300,6 @@ "[usr] [internal ? "opens" : "closes"] the valve on [src]'s [ITEM].") -/mob/living/carbon/proc/has_organ() - return - - /mob/living/carbon/do_unEquip(obj/item/I, force = FALSE, atom/newloc, no_move = FALSE, invdrop = TRUE, silent = FALSE) . = ..() if(!. || !I) diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 20c5a5732cb..6fd4348a94b 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -103,7 +103,7 @@ if(status_flags & GODMODE) return FALSE - var/lungs = get_organ_slot("lungs") + var/lungs = get_organ_slot(INTERNAL_ORGAN_LUNGS) if(!lungs) adjustOxyLoss(2) @@ -192,7 +192,7 @@ if(internal) if(internal.loc != src) internal = null - if(!get_organ_slot("breathing_tube")) + if(!get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) if(!wear_mask || !(wear_mask.flags & AIRTIGHT)) //not wearing mask or non-breath mask if(!head || !(head.flags & AIRTIGHT)) //not wearing helmet or non-breath helmet internal = null //turn off internals @@ -202,17 +202,17 @@ else update_action_buttons_icon() + /mob/living/carbon/proc/handle_organs() - for(var/thing in internal_organs) - var/obj/item/organ/internal/O = thing - O.on_life() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organ.on_life() + //remember to remove the "proc" of the child procs of these. /mob/living/carbon/proc/handle_blood() return - /mob/living/carbon/handle_mutations_and_radiation() if(radiation) @@ -305,7 +305,7 @@ if(!client) return var/shock_reduction = shock_reduction() - if(NO_PAIN_FEEL in dna.species.species_traits) + if(NO_PAIN_FEEL in dna?.species?.species_traits) shock_reduction = INFINITY if(stat == UNCONSCIOUS && health <= HEALTH_THRESHOLD_CRIT) diff --git a/code/modules/mob/living/carbon/superheroes.dm b/code/modules/mob/living/carbon/superheroes.dm index 2da66c9ab4b..74473e2523b 100644 --- a/code/modules/mob/living/carbon/superheroes.dm +++ b/code/modules/mob/living/carbon/superheroes.dm @@ -228,7 +228,7 @@ to_chat(target, "You may not harm other Greyshirt or [user]. However, you do not need to obey other Greyshirts.") SSticker.mode.greyshirts += target.mind target.set_species(/datum/species/human) - var/obj/item/organ/external/head/head_organ = target.get_organ("head") + var/obj/item/organ/external/head/head_organ = target.get_organ(BODY_ZONE_HEAD) if(head_organ) head_organ.h_style = "Bald" head_organ.f_style = "Shaved" diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 48d88416f96..c1e17c8380a 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -309,24 +309,43 @@ return FALSE return ..() -/mob/living/run_pointed(atom/A) + +/mob/living/run_pointed(atom/target) if(!..()) return FALSE + var/obj/item/hand_item = get_active_hand() - if(istype(hand_item, /obj/item/gun) && A != hand_item) - if(a_intent == INTENT_HELP || !ismob(A)) - visible_message("[src.declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] [hand_item.declent_ru(INSTRUMENTAL)] на [A.declent_ru(ACCUSATIVE)]") - add_emote_logs(src, "point [hand_item] to [key_name(A)] [COORD(A)]") + var/pointed_object = "[target.declent_ru(ACCUSATIVE)]" + + if(target.loc in src) + var/atom/inside = target.loc + pointed_object += " внутри [inside.declent_ru(GENITIVE)]" + + if(istype(hand_item, /obj/item/gun) && target != hand_item) + if(a_intent == INTENT_HELP || !ismob(target)) + visible_message("[declent_ru(NOMINATIVE)] указыва[pluralize_ru(gender,"ет","ют")] [hand_item.declent_ru(INSTRUMENTAL)] на [pointed_object].") return TRUE - A.visible_message("[src.declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] [hand_item.declent_ru(INSTRUMENTAL)] на [A.declent_ru(ACCUSATIVE)]!", - "[src.declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] [hand_item.declent_ru(INSTRUMENTAL)] на [pluralize_ru(A.gender,"тебя","вас")]!") - A << 'sound/weapons/targeton.ogg' - add_emote_logs(src, "point [hand_item] HARM to [key_name(A)] [COORD(A)]") + + target.visible_message( + span_danger("[declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] [hand_item.declent_ru(INSTRUMENTAL)] на [pointed_object]!"), + span_userdanger("[declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] [hand_item.declent_ru(INSTRUMENTAL)] на [pluralize_ru(target.gender,"тебя","вас")]!"), + ) + SEND_SOUND(target, sound('sound/weapons/targeton.ogg')) + add_emote_logs(src, "point [hand_item] HARM to [key_name(target)] [COORD(target)]") return TRUE - visible_message("[src.declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] на [A.declent_ru(ACCUSATIVE)]") - add_emote_logs(src, "point to [key_name(A)] [COORD(A)]") + + if(istype(hand_item, /obj/item/toy/russian_revolver/trick_revolver) && target != hand_item) + var/obj/item/toy/russian_revolver/trick_revolver/trick = hand_item + visible_message(span_danger("[declent_ru(NOMINATIVE)] указыва[pluralize_ru(src.gender,"ет","ют")] [trick.declent_ru(INSTRUMENTAL)] на... и [trick.declent_ru(NOMINATIVE)] срабатывает у [genderize_ru(gender, "него","неё","него","них")] в руке!")) + trick.shoot_gun(src) + add_emote_logs(src, "point to [key_name(target)] [COORD(target)]") + return TRUE + + visible_message("[declent_ru(NOMINATIVE)] указыва[pluralize_ru(gender,"ет","ют")] на [pointed_object].") + add_emote_logs(src, "point to [key_name(target)] [COORD(target)]") return TRUE + /mob/living/verb/succumb() set hidden = 1 if(InCritical()) @@ -658,9 +677,6 @@ H.Weaken(4 SECONDS) pulling.stop_pulling() visible_message(span_danger("Ноги [H] путаются и [genderize_ru(H.gender,"он","она","оно","они")] с грохотом падает на пол!")) - if(H.m_intent == MOVE_INTENT_WALK && m_intent != MOVE_INTENT_WALK && prob(4)) - H.Weaken(4 SECONDS) - visible_message(span_danger("[H] не поспевает за [src] и с грохотом падает на пол!")) else pulling.pixel_x = initial(pulling.pixel_x) pulling.pixel_y = initial(pulling.pixel_y) @@ -1150,33 +1166,16 @@ return 0 return 1 -/mob/living/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) - if(!AM || !src) - return FALSE - if(!(AM.can_be_pulled(src, state, force, show_message))) - return FALSE + +/mob/living/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) if(incapacitated()) - return - // If we're pulling something then drop what we're currently pulling and pull this instead. - AM.add_fingerprint(src) - if(pulling) - if(AM == pulling)// Are we trying to pull something we are already pulling? Then just stop here, no need to continue. - return - stop_pulling() - if(AM.pulledby) - visible_message("[src] has pulled [AM] from [AM.pulledby]'s grip.") - AM.pulledby.stop_pulling() //an object can't be pulled by two mobs at once. - pulling = AM - AM.pulledby = src + return FALSE + + . = ..() + if(pullin) pullin.update_icon(src) - if(ismob(AM)) - var/mob/M = AM - add_attack_logs(src, M, "pulls", ATKLOG_ALMOSTALL) - if(!iscarbon(src)) - M.LAssailant = null - else - M.LAssailant = usr + /mob/living/proc/check_pull() if(pulling && !(pulling in orange(1))) diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index a99c59fe207..7498fc85ab0 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -96,7 +96,7 @@ return ..() var/obj/item/thrown_item = AM - var/zone = ran_zone("chest", 65)//Hits a random part of the body, geared towards the chest + var/zone = ran_zone(BODY_ZONE_CHEST, 65)//Hits a random part of the body, geared towards the chest var/nosell_hit = SEND_SIGNAL(thrown_item, COMSIG_MOVABLE_IMPACT_ZONE, src, zone, throwingdatum) // TODO: find a better way to handle hitpush and skipcatch for humans if(nosell_hit) skipcatch = TRUE @@ -247,7 +247,7 @@ fire_stacks += L.fire_stacks IgniteMob() -/mob/living/can_be_pulled(user, grab_state, force, show_message = FALSE) +/mob/living/can_be_pulled(atom/movable/user, force, show_message = FALSE) return ..() && !(buckled && buckled.buckle_prevents_pull) /mob/living/water_act(volume, temperature, source, method = REAGENT_TOUCH) diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index a5a4d10b1e9..570963b3835 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -529,7 +529,7 @@ /mob/living/silicon/pai/Bumped(atom/movable/moving_atom) return ..() -/mob/living/silicon/pai/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) +/mob/living/silicon/pai/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) return FALSE /mob/living/silicon/pai/update_canmove(delay_action_updates = 0) diff --git a/code/modules/mob/living/silicon/pai/personality.dm b/code/modules/mob/living/silicon/pai/personality.dm index 434ade6566c..ce62a110fc2 100644 --- a/code/modules/mob/living/silicon/pai/personality.dm +++ b/code/modules/mob/living/silicon/pai/personality.dm @@ -12,7 +12,10 @@ /datum/paiCandidate/proc/savefile_save(mob/user) if(IsGuestKey(user.key)) - return 0 + return FALSE + + if(!src.name) //Preventing false savings + return FALSE var/savefile/F = new /savefile(src.savefile_path(user)) @@ -24,7 +27,7 @@ F["version"] << 1 - return 1 + return TRUE // loads the savefile corresponding to the mob's ckey // if silent=true, report incompatible savefiles diff --git a/code/modules/mob/living/silicon/pai/software/pai_apps.dm b/code/modules/mob/living/silicon/pai/software/pai_apps.dm index 639b5e233d3..5400f088592 100644 --- a/code/modules/mob/living/silicon/pai/software/pai_apps.dm +++ b/code/modules/mob/living/silicon/pai/software/pai_apps.dm @@ -426,14 +426,14 @@ data["addictions"] += list(list("addiction_name" = a_reagent.name, "id" = a_reagent.id, "stage" = a_reagent.addiction_stage)) for(var/name in held.bodyparts_by_name) - var/obj/item/organ/external/organ = held.bodyparts_by_name[name] + var/obj/item/organ/external/bodypart = held.bodyparts_by_name[name] if(data["fractures"] && data["internal_bleeding"]) break - if(!organ) + if(!bodypart) continue - if(organ.status & ORGAN_BROKEN) + if(bodypart.has_fracture()) data["fractures"] = TRUE - if(organ.internal_bleeding) + if(bodypart.has_internal_bleeding()) data["internal_bleeding"] = TRUE return data diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index a49c55e9db7..1f600b02275 100644 --- a/code/modules/mob/living/silicon/robot/component.dm +++ b/code/modules/mob/living/silicon/robot/component.dm @@ -300,23 +300,21 @@ to_chat(user, "Key: Electronics/Brute") to_chat(user, "External prosthetics:") - var/organ_found - if(LAZYLEN(H.internal_organs)) - for(var/obj/item/organ/external/E in H.bodyparts) - if(!E.is_robotic()) - continue - organ_found = TRUE - to_chat(user, "[E.name]: [E.brute_dam][E.burn_dam]") + var/organ_found = FALSE + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + if(!bodypart.is_robotic()) + continue + organ_found = TRUE + to_chat(user, "[bodypart.name]: [bodypart.brute_dam][bodypart.burn_dam]") if(!organ_found) to_chat(user, "No prosthetics located.") to_chat(user, "
") to_chat(user, "Internal prosthetics:") - organ_found = null - if(LAZYLEN(H.internal_organs)) - for(var/obj/item/organ/internal/O in H.internal_organs) - if(!O.is_robotic()) - continue - organ_found = TRUE - to_chat(user, "[capitalize(O.name)]: [O.damage]") + organ_found = FALSE + for(var/obj/item/organ/internal/organ as anything in H.internal_organs) + if(!organ.is_robotic()) + continue + organ_found = TRUE + to_chat(user, "[capitalize(organ.name)]: [organ.damage]") if(!organ_found) to_chat(user, "No prosthetics located.") diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index e5152568a1b..17b7bc0122f 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -365,7 +365,7 @@ /mob/living/silicon/robot/drone/Bumped(atom/movable/moving_atom) return ..() -/mob/living/silicon/robot/drone/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) +/mob/living/silicon/robot/drone/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) if(is_type_in_list(AM, pullable_drone_items)) ..(AM, force = INFINITY) // Drone power! Makes them able to drag pipes and such @@ -374,13 +374,13 @@ var/obj/item/O = AM if(O.w_class > WEIGHT_CLASS_SMALL) if(show_message) - to_chat(src, "You are too small to pull that.") + to_chat(src, span_warning("You are too small to pull that.")) return else ..() else if(show_message) - to_chat(src, "You are too small to pull that.") + to_chat(src, span_warning("You are too small to pull that.")) /mob/living/silicon/robot/drone/add_robot_verbs() src.verbs |= silicon_subsystems diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 44d51f2b8ee..8f9b5c359fa 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -1341,13 +1341,14 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( if(stat != DEAD && isturf(tile)) var/floor_only = TRUE for(var/A in tile) - if(istype(A, /obj/effect)) - if(is_cleanable(A)) - var/obj/effect/decal/cleanable/blood/B = A + if(iseffect(A)) + var/obj/effect/check = A + if(check.is_cleanable()) + var/obj/effect/decal/cleanable/blood/B = check if(istype(B) && B.off_floor) floor_only = FALSE else - qdel(A) + qdel(B) else if(istype(A, /obj/item)) var/obj/item/cleaned_item = A cleaned_item.clean_blood() diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 6e3b6f6450a..510197dc34e 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -739,12 +739,12 @@ playsound(loc, 'sound/effects/splat.ogg', 50, 1) var/damage = rand(5, 15) - H.apply_damage(2*damage, BRUTE, "head", run_armor_check("head", "melee")) - H.apply_damage(2*damage, BRUTE, "chest", run_armor_check("chest", "melee")) - H.apply_damage(0.5*damage, BRUTE, "l_leg", run_armor_check("l_leg", "melee")) - H.apply_damage(0.5*damage, BRUTE, "r_leg", run_armor_check("r_leg", "melee")) - H.apply_damage(0.5*damage, BRUTE, "l_arm", run_armor_check("l_arm", "melee")) - H.apply_damage(0.5*damage, BRUTE, "r_arm", run_armor_check("r_arm", "melee")) + H.apply_damage(2*damage, BRUTE, BODY_ZONE_HEAD, run_armor_check(BODY_ZONE_HEAD, MELEE)) + H.apply_damage(2*damage, BRUTE, BODY_ZONE_CHEST, run_armor_check(BODY_ZONE_CHEST, MELEE)) + H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_LEG, run_armor_check(BODY_ZONE_L_LEG, MELEE)) + H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_LEG, run_armor_check(BODY_ZONE_R_LEG, MELEE)) + H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_L_ARM, run_armor_check(BODY_ZONE_L_ARM, MELEE)) + H.apply_damage(0.5*damage, BRUTE, BODY_ZONE_R_ARM, run_armor_check(BODY_ZONE_R_ARM, MELEE)) if(NO_BLOOD in H.dna.species.species_traits)//Does the run over mob have blood? return//If it doesn't it shouldn't bleed (Though a check should be made eventually for things with liquid in them, like slime people.) diff --git a/code/modules/mob/living/simple_animal/friendly/dog.dm b/code/modules/mob/living/simple_animal/friendly/dog.dm index ca0ff8903f9..cefa14d7ce1 100644 --- a/code/modules/mob/living/simple_animal/friendly/dog.dm +++ b/code/modules/mob/living/simple_animal/friendly/dog.dm @@ -133,7 +133,7 @@ var/armorval = 0 if(def_zone) - if(def_zone == "head") + if(def_zone == BODY_ZONE_HEAD) if(inventory_head) armorval = inventory_head.armor.getRating(type) else diff --git a/code/modules/mob/living/simple_animal/friendly/frog.dm b/code/modules/mob/living/simple_animal/friendly/frog.dm index c36088cb436..3a03af48147 100644 --- a/code/modules/mob/living/simple_animal/friendly/frog.dm +++ b/code/modules/mob/living/simple_animal/friendly/frog.dm @@ -64,32 +64,38 @@ gold_core_spawnable = HOSTILE_SPAWN holder_type = /obj/item/holder/frog/toxic -/mob/living/simple_animal/frog/toxic/attack_hand(mob/living/carbon/human/H as mob) - if(ishuman(H)) - if(!istype(H.gloves, /obj/item/clothing/gloves)) - for(var/obj/item/organ/external/A in H.bodyparts) - if(!A.is_robotic()) - if((A.body_part == HAND_LEFT) || (A.body_part == HAND_RIGHT)) - to_chat(H, "Дотронувшись до [src.name], ваша кожа начинает чесаться!") - toxin_affect(H) - if(H.a_intent == INTENT_DISARM || H.a_intent == INTENT_HARM) - ..() - ..() -/mob/living/simple_animal/frog/toxic/Crossed(AM as mob|obj, oldloc) - if(ishuman(AM)) - var/mob/living/carbon/human/H = AM - if(!istype(H.shoes, /obj/item/clothing/shoes)) - for(var/obj/item/organ/external/F in H.bodyparts) - if(!F.is_robotic()) - if((F.body_part == FOOT_LEFT) || (F.body_part == FOOT_RIGHT)) - toxin_affect(H) - to_chat(H, "Ваши ступни начинают чесаться!") - ..() +/mob/living/simple_animal/frog/toxic/attack_hand(mob/living/carbon/human/user) + if(!ishuman(user) || user.gloves) + return ..() + + var/obj/item/organ/external/left_hand = get_organ(BODY_ZONE_PRECISE_L_HAND) + var/obj/item/organ/external/right_hand = get_organ(BODY_ZONE_PRECISE_R_HAND) + if((left_hand && !left_hand.is_robotic()) || (right_hand && !right_hand.is_robotic())) + to_chat(user, span_warning("Дотронувшись до [src.name], ваша кожа начинает чесаться!")) + toxin_affect(user) + + if(user.a_intent == INTENT_DISARM || user.a_intent == INTENT_HARM) + return ..() + + +/mob/living/simple_animal/frog/toxic/Crossed(mob/living/carbon/human/user, oldloc) + if(!ishuman(user) || user.gloves) + return ..() + + var/obj/item/organ/external/left_foot = get_organ(BODY_ZONE_PRECISE_L_FOOT) + var/obj/item/organ/external/right_foot = get_organ(BODY_ZONE_PRECISE_R_FOOT) + if((left_foot && !left_foot.is_robotic()) || (right_foot && !right_foot.is_robotic())) + to_chat(user, span_warning("Ваши ступни начинают чесаться!")) + toxin_affect(user) + + return ..() + + +/mob/living/simple_animal/frog/toxic/proc/toxin_affect(mob/living/carbon/human/user) + if(user.reagents && toxin_type && toxin_per_touch) + user.reagents.add_reagent(toxin_type, toxin_per_touch) -/mob/living/simple_animal/frog/toxic/proc/toxin_affect(mob/living/carbon/human/M as mob) - if(M.reagents && !toxin_per_touch == 0) - M.reagents.add_reagent(toxin_type, toxin_per_touch) /mob/living/simple_animal/frog/scream name = "орущая лягушка" diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm index 50339244260..7223c68db3d 100644 --- a/code/modules/mob/living/simple_animal/friendly/mouse.dm +++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm @@ -392,10 +392,11 @@ GLOBAL_VAR_INIT(hamster_count, 0) can_collar = 0 holder_type = /obj/item/holder/hamster -/mob/living/simple_animal/mouse/hamster/baby/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) + +/mob/living/simple_animal/mouse/hamster/baby/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) if(show_message) - to_chat(src, "Вы слишком малы чтобы что-то тащить.") - return + to_chat(src, span_warning("Вы слишком малы чтобы что-то тащить.")) + /mob/living/simple_animal/mouse/hamster/baby/Life(seconds, times_fired) . =..() diff --git a/code/modules/mob/living/simple_animal/friendly/snake.dm b/code/modules/mob/living/simple_animal/friendly/snake.dm index 966ac449656..43da203e860 100644 --- a/code/modules/mob/living/simple_animal/friendly/snake.dm +++ b/code/modules/mob/living/simple_animal/friendly/snake.dm @@ -185,7 +185,7 @@ var/armorval = inventory_head?.armor.getRating(type) if(!def_zone) armorval *= 0.5 - else if(def_zone != "head") + else if(def_zone != BODY_ZONE_HEAD) armorval = 0 return armorval diff --git a/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm b/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm index 017122eef90..1528706a218 100644 --- a/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm +++ b/code/modules/mob/living/simple_animal/hostile/floorcluwne.dm @@ -380,13 +380,8 @@ H.adjustBruteLoss(30) H.adjustBrainLoss(100) - for(var/I in H.bodyparts) - var/obj/item/organ/external/O = I - if(O.name == "head")//irksome runtimes - O.droplimb() - continue - O.drop_organs() - O.droplimb() + var/obj/item/organ/external/chest = H.get_organ(BODY_ZONE_CHEST) + chest?.drop_organs() Reset_View(FALSE, old_color, H) H.CureBlind() diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm index 2b50f41c9bb..d0ae134d678 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -48,7 +48,7 @@ . = ..() if(. && venom_per_bite > 0 && iscarbon(target) && (!client || a_intent == INTENT_HARM)) var/mob/living/carbon/C = target - var/inject_target = pick("chest", "head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(C.can_inject(null, FALSE, inject_target, FALSE)) C.reagents.add_reagent("spidertoxin", venom_per_bite) diff --git a/code/modules/mob/living/simple_animal/hostile/headcrab.dm b/code/modules/mob/living/simple_animal/hostile/headcrab.dm index 6d9ed00392b..36fb52b0f87 100644 --- a/code/modules/mob/living/simple_animal/hostile/headcrab.dm +++ b/code/modules/mob/living/simple_animal/hostile/headcrab.dm @@ -54,7 +54,7 @@ /mob/living/simple_animal/hostile/headcrab/proc/Zombify(mob/living/carbon/human/H) if(!H.check_death_method()) H.death() - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) is_zombie = TRUE if(H.wear_suit) var/obj/item/clothing/suit/armor/A = H.wear_suit @@ -184,7 +184,7 @@ /mob/living/simple_animal/hostile/headcrab/poison/AttackingTarget() . = ..() if(iscarbon(target) && target.reagents) - var/inject_target = pick("chest", "head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) var/mob/living/carbon/C = target if(C.IsStunned() || C.can_inject(null, FALSE, inject_target, FALSE)) if(C.AmountEyeBlurry() < 120 SECONDS) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 579a13e0801..077564c8e3f 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -56,6 +56,9 @@ var/mob_attack_logs = list() //for hostiles and megafauna + /// Used to disable gliding if mob is too slow, like goliath + var/needs_gliding = TRUE + tts_seed = "Vort_e2" dirslash_enabled = TRUE @@ -349,7 +352,8 @@ return 1 if(retreat_distance != null) //If we have a retreat distance, check if we need to run from our target if(target_distance <= retreat_distance) //If target's closer than our retreat distance, run - glide_for(move_to_delay) + if(needs_gliding) + glide_for(move_to_delay) walk_away(src,target,retreat_distance,move_to_delay) else Goto(target,move_to_delay,minimum_distance) //Otherwise, get to our minimum distance so we chase them @@ -383,7 +387,8 @@ approaching_target = TRUE else approaching_target = FALSE - glide_for(delay) + if(needs_gliding) + glide_for(delay) walk_to(src, target, minimum_distance, delay) /mob/living/simple_animal/hostile/adjustHealth(damage, updating_health = TRUE) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm b/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm index ac8f636cee5..a3e112d7774 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/basilisk.dm @@ -34,6 +34,7 @@ loot = list(/obj/item/stack/ore/diamond{layer = ABOVE_MOB_LAYER}, /obj/item/stack/ore/diamond{layer = ABOVE_MOB_LAYER}) tts_seed = "Antimage" + needs_gliding = FALSE /obj/item/projectile/temp/basilisk name = "freezing blast" @@ -82,15 +83,16 @@ crusher_loot = /obj/item/crusher_trophy/watcher_wing loot = list() butcher_results = list(/obj/item/stack/ore/diamond = 2, /obj/item/stack/sheet/sinew = 2, /obj/item/stack/sheet/bone = 1) - -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random/Initialize(mapload) + var/jewelry_loot = null + +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/death(gibbed) + if(!fromtendril && jewelry_loot) + if(prob(30)) + var/obj/gem = new jewelry_loot(loc) + deathmessage = "spits out a [gem.name] as it dies!" + jewelry_loot = null . = ..() - if(prob(40)) //60 for classic, 20/20 for magma and ice - if(prob(50)) - new /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing(loc) - else - new /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing(loc) - return INITIALIZE_HINT_QDEL + deathmessage = initial(deathmessage) /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing name = "magmawing watcher" @@ -105,6 +107,7 @@ light_power = 2.5 light_color = LIGHT_COLOR_LAVA projectiletype = /obj/item/projectile/temp/basilisk/magmawing + jewelry_loot = /obj/item/gem/magma crusher_loot = /obj/item/crusher_trophy/blaster_tubes/magma_wing crusher_drop_mod = 60 @@ -119,9 +122,28 @@ health = 170 projectiletype = /obj/item/projectile/temp/basilisk/icewing butcher_results = list(/obj/item/stack/ore/diamond = 5, /obj/item/stack/sheet/bone = 1) //No sinew; the wings are too fragile to be usable + jewelry_loot = /obj/item/gem/fdiamond crusher_loot = /obj/item/crusher_trophy/watcher_wing/ice_wing crusher_drop_mod = 60 +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/random/Initialize(mapload) + . = ..() + if(prob(40)) //60 for classic, 20/20 for magma and ice + if(prob(50)) + new /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing(loc) + else + new /mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing(loc) + return INITIALIZE_HINT_QDEL + +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/tendril + fromtendril = TRUE + +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing/tendril + fromtendril = TRUE + +/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing/tendril + fromtendril = TRUE + /obj/item/projectile/watcher name = "stunning blast" icon_state = "temp_0" @@ -172,26 +194,3 @@ var/mob/living/L = target if(istype(L)) L.apply_status_effect(/datum/status_effect/freon/watcher) - -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/tendril - fromtendril = TRUE - -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing/tendril - fromtendril = TRUE - -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing/tendril - fromtendril = TRUE - -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/icewing/death(gibbed) - if(prob(30) && !fromtendril) - new /obj/item/gem/fdiamond(loc) - deathmessage = "spits out a diamond as it dies!" - . = ..() - deathmessage = initial(deathmessage) - -/mob/living/simple_animal/hostile/asteroid/basilisk/watcher/magmawing/death(gibbed) - if(prob(30) && !fromtendril) - new /obj/item/gem/magma(loc) - deathmessage = "spits out a golden gem as it dies!" - . = ..() - deathmessage = initial(deathmessage) diff --git a/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm b/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm index 2a4780ac286..45e18e8ae76 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/goliath.dm @@ -43,6 +43,7 @@ food_type = list(/obj/item/reagent_containers/food/snacks/meat, /obj/item/reagent_containers/food/snacks/grown/ash_flora/cactus_fruit, /obj/item/reagent_containers/food/snacks/grown/ash_flora/mushroom_leaf) tame_chance = 0 bonus_tame_chance = 10 + needs_gliding= FALSE /mob/living/simple_animal/hostile/asteroid/goliath/bullet_act(var/obj/item/projectile/P) @@ -63,6 +64,8 @@ pre_attack++ if(!pre_attack || stat || AIStatus == AI_IDLE) return + if(stat == DEAD) + return icon_state = pre_attack_icon /mob/living/simple_animal/hostile/asteroid/goliath/revive()//who the fuck anchors mobs @@ -115,6 +118,8 @@ visible_message("[src] digs its tentacles under [target]!") new /obj/effect/temp_visual/goliath_tentacle/original(tturf, src) ranged_cooldown = world.time + ranged_cooldown_time + if((stat == DEAD)) + return icon_state = icon_aggro pre_attack = FALSE @@ -141,7 +146,6 @@ SLEEP_CHECK_DEATH(get_dist(src, T) * movespeed) walk(src, 0) // cancel the movement charging = FALSE - pre_attack = FALSE /mob/living/simple_animal/hostile/asteroid/goliath/beast/Bump(atom/A) if(isturf(A) && charging) @@ -167,7 +171,7 @@ if(target && prob(taunt_chance)) emote("me", 1, "[pick(emote_taunt)] at [target].") taunt_chance = max(taunt_chance-7,2) - if(icon_state != icon_aggro) + if(icon_state != icon_aggro && stat != DEAD) icon_state = icon_aggro //Lavaland Goliath diff --git a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm index a4febf9fc07..c2487523c79 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/hivelord.dm @@ -32,6 +32,7 @@ pass_flags = PASSTABLE butcher_results = list(/obj/item/organ/internal/regenerative_core = 1) var/brood_type = /mob/living/simple_animal/hostile/asteroid/hivelordbrood + needs_gliding = FALSE /mob/living/simple_animal/hostile/asteroid/hivelord/OpenFire(the_target) if(world.time >= ranged_cooldown) @@ -88,6 +89,7 @@ pass_flags = PASSTABLE | PASSMOB density = FALSE del_on_death = 1 + needs_gliding= FALSE /mob/living/simple_animal/hostile/asteroid/hivelordbrood/Initialize(mapload) . = ..() @@ -206,7 +208,7 @@ /mob/living/simple_animal/hostile/asteroid/hivelord/legion/death(gibbed) visible_message("The skulls on [src] wail in anger as they flee from their dying host!") var/turf/T = get_turf(src) - for(var/i in 1 to 3) + for(var/i in 1 to 2) new brood_type(T) if(T) if(stored_mob) @@ -259,7 +261,7 @@ . = ..() if(!isobj(target)) var/mob/living/carbon/human/victim = target - if(victim.can_inject(null, FALSE, "chest", FALSE, TRUE) && !victim.get_int_organ(/obj/item/organ/internal/legion_tumour) && prob(1)) + if(victim.can_inject(null, FALSE, BODY_ZONE_CHEST, FALSE, TRUE) && !victim.get_int_organ(/obj/item/organ/internal/legion_tumour) && prob(1)) new /obj/item/organ/internal/legion_tumour(victim) visible_message(span_userdanger("[src] вгрызается в шею [target], впрыскивая странную черную жидкость!")) //made it on russian to attract more attention from attacklogs diff --git a/code/modules/mob/living/simple_animal/hostile/mining/marrow_weaver.dm b/code/modules/mob/living/simple_animal/hostile/mining/marrow_weaver.dm index 566b93fa559..b978e718894 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/marrow_weaver.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/marrow_weaver.dm @@ -87,8 +87,8 @@ /mob/living/simple_animal/hostile/asteroid/marrowweaver/proc/fiesta(var/mob/living/carbon/human/snack, preparing = TRUE) var/foundorgans = 0 - var/list/organs = snack.get_organs_zone("chest") - for(var/obj/item/organ/internal/I in organs) + var/list/organs = snack.get_organs_zone(BODY_ZONE_CHEST) + for(var/obj/item/organ/internal/I as anything in organs) if(!istype(I, /obj/item/organ/internal/brain)) foundorgans ++ if(!preparing) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/builder.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/builder.dm index 70b65f3cf75..a717aaa531b 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/builder.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/builder.dm @@ -47,7 +47,7 @@ return TRUE if(L.reagents.has_reagent("frostoil", 100)) return TRUE - var/inject_target = pick("chest", "head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(L.IsStunned() || L.can_inject(null, FALSE, inject_target, FALSE)) L.reagents.add_reagent("frostoil", 20) visible_message("[src] buries its long fangs deep into the [inject_target] of [target]!") diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/defiler.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/defiler.dm index 67a270c27ed..0dc85fa3c9f 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/defiler.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/defiler.dm @@ -53,7 +53,7 @@ L.attack_animal(src) if(!poisonable) return TRUE - var/inject_target = pick("chest", "head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(L.IsParalyzed() || L.can_inject(null, FALSE, inject_target, FALSE) && prob(50)) new /obj/item/organ/internal/body_egg/terror_eggs(L) visible_message("[src] buries its long fangs deep into the [inject_target] of [target]!") @@ -80,7 +80,7 @@ /obj/structure/spider/terrorweb/white/web_special_ability(mob/living/carbon/C) if(istype(C)) if(!IsTSInfected(C) && ishuman(C)) - var/inject_target = pick("chest","head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(C.can_inject(null, FALSE, inject_target, FALSE)) to_chat(C, "[src] slices into you!") new /obj/item/organ/internal/body_egg/terror_eggs(C) diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/healer.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/healer.dm index 9a085f5d433..234fa63ee3f 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/healer.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/healer.dm @@ -102,7 +102,7 @@ return FALSE if(!poisonable) return TRUE - var/inject_target = pick("chest","head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(L.IsStunned() || L.can_inject(null, FALSE, inject_target, FALSE)) L.AdjustEyeBlurry(20 SECONDS, 0, 120 SECONDS) // instead of having a venom that only lasts seconds, we just add the eyeblur directly. diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm index b99d038893f..d79deaf50d4 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_ai.dm @@ -42,7 +42,7 @@ else targets3 += C else if(ai_target_method == TS_DAMAGE_POISON) - if(C.can_inject(null, FALSE, "chest", FALSE)) + if(C.can_inject(null, FALSE, BODY_ZONE_CHEST, FALSE)) targets1 += C else if(C in enemies) targets2 += C diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/widow.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/widow.dm index 923ba0091be..d893d7b8a64 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/widow.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/widow.dm @@ -43,7 +43,7 @@ return TRUE if(L.reagents.has_reagent("terror_black_toxin", 100)) return TRUE - var/inject_target = pick("chest", "head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(L.IsStunned() || L.can_inject(null, FALSE, inject_target, FALSE)) L.reagents.add_reagent("terror_black_toxin", 33) // inject our special poison visible_message(span_danger("[src] buries its long fangs deep into the [inject_target] of [target]!")) @@ -65,7 +65,7 @@ /obj/structure/spider/terrorweb/widow/web_special_ability(mob/living/carbon/C) if(istype(C)) if(!C.reagents.has_reagent("terror_black_toxin", 60)) - var/inject_target = pick("chest","head") + var/inject_target = pick(BODY_ZONE_CHEST, BODY_ZONE_HEAD) if(C.can_inject(null, FALSE, inject_target, FALSE)) to_chat(C, "[src] slices into you!") C.reagents.add_reagent("terror_black_toxin", 45) diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 744ae370efb..635bc80008b 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -58,7 +58,16 @@ var/parrot_state = PARROT_WANDER //Hunt for a perch when created var/parrot_sleep_max = 25 //The time the parrot sits while perched before looking around. Mosly a way to avoid the parrot's AI in process_ai() being run every single tick. var/parrot_sleep_dur = 25 //Same as above, this is the var that physically counts down - var/parrot_dam_zone = list("chest", "head", "l_arm", "l_leg", "r_arm", "r_leg") //For humans, select a bodypart to attack + + /// For humans, select a bodypart to attack + var/parrot_dam_zone = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + ) var/parrot_speed = 5 //"Delay in world ticks between movement." according to byond. Yeah, that's BS but it does directly affect movement. Higher number = slower. var/parrot_been_shot = 0 //Parrots get a speed bonus after being shot. This will deincrement every process_ai() and at 0 the parrot will return to regular speed. diff --git a/code/modules/mob/living/simple_animal/posessed_object.dm b/code/modules/mob/living/simple_animal/posessed_object.dm index 17762abf07a..20dc4a92730 100644 --- a/code/modules/mob/living/simple_animal/posessed_object.dm +++ b/code/modules/mob/living/simple_animal/posessed_object.dm @@ -36,9 +36,9 @@ animate_ghostly_presence(src, -1, 20, 1) // Restart the floating animation after the attack animation, as it will be cancelled. -/mob/living/simple_animal/possessed_object/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) // Silly motherfuckers think they can pull things. +/mob/living/simple_animal/possessed_object/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) // Silly motherfuckers think they can pull things. if(show_message) - to_chat(src, "You are unable to pull [AM]!") + to_chat(src, span_warning("You are unable to pull [AM]!")) /mob/living/simple_animal/possessed_object/ghost() // Ghosting will return the object to normal, and will not disqualify the ghoster from various mid-round antag positions. diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 04d70d5d0e3..8179d3f3848 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -728,7 +728,7 @@ if(. && length(src.damaged_sound)) playsound(src, pick(src.damaged_sound), 40, 1) -/mob/living/simple_animal/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) +/mob/living/simple_animal/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) if(pull_constraint(AM, show_message)) return ..() diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index e27937370ec..20eda0b2f41 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -285,8 +285,9 @@ return -/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, state, force = pull_force, show_message = FALSE) - return +/mob/living/simple_animal/slime/start_pulling(atom/movable/AM, force = pull_force, show_message = FALSE) + return FALSE + /mob/living/simple_animal/slime/attack_ui(slot) return diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index e6020be3b5d..f6f4367f38d 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -314,40 +314,6 @@ var/list/result = A.examine(src) to_chat(src, "
[result.Join("\n")]
") -//same as above -//note: ghosts can point, this is intended -//visible_message will handle invisibility properly -//overriden here and in /mob/dead/observer for different point span classes and sanity checks -/mob/verb/pointed(atom/A as mob|obj|turf in view(client.maxview())) - set name = "Point To" - set category = "Object" - - if(next_move >= world.time) - return - if(!isturf(loc) || istype(A, /obj/effect/temp_visual/point)) - return FALSE - - DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(run_pointed), A)) - -/// possibly delayed verb that finishes the pointing process starting in [/mob/verb/pointed()]. -/// either called immediately or in the tick after pointed() was called, as per the [DEFAULT_QUEUE_OR_CALL_VERB()] macro -/mob/proc/run_pointed(atom/A) - if(client && !(A in view(client.maxview()))) - return FALSE - - changeNext_move(CLICK_CD_POINT) - - var/tile = get_turf(A) - if(!tile) - return FALSE - var/obj/P = new /obj/effect/temp_visual/point(tile) - P.invisibility = invisibility - if(get_turf(src) != tile) - // Start off from the pointer and make it slide to the pointee - P.pixel_x = (x - A.x) * 32 - P.pixel_y = (y - A.y) * 32 - animate(P, 0.5 SECONDS, pixel_x = A.pixel_x, pixel_y = A.pixel_y, easing = QUAD_EASING) - return TRUE /mob/proc/ret_grab(obj/effect/list_container/mobl/L as obj, flag) if((!( istype(l_hand, /obj/item/grab) ) && !( istype(r_hand, /obj/item/grab) ))) @@ -1196,21 +1162,19 @@ /mob/proc/spin(spintime, speed) set waitfor = FALSE - var/D = dir - if(spintime < world.tick_lag || speed < world.tick_lag || !spintime || !speed) - return + if(!spintime || !speed || spintime > 100) + CRASH("Aborted attempted call of /mob/proc/spin with invalid args ([spintime],[speed]) which could have frozen the server.") while(spintime >= speed) sleep(speed) - switch(D) + switch(dir) if(NORTH) - D = EAST + setDir(EAST) if(SOUTH) - D = WEST + setDir(WEST) if(EAST) - D = SOUTH + setDir(SOUTH) if(WEST) - D = NORTH - setDir(D) + setDir(NORTH) spintime -= speed /mob/proc/is_literate() diff --git a/code/modules/mob/mob_emote.dm b/code/modules/mob/mob_emote.dm index 801bd4b2a23..e8c0309cc80 100644 --- a/code/modules/mob/mob_emote.dm +++ b/code/modules/mob/mob_emote.dm @@ -4,13 +4,14 @@ /** * Send an emote. * - * * emote_key: Key of the emote being triggered - * * m_type: Type of the emote, like EMOTE_AUDIBLE. If this is not null, the default type of the emote will be overridden. - * * message: Custom parameter for the emote. This should be used if you want to pass something like a target programmatically. - * * intentional: Whether or not the emote was deliberately triggered by the mob. If true, it's forced, which skips some checks when calling the emote. - * * force_silence: If true, unusable/nonexistent emotes will not notify the user. + * * emote_key - Key of the emote being triggered + * * m_type - Type of the emote, like EMOTE_AUDIBLE. If this is not null, the default type of the emote will be overridden. + * * message - Custom parameter for the emote. This should be used if you want to pass something like a target programmatically. + * * intentional - Whether or not the emote was deliberately triggered by the mob. If `TRUE`, it's forced, which skips some checks when calling the emote. + * * force_silence - If `TRUE`, unusable/nonexistent emotes will not notify the user. + * * ignore_cooldowns - If `TRUE` all cooldowns will be skipped. */ -/mob/proc/emote(emote_key, type_override = null, message = null, intentional = FALSE, force_silence = FALSE) +/mob/proc/emote(emote_key, type_override = null, message = null, intentional = FALSE, force_silence = FALSE, ignore_cooldowns = FALSE) emote_key = lowertext(emote_key) var/param = message var/custom_param_offset = findtext(emote_key, EMOTE_PARAM_SEPARATOR, 1, null) @@ -32,7 +33,7 @@ // can this mob run the emote at all? if(!P.can_run_emote(src, intentional = intentional)) continue - if(!P.check_cooldown(src, intentional)) + if(!P.check_cooldown(src, intentional, ignore_cooldowns)) // if an emote's on cooldown, don't spam them with messages of not being able to use it silenced = TRUE continue @@ -134,6 +135,8 @@ /datum/emote/flip/run_emote(mob/living/carbon/human/user, params, type_override, intentional) if(isobserver(user)) + if(user.orbiting) + user.stop_orbit() user.SpinAnimation(5, 1) return TRUE @@ -191,7 +194,13 @@ if(!.) return FALSE - if(!ishuman(user) || isobserver(user) || prob(95)) + if(isobserver(user)) + if(user.orbiting) + user.stop_orbit() + user.spin(20, 1) + return TRUE + + if(!ishuman(user) || prob(95)) user.spin(20, 1) return TRUE @@ -201,3 +210,4 @@ if(isliving(user)) user.Dizzy(24 SECONDS) user.Confused(24 SECONDS) + diff --git a/code/modules/mob/mob_grab.dm b/code/modules/mob/mob_grab.dm index d31682694ab..97581cfd8df 100644 --- a/code/modules/mob/mob_grab.dm +++ b/code/modules/mob/mob_grab.dm @@ -148,7 +148,7 @@ if(ishuman(affecting)) switch(hit_zone) //if("mouth") - the gag code in say.dm bellow is_muzzle - if("eyes") + if(BODY_ZONE_PRECISE_EYES) if(!affecting.EyeBlind(2 SECONDS)) affecting.SetEyeBlind(2 SECONDS) @@ -182,7 +182,7 @@ */ - var/breathing_tube = affecting.get_organ_slot("breathing_tube") + var/breathing_tube = affecting.get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE) if(state >= GRAB_NECK) if(isliving(affecting) && !breathing_tube) @@ -273,12 +273,12 @@ last_hit_zone = hit_zone if(ishuman(affecting)) switch(hit_zone) - if("mouth") + if(BODY_ZONE_PRECISE_MOUTH) if(!affecting.wear_mask) assailant.visible_message(span_warning("[assailant] закрыл[genderize_ru(assailant.gender,"","а","о","и")] рот [affecting]")) else assailant.visible_message(span_warning("[assailant] схватил[genderize_ru(assailant.gender,"","а","о","и")] рот [affecting], но на нем маска!")) - if("eyes") + if(BODY_ZONE_PRECISE_EYES) assailant.visible_message(span_warning("[assailant] рукой закрыл[genderize_ru(assailant.gender,"","а","о","и")] глаза [affecting]")) else assailant.visible_message(span_warning("[assailant] агрессивно схватил[genderize_ru(assailant.gender,"","а","о","и")] [affecting] (за руки)!")) @@ -321,7 +321,7 @@ add_attack_logs(assailant, affecting, "Strangled") assailant.next_move = world.time + 10 - if(!affecting.get_organ_slot("breathing_tube")) + if(!affecting.get_organ_slot(INTERNAL_ORGAN_BREATHING_TUBE)) affecting.AdjustLoseBreath(2 SECONDS) adjust_position() @@ -360,7 +360,7 @@ return if(INTENT_HARM) //This checks that the user is on harm intent. - if(last_hit_zone == "head") //This checks the hitzone the user has selected. In this specific case, they have the head selected. + if(last_hit_zone == BODY_ZONE_HEAD) //This checks the hitzone the user has selected. In this specific case, they have the head selected. if(affecting.lying) return assailant.visible_message("[assailant] с размаха бь[pluralize_ru(assailant.gender,"ёт","ют")] [genderize_ru(assailant.gender,"его","её","своей","их")] головой о череп [affecting]!") //A visible message for what is going on. @@ -368,7 +368,7 @@ var/obj/item/clothing/hat = attacker.head if(istype(hat)) damage += hat.force * 3 - affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, "head", affected.run_armor_check(affecting, "melee")) + affecting.apply_damage(damage*rand(90, 110)/100, BRUTE, BODY_ZONE_HEAD, affected.run_armor_check(affecting, MELEE)) playsound(assailant.loc, "swing_hit", 25, 1, -1) add_attack_logs(assailant, affecting, "Headbutted") return diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 1ff64b5f876..8461b6d4ec4 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -133,12 +133,13 @@ message_admins("No ghosts were willing to take control of [key_name_admin(M)])") /proc/check_zone(zone) - if(!zone) return "chest" + if(!zone) + return BODY_ZONE_CHEST switch(zone) - if("eyes") - zone = "head" - if("mouth") - zone = "head" + if(BODY_ZONE_PRECISE_EYES) + zone = BODY_ZONE_HEAD + if(BODY_ZONE_PRECISE_MOUTH) + zone = BODY_ZONE_HEAD return zone // Returns zone with a certain probability. @@ -153,27 +154,36 @@ if(prob(probability)) return zone - var/t = rand(1, 18) // randomly pick a different zone, or maybe the same one - switch(t) - if(1) return "head" - if(2) return "chest" - if(3 to 4) return "l_arm" - if(5 to 6) return "l_hand" - if(7 to 8) return "r_arm" - if(9 to 10) return "r_hand" - if(11 to 12) return "l_leg" - if(13 to 14) return "l_foot" - if(15 to 16) return "r_leg" - if(17 to 18) return "r_foot" - + switch(rand(1, 18)) // randomly pick a different zone, or maybe the same one + if(1) + return BODY_ZONE_HEAD + if(2) + return BODY_ZONE_CHEST + if(3 to 4) + return BODY_ZONE_L_ARM + if(5 to 6) + return BODY_ZONE_PRECISE_L_HAND + if(7 to 8) + return BODY_ZONE_R_ARM + if(9 to 10) + return BODY_ZONE_PRECISE_R_HAND + if(11 to 12) + return BODY_ZONE_L_LEG + if(13 to 14) + return BODY_ZONE_PRECISE_L_FOOT + if(15 to 16) + return BODY_ZONE_R_LEG + if(17 to 18) + return BODY_ZONE_PRECISE_R_FOOT return zone + /proc/above_neck(zone) - var/list/zones = list("head", "mouth", "eyes") + var/list/zones = list(BODY_ZONE_HEAD, BODY_ZONE_PRECISE_MOUTH, BODY_ZONE_PRECISE_EYES) if(zones.Find(zone)) - return 1 - else - return 0 + return TRUE + return FALSE + /proc/stars(n, pr) if(pr == null) diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 49fe391463c..3343adac454 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -333,31 +333,24 @@ /mob/proc/mob_negates_gravity() return 0 -/mob/proc/Move_Pulled(atom/A) + +/mob/proc/Move_Pulled(atom/target) if(!canmove || restrained() || !pulling) return if(pulling.anchored || pulling.move_resist > move_force || !pulling.Adjacent(src)) stop_pulling() return if(isliving(pulling)) - var/mob/living/L = pulling - if(L.buckled && L.buckled.buckle_prevents_pull) //if they're buckled to something that disallows pulling, prevent it + var/mob/living/living_pulling = pulling + if(living_pulling.buckled?.buckle_prevents_pull) //if they're buckled to something that disallows pulling, prevent it stop_pulling() return - if(A == loc && pulling.density) + if(target == loc && pulling.density) return - if(!Process_Spacemove(get_dir(pulling.loc, A))) + if(!Process_Spacemove(get_dir(pulling.loc, target))) return - if(ismob(pulling)) - var/mob/M = pulling - var/atom/movable/t = M.pulling - M.stop_pulling() - step(pulling, get_dir(pulling.loc, A)) - if(M) - M.start_pulling(t) - else - step(pulling, get_dir(pulling.loc, A)) - return + step(pulling, get_dir(pulling.loc, target)) + /mob/proc/update_gravity(has_gravity) return diff --git a/code/modules/mob/mob_say.dm b/code/modules/mob/mob_say.dm index 4d6fc283b43..3ef9748704e 100644 --- a/code/modules/mob/mob_say.dm +++ b/code/modules/mob/mob_say.dm @@ -56,6 +56,7 @@ /mob/proc/say_dead(message) + message = handleDiscordEmojis(message) if(client) if(!check_rights(R_ADMIN, FALSE) && !CONFIG_GET(flag/dsay_allowed)) to_chat(src, span_danger("Deadchat is globally muted.")) diff --git a/code/modules/mob/new_player/preferences_setup.dm b/code/modules/mob/new_player/preferences_setup.dm index 6d0aa9c9ddd..f60528d534f 100644 --- a/code/modules/mob/new_player/preferences_setup.dm +++ b/code/modules/mob/new_player/preferences_setup.dm @@ -230,7 +230,7 @@ H.dna.species = current_species H.s_tone = s_tone H.dna.species.updatespeciescolor(H, 0) //The mob's species wasn't set, so it's almost certainly different than the character's species at the moment. Thus, we need to be owner-insensitive. - var/obj/item/organ/external/chest/C = H.get_organ("chest") + var/obj/item/organ/external/chest/C = H.get_organ(BODY_ZONE_CHEST) icobase = C.icobase ? C.icobase : C.dna.species.icobase if(H.dna.species.bodyflags & HAS_TAIL) coloured_tail = H.tail ? H.tail : H.dna.species.tail @@ -249,18 +249,33 @@ if(H.icon_state) head = H.icon_state preview_icon.Blend(new /icon(icobase, "[head]_[g]"), ICON_OVERLAY) - - for(var/name in list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand")) - if(organ_data[name] == "amputated") continue - if(organ_data[name] == "cyborg") + var/list/check_list = list( + BODY_ZONE_CHEST, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_R_FOOT, + ) + for(var/limb_zone in check_list) + if(organ_data[limb_zone] == "amputated") + continue + if(organ_data[limb_zone] == "cyborg") var/datum/robolimb/R - if(rlimb_data[name]) R = GLOB.all_robolimbs[rlimb_data[name]] - if(!R) R = GLOB.basic_robolimb - if(name == "chest") - name = "torso" - preview_icon.Blend(icon(R.icon, "[name]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic. + if(rlimb_data[limb_zone]) + R = GLOB.all_robolimbs[rlimb_data[limb_zone]] + if(!R) + R = GLOB.basic_robolimb + if(limb_zone == BODY_ZONE_CHEST) + limb_zone = "torso" + preview_icon.Blend(icon(R.icon, "[limb_zone]"), ICON_OVERLAY) // This doesn't check gendered_icon. Not an issue while only limbs can be robotic. continue - preview_icon.Blend(new /icon(icobase, "[name]"), ICON_OVERLAY) + preview_icon.Blend(new /icon(icobase, "[limb_zone]"), ICON_OVERLAY) // Skin color if(current_species && (current_species.bodyflags & HAS_SKIN_COLOR) && !(current_species.bodyflags & HAS_ICON_SKIN_TONE)) diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 327812488cf..aededfc5986 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -184,7 +184,6 @@ qdel(src) - /mob/proc/safe_respawn(var/MP) if(!MP) return 0 diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 8af345dc165..c30761dfc82 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -149,7 +149,7 @@ return /obj/item/paper/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - if(user.zone_selected == "eyes") + if(user.zone_selected == BODY_ZONE_PRECISE_EYES) user.visible_message("[user] is trying to show the paper to you. ", \ "You hold up a paper and try to show it to [M]. ") @@ -160,7 +160,7 @@ else to_chat(user, span_warning("You fail to show the paper to [M].")) - else if(user.zone_selected == "mouth") + else if(user.zone_selected == BODY_ZONE_PRECISE_MOUTH) if(!istype(M, /mob)) return if(ishuman(M)) @@ -679,6 +679,11 @@ info = "" language = "Neo-Russkiya" +/obj/item/paper/solgov + name = "paper" + header = "


" + info = "" + /obj/item/paper/central_command name = "Директива Центрального Командования" info = "" diff --git a/code/modules/paperwork/paperbin.dm b/code/modules/paperwork/paperbin.dm index 1eecef34b79..2f2072a8eb7 100644 --- a/code/modules/paperwork/paperbin.dm +++ b/code/modules/paperwork/paperbin.dm @@ -48,9 +48,9 @@ /obj/item/paper_bin/attack_hand(mob/user as mob) if(ishuman(user)) var/mob/living/carbon/human/H = user - var/obj/item/organ/external/temp = H.bodyparts_by_name["r_hand"] + var/obj/item/organ/external/temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_R_HAND] if(H.hand) - temp = H.bodyparts_by_name["l_hand"] + temp = H.bodyparts_by_name[BODY_ZONE_PRECISE_L_HAND] if(temp && !temp.is_usable()) to_chat(H, "You try to move your [temp.name], but cannot!") return @@ -144,3 +144,7 @@ /obj/item/paper_bin/ussp name = "ussp paper bin" letterhead_type = /obj/item/paper/ussp + +/obj/item/paper_bin/solgov + name = "solgov paper bin" + letterhead_type = /obj/item/paper/solgov diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index cacd7958c1c..6fb5fc3b0d5 100644 --- a/code/modules/paperwork/stamps.dm +++ b/code/modules/paperwork/stamps.dm @@ -131,3 +131,8 @@ name = "Old USSP rubber stamp" icon_state = "stamp-ussp" item_color = "redcoat" + +/obj/item/stamp/solgov + name = "Solar Federation rubber stamp" + icon_state = "stamp-solgov" + item_color = "solgov" diff --git a/code/modules/point/point.dm b/code/modules/point/point.dm new file mode 100644 index 00000000000..96599da7187 --- /dev/null +++ b/code/modules/point/point.dm @@ -0,0 +1,180 @@ +#define POINT_TIME (2.5 SECONDS) +#define BUBBLE_TIME (3 SECONDS) + + +/** + * Point at an atom + * + * Intended to enable and standardise the pointing animation for all atoms + * + * Not intended as a replacement for the mob verb + */ +/atom/movable/proc/point_at(atom/pointed_atom) + var/turf/source_turf = loc + if(!isturf(source_turf)) + return + + if((pointed_atom in src) || (pointed_atom.loc in src)) + create_point_bubble_from_atom(pointed_atom) + return + + var/turf/pointed_turf = get_turf(pointed_atom) + if(!pointed_turf) + return + + var/obj/visual = new /obj/effect/temp_visual/point(source_turf, invisibility) + animate(visual, pixel_x = (pointed_turf.x - source_turf.x) * world.icon_size + pointed_atom.pixel_x, pixel_y = (pointed_turf.y - source_turf.y) * world.icon_size + pointed_atom.pixel_y, time = 0.5 SECONDS, easing = QUAD_EASING) + + +/** + * Create a bubble pointing at a particular icon and icon state. + * See args for create_point_bubble_from_atom. + */ +/atom/movable/proc/create_point_bubble(mutable_appearance/pointed_atom_appearance, include_arrow = TRUE) + var/obj/effect/thought_bubble_effect = new + + pointed_atom_appearance.layer = POINT_LAYER + pointed_atom_appearance.blend_mode = BLEND_INSET_OVERLAY + pointed_atom_appearance.pixel_x = 0 + pointed_atom_appearance.pixel_y = 0 + + var/mutable_appearance/thought_bubble = mutable_appearance( + 'icons/effects/effects.dmi', + thought_bubble_image, + layer = POINT_LAYER, + appearance_flags = KEEP_APART, + ) + + thought_bubble.overlays += pointed_atom_appearance + + thought_bubble.pixel_x = 16 + thought_bubble.pixel_y = 32 + thought_bubble.alpha = 200 + thought_bubble.mouse_opacity = MOUSE_OPACITY_TRANSPARENT + + if(include_arrow) + var/mutable_appearance/point_visual = mutable_appearance( + 'icons/mob/screen_gen.dmi', + "arrow", + layer = thought_bubble.layer, + ) + point_visual.pixel_y = 7 + thought_bubble.overlays += point_visual + thought_bubble.plane = POINT_PLANE + + // vis_contents is used to preserve mouse opacity + thought_bubble_effect.appearance = thought_bubble + vis_contents += thought_bubble_effect + + thought_bubble_effect.alpha = 0 + animate(thought_bubble_effect, alpha = 255, time = 0.5 SECONDS, easing = EASE_OUT) + animate(alpha = 255, time = BUBBLE_TIME) + animate(alpha = 0, time = 0.5 SECONDS, easing = EASE_IN) + + QDEL_IN(thought_bubble_effect, BUBBLE_TIME + 1 SECONDS) + + +/** + * Create a point bubble towards a given item. + * + * Arguments: + * * pointed_atom - Atom to show in the bubble. + * * include_arrow - If true, show an arrow pointing downwards. + */ +/atom/movable/proc/create_point_bubble_from_atom(atom/pointed_atom, include_arrow = TRUE) + var/mutable_appearance/pointed_atom_appearance = new(pointed_atom.appearance) + + var/hover_outline_index = pointed_atom.get_filter("hover_outline") + if(!isnull(hover_outline_index)) + pointed_atom_appearance.filters.Cut(hover_outline_index, hover_outline_index + 1) + + create_point_bubble(pointed_atom_appearance, include_arrow) + + +/** + * Create a point bubble towards a given item, from an icon/icon state. + * + * Arguments: + * * icon - Icon source for the bubble's icon. + * * icon_state - Icon state for the bubble's icon. + * * include_arrow - If true, show an arrow pointing downwards. + */ +/atom/movable/proc/create_point_bubble_from_icons(icon, icon_state, include_arrow = TRUE) + var/mutable_appearance/pointed_atom_appearance = mutable_appearance( + icon, + icon_state, + ) + create_point_bubble(pointed_atom_appearance, include_arrow) + + +/** + * See above, this uses an uninstantiated path. + */ +/atom/movable/proc/create_point_bubble_from_path(atom/pointed_atom_path, include_arrow = TRUE) + create_point_bubble_from_icons(initial(pointed_atom_path.icon), initial(pointed_atom_path.icon_state), include_arrow) + + +/obj/effect/temp_visual/point + name = "arrow" + desc = "It's an arrow hanging in mid-air. There may be a wizard about." + icon = 'icons/mob/screen_gen.dmi' + icon_state = "arrow" + layer = POINT_LAYER + plane = POINT_PLANE + duration = POINT_TIME + randomdir = FALSE + + +/obj/effect/temp_visual/point/Initialize(mapload, set_invis = 0) + . = ..() + invisibility = set_invis + + +/** + * Point at an atom + * + * mob verbs are faster than object verbs. See + * [this byond forum post](https://secure.byond.com/forum/?post=1326139&page=2#comment8198716) + * for why this isn't atom/verb/pointed() + * + * note: ghosts can point, this is intended + * + * visible_message will handle invisibility properly + * + * overridden here and in /mob/dead/observer for different point span classes and sanity checks + */ +/mob/verb/pointed(atom/target as mob|obj|turf in view(client.view, src)) + set name = "Point To" + set category = null + + if(next_move >= world.time) + return + + if(istype(target, /obj/effect/temp_visual/point)) + return + + changeNext_move(CLICK_CD_POINT) + + DEFAULT_QUEUE_OR_CALL_VERB(VERB_CALLBACK(src, PROC_REF(run_pointed), target)) + + +/** + * Possibly delayed verb that finishes the pointing process starting in [/mob/verb/pointed()]. + * Either called immediately or in the tick after pointed() was called, as per the [DEFAULT_QUEUE_OR_CALL_VERB()] macro. + */ +/mob/proc/run_pointed(atom/target) + if(target.loc in src) // Object is inside a container on the mob. It's not part of the verb's list since it's not in view and requires middle clicking. + point_at(target) + return TRUE + + if(client && !(target in view(client.maxview(), src))) + return FALSE + + point_at(target) + + return TRUE + + +#undef POINT_TIME +#undef BUBBLE_TIME + diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index 14817af9707..8e4209c712e 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -549,7 +549,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain return 0 var/cable_used = 0 var/childlist - if(!isnull(S.children)) + if(LAZYLEN(S.children)) childlist = S.children.Copy() var/parenthealed = FALSE while(cable_used <= MAXCABLEPERHEAL && amount >= 1) @@ -570,7 +570,7 @@ GLOBAL_LIST_INIT(cable_coil_recipes, list (new/datum/stack_recipe/cable_restrain while(cable_used <= MAXCABLEPERHEAL && E.burn_dam && amount >= 1) use(1) cable_used += 1 - E.heal_damage(0, HEALPERCABLE, 0, 1) + E.heal_damage(0, HEALPERCABLE, FALSE, TRUE) H.UpdateDamageIcon() user.visible_message("\The [user] repairs some burn damage on \the [M]'s [E.name] with \the [src].") return 1 diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 90e96cec54b..86c2d1fba12 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -25,7 +25,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne anchored = 1 density = 1 use_power = NO_POWER_USE - resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF | NO_MALF_EFFECT var/sprite_number = 0 /obj/machinery/gravity_generator/ex_act(severity) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index 3bc044212ca..3c259b4d520 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -640,7 +640,7 @@ if(user.a_intent == INTENT_DISARM || user.a_intent == INTENT_GRAB) to_chat(user, "You try to remove the light [fitting], but you burn your hand on it!") - var/obj/item/organ/external/affecting = H.get_organ("[user.hand ? "l" : "r" ]_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.hand ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) if(affecting.receive_damage(0, 5)) // 5 burn damage H.UpdateDamageIcon() H.updatehealth() @@ -900,7 +900,7 @@ /obj/item/light/suicide_act(mob/living/carbon/human/user) user.visible_message("[user] touches [src], burning [user.p_their()] hands off!", "You touch [src], burning your hands off!") - for(var/oname in list("l_hand", "r_hand")) + for(var/oname in list(BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND)) var/obj/item/organ/external/limb = user.get_organ(oname) if(limb) limb.droplimb(0, DROPLIMB_BURN) diff --git a/code/modules/projectiles/ammunition/ammo_casings.dm b/code/modules/projectiles/ammunition/ammo_casings.dm index 31a5426de56..0b574802e3c 100644 --- a/code/modules/projectiles/ammunition/ammo_casings.dm +++ b/code/modules/projectiles/ammunition/ammo_casings.dm @@ -160,6 +160,16 @@ materials = list(MAT_METAL = 1500) projectile_type = /obj/item/projectile/bullet/midbullet3 +/obj/item/ammo_casing/revolver/improvised + name = "improvised shell" + desc = "Full metal shell leaking oil. This is clearly an unreliable bullet." + icon_state = "improvisedrevolverbullet" + materials = list(MAT_METAL = 100) + caliber = ".257" + projectile_type = /obj/item/projectile/bullet/weakbullet3/c257 + muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL + muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL + /obj/item/ammo_casing/n762 desc = "A 7.62x38mm bullet casing." materials = list(MAT_METAL = 4000) @@ -195,7 +205,7 @@ /obj/item/ammo_casing/shotgun name = "shotgun slug" desc = "A 12 gauge lead slug." - icon_state = "blshell" + icon_state = "slugshell" materials = list(MAT_METAL = 4000) casing_drop_sound = 'sound/weapons/gun_interactions/shotgun_fall.ogg' caliber = ".12" @@ -206,78 +216,67 @@ /obj/item/ammo_casing/shotgun/buckshot name = "buckshot shell" desc = "A 12 gauge buckshot shell." - icon_state = "gshell" + icon_state = "buckshotshell" projectile_type = /obj/item/projectile/bullet/pellet pellets = 6 variance = 17 +/obj/item/ammo_casing/shotgun/assassination + name = "assassination shell" + desc = "A specialist shrapnel shell that has been laced with a silencing toxin." + materials = list(MAT_METAL = 1500, MAT_GLASS = 200) + projectile_type = /obj/item/projectile/bullet/pellet/assassination + muzzle_flash_effect = null + icon_state = "buckshotshell" + pellets = 6 + variance = 15 + /obj/item/ammo_casing/shotgun/buckshot/nuclear projectile_type = /obj/item/projectile/bullet/pellet/nuclear /obj/item/ammo_casing/shotgun/rubbershot name = "rubber shot" desc = "A shotgun casing filled with densely-packed rubber balls, used to incapacitate crowds from a distance." - icon_state = "cshell" + icon_state = "rubbershotshell" materials = list(MAT_METAL = 1000) projectile_type = /obj/item/projectile/bullet/pellet/rubber pellets = 6 variance = 17 +/obj/item/ammo_casing/shotgun/dart + name = "shotgun dart" + desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical." + icon_state = "rubbershotshell" + container_type = OPENCONTAINER + materials = list(MAT_METAL = 500, MAT_GLASS = 200) + projectile_type = /obj/item/projectile/bullet/dart + muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL + muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL + +/obj/item/ammo_casing/shotgun/dart/New() + ..() + create_reagents(30) + +/obj/item/ammo_casing/shotgun/dart/attackby() + return + /obj/item/ammo_casing/shotgun/beanbag name = "beanbag slug" desc = "A weak beanbag slug for riot control." - icon_state = "bshell" + icon_state = "beanbagshell" materials = list(MAT_METAL = 1000) projectile_type = /obj/item/projectile/bullet/weakbullet muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL -/obj/item/ammo_casing/shotgun/fakebeanbag - name = "beanbag shell" - desc = "A weak beanbag slug for riot control." +/obj/item/ammo_casing/shotgun/beanbag/fake description_antag = "Специальный патрон для усыпления жертв. Крайне эффективен против целей с алкоголем внутри. Любой стан по противнику после выстрела дополнительно приводит ко сну, не позволяя ему кричать о помощи." - icon_state = "bshell" projectile_type = /obj/item/projectile/bullet/weakbullet/booze - muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL - muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL - -/obj/item/ammo_casing/shotgun/improvised - name = "improvised shell" - desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards." - icon_state = "improvshell" - materials = list(MAT_METAL = 250) - projectile_type = /obj/item/projectile/bullet/pellet/weak - pellets = 10 - variance = 20 - muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL - muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL - -/obj/item/ammo_casing/revolver/improvised - name = "improvised shell" - desc = "Full metal shell leaking oil. This is clearly an unreliable bullet." - icon_state = "improvisedrevolverbullet" - materials = list(MAT_METAL = 100) - caliber = ".257" - projectile_type = /obj/item/projectile/bullet/weakbullet3/c257 - muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL - muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL - -/obj/item/ammo_casing/shotgun/improvised/overload - name = "overloaded improvised shell" - desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards. This one has been packed with even more \ - propellant. It's like playing russian roulette, with a shotgun." - icon_state = "improvshell" - materials = list(MAT_METAL = 250) - projectile_type = /obj/item/projectile/bullet/pellet/overload - pellets = 4 - variance = 40 - muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL - muzzle_flash_range = MUZZLE_FLASH_RANGE_STRONG /obj/item/ammo_casing/shotgun/stunslug name = "taser slug" desc = "A stunning taser slug." - icon_state = "stunshell" + icon_state = "stunslugshell" materials = list(MAT_METAL = 250) projectile_type = /obj/item/projectile/bullet/stunshot muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL @@ -287,13 +286,13 @@ /obj/item/ammo_casing/shotgun/meteorshot name = "meteorshot shell" desc = "A shotgun shell rigged with CMC technology, which launches a massive slug when fired." - icon_state = "mshell" + icon_state = "meteorshotshell" projectile_type = /obj/item/projectile/bullet/meteorshot /obj/item/ammo_casing/shotgun/breaching name = "breaching shell" desc = "An economic version of the meteorshot, utilizing similar technologies. Great for busting down doors." - icon_state = "mshell" + icon_state = "meteorshotshell" projectile_type = /obj/item/projectile/bullet/meteorshot/weak /obj/item/ammo_casing/shotgun/pulseslug @@ -301,27 +300,27 @@ desc = "A delicate device which can be loaded into a shotgun. The primer acts as a button which triggers the gain medium and fires a powerful \ energy blast. While the heat and power drain limit it to one use, it can still allow an operator to engage targets that ballistic ammunition \ would have difficulty with." - icon_state = "pshell" + icon_state = "pulseslugshell" projectile_type = /obj/item/projectile/beam/pulse/shot muzzle_flash_color = LIGHT_COLOR_DARKBLUE /obj/item/ammo_casing/shotgun/incendiary name = "incendiary slug" desc = "An incendiary-coated shotgun slug." - icon_state = "ishell" + icon_state = "incendiaryshell" projectile_type = /obj/item/projectile/bullet/incendiary/shell muzzle_flash_color = LIGHT_COLOR_FIRE /obj/item/ammo_casing/shotgun/frag12 name = "FRAG-12 slug" desc = "A high explosive breaching round for a 12 gauge shotgun." - icon_state = "heshell" + icon_state = "frag12shell" projectile_type = /obj/item/projectile/bullet/frag12 /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath name = "dragonsbreath shell" desc = "A shotgun shell which fires a spread of incendiary pellets." - icon_state = "ishell2" + icon_state = "dragonsbreathshell" projectile_type = /obj/item/projectile/bullet/incendiary/shell/dragonsbreath pellets = 4 variance = 25 @@ -347,40 +346,16 @@ /obj/item/ammo_casing/shotgun/laserslug name = "laser slug" desc = "An advanced shotgun shell that uses a micro laser to replicate the effects of a laser weapon in a ballistic package." - icon_state = "lshell" + icon_state = "laserslugshell" projectile_type = /obj/item/projectile/beam/laser/slug muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL muzzle_flash_color = LIGHT_COLOR_DARKRED -/obj/item/ammo_casing/shotgun/techshell - name = "unloaded technological shell" - desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects." - icon_state = "cshell" - materials = list(MAT_METAL = 1000, MAT_GLASS = 200) - projectile_type = null - -/obj/item/ammo_casing/shotgun/dart - name = "shotgun dart" - desc = "A dart for use in shotguns. Can be injected with up to 30 units of any chemical." - icon_state = "cshell" - container_type = OPENCONTAINER - materials = list(MAT_METAL = 500, MAT_GLASS = 200) - projectile_type = /obj/item/projectile/bullet/dart - muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL - muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL - -/obj/item/ammo_casing/shotgun/dart/New() - ..() - create_reagents(30) - -/obj/item/ammo_casing/shotgun/dart/attackby() - return - /obj/item/ammo_casing/shotgun/bioterror name = "bioterror shell" desc = "A shotgun shell filled with deadly toxins." - icon_state = "bioshell" + icon_state = "bioterrorshell" projectile_type = /obj/item/projectile/bullet/pellet/bioterror pellets = 4 variance = 17 @@ -388,7 +363,7 @@ /obj/item/ammo_casing/shotgun/tranquilizer name = "tranquilizer darts" desc = "A tranquilizer round used to subdue individuals utilizing stimulants." - icon_state = "nshell" + icon_state = "tranquilizershell" materials = list(MAT_METAL = 500, MAT_GLASS = 200) projectile_type = /obj/item/projectile/bullet/dart/syringe/tranquilizer muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL @@ -397,11 +372,38 @@ /obj/item/ammo_casing/shotgun/flechette name = "flechette" desc = "A shotgun casing filled with tiny steel darts, used to penetrate armor. Beehive incoming!" - icon_state = "flechette" + icon_state = "flechetteshell" projectile_type = /obj/item/projectile/bullet/pellet/flechette pellets = 4 variance = 13 +/obj/item/ammo_casing/shotgun/improvised + name = "improvised shell" + desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards." + icon_state = "improvisedshell" + materials = list(MAT_METAL = 250) + projectile_type = /obj/item/projectile/bullet/pellet/weak + pellets = 10 + variance = 20 + muzzle_flash_strength = MUZZLE_FLASH_STRENGTH_NORMAL + muzzle_flash_range = MUZZLE_FLASH_RANGE_NORMAL + +/obj/item/ammo_casing/shotgun/improvised/overload + name = "overloaded improvised shell" + desc = "An extremely weak shotgun shell with multiple small pellets made out of metal shards. This one has been packed with even more \ + propellant. It's like playing russian roulette, with a shotgun." + projectile_type = /obj/item/projectile/bullet/pellet/overload + pellets = 4 + variance = 40 + muzzle_flash_range = MUZZLE_FLASH_RANGE_STRONG + +/obj/item/ammo_casing/shotgun/techshell + name = "unloaded technological shell" + desc = "A high-tech shotgun shell which can be loaded with materials to produce unique effects." + icon_state = "techshell" + materials = list(MAT_METAL = 1000, MAT_GLASS = 200) + projectile_type = null + /obj/item/ammo_casing/a556 desc = "A 5.56mm bullet casing." materials = list(MAT_METAL = 3250) @@ -547,16 +549,6 @@ caliber = "foam_force_sniper" projectile_type = /obj/item/projectile/bullet/reusable/foam_dart/sniper/riot -/obj/item/ammo_casing/shotgun/assassination - name = "assassination shell" - desc = "A specialist shrapnel shell that has been laced with a silencing toxin." - materials = list(MAT_METAL = 1500, MAT_GLASS = 200) - projectile_type = /obj/item/projectile/bullet/pellet/assassination - muzzle_flash_effect = null - icon_state = "gshell" - pellets = 6 - variance = 15 - /obj/item/ammo_casing/cap desc = "A cap for children toys." materials = list(MAT_METAL = 10) diff --git a/code/modules/projectiles/ammunition/boxes.dm b/code/modules/projectiles/ammunition/boxes.dm index d9d528758e8..e0165b31e0c 100644 --- a/code/modules/projectiles/ammunition/boxes.dm +++ b/code/modules/projectiles/ammunition/boxes.dm @@ -33,31 +33,100 @@ icon_state = "buckshotbox" ammo_type = /obj/item/ammo_casing/shotgun/buckshot -/obj/item/ammo_box/shotgun/dragonsbreath - name = "Ammunition Box (Dragonsbreath)" - icon_state = "dragonsbreathbox" - ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath +/obj/item/ammo_box/shotgun/buck/assassination + name = "Ammunition Box (Assassination shells)" + ammo_type = /obj/item/ammo_casing/shotgun/assassination -/obj/item/ammo_box/shotgun/stun - name = "Ammunition Box (Stun shells)" - icon_state = "stunbox" - ammo_type = /obj/item/ammo_casing/shotgun/stunslug +/obj/item/ammo_box/shotgun/buck/nuclear + name = "Elite Ammunition Box (Buckshot)" + ammo_type = /obj/item/ammo_casing/shotgun/buckshot/nuclear + +/obj/item/ammo_box/shotgun/rubbershot + name = "Ammunition Box (Rubbershot shells)" + icon_state = "rubbershotbox" + ammo_type = /obj/item/ammo_casing/shotgun/rubbershot + +/obj/item/ammo_box/shotgun/rubbershot/dart + name = "Ammunition Box (Dart shells)" + ammo_type = /obj/item/ammo_casing/shotgun/dart /obj/item/ammo_box/shotgun/beanbag name = "Ammunition Box (Beanbag shells)" icon_state = "beanbagbox" ammo_type = /obj/item/ammo_casing/shotgun/beanbag -/obj/item/ammo_box/shotgun/rubbershot - name = "Ammunition Box (Rubbershot shells)" - icon_state = "rubbershotbox" - ammo_type = /obj/item/ammo_casing/shotgun/rubbershot +/obj/item/ammo_box/shotgun/beanbag/fake + ammo_type = /obj/item/ammo_casing/shotgun/beanbag/fake + +/obj/item/ammo_box/shotgun/stunslug + name = "Ammunition Box (Stun shells)" + icon_state = "stunslugbox" + ammo_type = /obj/item/ammo_casing/shotgun/stunslug + +/obj/item/ammo_box/shotgun/breaching + name = "Ammunition Box (Breaching shells)" + icon_state = "meteorshotbox" + ammo_type = /obj/item/ammo_casing/shotgun/breaching + +/obj/item/ammo_box/shotgun/pulseslug + name = "Ammunition Box (Pulse slugs)" + icon_state = "pulseslugbox" + ammo_type = /obj/item/ammo_casing/shotgun/pulseslug + +/obj/item/ammo_box/shotgun/incendiary + name = "Ammunition Box (Incendiary slugs)" + icon_state = "incendiarybox" + ammo_type = /obj/item/ammo_casing/shotgun/incendiary + +/obj/item/ammo_box/shotgun/frag12 + name = "Ammunition Box (FRAG-12 slugs)" + icon_state = "frag12box" + ammo_type = /obj/item/ammo_casing/shotgun/frag12 + +/obj/item/ammo_box/shotgun/dragonsbreath + name = "Ammunition Box (Dragonsbreath)" + icon_state = "dragonsbreathbox" + ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath + +/obj/item/ammo_box/shotgun/dragonsbreath/nuclear + name = "Elite Ammunition Box (Dragonsbreath)" + ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath/nuclear + +/obj/item/ammo_box/shotgun/ion + name = "Ammunition Box (Ion shells)" + icon_state = "ionbox" + ammo_type = /obj/item/ammo_casing/shotgun/ion + +/obj/item/ammo_box/shotgun/laserslug + name = "Ammunition Box (Laser slugs)" + icon_state = "laserslugbox" + ammo_type = /obj/item/ammo_casing/shotgun/laserslug + +/obj/item/ammo_box/shotgun/bioterror + name = "Ammunition Box (Bioterror shells)" + icon_state = "bioterrorbox" + ammo_type = /obj/item/ammo_casing/shotgun/bioterror /obj/item/ammo_box/shotgun/tranquilizer name = "Ammunition Box (Tranquilizer darts)" - icon_state = "tranqbox" + icon_state = "tranquilizerbox" ammo_type = /obj/item/ammo_casing/shotgun/tranquilizer +/obj/item/ammo_box/shotgun/flechette + name = "Ammunition Box (Flechette)" + icon_state = "flechettebox" + ammo_type = /obj/item/ammo_casing/shotgun/flechette + +/obj/item/ammo_box/shotgun/improvised + name = "Ammunition Box (Improvised shells)" + icon = 'icons/obj/storage.dmi' + icon_state = "largebox" + ammo_type = /obj/item/ammo_casing/shotgun/improvised + +/obj/item/ammo_box/shotgun/improvised/overload + name = "Ammunition Box (Overload shells)" + ammo_type = /obj/item/ammo_casing/shotgun/improvised/overload + // AUTOMATIC /obj/item/ammo_box/c9mm name = "ammo box (9mm)" @@ -205,49 +274,105 @@ // SHOTGUN /obj/item/ammo_box/speedloader/shotgun - name = "Shotgun Speedloader (slug)" - icon_state = "slugloader" + name = "Shotgun Speedloader" + desc = "Designed to quickly reload shotguns." + icon_state = "shotgunloader" origin_tech = "combat=2" - ammo_type = /obj/item/ammo_casing/shotgun - max_ammo = 7 caliber = ".12" - multiple_sprites = 1 + max_ammo = 7 + ammo_type = null w_class = WEIGHT_CLASS_NORMAL +/obj/item/ammo_box/speedloader/shotgun/New() + . = ..() + name = "Shotgun Speedloader" + icon_state = "shotgunloader" + +/obj/item/ammo_box/speedloader/shotgun/update_icon() + overlays.Cut() + + for(var/i = 1 to length(stored_ammo)) + var/obj/item/ammo_casing/shotgun/ammo = stored_ammo[i] + var/icon/new_ammo_icon = icon('icons/obj/weapons/ammo.dmi', "[initial(ammo.icon_state)]_loader") + if(i < 7) + new_ammo_icon.Shift((i % 2) == 0 ? WEST : EAST, 3) + new_ammo_icon.Turn(FLOOR((i - 1) * 45, 90)) + overlays += new_ammo_icon + +/obj/item/ammo_box/speedloader/shotgun/slug + name = "Shotgun Speedloader (slug)" + icon_state = "slugloader" + ammo_type = /obj/item/ammo_casing/shotgun + /obj/item/ammo_box/speedloader/shotgun/buck name = "Shotgun Speedloader (buckshot)" - icon_state = "buckloader" + icon_state = "buckshotloader" ammo_type = /obj/item/ammo_casing/shotgun/buckshot -/obj/item/ammo_box/speedloader/shotgun/dragonsbreath - name = "Shotgun Speedloader (dragonsbreath)" - icon_state = "dragonsbreathloader" - ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath +/obj/item/ammo_box/speedloader/shotgun/rubbershot + name = "Shotgun Speedloader (rubbershot)" + icon_state = "rubbershotloader" + ammo_type = /obj/item/ammo_casing/shotgun/rubbershot -/obj/item/ammo_box/speedloader/shotgun/stun - name = "Shotgun Speedloader (stun)" - icon_state = "stunloader" - ammo_type = /obj/item/ammo_casing/shotgun/stunslug +/obj/item/ammo_box/speedloader/shotgun/dart + name = "Shotgun Speedloader (dart)" + icon_state = "rubbershotloader" + ammo_type = /obj/item/ammo_casing/shotgun/dart /obj/item/ammo_box/speedloader/shotgun/beanbag name = "Shotgun Speedloader (beanbag)" icon_state = "beanbagloader" ammo_type = /obj/item/ammo_casing/shotgun/beanbag -/obj/item/ammo_box/speedloader/shotgun/rubbershot - name = "Shotgun Speedloader (rubbershot)" - icon_state = "rubbershotloader" - ammo_type = /obj/item/ammo_casing/shotgun/rubbershot +/obj/item/ammo_box/speedloader/shotgun/stunslug + name = "Shotgun Speedloader (stunslug)" + icon_state = "stunslugloader" + ammo_type = /obj/item/ammo_casing/shotgun/stunslug + +/obj/item/ammo_box/speedloader/shotgun/pulseslug + name = "Shotgun Speedloader (pulseslug)" + icon_state = "pulseslugloader" + ammo_type = /obj/item/ammo_casing/shotgun/pulseslug + +/obj/item/ammo_box/speedloader/shotgun/incendiary + name = "Shotgun Speedloader (incendiary)" + icon_state = "incendiaryloader" + ammo_type = /obj/item/ammo_casing/shotgun/incendiary + +/obj/item/ammo_box/speedloader/shotgun/frag12 + name = "Shotgun Speedloader (frag12)" + icon_state = "frag12loader" + ammo_type = /obj/item/ammo_casing/shotgun/frag12 + +/obj/item/ammo_box/speedloader/shotgun/dragonsbreath + name = "Shotgun Speedloader (dragonsbreath)" + icon_state = "dragonsbreathloader" + ammo_type = /obj/item/ammo_casing/shotgun/incendiary/dragonsbreath + +/obj/item/ammo_box/speedloader/shotgun/ion + name = "Shotgun Speedloader (ion)" + icon_state = "ionloader" + ammo_type = /obj/item/ammo_casing/shotgun/ion + +/obj/item/ammo_box/speedloader/shotgun/laserslug + name = "Shotgun Speedloader (laserslug)" + icon_state = "laserslugloader" + ammo_type = /obj/item/ammo_casing/shotgun/laserslug /obj/item/ammo_box/speedloader/shotgun/tranquilizer name = "Shotgun Speedloader (tranquilizer)" - icon_state = "tranqloader" + icon_state = "tranquilizerloader" ammo_type = /obj/item/ammo_casing/shotgun/tranquilizer -/obj/item/ammo_box/speedloader/shotgun/universal - name = "Shotgun Speedloader" - icon_state = "slugloader" - ammo_type = null +/obj/item/ammo_box/speedloader/shotgun/improvised + name = "Shotgun Speedloader (improvised)" + icon_state = "improvisedloader" + ammo_type = /obj/item/ammo_casing/shotgun/improvised + +/obj/item/ammo_box/speedloader/shotgun/overload + name = "Shotgun Speedloader (overload)" + icon_state = "improvisedloader" + ammo_type = /obj/item/ammo_casing/shotgun/improvised/overload // MISC /obj/item/ammo_box/speedloader/caps @@ -261,7 +386,7 @@ * STRIPPER CLIP */ -/obj/item/ammo_box/speedloader/shotgun/a762 +/obj/item/ammo_box/speedloader/a762 name = "stripper clip (7.62mm)" desc = "A stripper clip." icon_state = "762" @@ -269,4 +394,3 @@ ammo_type = /obj/item/ammo_casing/a762 max_ammo = 5 multiple_sprites = 1 - w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/projectiles/ammunition/energy.dm b/code/modules/projectiles/ammunition/energy.dm index d6abfad2f3e..4e0f06c3c4b 100644 --- a/code/modules/projectiles/ammunition/energy.dm +++ b/code/modules/projectiles/ammunition/energy.dm @@ -87,23 +87,23 @@ /obj/item/ammo_casing/energy/immolator/strong projectile_type = /obj/item/projectile/beam/immolator/strong - e_cost = 125 + e_cost = 50 select_name = "precise" /obj/item/ammo_casing/energy/immolator/strong/cyborg // Used by gamma ERT borgs - e_cost = 1000 // 5x that of the standard laser, for 2.25x the damage (if 1/1 shots hit) plus ignite. Not energy-efficient, but can be used for sniping. + e_cost = 250 // 5x that of the standard laser, for 2.25x the damage (if 1/1 shots hit) plus ignite. Not energy-efficient, but can be used for sniping. /obj/item/ammo_casing/energy/immolator/scatter projectile_type = /obj/item/projectile/beam/immolator/weak - e_cost = 125 + e_cost = 50 pellets = 6 variance = 25 select_name = "scatter" /obj/item/ammo_casing/energy/immolator/scatter/cyborg // Used by gamma ERT borgs - e_cost = 1000 // 5x that of the standard laser, for 7.5x the damage (if 6/6 shots hit) plus ignite. Efficient only if you hit with at least 4/6 of the shots. + e_cost = 250 // 5x that of the standard laser, for 7.5x the damage (if 6/6 shots hit) plus ignite. Efficient only if you hit with at least 4/6 of the shots. /obj/item/ammo_casing/energy/electrode projectile_type = /obj/item/projectile/energy/electrode diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 5514ef5c72d..12e08eb51b9 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -187,7 +187,7 @@ if(istype(user)) if((CLUMSY in user.mutations) && prob(40)) to_chat(user, "You shoot yourself in the foot with \the [src]!") - var/shot_leg = pick("l_foot", "r_foot") + var/shot_leg = pick(BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT) process_fire(user, user, 0, params, zone_override = shot_leg) user.drop_from_active_hand() return @@ -502,7 +502,7 @@ button_icon_state = "sniper_zoom" var/obj/item/gun/gun = null -/datum/action/toggle_scope_zoom/Trigger() +/datum/action/toggle_scope_zoom/Trigger(left_click = TRUE) gun.zoom(owner) /datum/action/toggle_scope_zoom/IsAvailable() diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index 3926a2a16fb..5531a4887a0 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -60,7 +60,7 @@ to_chat(user, "Вы успешно открутили шурупы мода Sibyl System от [src].") else var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? "l_hand" : "r_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.apply_damage(5, BRUTE , affecting) user.emote("scream") to_chat(user, "Проклятье! [I] сорвалась и повредила [affecting.name]!") @@ -83,7 +83,7 @@ to_chat(user, "Вы успешно разварили болты мода Sibyl System от [src].") else var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? "l_hand" : "r_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.apply_damage(10, BURN , affecting) user.emote("scream") to_chat(user, "Проклятье! [I] дёрнулась и прожгла [affecting.name]!") @@ -102,7 +102,7 @@ to_chat(user, "Вы успешно отковыряли болты мода Sibyl System от [src].") else var/mob/living/carbon/human/H = user - var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? "l_hand" : "r_hand") + var/obj/item/organ/external/affecting = H.get_organ(user.r_hand == I ? BODY_ZONE_PRECISE_L_HAND : BODY_ZONE_PRECISE_R_HAND) user.apply_damage(5, BRUTE , affecting) user.emote("scream") to_chat(user, "Проклятье! [I] соскальзнула и повредила [affecting.name]!") diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index bd0e00de65d..c4875eefc15 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -337,7 +337,7 @@ item_state = null weapon_weight = WEAPON_HEAVY slot_flags = SLOT_BACK - w_class = WEIGHT_CLASS_BULKY + w_class = WEIGHT_CLASS_NORMAL can_holster = FALSE zoomable = TRUE zoom_amt = 7 //Long range, enough to see in front of you, but no tiles behind you. diff --git a/code/modules/projectiles/guns/medbeam.dm b/code/modules/projectiles/guns/medbeam.dm index e6257119ac6..137a2bf65d1 100644 --- a/code/modules/projectiles/guns/medbeam.dm +++ b/code/modules/projectiles/guns/medbeam.dm @@ -99,19 +99,19 @@ qdel(dummy) return 1 -/obj/item/gun/medbeam/proc/on_beam_hit(var/mob/living/target) +/obj/item/gun/medbeam/proc/on_beam_hit(mob/living/target) return -/obj/item/gun/medbeam/proc/on_beam_tick(var/mob/living/target) +/obj/item/gun/medbeam/proc/on_beam_tick(mob/living/target) target.adjustBruteLoss(-4) target.adjustFireLoss(-4) if(ishuman(target)) var/mob/living/carbon/human/H = target - for(var/obj/item/organ/external/E in H.bodyparts) + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) if(prob(10)) - E.mend_fracture() + bodypart.mend_fracture() -/obj/item/gun/medbeam/proc/on_beam_release(var/mob/living/target) +/obj/item/gun/medbeam/proc/on_beam_release(mob/living/target) return /obj/effect/ebeam/medical diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm index 4e301d0ace4..8cb7c95df60 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -166,7 +166,7 @@ user.visible_message("[user] is putting the barrel of the [name] in [user.p_their()] mouth. It looks like [user.p_theyre()] trying to commit suicide.") sleep(25) if(user.l_hand == src || user.r_hand == src) - process_fire(user, user, 0, zone_override = "head") + process_fire(user, user, 0, zone_override = BODY_ZONE_HEAD) user.visible_message("[user] blows [user.p_their()] brains out with the [name]!") return BRUTELOSS else diff --git a/code/modules/projectiles/guns/projectile/revolver.dm b/code/modules/projectiles/guns/projectile/revolver.dm index 4bdd959ecbb..5b6adb143e6 100644 --- a/code/modules/projectiles/guns/projectile/revolver.dm +++ b/code/modules/projectiles/guns/projectile/revolver.dm @@ -282,7 +282,7 @@ if(AC.fire(user, user, firer_source_atom = src)) playsound(user, fire_sound, 50, 1) var/zone = check_zone(user.zone_selected) - if(zone == "head" || zone == "eyes" || zone == "mouth") + if(zone == BODY_ZONE_HEAD || zone == BODY_ZONE_PRECISE_EYES || zone == BODY_ZONE_PRECISE_MOUTH) shoot_self(user, zone) else user.visible_message(span_danger("[user.name] cowardly fires [src] at [user.p_their()] [zone]!"), span_userdanger("You cowardly fire [src] at your [zone]!"), span_italics("You hear a gunshot!")) @@ -291,7 +291,7 @@ user.visible_message(span_danger("*click*")) playsound(user, 'sound/weapons/empty.ogg', 100, 1) -/obj/item/gun/projectile/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = "head") +/obj/item/gun/projectile/revolver/russian/proc/shoot_self(mob/living/carbon/human/user, affecting = BODY_ZONE_HEAD) user.apply_damage(300, BRUTE, affecting) user.visible_message(span_danger("[user.name] fires [src] at [user.p_their()] head!"), span_userdanger("You fire [src] at your head!"), span_italics("You hear a gunshot!")) diff --git a/code/modules/projectiles/guns/projectile/shotgun.dm b/code/modules/projectiles/guns/projectile/shotgun.dm index 5c4297c12de..854a65a6ec0 100644 --- a/code/modules/projectiles/guns/projectile/shotgun.dm +++ b/code/modules/projectiles/guns/projectile/shotgun.dm @@ -18,7 +18,7 @@ . = ..() if(.) return - if(istype(A, /obj/item/ammo_box/speedloader/shotgun) || istype(A, /obj/item/ammo_casing)) + if(istype(A, /obj/item/ammo_box/speedloader) || istype(A, /obj/item/ammo_casing)) var/num_loaded = magazine.attackby(A, user, params, 1) if(num_loaded) to_chat(user, "You load [num_loaded] shell\s into \the [src]!") diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index 63e988d297d..96490a38a95 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -265,7 +265,7 @@ if(get_dist(A, original) <= 1) def_zone = ran_zone(def_zone, max(100 - (7 * distance), 5)) //Lower accurancy/longer range tradeoff. 7 is a balanced number to use. else - def_zone = pick(list("head", "chest", "l_arm", "r_arm", "l_leg", "r_leg")) // If we were aiming at one target but another one got hit, no accuracy is applied + def_zone = pick(list(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)) // If we were aiming at one target but another one got hit, no accuracy is applied if(isturf(A) && hitsound_wall) var/volume = clamp(vol_by_damage() + 20, 0, 100) diff --git a/code/modules/projectiles/projectile/beams.dm b/code/modules/projectiles/projectile/beams.dm index e64e3d5842a..621ce8522c8 100644 --- a/code/modules/projectiles/projectile/beams.dm +++ b/code/modules/projectiles/projectile/beams.dm @@ -157,6 +157,10 @@ damage = 8 icon_state = "scatterlaser" +/obj/item/projectile/beam/immolator/mech + name = "mecha immolation beam" + damage = 15 + /obj/item/projectile/beam/immolator/on_hit(var/atom/target, var/blocked = 0) . = ..() if(istype(target, /mob/living/carbon)) diff --git a/code/modules/reagents/chemistry/holder.dm b/code/modules/reagents/chemistry/holder.dm index b9e443e19b0..ac6c16325e5 100644 --- a/code/modules/reagents/chemistry/holder.dm +++ b/code/modules/reagents/chemistry/holder.dm @@ -561,7 +561,7 @@ if(react_type == "LIVING" && ishuman(A)) var/mob/living/carbon/human/H = A if(method == REAGENT_TOUCH) - var/obj/item/organ/external/head/affecting = H.get_organ("head") + var/obj/item/organ/external/head/affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting) if(chem_temp > H.dna.species.heat_level_1) var/mult = H.dna.species.heatmod diff --git a/code/modules/reagents/chemistry/reagents/admin.dm b/code/modules/reagents/chemistry/reagents/admin.dm index aeaffa9dfcb..531abd930ff 100644 --- a/code/modules/reagents/chemistry/reagents/admin.dm +++ b/code/modules/reagents/chemistry/reagents/admin.dm @@ -18,12 +18,11 @@ M.setBrainLoss(0, FALSE) if(ishuman(M)) var/mob/living/carbon/human/H = M - for(var/thing in H.internal_organs) - var/obj/item/organ/internal/I = thing - I.receive_damage(-5, FALSE) - for(var/obj/item/organ/external/E in H.bodyparts) - E.mend_fracture() - E.internal_bleeding = FALSE + for(var/obj/item/organ/internal/organ as anything in H.internal_organs) + organ.receive_damage(-5, FALSE) + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + bodypart.mend_fracture() + bodypart.stop_internal_bleeding() M.SetEyeBlind(0) M.CureNearsighted(FALSE) M.CureBlind(FALSE) diff --git a/code/modules/reagents/chemistry/reagents/alcohol.dm b/code/modules/reagents/chemistry/reagents/alcohol.dm index 7bde6e3404b..84543f0ef9a 100644 --- a/code/modules/reagents/chemistry/reagents/alcohol.dm +++ b/code/modules/reagents/chemistry/reagents/alcohol.dm @@ -2104,10 +2104,9 @@ taste_description = "electromagnetic impulse" /datum/reagent/consumable/ethanol/irishempbomb/on_mob_life(mob/living/M) - var/update_flags = STATUS_UPDATE_NONE - update_flags |= M.Stun(1, FALSE) + M.Stun(1, FALSE) do_sparks(5, FALSE, M.loc) - return ..() | update_flags + return ..() /datum/reagent/consumable/ethanol/codelibre name = "Code Libre" diff --git a/code/modules/reagents/chemistry/reagents/drugs.dm b/code/modules/reagents/chemistry/reagents/drugs.dm index b3a5d4edd42..edb2ef7d252 100644 --- a/code/modules/reagents/chemistry/reagents/drugs.dm +++ b/code/modules/reagents/chemistry/reagents/drugs.dm @@ -455,7 +455,7 @@ var/update_flags = STATUS_UPDATE_NONE if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) if(check < 8 && head_organ.h_style != "Very Long Beard") head_organ.h_style = "Very Long Hair" head_organ.f_style = "Very Long Beard" diff --git a/code/modules/reagents/chemistry/reagents/food.dm b/code/modules/reagents/chemistry/reagents/food.dm index b523dd0faf8..be474044f91 100644 --- a/code/modules/reagents/chemistry/reagents/food.dm +++ b/code/modules/reagents/chemistry/reagents/food.dm @@ -638,7 +638,7 @@ /datum/reagent/consumable/onion/reaction_mob(mob/living/M, method = REAGENT_TOUCH, volume) if(method == REAGENT_TOUCH) if(!M.is_mouth_covered() && !M.is_eyes_covered()) - if(!M.get_organ_slot("eyes")) //can't blind somebody with no eyes + if(!M.get_organ_slot(INTERNAL_ORGAN_EYES)) //can't blind somebody with no eyes to_chat(M, "Your eye sockets feel wet.") else if(!M.AmountEyeBlurry()) diff --git a/code/modules/reagents/chemistry/reagents/medicine.dm b/code/modules/reagents/chemistry/reagents/medicine.dm index 6a8e9fbe0ff..d83c0771c66 100644 --- a/code/modules/reagents/chemistry/reagents/medicine.dm +++ b/code/modules/reagents/chemistry/reagents/medicine.dm @@ -105,10 +105,9 @@ var/mob/living/carbon/human/H = M //Mitocholide is hard enough to get, it's probably fair to make this all internal organs - for(var/obj/item/organ/internal/I in H.internal_organs) - if(I.status & ORGAN_DEAD) - I.status &= ~ORGAN_DEAD - I.heal_internal_damage(0.4) + for(var/obj/item/organ/internal/organ as anything in H.internal_organs) + organ.unnecrotize() + organ.heal_internal_damage(0.4) return ..() /datum/reagent/medicine/mitocholide/reaction_obj(obj/O, volume) @@ -137,9 +136,8 @@ update_flags |= M.adjustFireLoss(-4, FALSE) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head = H.get_organ("head") - if(head) - head.disfigured = FALSE + var/obj/item/organ/external/head/head = H.get_organ(BODY_ZONE_HEAD) + head?.undisfigure() return ..() | update_flags /datum/reagent/medicine/cryoxadone/on_merge(list/mix_data) @@ -162,9 +160,8 @@ update_flags |= M.adjustFireLoss(-1, FALSE) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head = H.get_organ("head") - if(head) - head.disfigured = FALSE + var/obj/item/organ/external/head/head = H.get_organ(BODY_ZONE_HEAD) + head?.undisfigure() return ..() | update_flags /datum/reagent/medicine/rezadone/overdose_process(mob/living/M, severity) @@ -193,14 +190,13 @@ var/mob/living/carbon/human/H = M organs_list += H.bodyparts - for(var/X in organs_list) - var/obj/item/organ/O = X - if(O.germ_level < INFECTION_LEVEL_ONE) - O.germ_level = 0 //cure instantly - else if(O.germ_level < INFECTION_LEVEL_TWO) - O.germ_level = max(M.germ_level - 25, 0) //at germ_level == 500, this should cure the infection in 34 seconds + for(var/obj/item/organ/organ as anything in organs_list) + if(organ.germ_level < INFECTION_LEVEL_ONE) + organ.germ_level = 0 //cure instantly + else if(organ.germ_level < INFECTION_LEVEL_TWO) + organ.germ_level = max(M.germ_level - 25, 0) //at germ_level == 500, this should cure the infection in 34 seconds else - O.germ_level = max(M.germ_level - 10, 0) // at germ_level == 1000, this will cure the infection in 1 minutes, 14 seconds + organ.germ_level = max(M.germ_level - 10, 0) // at germ_level == 1000, this will cure the infection in 1 minutes, 14 seconds organs_list.Cut() M.germ_level = max(M.germ_level - 20, 0) // Reduces the mobs germ level, too @@ -466,8 +462,13 @@ if(prob(75)) update_flags |= M.adjustToxLoss(-2, FALSE) if(prob(33)) - update_flags |= M.adjustBruteLoss(0.5, FALSE) - update_flags |= M.adjustFireLoss(0.5, FALSE) + if(ishuman(M)) + var/mob/living/carbon/human/human = M + human.take_overall_damage(0.5, 0.5, FALSE, affect_robotic = FALSE) + else + update_flags |= M.adjustBruteLoss(0.5, FALSE) + update_flags |= M.adjustFireLoss(0.5, FALSE) + return ..() | update_flags /datum/reagent/medicine/sal_acid @@ -665,12 +666,12 @@ if(prob(80)) if(iscarbon(M)) var/mob/living/carbon/C = M - var/obj/item/organ/internal/eyes/E = C.get_int_organ(/obj/item/organ/internal/eyes) - if(istype(E) && !(E.status & ORGAN_DEAD)) - E.heal_internal_damage(1) + var/obj/item/organ/internal/eyes/eyes = C.get_int_organ(/obj/item/organ/internal/eyes) + if(eyes && !eyes.is_dead()) + eyes.heal_internal_damage(1) update_flags |= M.AdjustEyeBlurry(-2 SECONDS) var/obj/item/organ/internal/ears/ears = C.get_int_organ(/obj/item/organ/internal/ears) - if(istype(ears) && !(ears.status & ORGAN_DEAD)) + if(ears && !ears.is_dead()) ears.heal_internal_damage(1) if(ears.damage < 25 && prob(30)) C.SetDeaf(0) @@ -817,15 +818,14 @@ if(ishuman(M)) var/mob/living/carbon/human/H = M var/necrosis_prob = 40 * min((20 MINUTES), max((time_dead - (1 MINUTES)), 0)) / ((20 MINUTES) - (1 MINUTES)) - for(var/obj/item/organ/O in (H.bodyparts | H.internal_organs)) + for(var/obj/item/organ/organ as anything in (H.bodyparts|H.internal_organs)) // Per non-vital body part: // 0% chance of necrosis within 1 minute of death // 40% chance of necrosis after 20 minutes of death - if(!O.vital && prob(necrosis_prob)) + if(!organ.vital && prob(necrosis_prob)) // side effects may include: Organ failure - O.necrotize(FALSE) - if(O.status & ORGAN_DEAD) - O.germ_level = INFECTION_LEVEL_THREE + if(organ.necrotize()) + organ.germ_level = INFECTION_LEVEL_THREE H.update_body() M.update_revive(TRUE, TRUE) @@ -1337,19 +1337,18 @@ if(has_stimulant == TRUE) return ..() else - for(var/obj/item/organ/external/E in M.bodyparts) + for(var/obj/item/organ/external/bodypart as anything in M.bodyparts) if(prob(25)) // Each tick has a 25% chance of repearing a bone. - if(E.status & (ORGAN_BROKEN | ORGAN_SPLINTED)) //I can't just check for !E.status - to_chat(M, "You feel a burning sensation in your [E.name] as it straightens involuntarily!") - E.rejuvenate() //Repair it completely. - if(E.internal_bleeding) - to_chat(M, "You feel a burning sensation in your [E.name] as your veins begin to recover!") - E.internal_bleeding = FALSE - + if(bodypart.has_fracture()) //I can't just check for !E.status + to_chat(M, "You feel a burning sensation in your [bodypart.name] as it straightens involuntarily!") + bodypart.rejuvenate() //Repair it completely. + if(bodypart.has_internal_bleeding()) + to_chat(M, "You feel a burning sensation in your [bodypart.name] as your veins begin to recover!") + bodypart.stop_internal_bleeding() if(ishuman(M)) var/mob/living/carbon/human/H = M - for(var/obj/item/organ/internal/I in M.internal_organs) // 60 healing to all internal organs. + for(var/obj/item/organ/internal/I as anything in M.internal_organs) // 60 healing to all internal organs. I.heal_internal_damage(4) if(H.blood_volume < BLOOD_VOLUME_NORMAL * 0.9)// If below 90% blood, regenerate 225 units total H.blood_volume += 15 diff --git a/code/modules/reagents/chemistry/reagents/misc.dm b/code/modules/reagents/chemistry/reagents/misc.dm index e150bb77523..a7e149d608d 100644 --- a/code/modules/reagents/chemistry/reagents/misc.dm +++ b/code/modules/reagents/chemistry/reagents/misc.dm @@ -334,7 +334,7 @@ /datum/reagent/hair_dye/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) head_organ.facial_colour = rand_hex_color() head_organ.sec_facial_colour = rand_hex_color() head_organ.hair_colour = rand_hex_color() @@ -355,7 +355,7 @@ /datum/reagent/hairgrownium/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) head_organ.h_style = random_hair_style(H.gender, head_organ.dna.species.name) head_organ.f_style = random_facial_hair_style(H.gender, head_organ.dna.species.name) H.update_hair() @@ -374,7 +374,7 @@ /datum/reagent/super_hairgrownium/reaction_mob(mob/living/M, volume) if(ishuman(M)) var/mob/living/carbon/human/H = M - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) var/datum/sprite_accessory/tmp_hair_style = GLOB.hair_styles_full_list["Very Long Hair"] var/datum/sprite_accessory/tmp_facial_hair_style = GLOB.facial_hair_styles_list["Very Long Beard"] diff --git a/code/modules/reagents/chemistry/reagents/ninja.dm b/code/modules/reagents/chemistry/reagents/ninja.dm index e2a9fabae5b..692861691c1 100644 --- a/code/modules/reagents/chemistry/reagents/ninja.dm +++ b/code/modules/reagents/chemistry/reagents/ninja.dm @@ -75,21 +75,18 @@ // Regrow limbs if(current_cycle == 30) to_chat(mob_human, span_notice("Your body refreshes...")) - mob_human.check_and_regenerate_organs(mob_human) + mob_human.check_and_regenerate_organs() // Embedded objects - if(mob_human.has_embedded_objects()) - mob_human.remove_all_embedded_objects() + mob_human.remove_all_embedded_objects() // Organs - for(var/obj/item/organ/internal/internal_organ in mob_human.internal_organs) + for(var/obj/item/organ/internal/internal_organ as anything in mob_human.internal_organs) if(prob(20)) internal_organ.rejuvenate() internal_organ.receive_damage(-5, FALSE) // Bones - for(var/obj/item/organ/external/external_organ in mob_human.bodyparts) + for(var/obj/item/organ/external/external_organ as anything in mob_human.bodyparts) if(prob(20)) external_organ.rejuvenate() - external_organ.mend_fracture() - external_organ.internal_bleeding = FALSE //Eyes and Ears internal damage var/obj/item/organ/internal/eyes/our_eyes = mob_human.get_int_organ(/obj/item/organ/internal/eyes) if(istype(our_eyes)) diff --git a/code/modules/reagents/chemistry/reagents/toxins.dm b/code/modules/reagents/chemistry/reagents/toxins.dm index 1329cdd3dca..a65eb53ddd3 100644 --- a/code/modules/reagents/chemistry/reagents/toxins.dm +++ b/code/modules/reagents/chemistry/reagents/toxins.dm @@ -353,7 +353,7 @@ if(prob(75)) H.take_organ_damage(5, 10) H.emote("scream") - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting) affecting.disfigure() else @@ -397,13 +397,13 @@ if(volume >= 5) var/damage_coef = 0 var/isDamaged = FALSE - for(var/limb in H.bodyparts) - var/obj/item/organ/external/E = limb - damage_coef = (100 - clamp(H.getarmor_organ(E, "acid"), 0, 100))/100 + for(var/obj/item/organ/external/bodypart as anything in H.bodyparts) + damage_coef = (100 - clamp(H.getarmor_organ(bodypart, "acid"), 0, 100))/100 if(damage_coef > 0 && !isDamaged) isDamaged = TRUE - H.emote("scream") - E.receive_damage(0, clamp((volume - 5) * 3, 8, 75) * damage_coef / H.bodyparts.len) + if(H.has_pain()) + H.emote("scream") + bodypart.receive_damage(0, clamp((volume - 5) * 3, 8, 75) * damage_coef / length(H.bodyparts)) if(volume > 9 && (H.wear_mask || H.head)) if(H.wear_mask && !(H.wear_mask.resistance_flags & ACID_PROOF)) @@ -436,7 +436,7 @@ if(H.wear_mask || H.head) return if(volume >= 50 && prob(75)) - var/obj/item/organ/external/affecting = H.get_organ("head") + var/obj/item/organ/external/affecting = H.get_organ(BODY_ZONE_HEAD) if(affecting) affecting.disfigure() H.adjustBruteLoss(5) diff --git a/code/modules/reagents/chemistry/reagents/water.dm b/code/modules/reagents/chemistry/reagents/water.dm index 1b6e9a91087..ae147aec92f 100644 --- a/code/modules/reagents/chemistry/reagents/water.dm +++ b/code/modules/reagents/chemistry/reagents/water.dm @@ -61,11 +61,14 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list( process_flags = ORGANIC | SYNTHETIC taste_description = "floor cleaner" + /datum/reagent/space_cleaner/reaction_obj(obj/O, volume) - if(is_cleanable(O)) - var/obj/effect/decal/cleanable/blood/B = O - if(!(istype(B) && B.off_floor)) - qdel(O) + if(iseffect(O)) + var/obj/effect/E = O + if(E.is_cleanable()) + var/obj/effect/decal/cleanable/blood/B = E + if(!(istype(B) && B.off_floor)) + qdel(E) else if(O.simulated) O.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) @@ -74,6 +77,7 @@ GLOBAL_LIST_INIT(diseases_carrier_reagents, list( H.helmet.remove_atom_colour(WASHABLE_COLOUR_PRIORITY) O.clean_blood() + /datum/reagent/space_cleaner/reaction_turf(turf/T, volume) if(volume >= 1) var/floor_only = TRUE diff --git a/code/modules/reagents/reagent_containers/iv_bag.dm b/code/modules/reagents/reagent_containers/iv_bag.dm index cb0f9e3f291..798fb060ac1 100644 --- a/code/modules/reagents/reagent_containers/iv_bag.dm +++ b/code/modules/reagents/reagent_containers/iv_bag.dm @@ -65,7 +65,7 @@ if(get_dist(get_turf(src), get_turf(injection_target)) > 1) to_chat(injection_target, "The [src]'s' needle is ripped out of you!") - injection_target.apply_damage(3, BRUTE, pick("r_arm", "l_arm")) + injection_target.apply_damage(3, BRUTE, pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)) end_processing() return diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index 5052fc9223b..7c9abe19c36 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -26,7 +26,7 @@ /obj/item/reagent_containers/food/pill/attack(mob/living/carbon/M, mob/user, def_zone) if(!istype(M)) return FALSE - if(!get_location_accessible(M, "mouth")) + if(!get_location_accessible(M, BODY_ZONE_PRECISE_MOUTH)) if(M == user) to_chat(user, "Your face is obscured, so you cant eat.") else diff --git a/code/modules/recycling/disposal.dm b/code/modules/recycling/disposal.dm index 0c9d5134230..479cfe0782a 100644 --- a/code/modules/recycling/disposal.dm +++ b/code/modules/recycling/disposal.dm @@ -581,7 +581,7 @@ /obj/machinery/disposal/deliveryChute/Bumped(atom/movable/moving_atom) //Go straight into the chute ..() - if(istype(moving_atom, /obj/item/projectile)) return + if(istype(moving_atom, /obj/item/projectile) || istype(moving_atom, /obj/effect)) return switch(dir) if(NORTH) if(moving_atom.loc.y != src.loc.y+1) return @@ -1469,6 +1469,8 @@ //When the disposalsoutlet is forcefully moved. Due to meteorshot or the recall item spell for instance /obj/structure/disposaloutlet/Moved(atom/OldLoc, Dir) . = ..() + if(!loc) + return var/turf/T = OldLoc if(T.intact) var/turf/simulated/floor/F = T diff --git a/code/modules/research/designs/medical_designs.dm b/code/modules/research/designs/medical_designs.dm index e69ea09de62..4473b595349 100644 --- a/code/modules/research/designs/medical_designs.dm +++ b/code/modules/research/designs/medical_designs.dm @@ -581,7 +581,7 @@ req_tech = list("materials" = 2, "biotech" = 3, "magnets" = 3, "programming" = 2) build_type = PROTOLATHE materials = list(MAT_METAL = 500, MAT_GLASS = 500) - build_path = /obj/item/implantcase/track + build_path = /obj/item/implantcase/tracking category = list("Medical") /datum/design/implant_mindshield diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index ef81f6ec415..ab51b4b564c 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -261,7 +261,7 @@ if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) visible_message("[src] malfunctions and destroys [exp_on], lashing its arms out at nearby people!") for(var/mob/living/m in oview(1, src)) - m.apply_damage(15,BRUTE,pick("head","chest","groin")) + m.apply_damage(15,BRUTE,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) investigate_log("Experimentor dealt minor brute to [key_name_log(m)].", INVESTIGATE_EXPERIMENTOR) ejectItem(TRUE) if(prob(EFFECT_PROB_LOW-badThingCoeff)) @@ -398,7 +398,7 @@ visible_message("[src] malfunctions, activating its emergency coolant systems!") throwSmoke(src.loc) for(var/mob/living/m in oview(1, src)) - m.apply_damage(5,BURN,pick("head","chest","groin")) + m.apply_damage(5,BURN,pick(BODY_ZONE_HEAD, BODY_ZONE_CHEST, BODY_ZONE_PRECISE_GROIN)) investigate_log("Experimentor has dealt minor burn damage to [key_name_log(m)]", INVESTIGATE_EXPERIMENTOR) ejectItem() //////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/code/modules/response_team/ert.dm b/code/modules/response_team/ert.dm index 151a6031f50..9b989b1b001 100644 --- a/code/modules/response_team/ert.dm +++ b/code/modules/response_team/ert.dm @@ -145,7 +145,7 @@ GLOBAL_VAR_INIT(ert_request_answered, FALSE) return R var/mob/living/carbon/human/M = new(null) - var/obj/item/organ/external/head/head_organ = M.get_organ("head") + var/obj/item/organ/external/head/head_organ = M.get_organ(BODY_ZONE_HEAD) if(new_gender) if(new_gender == "Male") diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index 08c2e9b41aa..c91c0c17644 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -37,11 +37,11 @@ projone.starting = get_turf(my_atom) projone.firer = usr projone.firer_source_atom = src - projone.def_zone = "chest" + projone.def_zone = BODY_ZONE_CHEST projtwo.starting = get_turf(my_atom) projtwo.firer = usr projtwo.firer_source_atom = src - projtwo.def_zone = "chest" + projtwo.def_zone = BODY_ZONE_CHEST spawn() playsound(src, fire_sound, 50, 1) projone.dumbfire(my_atom.dir) diff --git a/code/modules/station_goals/brs/brs_reward.dm b/code/modules/station_goals/brs/brs_reward.dm index cd2be73ac98..819a5118965 100644 --- a/code/modules/station_goals/brs/brs_reward.dm +++ b/code/modules/station_goals/brs/brs_reward.dm @@ -61,7 +61,7 @@ /obj/item/stack/sheet/mineral/bananium/fifty = 100, /obj/item/stack/sheet/mineral/tranquillite/fifty = 100, /obj/item/stack/sheet/mineral/abductor/fifty = 60, - /obj/item/stack/telecrystal = 30, + /obj/item/stack/telecrystal/five = 30, // Items /obj/item/storage/box/beakers/bluespace = 40, @@ -105,7 +105,7 @@ /obj/vehicle/space/speedbike/red = 10, /obj/vehicle/space/speedbike = 10, /obj/vehicle/car, - + //Toys /obj/item/toy/syndicateballoon = 5, /obj/item/gun/projectile/automatic/c20r/toy, diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index c77b7dcf225..77132470d84 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -6,22 +6,48 @@ /datum/surgery/bone_repair name = "Bone Repair" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone, /datum/surgery_step/finish_bone, /datum/surgery_step/generic/cauterize) - possible_locs = list("chest", "l_arm", "l_hand", "r_arm", "r_hand","r_leg", "r_foot", "l_leg", "l_foot", "groin", "tail", "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/bone_repair/plasmaman name = "Plasmaman Bone Repair" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone/plasma, /datum/surgery_step/generic/cauterize) - possible_locs = list("chest", "l_arm", "l_hand", "r_arm", "r_hand","r_leg", "r_foot", "l_leg", "l_foot", "groin", "tail", "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/bone_repair/skull name = "Skull Repair" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone, /datum/surgery_step/mend_skull, /datum/surgery_step/finish_bone, /datum/surgery_step/generic/cauterize) - possible_locs = list("head") + possible_locs = list(BODY_ZONE_HEAD) /datum/surgery/bone_repair/plasmaman/skull name = "Plasmaman Skull Repair" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/glue_bone/plasma, /datum/surgery_step/generic/cauterize) - possible_locs = list("head") + possible_locs = list(BODY_ZONE_HEAD) /datum/surgery/bone_repair/can_start(mob/user, mob/living/carbon/target) if(istype(target,/mob/living/carbon/human)) @@ -35,7 +61,7 @@ return 0 if(affected.cannot_break) return 0 - if(affected.status & ORGAN_BROKEN) + if(affected.has_fracture()) return 1 return 1 @@ -51,7 +77,7 @@ return 0 if(affected.cannot_break) return 0 - if(affected.status & ORGAN_BROKEN) + if(affected.has_fracture()) return 1 if(isplasmaman(H)) return 1 @@ -136,7 +162,7 @@ /datum/surgery_step/set_bone/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(affected.status & ORGAN_BROKEN) + if(affected.has_fracture()) user.visible_message(" [user] sets the bone in [target]'s [affected.name] in place with \the [tool].", \ " You set the bone in [target]'s [affected.name] in place with \the [tool].") return 1 @@ -164,7 +190,7 @@ /datum/surgery_step/mend_skull/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool) var/obj/item/organ/external/affected = target.get_organ(target_zone) - return affected && !affected.is_robotic() && affected.limb_name == "head" + return affected && !affected.is_robotic() && affected.limb_zone == BODY_ZONE_HEAD /datum/surgery_step/mend_skull/begin_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool) user.visible_message("[user] is beginning piece together [target]'s skull with \the [tool]." , \ diff --git a/code/modules/surgery/cavity_implant.dm b/code/modules/surgery/cavity_implant.dm index 1cda85b60c9..a52912e9d6e 100644 --- a/code/modules/surgery/cavity_implant.dm +++ b/code/modules/surgery/cavity_implant.dm @@ -2,36 +2,50 @@ name = "Cavity Implant/Removal" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/open_encased/retract, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/open_encased/close,/datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + ) /datum/surgery/cavity_implant/soft name = "Cavity Implant/Removal" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/cut_open, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/generic/cauterize) - possible_locs = list("groin") + possible_locs = list(BODY_ZONE_PRECISE_GROIN) /datum/surgery/cavity_implant/insect name = "Insectoid Cavity Implant/Removal" steps = list(/datum/surgery_step/open_encased/saw, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/open_encased/close,/datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head", "groin") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_PRECISE_GROIN, + ) /datum/surgery/cavity_implant/plasmaman name = "Plasmaman Cavity Implant/Removal" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/open_encased/retract, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/open_encased/close,/datum/surgery_step/glue_bone/plasma,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + ) /datum/surgery/cavity_implant/plasmaman/soft steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/cut_open, /datum/surgery_step/cavity/make_space,/datum/surgery_step/cavity/place_item,/datum/surgery_step/cavity/close_space,/datum/surgery_step/generic/cauterize) - possible_locs = list("groin") + possible_locs = list(BODY_ZONE_PRECISE_GROIN) /datum/surgery/cavity_implant/synth name = "Robotic Cavity Implant/Removal" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/cavity/place_item,/datum/surgery_step/robotics/external/close_hatch) - possible_locs = list("chest","head","groin") requires_organic_bodypart = 0 + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_PRECISE_GROIN, + ) /datum/surgery/cavity_implant/can_start(mob/user, mob/living/carbon/human/target) var/mob/living/carbon/human/H = target @@ -84,22 +98,22 @@ priority = 1 /datum/surgery_step/cavity/proc/get_max_wclass(obj/item/organ/external/affected) - switch(affected.limb_name) - if("head") + switch(affected.limb_zone) + if(BODY_ZONE_HEAD) return 1 - if("chest") + if(BODY_ZONE_CHEST) return 3 - if("groin") + if(BODY_ZONE_PRECISE_GROIN) return 2 return 0 /datum/surgery_step/cavity/proc/get_cavity(obj/item/organ/external/affected) - switch(affected.limb_name) - if("head") + switch(affected.limb_zone) + if(BODY_ZONE_HEAD) return "cranial" - if("chest") + if(BODY_ZONE_CHEST) return "thoracic" - if("groin") + if(BODY_ZONE_PRECISE_GROIN) return "abdominal" return "" @@ -232,10 +246,8 @@ else user.visible_message(" [user] puts \the [tool] inside [target]'s [get_cavity(affected)] cavity.", \ " You put \the [tool] inside [target]'s [get_cavity(affected)] cavity." ) - if((tool.w_class > get_max_wclass(affected) / 2 && prob(50) && !affected.is_robotic())) + if((tool.w_class > get_max_wclass(affected) / 2 && prob(50)) && affected.internal_bleeding()) to_chat(user, " You tear some vessels trying to fit the object in the cavity.") - affected.internal_bleeding = TRUE - affected.owner.custom_pain("You feel something rip in your [affected.name]!") user.drop_transfer_item_to_loc(tool, affected) affected.hidden = tool tool.forceMove(affected) diff --git a/code/modules/surgery/core_removal.dm b/code/modules/surgery/core_removal.dm index a54aa25d228..98b6f98fe1d 100644 --- a/code/modules/surgery/core_removal.dm +++ b/code/modules/surgery/core_removal.dm @@ -2,7 +2,21 @@ name = "core removal" steps = list(/datum/surgery_step/slime/cut_flesh, /datum/surgery_step/slime/extract_core) allowed_mob = list(/mob/living/simple_animal/slime) - possible_locs = list("chest", "head", "l_arm", "l_hand", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "groin") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery_step/slime diff --git a/code/modules/surgery/dental_implant.dm b/code/modules/surgery/dental_implant.dm index 38caae724ff..454a6d10837 100644 --- a/code/modules/surgery/dental_implant.dm +++ b/code/modules/surgery/dental_implant.dm @@ -1,7 +1,7 @@ /datum/surgery/dental_implant name = "dental implant" steps = list(/datum/surgery_step/generic/drill, /datum/surgery_step/insert_pill) - possible_locs = list("mouth") + possible_locs = list(BODY_ZONE_PRECISE_MOUTH) /datum/surgery/dental_implant/can_start(mob/user, mob/living/carbon/target) if(istype(target,/mob/living/carbon/human)) @@ -44,7 +44,7 @@ /datum/action/item_action/hands_free/activate_pill name = "Activate Pill" -/datum/action/item_action/hands_free/activate_pill/Trigger() +/datum/action/item_action/hands_free/activate_pill/Trigger(left_click = TRUE) if(!..()) return to_chat(owner, "You grit your teeth and burst the implanted [target]!") diff --git a/code/modules/surgery/encased.dm b/code/modules/surgery/encased.dm index 54652741cc3..78a2ad839e9 100644 --- a/code/modules/surgery/encased.dm +++ b/code/modules/surgery/encased.dm @@ -49,7 +49,7 @@ user.visible_message(" [user] has cut [target]'s [affected.encased] open with \the [tool].", \ " You have cut [target]'s [affected.encased] open with \the [tool].") - affected.fracture() + affected.fracture(silent = TRUE) affected.open = 2.5 return 1 diff --git a/code/modules/surgery/generic.dm b/code/modules/surgery/generic.dm index b8032fe8bf9..220c9d8bcac 100644 --- a/code/modules/surgery/generic.dm +++ b/code/modules/surgery/generic.dm @@ -105,7 +105,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = "[user] starts to pry open the incision on [target]'s [affected.name] with \the [tool]." var/self_msg = "You start to pry open the incision on [target]'s [affected.name] with \the [tool]." - if(target_zone == "chest") + if(target_zone == BODY_ZONE_CHEST) msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with \the [tool]." if(target_zone == "groin") @@ -119,7 +119,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = " [user] keeps the incision open on [target]'s [affected.name] with \the [tool]." var/self_msg = " You keep the incision open on [target]'s [affected.name] with \the [tool]." - if(target_zone == "chest") + if(target_zone == BODY_ZONE_CHEST) msg = " [user] keeps the ribcage open on [target]'s torso with \the [tool]." self_msg = " You keep the ribcage open on [target]'s torso with \the [tool]." if(target_zone == "groin") @@ -133,7 +133,7 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/msg = " [user]'s hand slips, tearing the edges of incision on [target]'s [affected.name] with \the [tool]!" var/self_msg = " Your hand slips, tearing the edges of incision on [target]'s [affected.name] with \the [tool]!" - if(target_zone == "chest") + if(target_zone == BODY_ZONE_CHEST) msg = " [user]'s hand slips, damaging several organs [target]'s torso with \the [tool]!" self_msg = " Your hand slips, damaging several organs [target]'s torso with \the [tool]!" if(target_zone == "groin") @@ -208,13 +208,13 @@ time = 100 /datum/surgery_step/generic/amputate/can_use(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - if(target_zone == "eyes") //there are specific steps for eye surgery - return 0 + if(target_zone == BODY_ZONE_PRECISE_EYES) //there are specific steps for eye surgery + return FALSE if(!hasorgans(target)) - return 0 + return FALSE var/obj/item/organ/external/affected = target.get_organ(target_zone) if(affected == null) - return 0 + return FALSE return !affected.cannot_amputate /datum/surgery_step/generic/amputate/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) diff --git a/code/modules/surgery/helpers.dm b/code/modules/surgery/helpers.dm index 2fac8c2451b..fa91005d2b1 100644 --- a/code/modules/surgery/helpers.dm +++ b/code/modules/surgery/helpers.dm @@ -154,6 +154,14 @@ return TRUE return FALSE -// Called when a limb containing this object is placed back on a body -/atom/movable/proc/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H) - return 0 + +/** + * Called when a limb containing this object is placed back on a body. + * + * Arguments: + * * parent - bodypart in which our src object is placed. + * * target - future owner of the limb. + */ +/atom/movable/proc/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target) + return FALSE + diff --git a/code/modules/surgery/implant_removal.dm b/code/modules/surgery/implant_removal.dm index 402b12654e8..dd7b8efe165 100644 --- a/code/modules/surgery/implant_removal.dm +++ b/code/modules/surgery/implant_removal.dm @@ -5,7 +5,7 @@ /datum/surgery/implant_removal name = "Implant Removal" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin,/datum/surgery_step/extract_implant,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest") + possible_locs = list(BODY_ZONE_CHEST) /datum/surgery/implant_removal/insect name = "Insectoid Implant Removal" @@ -15,7 +15,7 @@ /datum/surgery/implant_removal/synth name = "Implant Removal" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/extract_implant/synth,/datum/surgery_step/robotics/external/close_hatch) - possible_locs = list("chest") + possible_locs = list(BODY_ZONE_CHEST) requires_organic_bodypart = 0 /datum/surgery/implant_removal/can_start(mob/user, mob/living/carbon/human/target) @@ -82,7 +82,7 @@ /datum/surgery_step/extract_implant/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) I = locate(/obj/item/implant) in target - if(I && (target_zone == "chest")) //implant removal only works on the chest. + if(I && (target_zone == BODY_ZONE_CHEST)) //implant removal only works on the chest. user.visible_message("[user] takes something out of [target]'s [affected.name] with \the [tool].", \ "You take [I] out of [target]'s [affected.name]s with \the [tool]." ) diff --git a/code/modules/surgery/limb_augmentation.dm b/code/modules/surgery/limb_augmentation.dm index 50fbe79c8e1..c18ed49395c 100644 --- a/code/modules/surgery/limb_augmentation.dm +++ b/code/modules/surgery/limb_augmentation.dm @@ -1,7 +1,16 @@ /datum/surgery/limb_augmentation name = "Augment Limb" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/augment) - possible_locs = list("head", "chest","l_arm","r_arm","r_leg","l_leg","tail", "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_R_LEG, + BODY_ZONE_L_LEG, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/limb_augmentation/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) @@ -9,7 +18,7 @@ var/obj/item/organ/external/affected = H.get_organ(user.zone_selected) if(!affected) return 0 - if(affected.status & ORGAN_BROKEN) //The arm has to be in prime condition to augment it. + if(affected.has_fracture()) //The arm has to be in prime condition to augment it. return 0 if(affected.is_robotic()) return 0 @@ -42,7 +51,7 @@ for(var/part_name in L.part) if(!target.get_organ(part_name)) continue - affected.robotize(L.model_info, make_tough = 1, convert_all = 0) + affected.robotize(make_tough = TRUE, company = L.model_info, convert_all = FALSE) if(L.sabotaged) affected.sabotaged = 1 break diff --git a/code/modules/surgery/limb_reattach.dm b/code/modules/surgery/limb_reattach.dm index a89f00a4329..b50763af853 100644 --- a/code/modules/surgery/limb_reattach.dm +++ b/code/modules/surgery/limb_reattach.dm @@ -6,7 +6,20 @@ /datum/surgery/amputation name = "Amputation" steps = list(/datum/surgery_step/generic/amputate) - possible_locs = list("head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin","tail", "wing") + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/amputation/can_start(mob/user, mob/living/carbon/target) @@ -26,16 +39,29 @@ /datum/surgery/reattach name = "Limb Reattachment" steps = list(/datum/surgery_step/limb/attach,/datum/surgery_step/limb/connect) - possible_locs = list("head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin","tail", "wing") + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/reattach/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) var/mob/living/carbon/human/H = target var/obj/item/organ/external/affected = H.get_organ(user.zone_selected) - if(ismachineperson(target) && user.zone_selected != "tail") + if(ismachineperson(target) && user.zone_selected != BODY_ZONE_TAIL) // RIP bi-centennial man return 0 - if(ismachineperson(target) && user.zone_selected != "wing") + if(ismachineperson(target) && user.zone_selected != BODY_ZONE_WING) // RIP bi-centennial man return 0 if(!affected) @@ -45,7 +71,20 @@ /datum/surgery/reattach_synth name = "Synthetic Limb Reattachment" steps = list(/datum/surgery_step/limb/attach/robo) - possible_locs = list("head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin","tail", "wing") + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/reattach_synth/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) @@ -60,7 +99,20 @@ /datum/surgery/robo_attach name = "Apply Robotic Prosthetic" steps = list(/datum/surgery_step/limb/mechanize) - possible_locs = list("head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin","tail", "wing") + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/robo_attach/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) @@ -80,9 +132,9 @@ if(affected) return 0 var/list/organ_data = target.dna.species.has_limbs["[target_zone]"] - if(target_zone == "tail") + if(target_zone == BODY_ZONE_TAIL) return TRUE - if(target_zone == "wing") + if(target_zone == BODY_ZONE_WING) return TRUE return !isnull(organ_data) @@ -98,16 +150,16 @@ if(!istype(tool, /obj/item/organ/external)) return 0 var/obj/item/organ/external/E = tool - if(target.get_organ(E.limb_name)) + if(target.get_organ(E.limb_zone)) // This catches attaching an arm to a missing hand while the arm is still there to_chat(user, "[target] already has an [E.name]!") return 0 - if(E.limb_name != target_zone) + if(E.limb_zone != target_zone) // This ensures you must be aiming at the appropriate location to attach // this limb. (Can't aim at a missing foot to re-attach a missing arm) to_chat(user, "The [E.name] does not go there.") return 0 - if(!target.get_organ(E.parent_organ)) + if(!target.get_organ(E.parent_organ_zone)) to_chat(user, "cannot attach a [E.name] because there is no limb to attach to!") return 0 if(!is_correct_limb(E, target)) @@ -163,12 +215,9 @@ return 1 /datum/surgery_step/limb/attach/robo/attach_limb(mob/living/user, mob/living/carbon/human/target, obj/item/organ/external/E) - // Fixes fabricator IPC heads - if(!(E.dna) && E.is_robotic() && target.dna) - E.set_dna(target.dna) ..() - if(E.limb_name == "head") - var/obj/item/organ/external/head/H = target.get_organ("head") + if(E.limb_zone == BODY_ZONE_HEAD) + var/obj/item/organ/external/head/H = target.get_organ(BODY_ZONE_HEAD) var/datum/robolimb/robohead = GLOB.all_robolimbs[H.model] if(robohead.is_monitor) //Ensures that if an IPC gets a head that's got a human hair wig attached to their body, the hair won't wipe. H.h_style = "Bald" @@ -243,16 +292,12 @@ for(var/part_name in L.part) if(!isnull(target.get_organ(part_name))) continue - var/list/organ_data = target.dna.species.has_limbs["[part_name]"] + var/list/organ_data = target.dna.species.has_limbs[part_name] if(!organ_data) continue - // This will break if there's more than one stump ever - var/obj/item/organ/external/stump = target.bodyparts_by_name["limb stump"] - if(stump) - stump.remove(target) var/new_limb_type = organ_data["path"] var/obj/item/organ/external/new_limb = new new_limb_type(target) - new_limb.robotize(L.model_info) + new_limb.robotize(company = L.model_info) if(L.sabotaged) new_limb.sabotaged = 1 target.update_body() diff --git a/code/modules/surgery/organs/augments_arms.dm b/code/modules/surgery/organs/augments_arms.dm index 0cfa70a9ef1..fb6b299e54f 100644 --- a/code/modules/surgery/organs/augments_arms.dm +++ b/code/modules/surgery/organs/augments_arms.dm @@ -1,8 +1,8 @@ /obj/item/organ/internal/cyberimp/arm name = "arm-mounted implant" desc = "You shouldn't see this! Adminhelp and report this as an issue on github!" - parent_organ = BODY_ZONE_R_ARM - slot = "r_arm_device" + parent_organ_zone = BODY_ZONE_R_ARM + slot = INTERNAL_ORGAN_R_ARM_DEVICE icon_state = "implant-toolkit" w_class = WEIGHT_CLASS_NORMAL actions_types = list(/datum/action/item_action/organ_action/toggle) @@ -21,41 +21,41 @@ active_item = new active_item(src) update_icon() - slot = parent_organ + "_device" + slot = parent_organ_zone + "_device" items_list = contents.Copy() /obj/item/organ/internal/cyberimp/arm/update_icon() - if(parent_organ == BODY_ZONE_R_ARM) + if(parent_organ_zone == BODY_ZONE_R_ARM) transform = null else // Mirroring the icon transform = matrix(-1, 0, 0, 0, 1, 0) /obj/item/organ/internal/cyberimp/arm/examine(mob/user) . = ..() - . += "[src] is assembled in the [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm configuration." + . += "[src] is assembled in the [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm configuration." . += "You can use a screwdriver to reassemble it." /obj/item/organ/internal/cyberimp/arm/screwdriver_act(mob/user, obj/item/I) . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - if(parent_organ == BODY_ZONE_R_ARM) - parent_organ = BODY_ZONE_L_ARM + if(parent_organ_zone == BODY_ZONE_R_ARM) + parent_organ_zone = BODY_ZONE_L_ARM else - parent_organ = BODY_ZONE_R_ARM - slot = parent_organ + "_device" - to_chat(user, "You modify [src] to be installed on the [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm.") + parent_organ_zone = BODY_ZONE_R_ARM + slot = parent_organ_zone + "_device" + to_chat(user, "You modify [src] to be installed on the [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.") update_icon() -/obj/item/organ/internal/cyberimp/arm/insert(mob/living/carbon/arm_owner, special, dont_remove_slot) +/obj/item/organ/internal/cyberimp/arm/insert(mob/living/carbon/arm_owner, special = ORGAN_MANIPULATION_DEFAULT) . = ..() - var/side = parent_organ == BODY_ZONE_R_ARM ? BODY_ZONE_R_ARM : BODY_ZONE_L_ARM + var/side = parent_organ_zone == BODY_ZONE_R_ARM ? BODY_ZONE_R_ARM : BODY_ZONE_L_ARM hand = owner.bodyparts_by_name[side] if(hand) RegisterSignal(hand, COMSIG_ITEM_ATTACK_SELF, PROC_REF(on_item_attack_self)) //If the limb gets an attack-self, open the menu. Only happens when hand is empty RegisterSignal(arm_owner, COMSIG_MOB_KEY_DROP_ITEM_DOWN, PROC_REF(dropkey)) //We're nodrop, but we'll watch for the drop hotkey anyway and then stow if possible. -/obj/item/organ/internal/cyberimp/arm/remove(mob/living/carbon/arm_owner, special = 0) +/obj/item/organ/internal/cyberimp/arm/remove(mob/living/carbon/arm_owner, special = ORGAN_MANIPULATION_DEFAULT) Retract() if(hand) UnregisterSignal(hand, COMSIG_ITEM_ATTACK_SELF) @@ -92,14 +92,16 @@ var/obj/current_hand = host.hand ? host.get_organ(BODY_ZONE_L_ARM) : host.get_organ(BODY_ZONE_R_ARM) if(hand != current_hand) return //wrong hand - Retract() + if(Retract()) + return COMPONENT_CANCEL_DROP + /obj/item/organ/internal/cyberimp/arm/proc/Retract() if(!active_item || (active_item in src)) return FALSE - owner.visible_message("[owner] retracts [active_item] back into [owner.p_their()] [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm.", - "[active_item] snaps back into your [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm.", + owner.visible_message("[owner] retracts [active_item] back into [owner.p_their()] [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.", + "[active_item] snaps back into your [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.", "You hear a short mechanical noise.") owner.drop_item_ground(active_item, force = TRUE, silent = TRUE) @@ -120,7 +122,7 @@ active_item.w_class = WEIGHT_CLASS_HUGE active_item.materials = null - var/arm_slot = (parent_organ == BODY_ZONE_R_ARM ? slot_r_hand : slot_l_hand) + var/arm_slot = (parent_organ_zone == BODY_ZONE_R_ARM ? slot_r_hand : slot_l_hand) var/obj/item/arm_item = owner.get_item_by_slot(arm_slot) if(arm_item) @@ -130,16 +132,16 @@ else to_chat(owner, "You drop [arm_item] to activate [src]!") - if(parent_organ == BODY_ZONE_R_ARM ? !owner.put_in_r_hand(active_item) : !owner.put_in_l_hand(active_item)) + if(parent_organ_zone == BODY_ZONE_R_ARM ? !owner.put_in_r_hand(active_item) : !owner.put_in_l_hand(active_item)) to_chat(owner, "Your [src] fails to activate!") return // Activate the hand that now holds our item. - if(parent_organ == BODY_ZONE_R_ARM ? owner.hand : !owner.hand) + if(parent_organ_zone == BODY_ZONE_R_ARM ? owner.hand : !owner.hand) owner.swap_hand() - owner.visible_message("[owner] extends [active_item] from [owner.p_their()] [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm.", - "You extend [active_item] from your [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm.", + owner.visible_message("[owner] extends [active_item] from [owner.p_their()] [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.", + "You extend [active_item] from your [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm.", "You hear a short mechanical noise.") playsound(get_turf(owner), src.sound_on, 50, 1) @@ -149,7 +151,7 @@ return // You can emag the arm-mounted implant by activating it while holding emag in it's hand. - var/arm_slot = (parent_organ == BODY_ZONE_R_ARM ? slot_r_hand : slot_l_hand) + var/arm_slot = (parent_organ_zone == BODY_ZONE_R_ARM ? slot_r_hand : slot_l_hand) if(istype(owner.get_item_by_slot(arm_slot), /obj/item/card/emag) && emag_act(owner)) return @@ -185,9 +187,9 @@ return if(prob(30/severity) && owner && !crit_fail) Retract() - owner.visible_message("A loud bang comes from [owner]\'s [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm!") + owner.visible_message("A loud bang comes from [owner]\'s [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm!") playsound(get_turf(owner), 'sound/weapons/flashbang.ogg', 100, 1) - to_chat(owner, "You feel an explosion erupt inside your [parent_organ == BODY_ZONE_R_ARM ? "right" : "left"] arm as your implant breaks!") + to_chat(owner, "You feel an explosion erupt inside your [parent_organ_zone == BODY_ZONE_R_ARM ? "right" : "left"] arm as your implant breaks!") owner.adjust_fire_stacks(20) owner.IgniteMob() owner.adjustFireLoss(25) @@ -204,7 +206,7 @@ contents = newlist(/obj/item/gun/energy/laser/mounted) /obj/item/organ/internal/cyberimp/arm/gun/laser/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/gun/laser/Initialize(mapload) . = ..() @@ -220,7 +222,7 @@ contents = newlist(/obj/item/gun/energy/gun/advtaser/mounted) /obj/item/organ/internal/cyberimp/arm/gun/taser/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/toolset @@ -233,7 +235,7 @@ action_icon_state = list(/datum/action/item_action/organ_action/toggle = "utilitybelt") /obj/item/organ/internal/cyberimp/arm/toolset/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/toolset/emag_act(mob/user) if(!(locate(/obj/item/kitchen/knife/combat/cyborg) in items_list)) @@ -252,7 +254,7 @@ action_icon_state = list(/datum/action/item_action/organ_action/toggle = "rpd") /obj/item/organ/internal/cyberimp/arm/atmostoolset/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/hacking name = "hacking arm implant" @@ -263,7 +265,7 @@ action_icon_state = list(/datum/action/item_action/organ_action/toggle = "hacktool") /obj/item/organ/internal/cyberimp/arm/hacking/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/esword name = "arm-mounted energy blade" @@ -343,14 +345,14 @@ icon_state = "syndie_mantis" /obj/item/organ/internal/cyberimp/arm/toolset/mantisblade/update_icon() - if(parent_organ == BODY_ZONE_R_ARM) + if(parent_organ_zone == BODY_ZONE_R_ARM) transform = null else // Mirroring the icon transform = matrix(-1, 0, 0, 0, 1, 0) /obj/item/organ/internal/cyberimp/arm/toolset/mantisblade/horlex/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/toolset/mantisblade/shellguard name = "hidden blade implant" @@ -362,7 +364,7 @@ icon_state = "mantis" /obj/item/organ/internal/cyberimp/arm/toolset/mantisblade/shellguard/l - parent_organ = "l_arm" + parent_organ_zone = BODY_ZONE_L_ARM /obj/item/organ/internal/cyberimp/arm/toolset/mantisblade/emp_act(severity) ..() @@ -385,8 +387,8 @@ action_icon_state = list(/datum/action/item_action/organ_action/toggle = "duffel-med") /obj/item/organ/internal/cyberimp/arm/surgery/l - parent_organ = "l_arm" - slot = "l_arm_device" + parent_organ_zone = BODY_ZONE_L_ARM + slot = INTERNAL_ORGAN_L_ARM_DEVICE /obj/item/organ/internal/cyberimp/arm/janitorial name = "janitorial toolset implant" @@ -397,8 +399,8 @@ action_icon_state = list(/datum/action/item_action/organ_action/toggle = "janibelt") /obj/item/organ/internal/cyberimp/arm/janitorial/l - parent_organ = "l_arm" - slot = "l_arm_device" + parent_organ_zone = BODY_ZONE_L_ARM + slot = INTERNAL_ORGAN_L_ARM_DEVICE /obj/item/organ/internal/cyberimp/arm/botanical name = "botanical toolset implant" @@ -409,11 +411,12 @@ action_icon_state = list(/datum/action/item_action/organ_action/toggle = "botanybelt") /obj/item/organ/internal/cyberimp/arm/botanical/l - parent_organ = "l_arm" - slot = "l_arm_device" + parent_organ_zone = BODY_ZONE_L_ARM + slot = INTERNAL_ORGAN_L_ARM_DEVICE // lets make IPCs even *more* vulnerable to EMPs! /obj/item/organ/internal/cyberimp/arm/power_cord + species_type = /datum/species/machine name = "APC-compatible power adapter implant" desc = "An implant commonly installed inside IPCs in order to allow them to easily collect energy from their environment" origin_tech = "materials=3;biotech=2;powerstorage=3" diff --git a/code/modules/surgery/organs/augments_eyes.dm b/code/modules/surgery/organs/augments_eyes.dm index b3d5df693b7..a908b88e929 100644 --- a/code/modules/surgery/organs/augments_eyes.dm +++ b/code/modules/surgery/organs/augments_eyes.dm @@ -3,8 +3,8 @@ desc = "artificial photoreceptors with specialized functionality" icon_state = "eye_implant" implant_overlay = "eye_implant_overlay" - slot = "eye_sight" - parent_organ = "eyes" + slot = INTERNAL_ORGAN_EYE_SIGHT_DEVICE + parent_organ_zone = BODY_ZONE_PRECISE_EYES w_class = WEIGHT_CLASS_TINY var/vision_flags = 0 @@ -17,8 +17,8 @@ var/flash_protect = 0 var/aug_message = "Your vision is augmented!" -/obj/item/organ/internal/cyberimp/eyes/insert(var/mob/living/carbon/M, var/special = 0) - ..() +/obj/item/organ/internal/cyberimp/eyes/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() var/mob/living/carbon/human/H = M if(istype(H) && eye_colour) H.update_body() //Apply our eye colour to the target. @@ -26,11 +26,11 @@ to_chat(owner, "[aug_message]") M.update_sight() -/obj/item/organ/internal/cyberimp/eyes/remove(var/mob/living/carbon/M, var/special = 0) +/obj/item/organ/internal/cyberimp/eyes/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() M.update_sight() -/obj/item/organ/internal/cyberimp/eyes/proc/generate_icon(var/mob/living/carbon/human/HA) +/obj/item/organ/internal/cyberimp/eyes/proc/generate_icon(mob/living/carbon/human/HA) var/mob/living/carbon/human/H = HA if(!istype(H)) H = owner @@ -82,19 +82,19 @@ /obj/item/organ/internal/cyberimp/eyes/hud name = "HUD implant" desc = "These cybernetic eyes will display a HUD over everything you see. Maybe." - slot = "eye_hud" + slot = INTERNAL_ORGAN_EYE_HUD_DEVICE var/HUD_type = 0 /// A list of extension kinds added to the examine text. Things like medical or security records. var/list/examine_extensions = null -/obj/item/organ/internal/cyberimp/eyes/hud/insert(var/mob/living/carbon/M, var/special = 0) - ..() +/obj/item/organ/internal/cyberimp/eyes/hud/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() if(HUD_type) var/datum/atom_hud/H = GLOB.huds[HUD_type] H.add_hud_to(M) M.permanent_huds |= H -/obj/item/organ/internal/cyberimp/eyes/hud/remove(var/mob/living/carbon/M, var/special = 0) +/obj/item/organ/internal/cyberimp/eyes/hud/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() if(HUD_type) var/datum/atom_hud/H = GLOB.huds[HUD_type] @@ -134,7 +134,7 @@ /obj/item/organ/internal/cyberimp/eyes/shield name = "welding shield implant" desc = "These reactive micro-shields will protect you from welders and flashes without obscuring your vision." - slot = "eye_shield" + slot = INTERNAL_ORGAN_EYE_SHIELD_DEVICE origin_tech = "materials=4;biotech=3;engineering=4;plasmatech=3" implant_color = "#101010" flash_protect = 2 diff --git a/code/modules/surgery/organs/augments_internal.dm b/code/modules/surgery/organs/augments_internal.dm index 54be1166638..b291d9245f5 100644 --- a/code/modules/surgery/organs/augments_internal.dm +++ b/code/modules/surgery/organs/augments_internal.dm @@ -25,7 +25,7 @@ desc = "injectors of extra sub-routines for the brain" icon_state = "brain_implant" implant_overlay = "brain_implant_overlay" - parent_organ = "head" + parent_organ_zone = BODY_ZONE_HEAD /obj/item/organ/internal/cyberimp/brain/emp_act(severity) if(!owner || emp_proof) @@ -45,7 +45,7 @@ var/obj/item/l_hand_obj = null var/obj/item/r_hand_obj = null implant_color = "#DE7E00" - slot = "brain_antidrop" + slot = INTERNAL_ORGAN_BRAIN_ANTIDROP origin_tech = "materials=4;programming=5;biotech=4" actions_types = list(/datum/action/item_action/organ_action/toggle) @@ -116,7 +116,7 @@ if(!r_hand_ignore && (r_hand_obj in owner.contents)) r_hand_obj.flags ^= NODROP -/obj/item/organ/internal/cyberimp/brain/anti_drop/remove(var/mob/living/carbon/M, special = 0) +/obj/item/organ/internal/cyberimp/brain/anti_drop/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) if(active) ui_action_click() return ..() @@ -125,7 +125,7 @@ name = "CNS Rebooter implant" desc = "This implant will automatically give you back control over your central nervous system, reducing downtime when stunned. Incompatible with the Neural Jumpstarter." implant_color = "#FFFF00" - slot = "brain_antistun" + slot = INTERNAL_ORGAN_BRAIN_ANTISTUN origin_tech = "materials=5;programming=4;biotech=5" /obj/item/organ/internal/cyberimp/brain/anti_stun/hardened @@ -163,7 +163,7 @@ name = "Neural Jumpstarter implant" desc = "This implant will automatically attempt to jolt you awake when it detects you have fallen unconscious. Has a short cooldown, incompatible with the CNS Rebooter." implant_color = "#0356fc" - slot = "brain_antistun" //one or the other not both. + slot = INTERNAL_ORGAN_BRAIN_ANTISTUN //one or the other not both. origin_tech = "materials=5;programming=4;biotech=5" var/cooldown = FALSE @@ -204,21 +204,21 @@ /obj/item/organ/internal/cyberimp/brain/anti_sleep/hardened/compatible name = "Hardened Neural Jumpstarter implant" desc = "A military-grade version of the standard implant, for NT's more elite forces. This one is compatible with the CNS Rebooter implant" - slot = "brain_antisleep" + slot = INTERNAL_ORGAN_BRAIN_ANTISLEEP emp_proof = TRUE /obj/item/organ/internal/cyberimp/brain/clown_voice name = "Comical implant" desc = "Uh oh." implant_color = "#DEDE00" - slot = "brain_clownvoice" + slot = INTERNAL_ORGAN_BRAIN_CLOWNVOICE origin_tech = "materials=2;biotech=2" /obj/item/organ/internal/cyberimp/brain/speech_translator //actual translating done in human/handle_speech_problems name = "Speech translator implant" desc = "While known as a translator, this implant actually generates speech based on the user's thoughts when activated, completely bypassing the need to speak." implant_color = "#C0C0C0" - slot = "brain_speechtranslator" + slot = INTERNAL_ORGAN_BRAIN_SPEECHTRANSLATOR w_class = WEIGHT_CLASS_TINY origin_tech = "materials=4;biotech=6" actions_types = list(/datum/action/item_action/organ_action/toggle) @@ -248,13 +248,13 @@ //[[[[MOUTH]]]] /obj/item/organ/internal/cyberimp/mouth - parent_organ = "mouth" + parent_organ_zone = BODY_ZONE_PRECISE_MOUTH /obj/item/organ/internal/cyberimp/mouth/breathing_tube name = "breathing tube implant" desc = "This simple implant adds an internals connector to your back, allowing you to use internals without a mask and protecting you from being choked." icon_state = "implant_mask" - slot = "breathing_tube" + slot = INTERNAL_ORGAN_BREATHING_TUBE w_class = WEIGHT_CLASS_TINY origin_tech = "materials=2;biotech=3" @@ -271,7 +271,7 @@ desc = "implants for the organs in your torso" icon_state = "chest_implant" implant_overlay = "chest_implant_overlay" - parent_organ = "chest" + parent_organ_zone = BODY_ZONE_CHEST /obj/item/organ/internal/cyberimp/chest/nutriment name = "Nutriment pump implant" @@ -280,7 +280,7 @@ implant_color = "#00AA00" var/hunger_modificator = 0.7 var/poison_amount = 5 - slot = "stomach" + slot = INTERNAL_ORGAN_STOMACH origin_tech = "materials=2;powerstorage=2;biotech=2" /obj/item/organ/internal/cyberimp/chest/nutriment/insert(mob/living/carbon/M, special, dont_remove_slot) @@ -314,7 +314,7 @@ var/hunger_threshold = NUTRITION_LEVEL_STARVING var/synthesizing = 0 var/poison_amount = 5 - slot = "stomach" + slot = INTERNAL_ORGAN_STOMACH origin_tech = "materials=2;powerstorage=2;biotech=2" /obj/item/organ/internal/cyberimp/chest/nutriment_old/on_life() @@ -358,7 +358,7 @@ icon_state = "chest_implant" implant_color = "#AD0000" origin_tech = "materials=5;programming=4;biotech=4" - slot = "heartdrive" + slot = INTERNAL_ORGAN_HEART_DRIVE var/revive_cost = 0 var/reviving = FALSE var/cooldown = 0 diff --git a/code/modules/surgery/organs/augments_legs.dm b/code/modules/surgery/organs/augments_legs.dm index c053ec55e52..4beb12699d0 100644 --- a/code/modules/surgery/organs/augments_legs.dm +++ b/code/modules/surgery/organs/augments_legs.dm @@ -1,7 +1,7 @@ /obj/item/organ/internal/cyberimp/leg name = "leg implant" desc = "You shouldn't see this! Adminhelp and report this as an issue on github!" - parent_organ = BODY_ZONE_R_LEG + parent_organ_zone = BODY_ZONE_R_LEG icon_state = "implant-leg" w_class = WEIGHT_CLASS_NORMAL @@ -12,14 +12,14 @@ /obj/item/organ/internal/cyberimp/leg/Initialize(mapload) . = ..() update_icon() - slot = parent_organ + "_device" + slot = parent_organ_zone + "_device" /obj/item/organ/internal/cyberimp/leg/emp_act(severity) . = ..() if(emp_proof) return - var/obj/item/organ/external/E = owner.get_organ(parent_organ) + var/obj/item/organ/external/E = owner.get_organ(parent_organ_zone) if(!E) //how did you get an implant in a limb you don't have? return @@ -39,42 +39,42 @@ COOLDOWN_START(src, emp_notice, 30 SECONDS) /obj/item/organ/internal/cyberimp/leg/update_icon() - if(parent_organ == BODY_ZONE_R_LEG) + if(parent_organ_zone == BODY_ZONE_R_LEG) transform = null else // Mirroring the icon transform = matrix(-1, 0, 0, 0, 1, 0) /obj/item/organ/internal/cyberimp/leg/examine(mob/user) . = ..() - . += span_notice("[src] is assembled in the [parent_organ == BODY_ZONE_R_LEG ? "right" : "left"] leg configuration. You can use a screwdriver to reassemble it.") + . += span_notice("[src] is assembled in the [parent_organ_zone == BODY_ZONE_R_LEG ? "right" : "left"] leg configuration. You can use a screwdriver to reassemble it.") . += span_info("You will need two of the same type of implant for them to properly function.") /obj/item/organ/internal/cyberimp/leg/screwdriver_act(mob/living/user, obj/item/I) . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - if(parent_organ == BODY_ZONE_R_LEG) - parent_organ = BODY_ZONE_L_LEG + if(parent_organ_zone == BODY_ZONE_R_LEG) + parent_organ_zone = BODY_ZONE_L_LEG else - parent_organ = BODY_ZONE_R_LEG + parent_organ_zone = BODY_ZONE_R_LEG SetSlot() - to_chat(user, "You modify [src] to be installed on the [parent_organ == BODY_ZONE_R_LEG ? "right" : "left"] leg.") + to_chat(user, "You modify [src] to be installed on the [parent_organ_zone == BODY_ZONE_R_LEG ? "right" : "left"] leg.") update_icon() -/obj/item/organ/internal/cyberimp/leg/insert(mob/living/carbon/M, special, dont_remove_slot) +/obj/item/organ/internal/cyberimp/leg/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() if(HasBoth()) AddEffect() -/obj/item/organ/internal/cyberimp/leg/remove(mob/living/carbon/M, special) +/obj/item/organ/internal/cyberimp/leg/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) RemoveEffect() . = ..() /obj/item/organ/internal/cyberimp/leg/proc/HasBoth() - if(owner.get_organ_slot("r_leg_device") && owner.get_organ_slot("l_leg_device")) - var/obj/item/organ/internal/cyberimp/leg/left = owner.get_organ_slot("r_leg_device") - var/obj/item/organ/internal/cyberimp/leg/right = owner.get_organ_slot("l_leg_device") + if(owner.get_organ_slot(INTERNAL_ORGAN_R_LEG_DEVICE) && owner.get_organ_slot(INTERNAL_ORGAN_L_LEG_DEVICE)) + var/obj/item/organ/internal/cyberimp/leg/left = owner.get_organ_slot(INTERNAL_ORGAN_R_LEG_DEVICE) + var/obj/item/organ/internal/cyberimp/leg/right = owner.get_organ_slot(INTERNAL_ORGAN_L_LEG_DEVICE) if(left.implant_type == right.implant_type) return TRUE return FALSE @@ -86,11 +86,11 @@ return /obj/item/organ/internal/cyberimp/leg/proc/SetSlot() - switch(parent_organ) + switch(parent_organ_zone) if(BODY_ZONE_L_LEG) - slot = "l_leg_device" + slot = INTERNAL_ORGAN_L_LEG_DEVICE if(BODY_ZONE_R_LEG) - slot = "r_leg_device" + slot = INTERNAL_ORGAN_R_LEG_DEVICE else CRASH("Invalid zone for [type]") @@ -104,16 +104,16 @@ var/datum/action/bhop/implant_ability /obj/item/organ/internal/cyberimp/leg/jumpboots/l - parent_organ = BODY_ZONE_L_LEG + parent_organ_zone = BODY_ZONE_L_LEG /obj/item/organ/internal/cyberimp/leg/jumpboots/AddEffect() - var/obj/item/organ/internal/cyberimp/leg/jumpboots/left = owner.get_organ_slot("r_leg_device") //leading leg or somethin + var/obj/item/organ/internal/cyberimp/leg/jumpboots/left = owner.get_organ_slot(INTERNAL_ORGAN_R_LEG_DEVICE) //leading leg or somethin if(!left.implant_ability) left.implant_ability = new(src) left.implant_ability.Grant(owner) /obj/item/organ/internal/cyberimp/leg/jumpboots/RemoveEffect() - var/obj/item/organ/internal/cyberimp/leg/jumpboots/left = owner.get_organ_slot("r_leg_device") + var/obj/item/organ/internal/cyberimp/leg/jumpboots/left = owner.get_organ_slot(INTERNAL_ORGAN_R_LEG_DEVICE) if(left.implant_ability) left.implant_ability.Remove(owner) left.implant_ability = null @@ -130,7 +130,7 @@ var/datum/callback/last_jump = null check_flags = AB_CHECK_CONSCIOUS|AB_CHECK_RESTRAINED|AB_CHECK_STUNNED //lying jumps is real -/datum/action/bhop/Trigger() +/datum/action/bhop/Trigger(left_click = TRUE) if(!IsAvailable()) return if(recharging_time > world.time) diff --git a/code/modules/surgery/organs/blood.dm b/code/modules/surgery/organs/blood.dm index eb9b22df797..f165e2926a6 100644 --- a/code/modules/surgery/organs/blood.dm +++ b/code/modules/surgery/organs/blood.dm @@ -53,24 +53,23 @@ var/temp_bleed = 0 var/internal_bleeding_rate = 0 //Bleeding out - for(var/X in bodyparts) - var/obj/item/organ/external/BP = X - var/brutedamage = BP.brute_dam + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + var/brutedamage = bodypart.brute_dam - if(BP.is_robotic()) + if(bodypart.is_robotic()) continue - //We want an accurate reading of .len - listclearnulls(BP.embedded_objects) - temp_bleed += 0.5*BP.embedded_objects.len + var/embedded_length = LAZYLEN(bodypart.embedded_objects) + if(embedded_length) + temp_bleed += 0.5 * embedded_length if(brutedamage >= 20) temp_bleed += (brutedamage * 0.013) - if(BP.open) + if(bodypart.open) temp_bleed += 0.5 - if(BP.internal_bleeding) + if(bodypart.has_internal_bleeding()) internal_bleeding_rate += 0.5 bleed_rate = max(bleed_rate - 0.5, temp_bleed)//if no wounds, other bleed effects naturally decreases @@ -127,14 +126,6 @@ else R.reaction_turf(get_turf(src), amt * EXOTIC_BLEED_MULTIPLIER) -/mob/living/carbon/human/proc/check_internal_bleedings() - var/list/internals_list = list() - if(NO_BLOOD in dna.species.species_traits) - return - for(var/obj/item/organ/external/limb in bodyparts) - if(limb.internal_bleeding) - internals_list.Add(limb) - return internals_list /mob/living/proc/restore_blood() blood_volume = initial(blood_volume) diff --git a/code/modules/surgery/organs/body_egg.dm b/code/modules/surgery/organs/body_egg.dm index be40b2e1f0b..c99b517e317 100644 --- a/code/modules/surgery/organs/body_egg.dm +++ b/code/modules/surgery/organs/body_egg.dm @@ -3,28 +3,28 @@ desc = "All slimy and yuck." icon_state = "innards" origin_tech = "biotech=5" - parent_organ = "chest" - slot = "parasite_egg" + parent_organ_zone = BODY_ZONE_CHEST + slot = INTERNAL_ORGAN_PARASITE_EGG /obj/item/organ/internal/body_egg/on_find(mob/living/finder) ..() - to_chat(finder, "You found an unknown alien organism in [owner]'s [parent_organ]!") + to_chat(finder, "You found an unknown alien organism in [owner]'s [parent_organ_zone]!") -/obj/item/organ/internal/body_egg/insert(var/mob/living/carbon/M, special = 0) - ..() + +/obj/item/organ/internal/body_egg/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() ADD_TRAIT(owner, TRAIT_XENO_HOST, GENERIC_TRAIT) START_PROCESSING(SSobj, src) owner.med_hud_set_status() - spawn(0) - AddInfectionImages(owner) + INVOKE_ASYNC(src, PROC_REF(AddInfectionImages), owner) + -/obj/item/organ/internal/body_egg/remove(var/mob/living/carbon/M, special = 0) +/obj/item/organ/internal/body_egg/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) STOP_PROCESSING(SSobj, src) if(owner) REMOVE_TRAIT(owner, TRAIT_XENO_HOST, GENERIC_TRAIT) owner.med_hud_set_status() - spawn(0) - RemoveInfectionImages(owner) + INVOKE_ASYNC(src, PROC_REF(RemoveInfectionImages), owner) . = ..() /obj/item/organ/internal/body_egg/process() diff --git a/code/modules/surgery/organs/ears.dm b/code/modules/surgery/organs/ears.dm index f068f627773..df75b80f655 100644 --- a/code/modules/surgery/organs/ears.dm +++ b/code/modules/surgery/organs/ears.dm @@ -2,9 +2,8 @@ name = "ears" icon_state = "ears" gender = PLURAL - organ_tag = "ears" - parent_organ = "head" - slot = "ears" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_EARS /obj/item/organ/internal/ears/on_life() if(!iscarbon(owner)) @@ -18,7 +17,7 @@ if(HAS_TRAIT_NOT_FROM(C, TRAIT_DEAF, EAR_DAMAGE)) return - if(status & ORGAN_DEAD) + if(is_dead()) C.Deaf(2 SECONDS) else if((damage > 10) && prob(damage / 30)) @@ -33,7 +32,7 @@ /obj/item/organ/internal/ears/surgeryize() - owner.SetDeaf(0) + owner?.SetDeaf(0) heal_internal_damage(100) /obj/item/organ/internal/ears/cybernetic diff --git a/code/modules/surgery/organs/eyes.dm b/code/modules/surgery/organs/eyes.dm index 02f6624c5c4..b5b1be321bd 100644 --- a/code/modules/surgery/organs/eyes.dm +++ b/code/modules/surgery/organs/eyes.dm @@ -2,9 +2,8 @@ name = "eyeballs" icon_state = "eyes" gender = PLURAL - organ_tag = "eyes" - parent_organ = "head" - slot = "eyes" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_EYES var/eye_colour = "#000000" // Should never be null var/list/colourmatrix = null var/list/colourblind_matrix = MATRIX_GREYSCALE //Special colourblindness parameters. By default, it's black-and-white. @@ -39,8 +38,8 @@ if(is_robotic() || (see_in_dark > EYE_SHINE_THRESHOLD)) return TRUE -/obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = 0) - ..() +/obj/item/organ/internal/eyes/insert(mob/living/carbon/human/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() if(istype(M) && eye_colour) M.update_body() //Apply our eye colour to the target. @@ -51,7 +50,7 @@ else M.update_client_colour() //If we're here, that means the mob acquired the colourblindness gene while they didn't have eyes. Better handle it. -/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = 0) +/obj/item/organ/internal/eyes/remove(mob/living/carbon/human/M, special = ORGAN_MANIPULATION_DEFAULT) if(!special && (COLOURBLIND in M.mutations)) //If special is set, that means these eyes are getting deleted (i.e. during set_species()) if(!(COLOURBLIND in dependent_disabilities)) //We only want to change COLOURBLINDBLOCK and such it the eyes are being surgically removed. dependent_disabilities |= COLOURBLIND @@ -67,7 +66,7 @@ owner.SetEyeBlurry(0) owner.SetEyeBlind(0) -/obj/item/organ/internal/eyes/robotize(make_tough) +/obj/item/organ/internal/eyes/robotize(make_tough = FALSE) colourmatrix = null ..() //Make sure the organ's got the robotic status indicators before updating the client colour. if(owner) @@ -86,7 +85,7 @@ var/update_flags = STATUS_UPDATE_NONE if(owner.glasses) var/obj/item/clothing/glasses/G = owner.glasses - if(G.heal_bodypart == "eyes" && iscarbon(owner)) + if(G.heal_bodypart == INTERNAL_ORGAN_EYES && iscarbon(owner)) var/mob/living/carbon/C = owner var/obj/item/organ/internal/eyes/E = C.get_int_organ(/obj/item/organ/internal/eyes) if(istype(E)) diff --git a/code/modules/surgery/organs/heart.dm b/code/modules/surgery/organs/heart.dm index 90870e191fc..4d2ca82c799 100644 --- a/code/modules/surgery/organs/heart.dm +++ b/code/modules/surgery/organs/heart.dm @@ -1,9 +1,8 @@ /obj/item/organ/internal/heart name = "heart" icon_state = "heart-on" - organ_tag = "heart" - parent_organ = "chest" - slot = "heart" + parent_organ_zone = BODY_ZONE_CHEST + slot = INTERNAL_ORGAN_HEART origin_tech = "biotech=5" var/beating = TRUE dead_icon = "heart-off" @@ -15,29 +14,23 @@ else icon_state = "[icon_base]-off" -/obj/item/organ/internal/heart/remove(mob/living/carbon/M, special = 0) - . = ..() - if(ishuman(M)) - var/mob/living/carbon/human/H = M - if(H.stat == DEAD) - Stop() - return - +/obj/item/organ/internal/heart/remove(mob/living/carbon/human/target, special = ORGAN_MANIPULATION_DEFAULT) if(!special) - addtimer(CALLBACK(src, PROC_REF(stop_if_unowned)), 120) + addtimer(CALLBACK(src, PROC_REF(stop_if_unowned)), 12 SECONDS) + . = ..() /obj/item/organ/internal/heart/emp_act(intensity) if(!is_robotic() || emp_proof) return Stop() -/obj/item/organ/internal/heart/necrotize() - ..() - Stop() +/obj/item/organ/internal/heart/necrotize(silent = FALSE) + if(..()) + Stop() /obj/item/organ/internal/heart/attack_self(mob/user) ..() - if(status & ORGAN_DEAD) + if(is_dead()) to_chat(user, "You can't restart a dead heart.") return if(!beating) @@ -106,7 +99,7 @@ else last_pump = world.time //lets be extra fair *sigh* -/obj/item/organ/internal/heart/cursed/insert(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/heart/cursed/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() if(owner) to_chat(owner, "Your heart has been replaced with a cursed one, you have to pump this one manually otherwise you'll die!") @@ -115,7 +108,7 @@ name = "pump your blood" //You are now brea- pumping blood manually -/datum/action/item_action/organ_action/cursed_heart/Trigger() +/datum/action/item_action/organ_action/cursed_heart/Trigger(left_click = TRUE) . = ..() if(. && istype(target, /obj/item/organ/internal/heart/cursed)) var/obj/item/organ/internal/heart/cursed/cursed_heart = target @@ -162,7 +155,7 @@ if(!ishuman(owner)) return - if(!(status & ORGAN_DEAD) && !attempted_restart && !beating) + if(!is_dead() && !attempted_restart && !beating) to_chat(owner, "Your [name] detects a cardiac event and attempts to return to its normal rhythm!") if(prob(20) && emagged) attempted_restart = TRUE @@ -182,7 +175,7 @@ addtimer(CALLBACK(src, PROC_REF(recharge)), 300) addtimer(CALLBACK(src, PROC_REF(message_to_owner), owner, "Your [name] fails to return to its normal rhythm!"), 30) - if(!(status & ORGAN_DEAD) && !attempted_restart && owner.HasDisease(/datum/disease/critical/heart_failure)) + if(!is_dead() && !attempted_restart && owner.HasDisease(/datum/disease/critical/heart_failure)) to_chat(owner, "Your [name] detects a cardiac event and attempts to return to its normal rhythm!") if(prob(40) && emagged) attempted_restart = TRUE @@ -204,7 +197,7 @@ addtimer(CALLBACK(src, PROC_REF(recharge)), 300) addtimer(CALLBACK(src, PROC_REF(message_to_owner), owner, "Your [name] fails to return to its normal rhythm!"), 30) - if(!(status & ORGAN_DEAD)) + if(!is_dead()) var/boost = emagged ? 2 : 1 owner.AdjustDrowsy(-8 SECONDS * boost) owner.AdjustParalysis(-2 SECONDS * boost) @@ -249,7 +242,7 @@ var/numHigh = round(intensity / 5) var/numMid = round(intensity / 10) var/numLow = round(intensity / 20) - if(emagged && !(status & ORGAN_DEAD)) + if(emagged && !is_dead()) if(prob(numHigh)) to_chat(owner, "Your [name] spasms violently!") owner.adjustBruteLoss(numHigh) @@ -266,7 +259,7 @@ if(prob(numLow)) to_chat(owner, "Your [name] shuts down!") necrotize() - else if(!emagged && !(status & ORGAN_DEAD)) + else if(!emagged && !is_dead()) if(prob(numMid)) to_chat(owner, "Your [name] spasms violently!") owner.adjustBruteLoss(numMid) diff --git a/code/modules/surgery/organs/helpers.dm b/code/modules/surgery/organs/helpers.dm index d52c599d212..1200c6b5d1c 100644 --- a/code/modules/surgery/organs/helpers.dm +++ b/code/modules/surgery/organs/helpers.dm @@ -7,64 +7,54 @@ /mob/proc/get_organ_slot(slot) //is it a brain, is it a brain_tumor? return -/mob/proc/get_int_organ_tag(tag) //is it a brain, is it a brain_tumor? - return - -/mob/living/proc/get_organ(zone) +/** + * Returns specified external organ by zone index. + * + * Arguments: + * * zone - bodypart index (see [combat.dm] for defines) + */ +/mob/proc/get_organ(zone) return /mob/living/carbon/get_int_organ(typepath) return (locate(typepath) in internal_organs) -/mob/living/carbon/get_organs_zone(zone, var/subzones = 0) +/mob/living/carbon/get_organs_zone(zone, subzones = FALSE) var/list/returnorg = list() if(subzones) // Include subzones - groin for chest, eyes and mouth for head //Fethas note:We have check_zone, i may need to remove the below - if(zone == "head") - returnorg = get_organs_zone("eyes") + get_organs_zone("mouth") - if(zone == "chest") - returnorg = get_organs_zone("groin") - - for(var/obj/item/organ/internal/O in internal_organs) - if(zone == O.parent_organ) - returnorg += O + if(zone == BODY_ZONE_HEAD) + returnorg = get_organs_zone(BODY_ZONE_PRECISE_EYES) + get_organs_zone(BODY_ZONE_PRECISE_MOUTH) + if(zone == BODY_ZONE_CHEST) + returnorg = get_organs_zone(BODY_ZONE_PRECISE_GROIN) + + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(zone == organ.parent_organ_zone) + returnorg += organ return returnorg + /mob/living/carbon/get_organ_slot(slot) return internal_organs_slot[slot] -/mob/living/carbon/get_int_organ_tag(tag) - for(var/obj/item/organ/internal/O in internal_organs) - if(tag == O.organ_tag) - return O /proc/is_int_organ(atom/A) return istype(A, /obj/item/organ/internal) -/mob/living/carbon/human/proc/get_limb_by_name(limb_name) //Look for a limb with the given limb name in the source mob, and return it if found. - for(var/obj/item/organ/external/O in bodyparts) - if(limb_name == O.limb_name) - return O - /mob/proc/has_left_hand() return TRUE /mob/living/carbon/human/has_left_hand() - if(has_organ("l_hand")) - return TRUE - return FALSE - + return get_organ(BODY_ZONE_PRECISE_L_HAND) /mob/proc/has_right_hand() return TRUE /mob/living/carbon/human/has_right_hand() - if(has_organ("r_hand")) - return TRUE - return FALSE + return get_organ(BODY_ZONE_PRECISE_R_HAND) /mob/proc/has_both_hands() return TRUE @@ -78,11 +68,11 @@ return FALSE /mob/living/carbon/human/l_arm_broken() - var/obj/item/organ/external/hand/l_hand = get_organ("l_hand") - var/obj/item/organ/external/arm/l_arm = get_organ("l_arm") + var/obj/item/organ/external/hand/l_hand = get_organ(BODY_ZONE_PRECISE_L_HAND) + var/obj/item/organ/external/arm/l_arm = get_organ(BODY_ZONE_L_ARM) if(!l_hand || !l_arm) - return FALSE //Ну, не сломано ведь - if(l_hand.is_broken() || l_arm.is_broken()) + return FALSE + if(l_hand.is_traumatized() || l_arm.is_traumatized()) return TRUE return FALSE @@ -90,11 +80,11 @@ return TRUE /mob/living/carbon/human/r_arm_broken() - var/obj/item/organ/external/hand/right/r_hand = get_organ("r_hand") - var/obj/item/organ/external/arm/right/r_arm = get_organ("r_arm") + var/obj/item/organ/external/hand/right/r_hand = get_organ(BODY_ZONE_PRECISE_R_HAND) + var/obj/item/organ/external/arm/right/r_arm = get_organ(BODY_ZONE_R_ARM) if(!r_hand || !r_arm) return FALSE - if(r_hand.is_broken() || r_arm.is_broken()) + if(r_hand.is_traumatized() || r_arm.is_traumatized()) return TRUE return FALSE @@ -105,11 +95,8 @@ /mob/living/carbon/human/get_num_arms() . = 0 - for(var/X in bodyparts) - var/obj/item/organ/external/affecting = X - if(affecting.body_part == ARM_RIGHT) - .++ - if(affecting.body_part == ARM_LEFT) + for(var/obj/item/organ/external/affecting as anything in bodyparts) + if(affecting.limb_zone == BODY_ZONE_L_ARM || affecting.limb_zone == BODY_ZONE_R_ARM) .++ @@ -119,42 +106,7 @@ /mob/living/carbon/human/get_num_legs() . = 0 - for(var/X in bodyparts) - var/obj/item/organ/external/affecting = X - if(affecting.body_part == LEG_RIGHT) - .++ - if(affecting.body_part == LEG_LEFT) + for(var/obj/item/organ/external/affecting as anything in bodyparts) + if(affecting.limb_zone == BODY_ZONE_L_LEG || affecting.limb_zone == BODY_ZONE_R_LEG) .++ - -//sometimes we want to ignore that we don't have the required amount of arms. -/mob/proc/get_arm_ignore() - return FALSE - - -//sometimes we want to ignore that we don't have the required amount of legs. -/mob/proc/get_leg_ignore() - return FALSE - - -/mob/living/carbon/human/get_leg_ignore() - - if(flying || floating) - return TRUE - - var/obj/item/tank/jetpack/J - if(istype(back,/obj/item/tank/jetpack)) - J = back - if(J.on == 1) - return TRUE - return FALSE - -/mob/living/proc/get_missing_limbs() - return list() - -/mob/living/carbon/human/get_missing_limbs() - var/list/full = list("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg") - for(var/zone in full) - if(has_organ(zone)) - full -= zone - return full diff --git a/code/modules/surgery/organs/kidneys.dm b/code/modules/surgery/organs/kidneys.dm index 58de14efafc..bea3b948a98 100644 --- a/code/modules/surgery/organs/kidneys.dm +++ b/code/modules/surgery/organs/kidneys.dm @@ -2,9 +2,8 @@ name = "kidneys" icon_state = "kidneys" gender = PLURAL - organ_tag = "kidneys" - parent_organ = "groin" - slot = "kidneys" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + slot = INTERNAL_ORGAN_KIDNEYS /obj/item/organ/internal/kidneys/on_life() // Coffee is really bad for you with busted kidneys. @@ -16,7 +15,7 @@ if(coffee) if(is_bruised()) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) - else if(is_broken()) + else if(is_traumatized()) owner.adjustToxLoss(0.3 * PROCESS_ACCURACY) /obj/item/organ/internal/kidneys/cybernetic diff --git a/code/modules/surgery/organs/liver.dm b/code/modules/surgery/organs/liver.dm index 00e8cdd7030..3df7b08afa5 100644 --- a/code/modules/surgery/organs/liver.dm +++ b/code/modules/surgery/organs/liver.dm @@ -1,9 +1,8 @@ /obj/item/organ/internal/liver name = "liver" icon_state = "liver" - organ_tag = "liver" - parent_organ = "groin" - slot = "liver" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + slot = INTERNAL_ORGAN_LIVER var/alcohol_intensity = 1 /obj/item/organ/internal/liver/on_life() @@ -35,7 +34,7 @@ var/filter_effect = 3 if(is_bruised()) filter_effect -= 1 - if(is_broken()) + if(is_traumatized()) filter_effect -= 2 // Damaged liver means some chemicals are very dangerous diff --git a/code/modules/surgery/organs/lungs.dm b/code/modules/surgery/organs/lungs.dm index 560e4071da0..6dcf2c343ad 100644 --- a/code/modules/surgery/organs/lungs.dm +++ b/code/modules/surgery/organs/lungs.dm @@ -1,9 +1,8 @@ /obj/item/organ/internal/lungs name = "lungs" icon_state = "lungs" - parent_organ = "chest" - slot = "lungs" - organ_tag = "lungs" + parent_organ_zone = BODY_ZONE_CHEST + slot = INTERNAL_ORGAN_LUNGS gender = PLURAL w_class = WEIGHT_CLASS_NORMAL @@ -58,13 +57,13 @@ if(owner) owner.LoseBreath(40 SECONDS) -/obj/item/organ/internal/lungs/insert(mob/living/carbon/M, special = 0, dont_remove_slot = 0) +/obj/item/organ/internal/lungs/insert(mob/living/carbon/target, special = ORGAN_MANIPULATION_DEFAULT) ..() for(var/thing in list("oxy", "tox", "co2", "nitro")) - M.clear_alert("not_enough_[thing]") - M.clear_alert("too_much_[thing]") + target.clear_alert("not_enough_[thing]") + target.clear_alert("too_much_[thing]") -/obj/item/organ/internal/lungs/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/lungs/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) for(var/thing in list("oxy", "tox", "co2", "nitro")) M.clear_alert("not_enough_[thing]") M.clear_alert("too_much_[thing]") diff --git a/code/modules/surgery/organs/mmi_holder.dm b/code/modules/surgery/organs/mmi_holder.dm index bd885471ff1..b4e48c616d8 100644 --- a/code/modules/surgery/organs/mmi_holder.dm +++ b/code/modules/surgery/organs/mmi_holder.dm @@ -1,7 +1,7 @@ // Used for an MMI or robotic brain being installed into a human. /obj/item/organ/internal/brain/mmi_holder name = "Man-Machine Interface" - parent_organ = "chest" + parent_organ_zone = BODY_ZONE_CHEST status = ORGAN_ROBOT var/obj/item/mmi/stored_mmi @@ -9,12 +9,17 @@ QDEL_NULL(stored_mmi) return ..() -/obj/item/organ/internal/brain/mmi_holder/insert(mob/living/target, special = 0) +/obj/item/organ/internal/brain/mmi_holder/insert(mob/living/target, special = ORGAN_MANIPULATION_DEFAULT) ..() // To supersede the over-writing of the MMI's name from `insert` update_from_mmi() + target.thought_bubble_image = "thought_bubble_machine" + if(ishuman(target) && istype(stored_mmi?.held_brain, /obj/item/organ/internal/brain/cluwne)) + var/mob/living/carbon/human/h_target = target + h_target.makeCluwne() //No matter where you go, no matter what you do, you cannot escape -/obj/item/organ/internal/brain/mmi_holder/remove(mob/living/user, special = 0) + +/obj/item/organ/internal/brain/mmi_holder/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT) if(!special) if(stored_mmi) . = stored_mmi @@ -33,4 +38,4 @@ desc = stored_mmi.desc icon = stored_mmi.icon icon_state = stored_mmi.icon_state - set_dna(stored_mmi.brainmob.dna) + update_DNA(stored_mmi.brainmob.dna) diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index 5c27d9ea597..a877ac4a420 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -3,75 +3,98 @@ icon = 'icons/obj/surgery.dmi' pickup_sound = 'sound/items/handling/flesh_pickup.ogg' drop_sound = 'sound/items/handling/flesh_drop.ogg' + germ_level = 0 var/dead_icon - var/mob/living/carbon/human/owner = null - var/status = 0 - var/vital = FALSE //Lose a vital limb, die immediately. - var/damage = 0 // amount of damage to the organ - + /// Current organ holder + var/mob/living/carbon/human/owner + /// Bitflags of organ status + var/status = NONE + /// Lose a vital organ, die immediately. + var/vital = FALSE + + /// Amount of damage to the organ. + var/damage = 0 + /// Minimal threshold after which various bad effects can happen (lung rupture, eyes temporary blindness etc.) var/min_bruised_damage = 10 + /// Minimal threshold for fracture to occure var/min_broken_damage = 30 + /// Minimal threshold for internal bleeding to occure + var/min_internal_bleeding_damage = 30 + /// Basically organ max health. var/max_damage - var/organ_tag = "organ" - var/parent_organ = "chest" + /// Defined body zone of parent organ. + var/parent_organ_zone = BODY_ZONE_CHEST + /// Data saved for autopsy scanner + var/list/datum/autopsy_data/autopsy_data + /// Traces of chemicals in the organ, links chemical IDs to number of ticks for which they'll stay in the blood + var/list/trace_chemicals - var/list/datum/autopsy_data/autopsy_data = list() - var/list/trace_chemicals = list() // traces of chemicals in the organ, - // links chemical IDs to number of ticks for which they'll stay in the blood - germ_level = 0 + /// DNA organ obtains from its holder var/datum/dna/dna - var/species_type // Species datum typepath, assumed to be a /datum/species/human if null + /// Species datum typepath, assumed to be a /datum/species/human if null + var/species_type - // Stuff for tracking if this is on a tile with an open freezer or not + /// Stuff for tracking if this is on a tile with an open freezer or not var/last_freezer_update_time = 0 - var/freezer_update_period = 100 - var/is_in_freezer = 0 + /// How much time we can survive before start decay without open freezer on our turf + var/freezer_update_period = 10 SECONDS - var/sterile = FALSE //can the organ be infected by germs? - var/tough = FALSE //can organ be easily damaged? - var/emp_proof = FALSE //is the organ immune to EMPs? - var/hidden_pain = FALSE //will it skip pain messages? - var/requires_robotic_bodypart = FALSE + /// Can the organ be infected by germs? + var/sterile = FALSE + /// Can organ be easily damaged? + var/tough = FALSE + /// Is the organ immune to EMPs? + var/emp_proof = FALSE + /// Will it skip pain messages? + var/hidden_pain = FALSE + + +/obj/item/organ/New(mob/living/carbon/holder) + ..(holder) + + if(!max_damage) + max_damage = min_broken_damage * 2 + + if(iscarbon(holder)) + update_DNA(holder.dna) + return + + update_DNA(update_blood = FALSE, randomize = TRUE) /obj/item/organ/Destroy() STOP_PROCESSING(SSobj, src) if(owner) - remove(owner, 1) + remove(owner, ORGAN_MANIPULATION_NOEFFECT) QDEL_LIST_ASSOC_VAL(autopsy_data) - QDEL_NULL(dna) + if(dna) + QDEL_NULL(dna) return ..() -/obj/item/organ/proc/update_health() - return -/obj/item/organ/New(mob/living/carbon/holder, datum/species/species_override = null) - ..(holder) - if(!max_damage) - max_damage = min_broken_damage * 2 - if(istype(holder)) - if(holder.dna) - dna = holder.dna.Clone() - if(species_type && species_type != holder.dna.species.type) - dna.species = new species_type - dna.UpdateSE() - else - log_runtime(EXCEPTION("[holder] spawned without a proper DNA."), holder) - var/mob/living/carbon/human/H = holder - if(istype(H)) - if(dna) - if(!blood_DNA) - blood_DNA = list() - blood_DNA[dna.unique_enzymes] = dna.blood_type - else - if(src in subtypesof(/obj/item/organ/internal/cyberimp)) - return - dna = new /datum/dna(null) - if(species_type) - dna.species = new species_type - else if(species_override) - dna.species = new species_override +/obj/item/organ/proc/update_DNA(datum/dna/new_dna, update_blood = TRUE, use_species_type = TRUE, randomize = FALSE) + if(dna) + QDEL_NULL(dna) + + if(istype(new_dna)) + dna = new_dna.Clone() + + if(!dna && !randomize) + return + + if(is_robotic() && !species_type) // no DNA for cybernetics, except IPC parts + if(update_blood) + update_blood() + return + + if(!dna) + dna = new + + if(use_species_type && species_type && dna.species.type != species_type) + dna.species = new species_type + + if(randomize) if(dna.species.language) var/datum/language/species_language = GLOB.all_languages[dna.species.language] if(species_language) @@ -80,33 +103,30 @@ dna.real_name = "Неизвестный-[rand(999)]" else dna.real_name = "Неизвестный-[rand(999)]" + dna.unique_enzymes = md5(dna.real_name) dna.ResetSE() dna.SE_original = dna.SE dna.struc_enzymes_original = dna.struc_enzymes dna.ResetUI() - blood_DNA = list() - blood_DNA[dna.unique_enzymes] = dna.blood_type -/obj/item/organ/attackby(obj/item/I, mob/user, params) - if(is_robotic() && istype(I, /obj/item/stack/nanopaste)) - var/obj/item/stack/nanopaste/nano = I - nano.use(1) - rejuvenate() - to_chat(user, "You repair the damage on [src].") + if(update_blood) + update_blood() + + +/obj/item/organ/proc/update_blood() + if(!dna || (NO_BLOOD in dna.species.species_traits)) return - return ..() + LAZYSET(blood_DNA, dna.unique_enzymes, dna.blood_type) + + +/obj/item/organ/proc/update_health() + return -/obj/item/organ/proc/set_dna(var/datum/dna/new_dna) - if(new_dna) - dna = new_dna.Clone() - if(blood_DNA) - blood_DNA.Cut() - else - blood_DNA = list() - blood_DNA[dna.unique_enzymes] = dna.blood_type -/obj/item/organ/proc/necrotize(update_sprite = TRUE) +/obj/item/organ/proc/necrotize(silent = FALSE) + if(status & (ORGAN_ROBOT|ORGAN_DEAD)) + return FALSE damage = max_damage status |= ORGAN_DEAD STOP_PROCESSING(SSobj, src) @@ -114,11 +134,34 @@ icon_state = dead_icon if(owner && vital) owner.death() + return TRUE + + +/obj/item/organ/proc/is_dead() + return (status & ORGAN_DEAD) + + +/obj/item/organ/proc/unnecrotize() + if(!is_dead()) + return FALSE + status &= ~ORGAN_DEAD + return TRUE + + +/obj/item/organ/attackby(obj/item/I, mob/user, params) + if(is_robotic() && istype(I, /obj/item/stack/nanopaste)) + var/obj/item/stack/nanopaste/nano = I + nano.use(1) + rejuvenate() + to_chat(user, span_notice("You repair the damage on [src].")) + return + return ..() + /obj/item/organ/process() //dead already, no need for more processing - if(status & ORGAN_DEAD) + if(is_dead()) return if(is_preserved()) @@ -146,28 +189,31 @@ handle_germs() return TRUE + /obj/item/organ/proc/is_preserved() - if(istype(loc,/obj/item/mmi)) - germ_level = max(0, germ_level - 1) // So a brain can slowly recover from being left out of an MMI + var/static/list/preserved_holders = list( + /obj/structure/closet/crate/freezer, + /obj/machinery/clonepod, + /obj/machinery/smartfridge/secure/medbay/organ, + ) + for(var/typepath in preserved_holders) + if(is_found_within(typepath)) + return TRUE + if(istype(loc,/obj/item/mmi)) // So a brain can slowly recover from being left out of an MMI + germ_level = max(0, germ_level - 1) return TRUE if(istype(loc, /mob/living/simple_animal/hostile/headslug) || istype(loc, /obj/item/organ/internal/body_egg/changeling_egg)) germ_level = 0 // weird stuff might happen, best to be safe return TRUE - if(is_found_within(/obj/structure/closet/crate/freezer)) - return TRUE - if(is_found_within(/obj/machinery/clonepod)) - return TRUE - if (is_found_within(/obj/machinery/smartfridge/secure/medbay/organ)) - return TRUE if(isturf(loc)) + var/is_in_freezer = FALSE if(world.time - last_freezer_update_time > freezer_update_period) // I don't want to loop through everything in the tile constantly, especially since it'll be a pile of organs // if the virologist releases gibbingtons again or something // There's probably a much less silly way of doing this, but BYOND native algorithms are stupidly naive - is_in_freezer = 0 - for(var/obj/structure/closet/crate/freezer/F in loc.contents) - if(F.opened) - is_in_freezer = 1 // on the same tile, close enough, should keep organs much fresher on avg + for(var/obj/structure/closet/crate/freezer/freezer in loc) + if(freezer.opened) + is_in_freezer = TRUE // on the same tile, close enough, should keep organs much fresher on avg break last_freezer_update_time = world.time return is_in_freezer // I'd like static varibles, please @@ -175,13 +221,15 @@ // You can do your cool location temperature organ preserving effects here! return FALSE + /obj/item/organ/examine(mob/user) . = ..() - if(status & ORGAN_DEAD) + if(is_dead()) if(!is_robotic()) - . += "The decay has set in." + . += span_notice("The decay has set in.") else - . += "It looks in need of repairs." + . += span_notice("It looks in need of repairs.") + /obj/item/organ/proc/handle_germs() if(germ_level > 0 && germ_level < INFECTION_LEVEL_ONE / 2 && prob(30)) @@ -197,11 +245,12 @@ owner.bodytemperature += between(0, (fever_temperature - T20C) / BODYTEMP_COLD_DIVISOR + 1, fever_temperature - owner.bodytemperature) if(germ_level >= INFECTION_LEVEL_TWO) - var/obj/item/organ/external/parent = owner.get_organ(parent_organ) + var/obj/item/organ/external/parent = owner.get_organ(parent_organ_zone) //spread germs if(parent.germ_level < germ_level && ( parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))) parent.germ_level += owner?.dna.species.germs_growth_rate + /obj/item/organ/proc/rejuvenate() damage = 0 germ_level = 0 @@ -209,40 +258,47 @@ if(is_robotic()) //Robotic organs stay robotic. status = ORGAN_ROBOT else - status = 0 + status = NONE if(!owner) START_PROCESSING(SSobj, src) + /obj/item/organ/proc/is_damaged() return damage > 0 + /obj/item/organ/proc/is_bruised() return damage >= min_bruised_damage -/obj/item/organ/proc/is_broken() + +/obj/item/organ/proc/is_traumatized() return (damage >= min_broken_damage || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED))) + //Adds autopsy data for used_weapon. -/obj/item/organ/proc/add_autopsy_data(var/used_weapon = "Unknown", var/damage) - var/datum/autopsy_data/W = autopsy_data[used_weapon] - if(!W) - W = new() - W.weapon = used_weapon - autopsy_data[used_weapon] = W +/obj/item/organ/proc/add_autopsy_data(used_weapon = "Unknown", damage) + LAZYINITLIST(autopsy_data) + + var/datum/autopsy_data/weapon_data = autopsy_data[used_weapon] + if(!weapon_data) + weapon_data = new + weapon_data.weapon = used_weapon + LAZYSET(autopsy_data, used_weapon, weapon_data) + + weapon_data.hits++ + weapon_data.damage += damage + weapon_data.time_inflicted = world.time - W.hits += 1 - W.damage += damage - W.time_inflicted = world.time //Note: external organs have their own version of this proc -/obj/item/organ/proc/receive_damage(amount, silent = 0) +/obj/item/organ/proc/receive_damage(amount, silent = FALSE) if(tough) return damage = between(0, damage + amount, max_damage) //only show this if the organ is not robotic - if(owner && parent_organ && amount > 0) - var/obj/item/organ/external/parent = owner.get_organ(parent_organ) + if(owner && parent_organ_zone && amount > 0) + var/obj/item/organ/external/parent = owner.get_organ(parent_organ_zone) if(parent && !silent) owner.custom_pain("Something inside your [parent.name] hurts a lot.") @@ -250,64 +306,59 @@ if(damage >= max_damage) necrotize() + /obj/item/organ/proc/heal_internal_damage(amount, robo_repair = FALSE) if(is_robotic() && !robo_repair) return damage = max(damage - amount, 0) -/obj/item/organ/proc/robotize(make_tough) //Being used to make robutt hearts, etc + +/obj/item/organ/proc/robotize(make_tough = FALSE) //Being used to make robutt hearts, etc status &= ~ORGAN_BROKEN - status &= ~ORGAN_SPLINTED status |= ORGAN_ROBOT + /obj/item/organ/proc/shock_organ(intensity) return -/obj/item/organ/proc/remove(var/mob/living/user,special = 0) + +/obj/item/organ/proc/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT) if(!istype(owner)) return owner.internal_organs -= src - var/obj/item/organ/external/affected = owner.get_organ(parent_organ) - if(affected) affected.internal_organs -= src + var/obj/item/organ/external/affected = owner.get_organ(parent_organ_zone) + if(affected) + LAZYREMOVE(affected.internal_organs, src) - loc = get_turf(owner) + loc = owner.drop_location() START_PROCESSING(SSobj, src) - if(owner && vital && is_primary_organ()) // I'd do another check for species or whatever so that you couldn't "kill" an IPC by removing a human head from them, but it doesn't matter since they'll come right back from the dead + if(owner?.stat != DEAD && vital && !special) add_attack_logs(user, owner, "Removed vital organ ([src])") owner.death() owner = null return src -/obj/item/organ/proc/replaced(var/mob/living/carbon/human/target) + +/obj/item/organ/proc/replaced(mob/living/carbon/human/target) return // Nothing uses this, it is always overridden + // A version of `replaced` that "flattens" the process of insertion, making organs "Plug'n'play" // (Particularly the heart, which stops beating when removed) -/obj/item/organ/proc/safe_replace(var/mob/living/carbon/human/target) +/obj/item/organ/proc/safe_replace(mob/living/carbon/human/target) replaced(target) + /obj/item/organ/proc/surgeryize() return -/* -Returns 1 if this is the organ that is handling all the functionalities of that particular organ slot -Returns 0 if it isn't -I use this so that this can be made better once the organ overhaul rolls out -- Crazylemon -*/ -/obj/item/organ/proc/is_primary_organ(var/mob/living/carbon/human/O = null) - if(isnull(O)) - O = owner - if(!istype(owner)) // You're not the primary organ of ANYTHING, bucko - return 0 - return src == O.get_int_organ(organ_tag) /obj/item/organ/proc/is_robotic() - if(status & ORGAN_ROBOT) - return TRUE - return FALSE + return (status & ORGAN_ROBOT) + /obj/item/organ/serialize() var/data = ..() @@ -320,6 +371,7 @@ I use this so that this can be made better once the organ overhaul rolls out -- data["dna"] = dna.serialize() return data + /obj/item/organ/deserialize(data) if(isnum(data["status"])) if(data["status"] & ORGAN_ROBOT) @@ -330,3 +382,4 @@ I use this so that this can be made better once the organ overhaul rolls out -- //instantiate the list and call this proc dna.deserialize(data["dna"]) ..() + diff --git a/code/modules/surgery/organs/organ_external.dm b/code/modules/surgery/organs/organ_external.dm index ac076e7333e..74d30df2f5c 100644 --- a/code/modules/surgery/organs/organ_external.dm +++ b/code/modules/surgery/organs/organ_external.dm @@ -1,3 +1,15 @@ +/// Threshold needed to have a chance of hurting internal bits with something sharp +#define LIMB_SHARP_THRESH_INT_DMG 5 +/// Threshold needed to have a chance of hurting internal bits +#define LIMB_THRESH_INT_DMG 10 +/// Probability of taking internal damage from sufficient force, while otherwise healthy +#define LIMB_DMG_PROB 5 +/// Threshold needed to have a chance of inflicting fracture +#define LIMB_FRACTURE_MIN_DMG 15 +/// Threshold needed to have a chance of inflicting internal bleeding +#define LIMB_INT_BLEEDING_MIN_DMG 15 + + /**************************************************** EXTERNAL ORGANS ****************************************************/ @@ -6,266 +18,338 @@ min_broken_damage = 30 max_damage = 0 dir = SOUTH - organ_tag = "limb" - - var/brute_mod = 1 - var/burn_mod = 1 - - var/icon_name = null - var/body_part = null - var/icon_position = 0 - + /// External body part zone + var/limb_zone + /// Used to calculate protection from armor + var/limb_body_flag = NONE + /// Bodypart parent + var/obj/item/organ/external/parent + /// Lazy list of bodypart children + var/list/children + /// Child bodyparts in this list will be robotized with the parent + var/list/convertable_children + /// Lazy list of internal organs of this bodypart. + var/list/internal_organs + + /// Bitflag for icon position (LEFT or RIGHT), used to correctly render bodyparts position + var/icon_position = NONE + /// Icon state used to render bodypart + var/icon_name + /// Bodypart model, used for robotic parts visualization var/model + /// Icon override used for wings/tails var/force_icon - - var/icobase = 'icons/mob/human_races/r_human.dmi' // Normal icon set. - var/deform = 'icons/mob/human_races/r_def_human.dmi' // Mutated icon set. - + /// Default organ icons set + var/icobase = 'icons/mob/human_races/r_human.dmi' + /// Mutated organ icons set + var/deform = 'icons/mob/human_races/r_def_human.dmi' + /// String code used to apply and check bodypart visual damage var/damage_state = "00" + /// Default icon used by dismembered bodypart + var/icon/mob_icon + /// If set to `TRUE` bodypart will use genderized bodypart icon if available + var/gendered_icon = FALSE + /// Visual bodypart color tone + var/s_tone + /// Visual bodypart color override. If this is instantiated, it should be a hex value + var/s_col + /// Lazy list of children bodyparts icons + var/list/child_icons + + /// Brute modifier allpied to received damage + var/brute_mod = 1 + /// Burn modifier allpied to received damage + var/burn_mod = 1 + /// Curent bodypart brute damage var/brute_dam = 0 + /// Curent bodypart burn damage var/burn_dam = 0 - var/max_size = 0 - var/icon/mob_icon - var/gendered_icon = 0 - var/limb_name - var/disfigured = 0 - var/cannot_amputate - var/cannot_break - var/s_tone = null - var/s_col = null // If this is instantiated, it should be a hex value. - var/list/child_icons = list() + /// Damage equal to brute damage after bodypart breaks. Used to calculate bodypart overall damage var/perma_injury = 0 - var/dismember_at_max_damage = FALSE - - var/obj/item/organ/external/parent - var/list/obj/item/organ/external/children - var/list/convertable_children = list() + /// Whether bodypart can be amputated + var/cannot_amputate = FALSE + /// Whether bodypart can be broken + var/cannot_break = FALSE + /// Whether bodypart can have internal bleeding + var/cannot_internal_bleed = FALSE + /// Whether bodypart will drop if maximum damage is reached + var/dismember_at_max_damage = FALSE // Does the organ take reduce damage from EMPs? IPC limbs get this by default var/emp_resistant = FALSE - - // Internal organs of this body part - var/list/internal_organs = list() - - var/damage_msg = "You feel an intense pain" + /// Whether this bodypart can be used for grasping + var/can_grasp = FALSE + + /// If `TRUE` you cannot be identified by examine (used for head bodypart only) + var/disfigured = FALSE + /// Whether prosthetic bodypart is emagged, it will detonate when it fails + var/sabotaged = FALSE + /// Time when this organ was last splinted + var/splinted_count = 0 + /// Lazy list of all embedded objects inside the bodypart + var/list/embedded_objects + + /// Whether bodypart has an open incision from surgery + var/open = 0 + /// Whether bodypart needs to be opened with a saw to access the internal organs. Can be a string with encasing description + var/encased = FALSE + /// Reference to item hidden in this bodypart after cavity surgery + var/obj/item/hidden + /// Fluff fracture description var/broken_description + /// Descriptive string used in amputation + var/amputation_point - var/open = 0 // If the body part has an open incision from surgery - var/sabotaged = 0 //If a prosthetic limb is emagged, it will detonate when it fails. - var/encased // Needs to be opened with a saw to access the organs. - var/obj/item/hidden = null - var/list/embedded_objects = list() - var/internal_bleeding = FALSE - var/amputation_point // Descriptive string used in amputation. - var/can_grasp - var/can_stand +/obj/item/organ/external/New(mob/living/carbon/holder) + ..() - var/splinted_count = 0 //Time when this organ was last splinted + if(dna?.species) + icobase = dna.species.icobase + deform = dna.species.deform + if(ishuman(holder)) + replaced(holder) + sync_colour_to_human(holder) + get_icon() -/obj/item/organ/external/necrotize(update_sprite=TRUE) - if(status & (ORGAN_ROBOT|ORGAN_DEAD)) - return - status |= ORGAN_DEAD - if(dead_icon) - icon_state = dead_icon - if(owner) - to_chat(owner, "You can't feel your [name] anymore...") - owner.update_body() - if(vital) - owner.death() /obj/item/organ/external/Destroy() - if(parent && parent.children) - parent.children -= src - - parent = null + if(parent) + LAZYREMOVE(parent.children, src) + parent = null - if(internal_organs) - for(var/obj/item/organ/internal/O in internal_organs) - internal_organs -= O - O.remove(owner,special = 1) - qdel(O) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(owner) + var/atom/movable/thing = organ.remove(owner, ORGAN_MANIPULATION_NOEFFECT) + if(!QDELETED(thing)) + qdel(thing) + else + LAZYREMOVE(internal_organs, organ) + qdel(organ) + + for(var/obj/item/organ/external/childpart as anything in children) + if(owner) + var/atom/movable/thing = childpart.remove(owner, ORGAN_MANIPULATION_NOEFFECT) + if(!QDELETED(thing)) + qdel(thing) + else + qdel(childpart) if(owner) - owner.bodyparts_by_name[limb_name] = null - owner.splinted_limbs -= src - - QDEL_LIST(children) + owner.bodyparts_by_name[limb_zone] = null + LAZYREMOVE(owner.splinted_limbs, src) QDEL_LIST(embedded_objects) - QDEL_NULL(hidden) + if(owner && !owner.has_embedded_objects()) + owner.clear_alert("embeddedobject") + return ..() -/obj/item/organ/external/update_health() - damage = min(max_damage, (brute_dam + burn_dam)) - return +/obj/item/organ/external/replaced(mob/living/carbon/human/target) + owner = target + forceMove(owner) -/obj/item/organ/external/New(var/mob/living/carbon/holder) - ..() - var/mob/living/carbon/human/H = holder - icobase = dna.species.icobase - deform = dna.species.deform - if(istype(H)) - replaced(H) - sync_colour_to_human(H) - get_icon() + if(LAZYLEN(embedded_objects)) + owner.throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) -/obj/item/organ/external/replaced(var/mob/living/carbon/human/target) - owner = target - forceMove(owner) - if(istype(owner)) - if(!isnull(owner.bodyparts_by_name[limb_name])) - log_debug("Duplicate organ in slot \"[limb_name]\", mob '[target]'") - owner.bodyparts_by_name[limb_name] = src - owner.bodyparts |= src - for(var/atom/movable/stuff in src) - stuff.attempt_become_organ(src, owner) - - if(parent_organ) - parent = owner.bodyparts_by_name[src.parent_organ] + if(!ishuman(owner)) + return + + var/obj/item/organ/external/replaced = owner.bodyparts_by_name[limb_zone] + if(!isnull(replaced)) + replaced.remove(target, ORGAN_MANIPULATION_NOEFFECT) + owner.bodyparts_by_name[limb_zone] = src + owner.bodyparts |= src + + for(var/atom/movable/thing in src) + thing.attempt_become_organ(src, owner) + + if(parent_organ_zone) + parent = owner.bodyparts_by_name[parent_organ_zone] if(parent) - if(!parent.children) - parent.children = list() - parent.children.Add(src) + LAZYADDOR(parent.children, src) + + +/obj/item/organ/external/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE) + if(!owner) + return + + var/mob/living/carbon/human/organ_owner = owner // we need to have a reference since its nullified in parent proc + + remove_splint(silent = TRUE) + remove_all_embedded_objects() + + . = ..() + + // Attached organs also fly off. + if(!ignore_children) + for(var/obj/item/organ/external/childpart as anything in children) + var/atom/movable/thing = childpart.remove(organ_owner, special) + if(!QDELETED(thing)) + thing.forceMove(src) + organ_owner.updatehealth("limb remove") + + // Grab all the internal giblets too. + for(var/obj/item/organ/internal/organ as anything in internal_organs) + var/atom/movable/thing = organ.remove(organ_owner, special) + if(!QDELETED(thing)) + thing.forceMove(src) + + release_restraints(organ_owner) + organ_owner.bodyparts -= src + organ_owner.bodyparts_by_name[limb_zone] = null // Remove from owner's vars. + + //Robotic limbs explode if sabotaged. + if(is_robotic() && sabotaged && !special) + organ_owner.visible_message( + span_danger("[organ_owner]'s [name] explodes violently!"), + span_danger("Your [name] explodes!"), + span_danger("You hear an explosion!"), + ) + explosion(get_turf(organ_owner), -1, -1, 2, 3, cause = "Organ Sabotage") + do_sparks(5, FALSE, organ_owner) + qdel(src) + + +/obj/item/organ/external/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target) + if(parent_organ_zone != parent.limb_zone) + return FALSE + replaced(target) + return TRUE + + +/obj/item/organ/external/update_health() + damage = min(max_damage, (brute_dam + burn_dam)) -/obj/item/organ/external/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H) - if(parent_organ != parent.limb_name) - return 0 - replaced(H) - return 1 /**************************************************** DAMAGE PROCS ****************************************************/ -/obj/item/organ/external/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE) +/obj/item/organ/external/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE, silent = FALSE) if(owner?.status_flags & GODMODE) - return + return FALSE + if(tough && !ignore_resists) brute = max(0, brute - 5) burn = max(0, burn - 4) - if((brute <= 0) && (burn <= 0)) - return 0 + if(brute <= 0 && burn <= 0) + return FALSE if(!ignore_resists) brute *= brute_mod burn *= burn_mod - // Threshold needed to have a chance of hurting internal bits with something sharp -#define LIMB_SHARP_THRESH_INT_DMG 5 - // Threshold needed to have a chance of hurting internal bits -#define LIMB_THRESH_INT_DMG 10 - // Probability of taking internal damage from sufficient force, while otherwise healthy -#define LIMB_DMG_PROB 5 // High brute damage or sharp objects may damage internal organs; distributed damage doesn't inflict it - if(!ignore_resists && internal_organs && (brute_dam >= max_damage || (((sharp && brute >= LIMB_SHARP_THRESH_INT_DMG) || brute >= LIMB_THRESH_INT_DMG) && prob(LIMB_DMG_PROB)))) - // Damage an internal organ - if(internal_organs && internal_organs.len) - var/obj/item/organ/internal/internal_organ = pick(internal_organs) - //Pass full damage if an internal organ is dead - var/internal_damage = min(internal_organ.max_damage - internal_organ.damage, brute * 0.5) - if(internal_damage) - internal_organ.receive_damage(internal_damage) - brute -= internal_damage - - if(status & ORGAN_BROKEN && prob(40) && brute) - owner.emote("scream") //getting hit on broken hand hurts - if(status & ORGAN_SPLINTED && prob((brute + burn)*4)) //taking damage to splinted limbs removes the splints - status &= ~ORGAN_SPLINTED - owner.visible_message("The splint on [owner]'s left arm unravels from [owner.p_their()] [name]!","The splint on your [name] unravels!") - owner.handle_splints() + if(!ignore_resists && LAZYLEN(internal_organs) && (brute_dam >= max_damage || (((sharp && brute >= LIMB_SHARP_THRESH_INT_DMG) || brute >= LIMB_THRESH_INT_DMG) && prob(LIMB_DMG_PROB)))) + var/obj/item/organ/internal/internal_organ = pick(internal_organs) + // Pass full damage if an internal organ is dead + var/internal_damage = min(internal_organ.max_damage - internal_organ.damage, brute * 0.5) + if(internal_damage) + internal_organ.receive_damage(internal_damage) + brute -= internal_damage + + if(!silent && brute && has_fracture() && owner?.has_pain() && prob(40)) + owner.emote("scream") // Getting hit on broken hand hurts + else if(brute && prob((brute + burn) * 4)) + remove_splint(splint_break = TRUE, silent = silent) // Taking damage to splinted limbs removes the splints + if(used_weapon) add_autopsy_data("[used_weapon]", brute + burn) else add_autopsy_data(null, brute + burn) - // See if internal bleeding has place; distributed damage doesn't inflict it - if(!ignore_resists) - check_for_internal_bleeding(brute) - // See if bones need to break; distributed damage doesn't inflict it if(!ignore_resists) - check_fracture(brute) + // See if internal bleeding/fracture has place; distributed damage doesn't inflict it + try_internal_bleeding(brute, silent) + try_fracture(brute, silent) + + // Need to update health, but need a reference in case the below checks cuts off a limb. + var/mob/living/carbon/organ_owner = owner // Make sure we don't exceed the maximum damage a limb can take before dismembering if((brute_dam + burn_dam + brute + burn) < max_damage) brute_dam += brute burn_dam += burn else - //If we can't inflict the full amount of damage, spread the damage in other ways - //How much damage can we actually cause? - var/can_inflict = max_damage - (brute_dam + burn_dam) - if(can_inflict) + // If we can't inflict the full amount of damage, spread the damage in other ways + // How much damage can we actually cause? + var/remaining_health = max_damage - (brute_dam + burn_dam) + if(remaining_health) if(brute > 0) - //Inflict all burte damage we can - brute_dam = min(brute_dam + brute, brute_dam + can_inflict) - var/temp = can_inflict - //How much mroe damage can we inflict - can_inflict = max(0, can_inflict - brute) - //How much brute damage is left to inflict + // Inflict all brute damage we can + brute_dam = min(brute_dam + brute, brute_dam + remaining_health) + var/temp = remaining_health + // How much more damage can we inflict + remaining_health = max(0, remaining_health - brute) + // How much brute damage is left to inflict brute = max(0, brute - temp) - if(burn > 0 && can_inflict) - //Inflict all burn damage we can - burn_dam = min(burn_dam + burn, burn_dam + can_inflict) - //How much burn damage is left to inflict - burn = max(0, burn - can_inflict) - //If there are still hurties to dispense + if(burn > 0 && remaining_health) + // Inflict all burn damage we can + burn_dam = min(burn_dam + burn, burn_dam + remaining_health) + // How much burn damage is left to inflict + burn = max(0, burn - remaining_health) + + // If there are still hurties to dispense if(burn || brute) - //List organs we can pass it to + // List organs we can pass it to var/list/obj/item/organ/external/possible_points = list() if(parent) possible_points += parent - if(children) - var/all_child_forbidden = TRUE - for(var/organ in children) - if(organ && !(organ in forbidden_limbs)) - all_child_forbidden = FALSE - possible_points += organ - if(all_child_forbidden) - forbidden_limbs += src + + if(LAZYLEN(children)) + var/all_children_forbidden = TRUE + for(var/obj/item/organ/external/childpart as anything in children) + if(!(childpart in forbidden_limbs)) + all_children_forbidden = FALSE + possible_points += childpart + if(all_children_forbidden) + forbidden_limbs |= src else - forbidden_limbs += src + forbidden_limbs |= src + if(length(forbidden_limbs)) possible_points -= forbidden_limbs - //If everything is damaged, no damage + + // If everything is damaged, no damage var/can_distribute = TRUE if(owner && length(forbidden_limbs) == length(owner.bodyparts_by_name)) can_distribute = FALSE - //Return damage to upper body if nothing is available + + // Return damage to upper body if nothing is available if(parent && !length(possible_points)) possible_points += parent if(can_distribute && length(possible_points)) - //And pass the pain around - var/obj/item/organ/external/target = pick(possible_points) - target.receive_damage(brute, burn, sharp, used_weapon, forbidden_limbs, ignore_resists = TRUE) //If the damage was reduced before, don't reduce it again - - if(dismember_at_max_damage && body_part != UPPER_TORSO && body_part != LOWER_TORSO) // We've ensured all damage to the mob is retained, now let's drop it, if necessary. - droplimb(1) //Clean loss, just drop the limb and be done - - var/mob/living/carbon/owner_old = owner //Need to update health, but need a reference in case the below check cuts off a limb. - //If limb took enough damage, try to cut or tear it off - if(owner && loc == owner) - if(!cannot_amputate && (brute_dam + burn_dam) >= (max_damage)) - if(prob(brute / 2)) - if(sharp) - droplimb(0, DROPLIMB_SHARP) - - if(owner_old) - owner_old.updatehealth("limb receive damage") + // And pass the pain around + var/obj/item/organ/external/picked_part = pick(possible_points) + // If the damage was reduced before, don't reduce it again + picked_part.receive_damage(brute, burn, sharp, used_weapon, forbidden_limbs, ignore_resists = TRUE, updating_health = FALSE, silent = silent) + + // We've ensured all damage to the mob is retained, now let's drop it, if necessary + var/limb_dropped = FALSE + if(dismember_at_max_damage && limb_zone != BODY_ZONE_CHEST && limb_zone != BODY_ZONE_PRECISE_GROIN) + // Clean loss, just drop the limb and be done + droplimb(clean = TRUE, silent = silent) + limb_dropped = TRUE + + // If limb took enough damage, try to cut or tear it off. + if(!limb_dropped && sharp && owner && loc == owner && !cannot_amputate && prob(brute / 2)) + droplimb(silent = silent) + + if(updating_health) + organ_owner?.updatehealth("limb receive damage") + return update_icon() -#undef LIMB_SHARP_THRESH_INT_DMG -#undef LIMB_THRESH_INT_DMG -#undef LIMB_DMG_PROB -/obj/item/organ/external/proc/heal_damage(brute, burn, internal = 0, robo_repair = 0, updating_health = TRUE) +/obj/item/organ/external/proc/heal_damage(brute, burn, internal = FALSE, robo_repair = FALSE, updating_health = TRUE) if(is_robotic() && !robo_repair) return @@ -281,6 +365,7 @@ return update_icon() + /obj/item/organ/external/emp_act(severity) if(!is_robotic() || emp_proof) return @@ -307,6 +392,7 @@ if(2) receive_damage(0, 7) + /* This function completely restores a damaged organ to perfect condition. */ @@ -316,21 +402,20 @@ This function completely restores a damaged organ to perfect condition. if(is_robotic()) //Robotic organs stay robotic. status = ORGAN_ROBOT else - status = 0 + status = NONE germ_level = 0 perma_injury = 0 brute_dam = 0 burn_dam = 0 open = 0 //Closing all wounds. - internal_bleeding = FALSE disfigured = FALSE // handle internal organs - for(var/obj/item/organ/internal/current_organ in internal_organs) - current_organ.rejuvenate() + for(var/obj/item/organ/internal/organ as anything in internal_organs) + organ.rejuvenate() - for(var/obj/item/organ/external/EO in contents) - EO.rejuvenate() + for(var/obj/item/organ/external/childpart as anything in children) + childpart.rejuvenate() if(owner) owner.updatehealth("limb rejuvenate") @@ -338,6 +423,7 @@ This function completely restores a damaged organ to perfect condition. if(!owner) START_PROCESSING(SSobj, src) + /**************************************************** PROCESSING & UPDATING ****************************************************/ @@ -353,7 +439,7 @@ This function completely restores a damaged organ to perfect condition. if(trace_chemicals[chemID] <= 0) trace_chemicals.Remove(chemID) - if(!(status & ORGAN_BROKEN)) + if(!has_fracture()) perma_injury = 0 if(..()) @@ -361,6 +447,7 @@ This function completely restores a damaged organ to perfect condition. //Open wounds can become infected germ_level++ + //Updating germ levels. Handles organ germ levels and necrosis. /* The INFECTION_LEVEL values defined in setup.dm control the time it takes to reach the different @@ -380,7 +467,6 @@ INFECTION_LEVEL_THREE above this germ level the player will take additional toxi Note that amputating the affected organ does in fact remove the infection from the player's body. */ - /obj/item/organ/external/handle_germs() if(germ_level < INFECTION_LEVEL_TWO) @@ -389,60 +475,61 @@ Note that amputating the affected organ does in fact remove the infection from t if(germ_level >= INFECTION_LEVEL_TWO) //spread the infection to internal organs var/obj/item/organ/internal/target_organ = null //make internal organs become infected one at a time instead of all at once - for(var/obj/item/organ/internal/I in internal_organs) - if(I.germ_level > 0 && I.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one - if(!target_organ || I.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level - target_organ = I + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(organ.germ_level > 0 && organ.germ_level < min(germ_level, INFECTION_LEVEL_TWO) && (!target_organ || organ.germ_level > target_organ.germ_level)) //once the organ reaches whatever we can give it, or level two, switch to a different one, choosing the organ with the highest germ_level + target_organ = organ if(!target_organ) //figure out which organs we can spread germs to and pick one at random var/list/candidate_organs = list() - for(var/obj/item/organ/internal/I in internal_organs) - if(I.germ_level < germ_level) - candidate_organs |= I - if(candidate_organs.len) - target_organ = pick(candidate_organs) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(organ.germ_level < germ_level) + candidate_organs += organ + + target_organ = safepick(candidate_organs) if(target_organ) target_organ.germ_level += owner.dna.species.germs_growth_rate //spread the infection to child and parent organs - if(children) - for(var/obj/item/organ/external/child in children) - if(child.germ_level < germ_level && !child.is_robotic()) - if(child.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30)) - child.germ_level += owner.dna.species.germs_growth_rate + for(var/obj/item/organ/external/childpart as anything in children) + if(childpart.germ_level < germ_level && !childpart.is_robotic() && (childpart.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))) + childpart.germ_level += owner.dna.species.germs_growth_rate - if(parent) - if(parent.germ_level < germ_level && !parent.is_robotic()) - if(parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30)) - parent.germ_level += owner.dna.species.germs_growth_rate + if(parent && parent.germ_level < germ_level && !parent.is_robotic() && (parent.germ_level < INFECTION_LEVEL_ONE * 2 || prob(30))) + parent.germ_level += owner.dna.species.germs_growth_rate if(germ_level >= INFECTION_LEVEL_THREE) necrotize() germ_level += owner.dna.species.germs_growth_rate owner.adjustToxLoss(1) -//Updates brute_damn and burn_damn from wound damages. Updates BLEEDING status. -/obj/item/organ/external/proc/check_fracture(damage) - if(CONFIG_GET(flag/bones_can_break) && brute_dam + burn_dam + damage > min_broken_damage && !is_robotic()) - if(prob(damage * FRAGILITY(owner))) - fracture() - add_attack_logs(owner, null, "Suffered fracture to [src](Damage: [damage], Organ HP: [max_damage - (brute_dam + burn_dam) ])") -/obj/item/organ/external/proc/check_for_internal_bleeding(damage) - if(!owner) - return - if(NO_BLOOD in owner.dna.species.species_traits) - return - if(owner.status_flags & GODMODE) - return - var/min_internal_bleeding_damage = 30 - if(damage > 15 && brute_dam + burn_dam + damage > min_internal_bleeding_damage && !is_robotic()) - if(prob(damage)) - internal_bleeding = TRUE - owner.custom_pain("You feel something rip in your [name]!") - add_attack_logs(owner, null, "Suffered internal bleeding to [src](Damage: [damage], Organ HP: [max_damage - (brute_dam + burn_dam) ])") +/obj/item/organ/external/proc/try_fracture(inflicted_damage, silent = FALSE) + if(inflicted_damage <= LIMB_FRACTURE_MIN_DMG) + return FALSE + if(brute_dam + burn_dam + inflicted_damage <= min_broken_damage) + return FALSE + if(!prob(inflicted_damage * FRAGILITY(owner))) + return FALSE + if(fracture(silent)) + add_attack_logs(owner, null, "Suffered fracture to [src](Damage: [inflicted_damage], Organ HP: [max_damage - (brute_dam + burn_dam) ])") + return TRUE + return FALSE + + +/obj/item/organ/external/proc/try_internal_bleeding(inflicted_damage, silent = FALSE) + if(inflicted_damage <= LIMB_INT_BLEEDING_MIN_DMG) + return FALSE + if(brute_dam + burn_dam + inflicted_damage <= min_internal_bleeding_damage) + return FALSE + if(!prob(inflicted_damage)) + return FALSE + if(internal_bleeding(silent)) + add_attack_logs(owner, null, "Suffered internal bleeding to [src](Damage: [inflicted_damage], Organ HP: [max_damage - (brute_dam + burn_dam) ])") + return TRUE + return FALSE + // new damage icon system // returns just the brute/burn damage code @@ -469,340 +556,500 @@ Note that amputating the affected organ does in fact remove the infection from t tbrute = 3 return "[tbrute][tburn]" -/obj/item/organ/external/proc/update_splints() - if(!(status & ORGAN_SPLINTED)) - owner.splinted_limbs -= src - return - if(owner.step_count >= splinted_count + SPLINT_LIFE) - status &= ~ORGAN_SPLINTED //oh no, we actually need surgery now! - owner.visible_message("[owner] screams in pain as [owner.p_their()] splint pops off their [name]!","You scream in pain as your splint pops off your [name]!") - owner.emote("scream") - owner.Stun(4 SECONDS) - owner.handle_splints() - /**************************************************** DISMEMBERMENT ****************************************************/ - -//Handles dismemberment -/obj/item/organ/external/proc/droplimb(clean, disintegrate, ignore_children, nodamage) - - if(cannot_amputate || !owner) +/obj/item/organ/external/proc/droplimb(clean = FALSE, disintegrate = DROPLIMB_SHARP, ignore_children = FALSE, nodamage = FALSE, silent = FALSE) + if(!owner || cannot_amputate) return + if(owner.status_flags & GODMODE) return - if(!disintegrate) - disintegrate = DROPLIMB_SHARP - - switch(disintegrate) - if(DROPLIMB_SHARP) - if(!clean) - var/gore_sound = "[is_robotic() ? "tortured metal" : "ripping tendons and flesh"]" + if(!silent) + switch(disintegrate) + if(DROPLIMB_SHARP) + if(!clean) + var/gore_sound = "[is_robotic() ? "tortured metal" : "ripping tendons and flesh"]" + owner.visible_message( + span_danger("[owner]'s [name] flies off in an arc!"), + span_userdanger("Your [name] goes flying off!"), + span_italics("You hear a terrible sound of [gore_sound]."), + ) + if(DROPLIMB_BURN) + var/gore = "[is_robotic() ? "" : " of burning flesh"]" owner.visible_message( - "\The [owner]'s [src.name] flies off in an arc!",\ - "Your [src.name] goes flying off!",\ - "You hear a terrible sound of [gore_sound].") - if(DROPLIMB_BURN) - var/gore = "[is_robotic() ? "" : " of burning flesh"]" - owner.visible_message( - "\The [owner]'s [src.name] flashes away into ashes!",\ - "Your [src.name] flashes away into ashes!",\ - "You hear a crackling sound[gore].") - if(DROPLIMB_BLUNT) - var/gore = "[is_robotic() ? "": " in shower of gore"]" - var/gore_sound = "[is_robotic() ? "rending sound of tortured metal" : "sickening splatter of gore"]" - owner.visible_message( - "\The [owner]'s [src.name] explodes[gore]!",\ - "Your [src.name] explodes[gore]!",\ - "You hear the [gore_sound].") + span_danger("[owner]'s [name] flashes away into ashes!"), + span_userdanger("Your [name] flashes away into ashes!"), + span_italics("You hear a crackling sound[gore]."), + ) + if(DROPLIMB_BLUNT) + var/gore = "[is_robotic() ? "": " in shower of gore"]" + var/gore_sound = "[is_robotic() ? "rending sound of tortured metal" : "sickening splatter of gore"]" + owner.visible_message( + span_danger("[owner]'s [name] explodes[gore]!"), + span_userdanger("Your [name] explodes[gore]!"), + span_italics("You hear the [gore_sound].") + ) var/mob/living/carbon/human/victim = owner //Keep a reference for post-removed(). // Let people make limbs become fun things when removed - var/atom/movable/dropped_part = remove(null, ignore_children) + var/atom/movable/dropped_part = remove(ignore_children = ignore_children) - if(parent) - parent.children -= src + if(!QDELETED(src) && parent) + LAZYREMOVE(parent.children, src) if(!nodamage) var/total_brute = brute_dam var/total_burn = burn_dam - for(var/obj/item/organ/external/E in children) //Factor in the children's brute and burn into how much will transfer - total_brute += E.brute_dam - total_burn += E.burn_dam - parent.receive_damage(total_brute, total_burn, ignore_resists = TRUE) //Transfer the full damage to the parent, bypass limb damage reduction. + for(var/obj/item/organ/external/childpart as anything in children) //Factor in the children's brute and burn into how much will transfer + total_brute += childpart.brute_dam + total_burn += childpart.burn_dam + parent.receive_damage(total_brute, total_burn, ignore_resists = TRUE, silent = silent) //Transfer the full damage to the parent, bypass limb damage reduction. parent = null - - dir = 2 + dir = SOUTH if(victim) - victim.update_tail() - victim.update_wing() victim.updatehealth("droplimb") victim.UpdateDamageIcon() victim.regenerate_icons() switch(disintegrate) if(DROPLIMB_SHARP) - compile_icon() - add_blood(victim.blood_DNA, victim.dna.species.blood_color) - var/matrix/M = matrix() - M.Turn(rand(180)) - src.transform = M - if(!clean) + if(!QDELETED(src)) + compile_icon() + brute_dam = 0 + burn_dam = 0 //Reset the damage on the limb; the damage should have transferred to the parent; we don't want extra damage being re-applied when then limb is re-attached + + if(!clean && !QDELETED(dropped_part)) // we need to separate this in case [remove()] returned smth else but our src + dropped_part.add_mob_blood(victim) + var/matrix/new_transform = matrix(dropped_part.transform) + new_transform.Turn(rand(180)) + dropped_part.transform = new_transform // Throw limb around. - if(src && istype(loc,/turf)) - dropped_part.throw_at(get_edge_target_turf(src,pick(GLOB.alldirs)),rand(1,3),30) - dir = 2 - brute_dam = 0 - burn_dam = 0 //Reset the damage on the limb; the damage should have transferred to the parent; we don't want extra damage being re-applied when then limb is re-attached + if(isturf(dropped_part.loc)) + dropped_part.throw_at(get_edge_target_turf(dropped_part, pick(GLOB.alldirs)), rand(1, 3), 30) + dropped_part.dir = SOUTH + return dropped_part + else - qdel(src) // If you flashed away to ashes, YOU FLASHED AWAY TO ASHES + if(!QDELETED(src)) + qdel(src) // If you flashed away to ashes, YOU FLASHED AWAY TO ASHES + return null -/obj/item/organ/external/proc/disembowel(spillage_zone = "chest") +/obj/item/organ/external/proc/disembowel(spillage_zone = BODY_ZONE_CHEST, silent = FALSE) if(!owner) - return + return FALSE - var/mob/living/carbon/C = owner + var/mob/living/carbon/human/organ_owner = owner - if(!hasorgans(C)) - return + if(!hasorgans(organ_owner)) + return FALSE var/organ_spilled = FALSE - var/turf/T = get_turf(C) - C.add_splatter_floor(T) - playsound(get_turf(C), 'sound/effects/splat.ogg', 25, 1) - for(var/X in C.internal_organs) - var/obj/item/organ/O = X - var/org_zone = check_zone(O.parent_organ) - if(org_zone == spillage_zone) - O.remove(C) - O.forceMove(T) - organ_spilled = TRUE - - if(organ_spilled) - C.visible_message("[C]'s internal organs spill out onto the floor!") + var/owner_turf = get_turf(organ_owner) + if(!silent) + organ_owner.add_splatter_floor(owner_turf) + playsound(owner_turf, 'sound/effects/splat.ogg', 25, TRUE) + + for(var/obj/item/organ/organ as anything in organ_owner.internal_organs) + var/organ_zone = check_zone(organ.parent_organ_zone) + if(organ_zone == spillage_zone) + var/atom/movable/thing = organ.remove(organ_owner) + if(!QDELETED(thing)) + organ_spilled = TRUE + thing.forceMove(drop_location()) + + if(organ_spilled && !silent) + organ_owner.visible_message(span_danger("[organ_owner]'s internal organs spill out onto the floor!")) + return TRUE -/obj/item/organ/external/chest/droplimb() - if(disembowel()) - return TRUE -/obj/item/organ/external/groin/droplimb() - if(disembowel("groin")) - return TRUE +/obj/item/organ/external/chest/droplimb(clean = FALSE, disintegrate = DROPLIMB_SHARP, ignore_children = FALSE, nodamage = FALSE, silent = FALSE) + return disembowel(BODY_ZONE_CHEST, silent) + +/obj/item/organ/external/groin/droplimb(clean = FALSE, disintegrate = DROPLIMB_SHARP, ignore_children = FALSE, nodamage = FALSE, silent = FALSE) + return disembowel(BODY_ZONE_PRECISE_GROIN, silent) /obj/item/organ/external/attackby(obj/item/I, mob/user, params) if(I.sharp) add_fingerprint(user) - if(!contents.len) - to_chat(user, "There is nothing left inside [src]!") + if(!length(contents)) + to_chat(user, span_warning("There is nothing left inside [src]!")) return - playsound(loc, 'sound/weapons/slice.ogg', 50, 1, -1) - user.visible_message("[user] begins to cut open [src].",\ - "You begin to cut open [src]...") - if(do_after(user, 54, target = src)) - drop_organs(user) + + playsound(loc, 'sound/weapons/slice.ogg', 50, TRUE, -1) + user.visible_message( + span_warning("[user] begins to cut open [src]."), + span_notice("You begin to cut open [src]..."), + ) + if(do_after(user, 5 SECONDS, target = src) && length(contents) && !QDELETED(src) && !QDELETED(user)) + drop_organs() else return ..() -//empties the bodypart from its organs and other things inside it -/obj/item/organ/external/proc/drop_organs(mob/user) - var/turf/T = get_turf(src) - if(!is_robotic()) - playsound(T, 'sound/effects/splat.ogg', 25, 1) - for(var/obj/item/I in src) - I.forceMove(T) + +/** + * Empties the bodypart from its organs and other things inside it. + */ +/obj/item/organ/external/proc/drop_organs(atom/drop_loc, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE, silent = FALSE) + drop_loc = drop_loc ? drop_loc : drop_location() + var/mob/living/carbon/human/organ_owner = owner + + var/need_compile = !ignore_children && LAZYLEN(children) + + remove_all_embedded_objects() + + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(organ_owner) + var/atom/movable/thing = organ.remove(organ_owner, special) + if(!QDELETED(thing)) + thing.forceMove(drop_loc) + else + LAZYREMOVE(internal_organs, organ) + organ.forceMove(drop_loc) + + if(!ignore_children) + for(var/obj/item/organ/external/childpart as anything in children) + if(organ_owner) + if(childpart.limb_zone == BODY_ZONE_PRECISE_GROIN) + for(var/obj/item/organ/external/groinpart as anything in childpart.children) + groinpart.compile_icon() + groinpart.brute_dam = 0 + groinpart.burn_dam = 0 + var/atom/movable/groin_thing = groinpart.remove(organ_owner, special) + if(!QDELETED(groin_thing)) + groin_thing.forceMove(drop_loc) + continue + childpart.compile_icon() + childpart.brute_dam = 0 + childpart.burn_dam = 0 + var/atom/movable/thing = childpart.remove(organ_owner, special) + if(!QDELETED(thing)) + thing.forceMove(drop_loc) + else + childpart.compile_icon() + LAZYREMOVE(children, childpart) + childpart.parent = null + childpart.forceMove(drop_loc) + childpart.dir = SOUTH + + for(var/obj/item/thing in contents) + if(isexternalorgan(thing)) + continue + thing.forceMove(drop_loc) + + if(organ_owner) + organ_owner.updatehealth("drop_organs") + organ_owner.UpdateDamageIcon() + organ_owner.regenerate_icons() + + if(!silent && !is_robotic()) + playsound(drop_loc, 'sound/effects/splat.ogg', 25, TRUE) + + if(need_compile) + compile_icon() + /**************************************************** HELPERS ****************************************************/ -/obj/item/organ/external/proc/release_restraints(var/mob/living/carbon/human/holder) +/obj/item/organ/external/proc/release_restraints(mob/living/carbon/human/holder, silent = FALSE) if(!holder) holder = owner if(!holder) return - if(holder.handcuffed && (body_part in list(ARM_LEFT, ARM_RIGHT, HAND_LEFT, HAND_RIGHT))) - holder.visible_message(\ - "\The [holder.handcuffed.name] falls off of [holder.name].",\ - "\The [holder.handcuffed.name] falls off you.") + if(holder.handcuffed && (limb_zone in list(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_PRECISE_L_HAND, BODY_ZONE_PRECISE_R_HAND))) + if(!silent) + holder.visible_message( + "[holder.handcuffed.name] falls off of [holder.name].", + "[holder.handcuffed.name] falls off you.", + ) holder.drop_item_ground(holder.handcuffed) - if(holder.legcuffed && (body_part in list(FOOT_LEFT, FOOT_RIGHT, LEG_LEFT, LEG_RIGHT))) - holder.visible_message(\ - "\The [holder.legcuffed.name] falls off of [holder.name].",\ - "\The [holder.legcuffed.name] falls off you.") + + if(holder.legcuffed && (limb_zone in list(BODY_ZONE_L_LEG, BODY_ZONE_R_LEG, BODY_ZONE_PRECISE_L_FOOT, BODY_ZONE_PRECISE_R_FOOT))) + if(!silent) + holder.visible_message( + "[holder.legcuffed.name] falls off of [holder.name].", + "[holder.legcuffed.name] falls off you.", + ) holder.drop_item_ground(holder.legcuffed) -/obj/item/organ/external/proc/fracture() + +/obj/item/organ/external/proc/internal_bleeding(silent = FALSE) + if(owner?.status_flags & GODMODE) + return FALSE if(is_robotic()) - return //ORGAN_BROKEN doesn't have the same meaning for robot limbs - if((status & ORGAN_BROKEN) || cannot_break) - return - if(owner) - if(owner.status_flags & GODMODE) - return - owner.visible_message(\ - "You hear a loud cracking sound coming from \the [owner].",\ - "Something feels like it shattered in your [name]!",\ - "You hear a sickening crack.") - playsound(owner, "bonebreak", 150, 1) + return FALSE + if(dna && (NO_BLOOD in dna.species.species_traits)) + return FALSE + if(has_internal_bleeding() || cannot_internal_bleed) + return FALSE + + status |= ORGAN_INT_BLEED + + if(owner && !silent) + owner.custom_pain("You feel something rip in your [name]!") + + return TRUE + + +/obj/item/organ/external/proc/has_internal_bleeding() + return (status & ORGAN_INT_BLEED) + + +/obj/item/organ/external/proc/stop_internal_bleeding() + if(is_robotic()) + return FALSE + if(dna && (NO_BLOOD in dna.species.species_traits)) + return FALSE + if(!has_internal_bleeding()) + return FALSE + + status &= ~ORGAN_INT_BLEED + + return TRUE + + +/obj/item/organ/external/proc/fracture(silent = FALSE) + if(!CONFIG_GET(flag/bones_can_break)) + return FALSE + if(owner?.status_flags & GODMODE) + return FALSE + if(is_robotic()) + return FALSE + if(has_fracture() || cannot_break) + return FALSE + + if(owner && !silent) + owner.visible_message( + span_warning("You hear a loud cracking sound coming from \the [owner]."), + span_danger("Something feels like it shattered in your [name]!"), + span_italics("You hear a sickening crack."), + ) + + playsound(owner, "bonebreak", 150, TRUE) + if(owner.has_pain()) owner.emote("scream") status |= ORGAN_BROKEN - broken_description = pick("broken","fracture","hairline fracture") + broken_description = pick("broken", "fracture", "hairline fracture") perma_injury = brute_dam // Fractures have a chance of getting you out of restraints if(prob(25)) - release_restraints() + release_restraints(silent = silent) + + return TRUE + + +/obj/item/organ/external/proc/has_fracture() + return (status & ORGAN_BROKEN) -/mob/living/carbon/human/proc/check_fractures() - var/list/fractures = list() - for(var/obj/item/organ/external/limb in bodyparts) - if(limb.status == ORGAN_BROKEN) - fractures.Add(limb) - return fractures /obj/item/organ/external/proc/mend_fracture() if(is_robotic()) - return FALSE //ORGAN_BROKEN doesn't have the same meaning for robot limbs - - if(!(status & ORGAN_BROKEN)) + return FALSE + if(!has_fracture()) return FALSE status &= ~ORGAN_BROKEN - status &= ~ORGAN_SPLINTED perma_injury = 0 + remove_splint() + + return TRUE + + +/obj/item/organ/external/proc/apply_splint() + if(is_splinted()) + return FALSE + if(!has_fracture()) + return FALSE + + status |= ORGAN_SPLINTED + if(owner) + LAZYADDOR(owner.splinted_limbs, src) + splinted_count = owner.step_count + + return TRUE + + +/obj/item/organ/external/proc/is_splinted() + return (status & ORGAN_SPLINTED) + + +/obj/item/organ/external/proc/remove_splint(splint_break = FALSE, silent = FALSE) + if(!is_splinted()) + return FALSE + + status &= ~ORGAN_SPLINTED + splinted_count = 0 if(owner) - owner.handle_splints() + LAZYREMOVE(owner.splinted_limbs, src) + if(splint_break) + owner.Stun(4 SECONDS) + if(owner.has_pain() && !silent) + owner.emote("scream") + owner.visible_message( + span_danger("[owner] screams in pain as [owner.p_their()] splint pops off their [name]!"), + span_userdanger("You scream in pain as your splint pops off your [name]!"), + span_italics("You hear a loud scream!") + ) + else if(!silent) + owner.visible_message( + span_danger("The splint on [owner]'s [name] unravels!"), + span_userdanger("The splint on your [name] unravels!"), + ) + return TRUE -/obj/item/organ/external/robotize(company, make_tough = 0, convert_all = 1) + +/obj/item/organ/external/proc/has_fracture_or_splint() + return (status & (ORGAN_BROKEN|ORGAN_SPLINTED)) + + +/obj/item/organ/external/robotize(make_tough = FALSE, company, convert_all = TRUE) ..() + remove_splint() + //robot limbs take reduced damage - if(!make_tough) + if(make_tough) + tough = TRUE + else brute_mod = 0.66 burn_mod = 0.66 dismember_at_max_damage = TRUE - else - tough = TRUE + // Robot parts also lack bones // This is so surgery isn't kaput, let's see how this does encased = null - if(company && istext(company)) + if(istext(company)) set_company(company) - cannot_break = 1 + cannot_break = TRUE get_icon() - for(var/obj/item/organ/external/T in children) - if((convert_all) || (T.type in convertable_children)) - T.robotize(company, make_tough, convert_all) + for(var/obj/item/organ/external/bodypart as anything in children) + if(convert_all || (convertable_children && (bodypart.type in convertable_children))) + bodypart.robotize(make_tough, company, convert_all) -/obj/item/organ/external/proc/set_company(var/company) - model = company - var/datum/robolimb/R = GLOB.all_robolimbs[company] - if(R) - force_icon = R.icon - name = "[R.company] [initial(name)]" - desc = "[R.desc]" +/obj/item/organ/external/necrotize(silent = FALSE) + if(status & (ORGAN_ROBOT|ORGAN_DEAD)) + return FALSE + status |= ORGAN_DEAD + if(dead_icon) + icon_state = dead_icon + if(owner) + if(!silent) + to_chat(owner, span_notice("You can't feel your [name] anymore...")) + owner.update_body() + if(vital) + owner.death() + return TRUE -/obj/item/organ/external/proc/mutate() - src.status |= ORGAN_MUTATED + +/obj/item/organ/external/unnecrotize() + if(!is_dead()) + return FALSE + status &= ~ORGAN_DEAD + owner?.update_body() + return TRUE + + +/obj/item/organ/external/proc/mutate(silent = FALSE, update_body = TRUE) + if(owner?.status_flags & GODMODE) + return FALSE + if(is_robotic()) + return FALSE + if(is_mutated()) + return FALSE + status |= ORGAN_MUTATED if(owner) - owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly render the deformed sprite. + if(update_body) + owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly render the deformed sprite. + if(!silent) + to_chat(owner, span_warning("Something is not right with your [name]...")) + return TRUE + -/obj/item/organ/external/proc/unmutate() - src.status &= ~ORGAN_MUTATED +/obj/item/organ/external/proc/unmutate(silent = FALSE, update_body = TRUE) + if(!is_mutated()) + return FALSE + if(is_robotic()) + return FALSE + status &= ~ORGAN_MUTATED if(owner) - owner.update_body(TRUE) //Forces all bodyparts to update in order to correctly return them to normal. + if(update_body) + owner.update_body(rebuild_base = TRUE) //Forces all bodyparts to update in order to correctly return them to normal. + if(!silent) + to_chat(owner, span_warning("Your [name] is shaped normally again.")) + return TRUE + + +/obj/item/organ/external/proc/is_mutated() + return (status & ORGAN_MUTATED) + /obj/item/organ/external/proc/get_damage() //returns total damage return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use health? + /obj/item/organ/external/proc/has_infected_wound() if(germ_level > INFECTION_LEVEL_ONE) return TRUE return FALSE + /obj/item/organ/external/proc/is_usable() if((is_robotic() && get_damage() >= max_damage) && !tough) //robot limbs just become inoperable at max damage return return !(status & (ORGAN_MUTATED|ORGAN_DEAD)) + /obj/item/organ/external/proc/is_malfunctioning() return (is_robotic() && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam) && !tough) -/obj/item/organ/external/remove(var/mob/living/user, var/ignore_children) - if(!owner) - return - var/mob/living/carbon/human/victim = owner +/obj/item/organ/external/proc/disfigure(silent = FALSE) + if(is_disfigured()) + return FALSE - if(status & ORGAN_SPLINTED) - victim.splinted_limbs -= src + if(owner) + if(owner.status_flags & GODMODE) + return FALSE - for(var/obj/item/I in embedded_objects) - embedded_objects -= I - I.forceMove(src) - if(!owner.has_embedded_objects()) - owner.clear_alert("embeddedobject") + if(!silent) + owner.visible_message( + span_warning("You hear a sickening sound coming from \the [owner]'s [name] as it turns into a mangled mess!"), + span_userdanger("Your [name] becomes a mangled mess!"), + span_italics("You hear a sickening sound.") + ) - . = ..() + disfigured = TRUE + return TRUE - // Attached organs also fly off. - if(!ignore_children) - for(var/obj/item/organ/external/O in children) - var/atom/movable/thing = O.remove(victim) - if(thing) - thing.forceMove(src) - victim.updatehealth("limb remove") - // Grab all the internal giblets too. - for(var/obj/item/organ/internal/organ in internal_organs) - var/atom/movable/thing = organ.remove(victim) - thing.forceMove(src) +/obj/item/organ/external/proc/is_disfigured() + return disfigured - release_restraints(victim) - victim.bodyparts -= src - if(is_primary_organ(victim)) - victim.bodyparts_by_name[limb_name] = null // Remove from owner's vars. - //Robotic limbs explode if sabotaged. - if(is_robotic() && sabotaged) - victim.visible_message( - "\The [victim]'s [src.name] explodes violently!",\ - "Your [src.name] explodes!",\ - "You hear an explosion!") - explosion(get_turf(owner),-1,-1,2,3, cause = "Organ Sabotage") - do_sparks(5, 0, victim) - qdel(src) +/obj/item/organ/external/proc/undisfigure() + if(!is_disfigured()) + return FALSE -/obj/item/organ/external/proc/disfigure() - if(disfigured) - return - if(owner) - if(owner.status_flags & GODMODE) - return - owner.visible_message("You hear a sickening sound coming from \the [owner]'s [name] as it turns into a mangled mess!", \ - "Your [name] becomes a mangled mess!", \ - "You hear a sickening sound.") - disfigured = TRUE + disfigured = FALSE + + return TRUE -/obj/item/organ/external/is_primary_organ(var/mob/living/carbon/human/O = null) - if(isnull(O)) - O = owner - if(!istype(O)) // You're not the primary organ of ANYTHING, bucko - return 0 - return src == O.bodyparts_by_name[limb_name] /obj/item/organ/external/proc/infection_check() if(owner?.status_flags & GODMODE) @@ -819,6 +1066,7 @@ Note that amputating the affected organ does in fact remove the infection from t return prob(dam_coef * 10) return FALSE + /obj/item/organ/external/serialize() var/list/data = ..() if(is_robotic()) @@ -826,6 +1074,7 @@ Note that amputating the affected organ does in fact remove the infection from t // If we wanted to store wound information, here is where it would go return data + /obj/item/organ/external/deserialize(list/data) var/company = data["company"] if(company && istext(company)) @@ -834,35 +1083,50 @@ Note that amputating the affected organ does in fact remove the infection from t if(data["dna"]) sync_colour_to_dna() -//Remove all embedded objects from all limbs on the carbon mob -/mob/living/carbon/human/proc/remove_all_embedded_objects() - var/turf/T = get_turf(src) - for(var/X in bodyparts) - var/obj/item/organ/external/L = X - for(var/obj/item/I in L.embedded_objects) - L.embedded_objects -= I - I.forceMove(T) +/obj/item/organ/external/proc/set_company(company) + model = company + var/datum/robolimb/R = GLOB.all_robolimbs[company] + if(R) + force_icon = R.icon + name = "[R.company] [initial(name)]" + desc = "[R.desc]" - clear_alert("embeddedobject") -/mob/living/carbon/human/proc/has_embedded_objects() +/obj/item/organ/external/proc/remove_all_embedded_objects(atom/drop_loc, clear_alert = TRUE) . = 0 - for(var/X in bodyparts) - var/obj/item/organ/external/L = X - for(var/obj/item/I in L.embedded_objects) - return 1 - -/mob/living/carbon/human/proc/check_limbs_with_embedded_objects() - var/list/limbs = list() - for(var/obj/item/organ/external/limb in bodyparts) - if(limb.embedded_objects.len) - limbs.Add() - return limbs - -/mob/living/carbon/human/proc/check_embedded_objects() - var/list/items = list() - for(var/obj/item/organ/external/limb in bodyparts) - for(var/obj/item/item in limb.embedded_objects) - items.Add(item) - return items + if(!LAZYLEN(embedded_objects)) + return . + drop_loc = drop_loc ? drop_loc : drop_location() + for(var/obj/item/thing as anything in embedded_objects) + LAZYREMOVE(embedded_objects, thing) + thing.forceMove(drop_loc) + .++ + if(clear_alert && owner && !owner.has_embedded_objects()) + owner.clear_alert("embeddedobject") + return . + + +/obj/item/organ/external/proc/remove_embedded_object(obj/item/thing, atom/drop_loc, clear_alert = TRUE) + if(!LAZYIN(embedded_objects, thing)) + return FALSE + LAZYREMOVE(embedded_objects, thing) + thing.forceMove(drop_loc ? drop_loc : drop_location()) + if(clear_alert && owner && !owner.has_embedded_objects()) + owner.clear_alert("embeddedobject") + return TRUE + + +/obj/item/organ/external/proc/add_embedded_object(obj/item/thing, throw_alert = TRUE) + LAZYADDOR(embedded_objects, thing) + thing.forceMove(src) + if(throw_alert) + owner?.throw_alert("embeddedobject", /obj/screen/alert/embeddedobject) + + +#undef LIMB_SHARP_THRESH_INT_DMG +#undef LIMB_THRESH_INT_DMG +#undef LIMB_DMG_PROB +#undef LIMB_FRACTURE_MIN_DMG +#undef LIMB_INT_BLEEDING_MIN_DMG + diff --git a/code/modules/surgery/organs/organ_icon.dm b/code/modules/surgery/organs/organ_icon.dm index fcce8c7e53b..3820587dfb1 100644 --- a/code/modules/surgery/organs/organ_icon.dm +++ b/code/modules/surgery/organs/organ_icon.dm @@ -4,17 +4,14 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) // I do this so the head's overlays don't get obliterated for(var/child_i in child_icons) overlays -= child_i - child_icons.Cut() + LAZYREINITLIST(child_icons) // This is a kludge, only one icon has more than one generation of children though. - for(var/obj/item/organ/external/organ in contents) - if(organ.children && organ.children.len) - for(var/obj/item/organ/external/child in organ.children) - overlays += child.mob_icon - child_icons += child.mob_icon - overlays += organ.mob_icon - child_icons += organ.mob_icon - -/obj/item/organ/external/proc/change_organ_icobase(var/new_icobase, var/new_deform, var/owner_sensitive) //Change the icobase/deform of this organ. If owner_sensitive is set, that means the proc won't mess with frankenstein limbs. + for(var/obj/item/organ/external/childpart as anything in children) + overlays += childpart.mob_icon + child_icons += childpart.mob_icon + + +/obj/item/organ/external/proc/change_organ_icobase(new_icobase, new_deform, owner_sensitive) //Change the icobase/deform of this organ. If owner_sensitive is set, that means the proc won't mess with frankenstein limbs. if(owner_sensitive) //This and the below statements mean that the icobase/deform will only get updated if the limb is the same species as and is owned by the mob it's attached to. if(dna.species && owner.dna.species && dna.species.name != owner.dna.species.name) return @@ -24,7 +21,8 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) icobase = new_icobase ? new_icobase : icobase deform = new_deform ? new_deform : deform -/obj/item/organ/external/proc/sync_colour_to_human(var/mob/living/carbon/human/H) + +/obj/item/organ/external/proc/sync_colour_to_human(mob/living/carbon/human/H) if(is_robotic() && !istype(dna.species, /datum/species/machine)) //machine people get skin color return if(dna.species && H.dna.species && dna.species.name != H.dna.species.name) @@ -40,7 +38,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) s_tone = null s_col = H.skin_colour if(H.dna.species.bodyflags & HAS_ICON_SKIN_TONE) - var/obj/item/organ/external/chest/C = H.get_organ("chest") + var/obj/item/organ/external/chest/C = H.get_organ(BODY_ZONE_CHEST) change_organ_icobase(C.icobase, C.deform) /obj/item/organ/external/proc/sync_colour_to_dna() @@ -55,13 +53,15 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) /obj/item/organ/external/head/sync_colour_to_human(var/mob/living/carbon/human/H) ..() - var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ(/obj/item/organ/internal/eyes)//owner.internal_bodyparts_by_name["eyes"] + var/obj/item/organ/internal/eyes/eyes = owner.get_int_organ(/obj/item/organ/internal/eyes) if(eyes) eyes.update_colour() -/obj/item/organ/external/head/remove(mob/living/user, ignore_children) + +/obj/item/organ/external/head/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE) get_icon() . = ..() + /obj/item/organ/external/proc/get_icon(skeletal) // Kasparrov, you monster if(force_icon) @@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) var/new_icon_state = new_icons[2] mob_icon = new /icon(icon_file, new_icon_state) if(!skeletal && !is_robotic()) - if(status & ORGAN_DEAD) + if(is_dead()) mob_icon.ColorTone(rgb(10,50,0)) mob_icon.SetIntensity(0.7) @@ -100,7 +100,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) if(!owner) return - if(dna.species.has_organ["eyes"]) + if(dna.species.has_organ[INTERNAL_ORGAN_EYES]) var/icon/eyes_icon = owner.get_eyecon() if(eyes_icon) mob_icon.Blend(eyes_icon, ICON_OVERLAY) //This is required since update_icons.dm relies on this proc to render non-shining eyes. @@ -169,7 +169,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) gender = "m" else gender = "f" //Default to "f" (per line 162). Using a pick("m", "f") will make different body parts different genders for the same character. - if(limb_name == "head") + if(limb_zone == BODY_ZONE_HEAD) var/obj/item/organ/external/head/head_organ = src head_organ.handle_alt_icon() @@ -180,7 +180,7 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) else if(is_robotic()) icon_file = 'icons/mob/human_races/robotic.dmi' else - if(status & ORGAN_MUTATED) + if(is_mutated()) icon_file = deform else // Congratulations, you are normal @@ -194,5 +194,5 @@ GLOBAL_LIST_EMPTY(limb_icon_cache) if(n_is != damage_state) damage_state = n_is owner?.UpdateDamageIcon() - return 1 - return 0 + return TRUE + return FALSE diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 9edc4a0cffa..080a0affd33 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -3,90 +3,101 @@ force = 1 w_class = WEIGHT_CLASS_SMALL throwforce = 0 - var/slot - // DO NOT add slots with matching names to different zones - it will break internal_organs_slot list! - var/non_primary = 0 + /// Unique slot this organ occupies. See [combat.dm] for defines. DO NOT add slots with matching names to different zones - it will break internal_organs_slot list! + var/slot = NONE + /// Whether it shows up as an option to remove during surgery. + var/unremovable = FALSE var/can_see_food = FALSE - var/unremovable = FALSE //Whether it shows up as an option to remove during surgery. + /obj/item/organ/internal/New(mob/living/carbon/holder) ..() if(istype(holder)) insert(holder) -/obj/item/organ/internal/Initialize(mapload) - . = ..() if(species_type == /datum/species/diona) AddComponent(/datum/component/diona_internals) -/obj/item/organ/internal/proc/insert(mob/living/carbon/M, special = 0, var/dont_remove_slot = 0) - if(!iscarbon(M) || owner == M) +/obj/item/organ/internal/proc/insert(mob/living/carbon/target, special = ORGAN_MANIPULATION_DEFAULT) + if(!iscarbon(target) || owner == target) return - do_pickup_animation(src, M) + do_pickup_animation(src, target) - var/obj/item/organ/internal/replaced = M.get_organ_slot(slot) + var/obj/item/organ/internal/replaced = target.get_organ_slot(slot) if(replaced) - if(dont_remove_slot) - non_primary = 1 - else - replaced.remove(M, special = 1) + replaced.remove(target, ORGAN_MANIPULATION_NOEFFECT) - owner = M + owner = target + target.internal_organs |= src + target.internal_organs_slot[slot] = src - M.internal_organs |= src - M.internal_organs_slot[slot] = src - var/obj/item/organ/external/parent - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - parent = H.get_organ(check_zone(parent_organ)) + if(ishuman(target)) + var/mob/living/carbon/human/h_target = target + var/obj/item/organ/external/parent = h_target.get_organ(check_zone(parent_organ_zone)) if(!istype(parent)) - log_runtime(EXCEPTION("[src] attempted to insert into a [parent_organ], but [parent_organ] wasn't an organ! [atom_loc_line(M)]"), src) + stack_trace("[src] attempted to insert into a [parent_organ_zone], but [parent_organ_zone] wasn't an organ! [atom_loc_line(h_target)]") else - parent.internal_organs |= src + LAZYADDOR(parent.internal_organs, src) + h_target.update_int_organs() + loc = null - for(var/X in actions) - var/datum/action/A = X - A.Grant(M) + + for(var/datum/action/action as anything in actions) + action.Grant(target) + if(vital) - M.update_stat("Vital organ inserted") + target.update_stat("Vital organ inserted") + STOP_PROCESSING(SSobj, src) -// Removes the given organ from its owner. -// Returns the removed object, which is usually just itself -// However, you MUST set the object's positiion yourself when you call this! -/obj/item/organ/internal/remove(mob/living/carbon/M, special = 0) + +/** + * Removes the given organ from its owner. + * Returns the removed object, which is usually just itself. + * However, you MUST set the object's positiion yourself when you call this! + */ +/obj/item/organ/internal/remove(mob/living/carbon/target, special = ORGAN_MANIPULATION_DEFAULT) if(!owner) - log_runtime(EXCEPTION("\'remove\' called on [src] without an owner! Mob: [M], [atom_loc_line(M)]"), src) + stack_trace("\'remove\' called on [src] without an owner! Mob: [target], [atom_loc_line(target)]") + return + + if(target != owner) + return + + var/mob/living/carbon/organ_owner = target || owner + var/send_signal = FALSE - if(M) - M.internal_organs -= src - if(M.internal_organs_slot[slot] == src) - M.internal_organs_slot.Remove(slot) + if(iscarbon(organ_owner)) + organ_owner.internal_organs -= src + if(organ_owner.internal_organs_slot[slot] == src) + organ_owner.internal_organs_slot[slot] = null if(!special) - SEND_SIGNAL(src, COMSIG_CARBON_LOSE_ORGAN) - if(vital && !special) - if(M.stat != DEAD)//safety check! - M.death() - - if(istype(M, /mob/living/carbon/human)) - var/mob/living/carbon/human/H = M - var/obj/item/organ/external/parent = H.get_organ(check_zone(parent_organ)) - if(!istype(parent)) - log_runtime(EXCEPTION("[src] attempted to remove from a [parent_organ], but [parent_organ] didn't exist! [atom_loc_line(M)]"), src) + send_signal = TRUE + if(vital && !special && organ_owner.stat != DEAD) + organ_owner.death() + + if(ishuman(organ_owner)) + var/mob/living/carbon/human/h_owner = organ_owner + var/obj/item/organ/external/parent = h_owner.get_organ(check_zone(parent_organ_zone)) + if(isexternalorgan(parent)) + LAZYREMOVE(parent.internal_organs, src) else - parent.internal_organs -= src - H.update_int_organs() + stack_trace("[src] attempted to remove from a [parent_organ_zone], but [parent_organ_zone] didn't exist! [atom_loc_line(target)]") + h_owner.update_int_organs() - for(var/X in actions) - var/datum/action/A = X - A.Remove(M) + for(var/datum/action/action as anything in actions) + action.Remove(organ_owner) + + if(send_signal) + SEND_SIGNAL(src, COMSIG_CARBON_LOSE_ORGAN) owner = null START_PROCESSING(SSobj, src) return src + /obj/item/organ/internal/emp_act(severity) if(!is_robotic() || emp_proof) return @@ -96,22 +107,28 @@ if(2) receive_damage(7, 1) -/obj/item/organ/internal/replaced(var/mob/living/carbon/human/target) + +/obj/item/organ/internal/replaced(mob/living/carbon/human/target) insert(target) + /obj/item/organ/internal/item_action_slot_check(slot, mob/user) return + /obj/item/organ/internal/proc/on_find(mob/living/finder) return + /obj/item/organ/internal/proc/on_life() return + //abstract proc called by carbon/death() /obj/item/organ/internal/proc/on_owner_death() return + /obj/item/organ/internal/proc/prepare_eat() if(is_robotic()) return //no eating cybernetic implants! @@ -122,25 +139,28 @@ S.icon_state = icon_state S.origin_tech = origin_tech S.w_class = w_class - return S -/obj/item/organ/internal/attempt_become_organ(obj/item/organ/external/parent,mob/living/carbon/human/H) - if(parent_organ != parent.limb_name) - return 0 - insert(H) - return 1 + +/obj/item/organ/internal/attempt_become_organ(obj/item/organ/external/parent, mob/living/carbon/human/target) + if(parent_organ_zone != parent.limb_zone) + return FALSE + insert(target) + return TRUE + // Rendering! /obj/item/organ/internal/proc/render() return + /obj/item/reagent_containers/food/snacks/organ name = "appendix" icon_state = "appendix" icon = 'icons/obj/surgery.dmi' list_reagents = list("nutriment" = 5) + /obj/item/organ/internal/attack(mob/living/carbon/M, mob/user) if(M == user && ishuman(user)) var/mob/living/carbon/human/H = user @@ -153,6 +173,7 @@ else ..() + /**************************************************** INTERNAL ORGANS DEFINES ****************************************************/ @@ -160,10 +181,10 @@ // Brain is defined in brain_item.dm. -/obj/item/organ/internal/robotize(make_tough) +/obj/item/organ/internal/robotize(make_tough = FALSE) if(!is_robotic()) var/list/states = icon_states('icons/obj/surgery.dmi') //Insensitive to specially-defined icon files for species like the Drask or whomever else. Everyone gets the same robotic heart. - if(slot == "heart" && ("[slot]-c-on" in states) && ("[slot]-c-off" in states)) //Give the robotic heart its robotic heart icons if they exist. + if(slot == INTERNAL_ORGAN_HEART && ("[slot]-c-on" in states) && ("[slot]-c-off" in states)) //Give the robotic heart its robotic heart icons if they exist. var/obj/item/organ/internal/heart/H = src H.icon = icon('icons/obj/surgery.dmi') H.icon_base = "[slot]-c" @@ -175,33 +196,37 @@ name = "cybernetic [slot]" ..() //Go apply all the organ flags/robotic statuses. + /obj/item/organ/internal/appendix name = "appendix" icon_state = "appendix" - organ_tag = "appendix" - parent_organ = "groin" - slot = "appendix" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + slot = INTERNAL_ORGAN_APPENDIX var/inflamed = FALSE -/obj/item/organ/internal/appendix/remove(mob/living/carbon/M, special = 0) + +/obj/item/organ/internal/appendix/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) for(var/datum/disease/appendicitis/A in M.diseases) A.cure() inflamed = TRUE update_icon() . = ..() -/obj/item/organ/internal/appendix/insert(mob/living/carbon/M, special = 0) + +/obj/item/organ/internal/appendix/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() if(inflamed) var/datum/disease/appendicitis/D = new D.Contract(M) + /obj/item/organ/internal/appendix/prepare_eat() var/obj/S = ..() if(inflamed) S.reagents.add_reagent("????", 5) return S + //shadowling tumor /obj/item/organ/internal/shadowtumor name = "black tumor" @@ -209,18 +234,21 @@ icon_state = "blacktumor" origin_tech = "biotech=5" w_class = WEIGHT_CLASS_TINY - parent_organ = "head" - slot = "brain_tumor" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_BRAIN_TUMOR max_integrity = 3 + /obj/item/organ/internal/shadowtumor/New() ..() START_PROCESSING(SSobj, src) + /obj/item/organ/internal/shadowtumor/Destroy() STOP_PROCESSING(SSobj, src) return ..() + /obj/item/organ/internal/shadowtumor/process() if(isturf(loc)) var/turf/T = loc @@ -233,6 +261,7 @@ visible_message("[src] collapses in on itself!") qdel(src) + //debug and adminbus.... /obj/item/organ/internal/honktumor @@ -241,13 +270,14 @@ icon_state = "honktumor" origin_tech = "biotech=1" w_class = WEIGHT_CLASS_TINY - parent_organ = "head" - slot = "brain_tumor" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_BRAIN_TUMOR var/organhonked = 0 var/suffering_delay = 900 var/datum/component/squeak -/obj/item/organ/internal/honktumor/insert(mob/living/carbon/M, special = 0) + +/obj/item/organ/internal/honktumor/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() M.mutations.Add(CLUMSY) M.mutations.Add(GLOB.comicblock) @@ -259,7 +289,8 @@ M.AddElement(/datum/element/waddling) squeak = M.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg' = 1), 50, falloff_exponent = 20) -/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = 0) + +/obj/item/organ/internal/honktumor/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) M.mutations.Remove(CLUMSY) M.mutations.Remove(GLOB.comicblock) M.dna.SetSEState(GLOB.clumsyblock,0) @@ -270,6 +301,7 @@ QDEL_NULL(squeak) . = ..() + /obj/item/organ/internal/honktumor/on_life() if(organhonked < world.time) organhonked = world.time + suffering_delay @@ -295,9 +327,11 @@ if(thingy) walk(thingy,0) + /obj/item/organ/internal/honktumor/cursed unremovable = TRUE + /obj/item/organ/internal/honktumor/cursed/on_life() //No matter what you do, no matter who you are, no matter where you go, you're always going to be a fat, stuttering dimwit. ..() owner.setBrainLoss(80, use_brain_mod = FALSE) @@ -311,27 +345,31 @@ icon_state = "honktumor"//Not making a new icon origin_tech = "biotech=1" w_class = WEIGHT_CLASS_TINY - parent_organ = "groin" - slot = "honk_bladder" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + slot = INTERNAL_ORGAN_HONK_BLADDER var/datum/component/squeak -/obj/item/organ/internal/honkbladder/insert(mob/living/carbon/M, special = 0) + +/obj/item/organ/internal/honkbladder/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) squeak = M.AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg'=1,'sound/effects/clownstep2.ogg'=1), 50, falloff_exponent = 20) -/obj/item/organ/internal/honkbladder/remove(mob/living/carbon/M, special = 0) + +/obj/item/organ/internal/honkbladder/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) . = ..() QDEL_NULL(squeak) qdel(src) + /obj/item/organ/internal/beard name = "beard organ" desc = "Let they who is worthy wear the beard of Thorbjorndottir." icon_state = "liver" origin_tech = "biotech=1" w_class = WEIGHT_CLASS_TINY - parent_organ = "head" - slot = "hair_organ" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_HAIR + /obj/item/organ/internal/beard/on_life() @@ -340,7 +378,7 @@ if(istype(owner, /mob/living/carbon/human)) var/mob/living/carbon/human/H = owner - var/obj/item/organ/external/head/head_organ = H.get_organ("head") + var/obj/item/organ/external/head/head_organ = H.get_organ(BODY_ZONE_HEAD) if(!(head_organ.h_style == "Very Long Hair" || head_organ.h_style == "Mohawk")) if(prob(10)) head_organ.h_style = "Mohawk" @@ -353,6 +391,7 @@ head_organ.facial_colour = "#D8C078" H.update_fhair() + /obj/item/organ/internal/emp_act(severity) if(!is_robotic() || emp_proof) return @@ -362,6 +401,7 @@ if(2) receive_damage(7, 1) + /obj/item/organ/internal/handle_germs() ..() if(germ_level >= INFECTION_LEVEL_TWO) @@ -369,16 +409,19 @@ // big message from every 1 damage is not good. If germs growth rate is big, it will spam the chat. receive_damage(1, silent = prob(30*owner.dna.species.germs_growth_rate)) + /mob/living/carbon/human/proc/check_infections() var/list/infections = list() - for(var/obj/item/organ/internal/organ in internal_organs) + for(var/obj/item/organ/internal/organ as anything in internal_organs) if(organ.germ_level > 0) infections.Add(organ) return infections + /mob/living/carbon/human/proc/check_damaged_organs() var/list/damaged = list() - for(var/obj/item/organ/internal/organ in internal_organs) + for(var/obj/item/organ/internal/organ as anything in internal_organs) if(organ.damage > 0) damaged.Add(organ) return damaged + diff --git a/code/modules/surgery/organs/pain.dm b/code/modules/surgery/organs/pain.dm index 2ccde0b8bae..5ebcb82fc45 100644 --- a/code/modules/surgery/organs/pain.dm +++ b/code/modules/surgery/organs/pain.dm @@ -57,24 +57,24 @@ var/maxdam = 0 var/obj/item/organ/external/damaged_organ = null - for(var/obj/item/organ/external/E in bodyparts) - if((E.status & ORGAN_DEAD|ORGAN_ROBOT) || E.hidden_pain) + for(var/obj/item/organ/external/bodypart as anything in bodyparts) + if((bodypart.status & ORGAN_DEAD|ORGAN_ROBOT) || bodypart.hidden_pain) continue - var/dam = E.get_damage() + var/dam = bodypart.get_damage() // make the choice of the organ depend on damage, // but also sometimes use one of the less damaged ones if(dam > maxdam && (maxdam == 0 || prob(70))) - damaged_organ = E + damaged_organ = bodypart maxdam = dam if(damaged_organ) pain(damaged_organ.name, maxdam) // Damage to internal organs hurts a lot. - for(var/obj/item/organ/internal/I in internal_organs) - if(I.hidden_pain) + for(var/obj/item/organ/internal/organ as anything in internal_organs) + if(organ.hidden_pain) continue - if(I.damage > 2 && prob(2)) - var/obj/item/organ/external/parent = get_organ(I.parent_organ) - custom_pain("You feel a sharp pain in your [parent.limb_name]") + if(organ.damage > 2 && prob(2)) + var/obj/item/organ/external/parent = get_organ(organ.parent_organ_zone) + custom_pain("You feel a sharp pain in your [parent.name]") #undef MIN_SHOCK_REDUCTION diff --git a/code/modules/surgery/organs/parasites.dm b/code/modules/surgery/organs/parasites.dm index d277a045f3e..e61741b80f2 100644 --- a/code/modules/surgery/organs/parasites.dm +++ b/code/modules/surgery/organs/parasites.dm @@ -32,7 +32,7 @@ owner.visible_message("[owner] bursts open! Holy fuck!") owner.gib() -/obj/item/organ/internal/body_egg/spider_eggs/remove(var/mob/living/carbon/M, var/special = 0) +/obj/item/organ/internal/body_egg/spider_eggs/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() M.reagents.del_reagent("spidereggs") //purge all remaining spider eggs reagent if caught, in time. if(!QDELETED(src)) @@ -117,7 +117,7 @@ if(infection_completed && !QDELETED(src)) qdel(src) -/obj/item/organ/internal/body_egg/terror_eggs/remove(var/mob/living/carbon/M, var/special = 0) +/obj/item/organ/internal/body_egg/terror_eggs/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() if(!QDELETED(src)) qdel(src) // prevent people re-implanting them into others diff --git a/code/modules/surgery/organs/robolimbs.dm b/code/modules/surgery/organs/robolimbs.dm index 1ee2afffbfa..480f46eeb43 100644 --- a/code/modules/surgery/organs/robolimbs.dm +++ b/code/modules/surgery/organs/robolimbs.dm @@ -11,7 +11,22 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) var/selectable = 1 // If set, is it available for selection on attack_self with a robo limb? var/is_monitor // If set, limb is a monitor and should be getting monitor styles. var/has_subtypes = 2 // If null, object is a model. If 1, object is a brand (that serves as the default model) with child models. If 2, object is a brand that has no child models and thus also serves as the model.. - var/parts = list("chest", "groin", "head", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "l_arm", "l_hand", "tail", "wing") // Defines what parts said brand can replace on a body. + /// Defines what parts said brand can replace on a body. + var/parts = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/robolimb/bishop company = "Bishop Cybernetics" @@ -22,14 +37,14 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/bishop/alt1 company = "Bishop Cybernetics alt." icon = 'icons/mob/human_races/cyberlimbs/bishop/bishop_alt1.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) selectable = 0 has_subtypes = null /datum/robolimb/bishop/monitor company = "Bishop Cybernetics mtr." icon = 'icons/mob/human_races/cyberlimbs/bishop/bishop_monitor.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) is_monitor = 1 selectable = 0 has_subtypes = null @@ -43,7 +58,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/hesphiastos/alt1 company = "Hesphiastos Industries alt." icon = 'icons/mob/human_races/cyberlimbs/hesphiastos/hesphiastos_alt1.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) is_monitor = 1 selectable = 0 has_subtypes = null @@ -51,7 +66,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/hesphiastos/monitor company = "Hesphiastos Industries mtr." icon = 'icons/mob/human_races/cyberlimbs/hesphiastos/hesphiastos_monitor.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) is_monitor = 1 selectable = 0 has_subtypes = null @@ -67,7 +82,7 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/morpheus/alt1 company = "Morpheus Cyberkinetics alt." icon = 'icons/mob/human_races/cyberlimbs/morpheus/morpheus_alt1.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) unavailable_at_chargen = null is_monitor = null selectable = 0 @@ -83,14 +98,14 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/wardtakahashi/alt1 company = "Ward-Takahashi alt." icon = 'icons/mob/human_races/cyberlimbs/wardtakahashi/wardtakahashi_alt1.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) selectable = 0 has_subtypes = null /datum/robolimb/wardtakahashi/monitor company = "Ward-Takahashi mtr." icon = 'icons/mob/human_races/cyberlimbs/wardtakahashi/wardtakahashi_monitor.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) is_monitor = 1 selectable = 0 has_subtypes = null @@ -104,14 +119,14 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/xion/alt1 company = "Xion Manufacturing Group alt." icon = 'icons/mob/human_races/cyberlimbs/xion/xion_alt1.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) selectable = 0 has_subtypes = null /datum/robolimb/xion/monitor company = "Xion Manufacturing Group mtr." icon = 'icons/mob/human_races/cyberlimbs/xion/xion_monitor.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) is_monitor = 1 selectable = 0 has_subtypes = null @@ -131,14 +146,14 @@ GLOBAL_DATUM(basic_robolimb, /datum/robolimb) /datum/robolimb/shellguard/alt1 company = "Shellguard Munitions Elite Series" icon = 'icons/mob/human_races/cyberlimbs/shellguard/shellguard_alt1.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) selectable = 0 has_subtypes = null /datum/robolimb/shellguard/monitor company = "Shellguard Munitions Monitor Series" icon = 'icons/mob/human_races/cyberlimbs/shellguard/shellguard_monitor.dmi' - parts = list("head") + parts = list(BODY_ZONE_HEAD) is_monitor = 1 selectable = 0 has_subtypes = null diff --git a/code/modules/surgery/organs/subtypes/diona.dm b/code/modules/surgery/organs/subtypes/diona.dm index 6d905d065af..e56e1805f4b 100644 --- a/code/modules/surgery/organs/subtypes/diona.dm +++ b/code/modules/surgery/organs/subtypes/diona.dm @@ -5,14 +5,14 @@ min_broken_damage = 50 amputation_point = "trunk" encased = null - gendered_icon = 0 + gendered_icon = FALSE /obj/item/organ/external/groin/diona species_type = /datum/species/diona name = "fork" min_broken_damage = 50 amputation_point = "lower trunk" - gendered_icon = 0 + gendered_icon = FALSE /obj/item/organ/external/arm/diona species_type = /datum/species/diona @@ -76,7 +76,7 @@ min_broken_damage = 25 encased = null amputation_point = "upper trunk" - gendered_icon = 0 + gendered_icon = FALSE /obj/item/organ/diona/process() return @@ -87,7 +87,7 @@ icon = 'icons/obj/objects.dmi' icon_state = "nymph" dead_icon = null - parent_organ = "chest" + parent_organ_zone = BODY_ZONE_CHEST actions_types = list(/datum/action/item_action/organ_action/diona_brain_evacuation) /datum/action/item_action/organ_action/diona_brain_evacuation @@ -101,7 +101,7 @@ return FALSE -/datum/action/item_action/organ_action/diona_brain_evacuation/Trigger() +/datum/action/item_action/organ_action/diona_brain_evacuation/Trigger(left_click = TRUE) . = ..() var/confirm = alert("Вы уверены, что хотите покинуть свое тело как нимфа? (!Если использовать, пока живы, то лишитесь роли антагониста!)","Confirm evacuation","Yes","No") if(confirm == "No") @@ -146,7 +146,7 @@ name = "anchoring ligament" icon = 'icons/obj/objects.dmi' icon_state = "nymph" - parent_organ = "groin" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN /obj/item/organ/internal/heart/diona/update_icon() return @@ -156,7 +156,7 @@ name = "receptor node" icon = 'icons/mob/alien.dmi' icon_state = "claw" - parent_organ = "chest" + parent_organ_zone = BODY_ZONE_CHEST /obj/item/organ/internal/liver/diona species_type = /datum/species/diona @@ -171,17 +171,22 @@ icon = 'icons/mob/alien.dmi' icon_state = "claw" desc = "A strange organic object used by a Gestalt for orientation in a three-dimensional projection." - parent_organ = "groin" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + /datum/component/diona_internals + /datum/component/diona_internals/Initialize() if(!isatom(parent)) return COMPONENT_INCOMPATIBLE if(istype(parent, /obj/item/organ/internal)) RegisterSignal(parent, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(transform_organ)) + /datum/component/diona_internals/proc/transform_organ() + SIGNAL_HANDLER + if(is_int_organ(parent)) var/obj/item/organ/internal/organ = parent var/mob/living/simple_animal/diona/nymph = new /mob/living/simple_animal/diona(get_turf(organ.owner)) diff --git a/code/modules/surgery/organs/subtypes/drask.dm b/code/modules/surgery/organs/subtypes/drask.dm index f50ab655865..08019e3afba 100644 --- a/code/modules/surgery/organs/subtypes/drask.dm +++ b/code/modules/surgery/organs/subtypes/drask.dm @@ -10,7 +10,7 @@ species_type = /datum/species/drask name = "drask heart" icon = 'icons/obj/species_organs/drask.dmi' - parent_organ = "head" + parent_organ_zone = BODY_ZONE_HEAD /obj/item/organ/internal/liver/drask species_type = /datum/species/drask diff --git a/code/modules/surgery/organs/subtypes/grey.dm b/code/modules/surgery/organs/subtypes/grey.dm index ea2c8295097..5b3e0dccd2d 100644 --- a/code/modules/surgery/organs/subtypes/grey.dm +++ b/code/modules/surgery/organs/subtypes/grey.dm @@ -13,13 +13,13 @@ mmi_icon = 'icons/obj/species_organs/grey.dmi' mmi_icon_state = "mmi_full" -/obj/item/organ/internal/brain/grey/insert(var/mob/living/carbon/M, var/special = 0) - ..() +/obj/item/organ/internal/brain/grey/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() M.add_language("Psionic Communication") -/obj/item/organ/internal/brain/grey/remove(var/mob/living/carbon/M, var/special = 0) - . = ..() +/obj/item/organ/internal/brain/grey/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) M.remove_language("Psionic Communication") + . = ..() /obj/item/organ/internal/eyes/grey species_type = /datum/species/grey diff --git a/code/modules/surgery/organs/subtypes/kidan.dm b/code/modules/surgery/organs/subtypes/kidan.dm index 67bfa4486e4..fbef4c67856 100644 --- a/code/modules/surgery/organs/subtypes/kidan.dm +++ b/code/modules/surgery/organs/subtypes/kidan.dm @@ -17,8 +17,8 @@ icon_state = "kid_lantern" origin_tech = "biotech=2" w_class = WEIGHT_CLASS_TINY - parent_organ = "groin" - slot = "lantern" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + slot = INTERNAL_ORGAN_LANTERN actions_types = list(/datum/action/item_action/organ_action/toggle) var/colour var/glowing = 0 @@ -51,7 +51,7 @@ colour = BlendRGB(owner.m_colours["body"], owner.m_colours["head"], 0.65) //then again im pretty bad at theoretics if(new_light != glowing) - var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ)) + var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ_zone)) lbody.set_light(new_light,l_color = colour) glowing = new_light @@ -75,13 +75,13 @@ if(!glowing) var/light = calculate_glow(KIDAN_LANTERN_LIGHT) - var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ)) + var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ_zone)) lbody.set_light(light,l_color = colour) glowing = light return 1 else - var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ)) + var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ_zone)) lbody.set_light(0) glowing = 0 return 1 @@ -92,7 +92,7 @@ var/occlusion = 0 //clothes occluding light - if(!get_location_accessible(owner, "head")) + if(!get_location_accessible(owner, BODY_ZONE_HEAD)) occlusion++ if(owner.w_uniform && copytext(owner.w_uniform.item_color,-2) != "_d") //jumpsuit not rolled down occlusion++ @@ -101,7 +101,7 @@ return light - occlusion -/obj/item/organ/internal/lantern/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/lantern/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) if(ishuman(M)) var/mob/living/carbon/human/H = M @@ -129,18 +129,18 @@ icon_state = "brain2" mmi_icon = 'icons/obj/species_organs/kidan.dmi' mmi_icon_state = "mmi_full" - parent_organ = "chest" + parent_organ_zone = BODY_ZONE_CHEST /obj/item/organ/internal/brain/kidan/on_life() . = ..() - var/obj/item/organ/external/organ = owner.get_organ("head") + var/obj/item/organ/external/organ = owner.get_organ(BODY_ZONE_HEAD) if(!istype(organ)) - owner.Slowed(40 SECONDS) - owner.Confused(80 SECONDS) - owner.Silence(40 SECONDS) - owner.Stuttering(80 SECONDS) - owner.EyeBlind(10 SECONDS) - owner.EyeBlurry(40 SECONDS) + owner.SetSlowed(40 SECONDS) + owner.SetConfused(80 SECONDS) + owner.SetSilence(40 SECONDS) + owner.SetStuttering(80 SECONDS) + owner.SetEyeBlind(10 SECONDS) + owner.SetEyeBlurry(40 SECONDS) /obj/item/organ/internal/lungs/kidan species_type = /datum/species/kidan @@ -156,13 +156,13 @@ species_type = /datum/species/kidan encased = "head chitin" -/obj/item/organ/external/head/kidan/remove(var/mob/living/user, var/ignore_children) - if(iskidan(src.owner)) - src.owner.adjustBrainLoss(60) +/obj/item/organ/external/head/kidan/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE) + if(iskidan(owner)) + owner.adjustBrainLoss(60) . = ..() -/obj/item/organ/external/head/kidan/replaced(var/mob/living/carbon/human/target) +/obj/item/organ/external/head/kidan/replaced(mob/living/carbon/human/target) . = ..() if(iskidan(target)) target.adjustBrainLoss(30) diff --git a/code/modules/surgery/organs/subtypes/machine.dm b/code/modules/surgery/organs/subtypes/machine.dm index bfeb53b332c..5b7f0c5e1f5 100644 --- a/code/modules/surgery/organs/subtypes/machine.dm +++ b/code/modules/surgery/organs/subtypes/machine.dm @@ -10,9 +10,9 @@ pickup_sound = 'sound/items/handling/component_pickup.ogg' drop_sound = 'sound/items/handling/component_drop.ogg' -/obj/item/organ/external/head/ipc/New(mob/living/carbon/holder, datum/species/species_override = null) - ..(holder, /datum/species/machine) // IPC heads need to be explicitly set to this since you can print them - robotize("Morpheus Cyberkinetics") +/obj/item/organ/external/head/ipc/New() + ..() + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/chest/ipc species_type = /datum/species/machine @@ -24,7 +24,7 @@ /obj/item/organ/external/chest/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/groin/ipc species_type = /datum/species/machine @@ -36,7 +36,7 @@ /obj/item/organ/external/groin/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/arm/ipc species_type = /datum/species/machine @@ -48,7 +48,7 @@ /obj/item/organ/external/arm/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/arm/right/ipc species_type = /datum/species/machine @@ -58,7 +58,7 @@ /obj/item/organ/external/arm/right/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/leg/ipc species_type = /datum/species/machine @@ -70,7 +70,7 @@ /obj/item/organ/external/leg/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/leg/right/ipc species_type = /datum/species/machine @@ -80,7 +80,7 @@ /obj/item/organ/external/leg/right/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/foot/ipc species_type = /datum/species/machine @@ -92,7 +92,7 @@ /obj/item/organ/external/foot/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/foot/right/ipc species_type = /datum/species/machine @@ -102,7 +102,7 @@ /obj/item/organ/external/foot/right/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/hand/ipc species_type = /datum/species/machine @@ -114,7 +114,7 @@ /obj/item/organ/external/hand/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/external/hand/right/ipc species_type = /datum/species/machine @@ -124,7 +124,7 @@ /obj/item/organ/external/hand/right/ipc/New() ..() - robotize("Morpheus Cyberkinetics") + robotize(company = "Morpheus Cyberkinetics") /obj/item/organ/internal/cell species_type = /datum/species/machine @@ -132,9 +132,8 @@ desc = "A small, powerful cell for use in fully prosthetic bodies." icon = 'icons/obj/engines_and_power/power.dmi' icon_state = "scell" - organ_tag = "heart" - parent_organ = "chest" - slot = "heart" + parent_organ_zone = BODY_ZONE_CHEST + slot = INTERNAL_ORGAN_HEART vital = TRUE status = ORGAN_ROBOT pickup_sound = 'sound/items/handling/component_pickup.ogg' @@ -151,7 +150,7 @@ pickup_sound = 'sound/items/handling/component_pickup.ogg' drop_sound = 'sound/items/handling/component_drop.ogg' -/obj/item/organ/internal/eyes/optical_sensor/remove(var/mob/living/user,special = 0) +/obj/item/organ/internal/eyes/optical_sensor/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT) if(!special) to_chat(owner, "Error 404:Optical Sensors not found.") @@ -170,7 +169,7 @@ stored_mmi.forceMove(get_turf(src)) qdel(src) -/obj/item/organ/internal/brain/mmi_holder/posibrain/remove(mob/living/user, special = 0) +/obj/item/organ/internal/brain/mmi_holder/posibrain/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT) if(stored_mmi && dna) stored_mmi.name = "[initial(name)] ([dna.real_name])" stored_mmi.brainmob.real_name = dna.real_name @@ -190,7 +189,7 @@ pickup_sound = 'sound/items/handling/component_pickup.ogg' drop_sound = 'sound/items/handling/component_drop.ogg' -/obj/item/organ/internal/ears/microphone/remove(mob/living/user, special = FALSE) +/obj/item/organ/internal/ears/microphone/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT) if(!special) to_chat(owner, "BZZZZZZZZZZZZZZT! Microphone error!") . = ..() diff --git a/code/modules/surgery/organs/subtypes/nucleation.dm b/code/modules/surgery/organs/subtypes/nucleation.dm index 90d0e67066a..e05362c71de 100644 --- a/code/modules/surgery/organs/subtypes/nucleation.dm +++ b/code/modules/surgery/organs/subtypes/nucleation.dm @@ -5,35 +5,35 @@ icon = 'icons/obj/surgery.dmi' desc = "A crystalized human organ. It has a strangely iridescent glow." + /obj/item/organ/internal/nucleation/resonant_crystal - species_type = /datum/species/nucleation name = "resonant crystal" icon_state = "resonant-crystal" - organ_tag = "resonant crystal" - parent_organ = "head" - slot = "res_crystal" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_RESONANT_CRYSTAL + /obj/item/organ/internal/nucleation/strange_crystal - species_type = /datum/species/nucleation name = "strange crystal" icon_state = "strange-crystal" - organ_tag = "strange crystal" - parent_organ = "chest" - slot = "heart" + parent_organ_zone = BODY_ZONE_CHEST + slot = INTERNAL_ORGAN_STRANGE_CRYSTAL + /obj/item/organ/internal/eyes/luminescent_crystal species_type = /datum/species/nucleation name = "luminescent eyes" icon_state = "crystal-eyes" - organ_tag = "luminescent eyes" light_color = "#1C1C00" + /obj/item/organ/internal/eyes/luminescent_crystal/New() set_light(2) ..() + /obj/item/organ/internal/brain/crystal species_type = /datum/species/nucleation name = "crystallized brain" icon_state = "crystal-brain" - organ_tag = "crystallized brain" + diff --git a/code/modules/surgery/organs/subtypes/skrell.dm b/code/modules/surgery/organs/subtypes/skrell.dm index a5f6876e2ba..4ec5f71cd53 100644 --- a/code/modules/surgery/organs/subtypes/skrell.dm +++ b/code/modules/surgery/organs/subtypes/skrell.dm @@ -10,7 +10,7 @@ if(alcohol) if(is_bruised()) owner.adjustToxLoss(0.1 * PROCESS_ACCURACY) - else if(is_broken()) + else if(is_traumatized()) owner.adjustToxLoss(5) receive_damage(1) @@ -23,8 +23,8 @@ icon_state = "skrell_headpocket" origin_tech = "biotech=2" w_class = WEIGHT_CLASS_TINY - parent_organ = "head" - slot = "headpocket" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_HEADPOCKET actions_types = list(/datum/action/item_action/organ_action/toggle) var/obj/item/storage/internal/pocket @@ -40,7 +40,7 @@ /obj/item/organ/internal/headpocket/on_life() ..() - var/obj/item/organ/external/head/head = owner.get_organ("head") + var/obj/item/organ/external/head/head = owner.get_organ(BODY_ZONE_HEAD) if(pocket.contents.len && !findtextEx(head.h_style, "Tentacles")) owner.visible_message("Something falls from [owner]'s head!", "Something falls from your head!") @@ -54,7 +54,7 @@ /obj/item/organ/internal/headpocket/on_owner_death() empty_contents() -/obj/item/organ/internal/headpocket/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/headpocket/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) empty_contents() . = ..() diff --git a/code/modules/surgery/organs/subtypes/standard.dm b/code/modules/surgery/organs/subtypes/standard.dm index 4f3ddcb4f7e..fa86f001afa 100644 --- a/code/modules/surgery/organs/subtypes/standard.dm +++ b/code/modules/surgery/organs/subtypes/standard.dm @@ -4,16 +4,16 @@ /obj/item/organ/external/chest name = "upper body" - limb_name = "chest" + limb_zone = BODY_ZONE_CHEST icon_name = "torso" max_damage = 100 min_broken_damage = 35 w_class = WEIGHT_CLASS_HUGE - body_part = UPPER_TORSO + limb_body_flag = UPPER_TORSO vital = TRUE amputation_point = "spine" - gendered_icon = 1 - parent_organ = null + gendered_icon = TRUE + parent_organ_zone = null encased = "ribcage" convertable_children = list(/obj/item/organ/external/groin) @@ -30,60 +30,59 @@ /obj/item/organ/external/groin name = "lower body" - limb_name = "groin" + limb_zone = BODY_ZONE_PRECISE_GROIN icon_name = "groin" max_damage = 100 min_broken_damage = 35 w_class = WEIGHT_CLASS_BULKY // if you know what I mean ;) - body_part = LOWER_TORSO + limb_body_flag = LOWER_TORSO vital = TRUE - parent_organ = "chest" + parent_organ_zone = BODY_ZONE_CHEST amputation_point = "lumbar" - gendered_icon = 1 + gendered_icon = TRUE /obj/item/organ/external/arm - limb_name = "l_arm" + limb_zone = BODY_ZONE_L_ARM name = "left arm" icon_name = "l_arm" max_damage = 50 min_broken_damage = 30 w_class = WEIGHT_CLASS_NORMAL - body_part = ARM_LEFT - parent_organ = "chest" + limb_body_flag = ARM_LEFT + parent_organ_zone = BODY_ZONE_CHEST amputation_point = "left shoulder" - can_grasp = 1 + can_grasp = TRUE convertable_children = list(/obj/item/organ/external/hand) /obj/item/organ/external/arm/emp_act(severity) ..() if(!owner || !is_robotic() || emp_proof || !tough) // Augmented arms and hands drop whatever they are holding on EMP. return - var/hand = (body_part == ARM_LEFT) ? owner.l_hand : owner.r_hand + var/hand = (limb_zone == BODY_ZONE_L_ARM) ? owner.l_hand : owner.r_hand if(hand && owner.can_unEquip(hand)) owner.drop_item_ground(hand) to_chat(owner, "Ваш [name] выходит из строя, бросая то что держал!") owner.custom_emote(EMOTE_VISIBLE, "роня%(ет,ют)% предмет, %(его,её,его,их)% рука выходит из строя!") /obj/item/organ/external/arm/right - limb_name = "r_arm" + limb_zone = BODY_ZONE_R_ARM name = "right arm" icon_name = "r_arm" - body_part = ARM_RIGHT + limb_body_flag = ARM_RIGHT amputation_point = "right shoulder" convertable_children = list(/obj/item/organ/external/hand/right) /obj/item/organ/external/leg - limb_name = "l_leg" + limb_zone = BODY_ZONE_L_LEG name = "left leg" icon_name = "l_leg" max_damage = 50 min_broken_damage = 30 w_class = WEIGHT_CLASS_NORMAL - body_part = LEG_LEFT + limb_body_flag = LEG_LEFT icon_position = LEFT - parent_organ = "groin" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN amputation_point = "left hip" - can_stand = 1 convertable_children = list(/obj/item/organ/external/foot) /obj/item/organ/external/leg/emp_act(severity) @@ -103,26 +102,26 @@ owner.AdjustWeakened(4 SECONDS) /obj/item/organ/external/leg/right - limb_name = "r_leg" + limb_zone = BODY_ZONE_R_LEG name = "right leg" icon_name = "r_leg" - body_part = LEG_RIGHT + limb_body_flag = LEG_RIGHT icon_position = RIGHT amputation_point = "right hip" convertable_children = list(/obj/item/organ/external/foot/right) /obj/item/organ/external/foot - limb_name = "l_foot" + limb_zone = BODY_ZONE_PRECISE_L_FOOT name = "left foot" icon_name = "l_foot" max_damage = 30 min_broken_damage = 15 w_class = WEIGHT_CLASS_SMALL - body_part = FOOT_LEFT + limb_body_flag = FOOT_LEFT icon_position = LEFT - parent_organ = "l_leg" + parent_organ_zone = BODY_ZONE_L_LEG amputation_point = "left ankle" - can_stand = 1 + /obj/item/organ/external/foot/emp_act(severity) ..() @@ -140,42 +139,43 @@ if(2) owner.AdjustWeakened(4 SECONDS) -/obj/item/organ/external/foot/remove() - if(owner && owner.shoes) owner.drop_item_ground(owner.shoes) +/obj/item/organ/external/foot/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE) + if(owner?.shoes) + owner.drop_item_ground(owner.shoes) . = ..() /obj/item/organ/external/foot/right - limb_name = "r_foot" + limb_zone = BODY_ZONE_PRECISE_R_FOOT name = "right foot" icon_name = "r_foot" - body_part = FOOT_RIGHT + limb_body_flag = FOOT_RIGHT icon_position = RIGHT - parent_organ = "r_leg" + parent_organ_zone = BODY_ZONE_R_LEG amputation_point = "right ankle" /obj/item/organ/external/hand - limb_name = "l_hand" + limb_zone = BODY_ZONE_PRECISE_L_HAND name = "left hand" icon_name = "l_hand" max_damage = 30 min_broken_damage = 15 w_class = WEIGHT_CLASS_SMALL - body_part = HAND_LEFT - parent_organ = "l_arm" + limb_body_flag = HAND_LEFT + parent_organ_zone = BODY_ZONE_L_ARM amputation_point = "left wrist" - can_grasp = 1 + can_grasp = TRUE /obj/item/organ/external/hand/emp_act(severity) ..() if(!owner || !is_robotic() || emp_proof || !tough) // Augmented arms and hands drop whatever they are holding on EMP. return - var/hand = (body_part == HAND_LEFT) ? owner.l_hand : owner.r_hand + var/hand = (limb_zone == BODY_ZONE_L_ARM) ? owner.l_hand : owner.r_hand if(hand && owner.can_unEquip(hand)) owner.drop_item_ground(hand) to_chat(owner, "Ваш [name] выходит из строя, dropping what it was holding!") owner.custom_emote(EMOTE_VISIBLE, "роня%(ет,ют)% предмет, %(его,её,его,их)% кисть выходит из строя!") -/obj/item/organ/external/hand/remove() +/obj/item/organ/external/hand/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE) if(owner) if(owner.gloves) owner.drop_item_ground(owner.gloves) @@ -187,24 +187,24 @@ . = ..() /obj/item/organ/external/hand/right - limb_name = "r_hand" + limb_zone = BODY_ZONE_PRECISE_R_HAND name = "right hand" icon_name = "r_hand" - body_part = HAND_RIGHT - parent_organ = "r_arm" + limb_body_flag = HAND_RIGHT + parent_organ_zone = BODY_ZONE_R_ARM amputation_point = "right wrist" /obj/item/organ/external/head - limb_name = "head" + limb_zone = BODY_ZONE_HEAD icon_name = "head" name = "head" max_damage = 75 min_broken_damage = 35 w_class = WEIGHT_CLASS_NORMAL - body_part = HEAD - parent_organ = "chest" + limb_body_flag = HEAD + parent_organ_zone = BODY_ZONE_CHEST amputation_point = "neck" - gendered_icon = 1 + gendered_icon = TRUE encased = "skull" var/can_intake_reagents = 1 var/alt_head = "None" @@ -228,7 +228,7 @@ var/sec_facial_colour = "#000000" var/f_style = "Shaved" -/obj/item/organ/external/head/remove() +/obj/item/organ/external/head/remove(mob/living/user, special = ORGAN_MANIPULATION_DEFAULT, ignore_children = FALSE) if(owner) if(!istype(dna)) dna = owner.dna.Clone() @@ -250,14 +250,15 @@ . = ..() /obj/item/organ/external/head/replaced() - name = limb_name + name = limb_zone ..() -/obj/item/organ/external/head/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE) + +/obj/item/organ/external/head/receive_damage(brute, burn, sharp, used_weapon = null, list/forbidden_limbs = list(), ignore_resists = FALSE, updating_health = TRUE, silent = FALSE) ..() - if(!disfigured) - if(brute_dam + burn_dam > 50) - disfigure() + if(brute_dam + burn_dam > 50) + disfigure(silent) + /obj/item/organ/external/head/examine(mob/user) . = ..() @@ -280,14 +281,14 @@ alt_head = initial(alt_head) icon_name = initial(icon_name) -/obj/item/organ/external/head/robotize(company, make_tough = 0, convert_all = 1) //Undoes alt_head business to avoid getting in the way of robotization. Make sure we pass all args down the line... +/obj/item/organ/external/head/robotize(make_tough = FALSE, company, convert_all = TRUE) //Undoes alt_head business to avoid getting in the way of robotization. Make sure we pass all args down the line... alt_head = initial(alt_head) icon_name = initial(icon_name) ..() -/obj/item/organ/external/head/set_dna(datum/dna/new_dna) +/obj/item/organ/external/head/update_DNA(datum/dna/new_dna, update_blood = TRUE, use_species_type = TRUE, randomize = FALSE) ..() - new_dna.write_head_attributes(src) + new_dna?.write_head_attributes(src) /obj/item/organ/external/head/emp_act(severity) ..() @@ -301,25 +302,24 @@ to_chat(owner, "Ваш [name] выходит из строя, перегружая ваше управление!") /obj/item/organ/external/tail - limb_name = "tail" + limb_zone = BODY_ZONE_TAIL name = "tail" force_icon = "icons/effects/species.dmi" icon_name = "tail" max_damage = 30 min_broken_damage = 15 w_class = WEIGHT_CLASS_SMALL - body_part = TAIL - parent_organ = "groin" + limb_body_flag = TAIL + parent_organ_zone = BODY_ZONE_PRECISE_GROIN amputation_point = "lower spine" var/datum/body_accessory/body_accessory var/list/m_styles = list("tail" = "None") var/list/m_colours = list("tail" = "#000000") s_col = "#000000" -/obj/item/organ/external/tail/New(var/mob/living/carbon/holder) +/obj/item/organ/external/tail/New(mob/living/carbon/holder) ..() - var/mob/living/carbon/human/H = holder - if(!H) + if(!holder) var/icon/tempicon = new/icon("icon" = force_icon, "icon_state" = icon_name) var/icon/tempicon2 = new/icon(tempicon,dir=NORTH) tempicon2.Flip(SOUTH) @@ -365,24 +365,23 @@ icon_name = "stoktail_s" /obj/item/organ/external/wing - limb_name = "wing" + limb_zone = BODY_ZONE_WING name = "wings" icon_name = "wing" max_damage = 30 min_broken_damage = 15 w_class = WEIGHT_CLASS_SMALL - body_part = WING - parent_organ = "chest" + limb_body_flag = WING + parent_organ_zone = BODY_ZONE_CHEST amputation_point = "spine" var/datum/body_accessory/body_accessory var/list/m_styles = list("wing" = "None") var/list/m_colours = list("wing" = "#000000") s_col = "#000000" -/obj/item/organ/external/wing/New(var/mob/living/carbon/holder) +/obj/item/organ/external/wing/New(mob/living/carbon/holder) ..() - var/mob/living/carbon/human/H = holder - if(!H) + if(!holder) var/icon/tempicon = new/icon("icon" = force_icon, "icon_state" = icon_name) var/icon/tempicon2 = new/icon(tempicon,dir=NORTH) tempicon2.Flip(SOUTH) diff --git a/code/modules/surgery/organs/subtypes/wryn.dm b/code/modules/surgery/organs/subtypes/wryn.dm index 20fbfba53cc..945d2d8a66a 100644 --- a/code/modules/surgery/organs/subtypes/wryn.dm +++ b/code/modules/surgery/organs/subtypes/wryn.dm @@ -2,18 +2,17 @@ /obj/item/organ/internal/wryn/hivenode species_type = /datum/species/wryn name = "antennae" - organ_tag = "antennae" icon = 'icons/mob/human_races/r_wryn.dmi' icon_state = "antennae" - parent_organ = "head" - slot = "hivenode" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_HIVENODE /obj/item/organ/internal/wryn/glands species_type = /datum/species/wryn name = "wryn wax glands" - parent_organ = "mouth" icon_state = "eggsac" - slot = "wax glands" + parent_organ_zone = BODY_ZONE_PRECISE_MOUTH + slot = INTERNAL_ORGAN_WAX_GLANDS var/datum/action/innate/honeycomb/honeycomb = new var/datum/action/innate/honeyfloor/honeyfloor = new var/datum/action/innate/toggle_producing/toggle_producing = new @@ -29,13 +28,13 @@ if(prob(10)) to_chat(owner, "Вы чувствуете лёгкое бурление в восковых железах.") -/obj/item/organ/internal/wryn/glands/insert(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/wryn/glands/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) ..() honeycomb.Grant(M) honeyfloor.Grant(M) toggle_producing.Grant(M) -/obj/item/organ/internal/wryn/glands/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/wryn/glands/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) honeycomb.Remove(M) honeyfloor.Remove(M) toggle_producing.Remove(M) diff --git a/code/modules/surgery/organs/subtypes/xenos.dm b/code/modules/surgery/organs/subtypes/xenos.dm index 8a3345c432b..f04372860b5 100644 --- a/code/modules/surgery/organs/subtypes/xenos.dm +++ b/code/modules/surgery/organs/subtypes/xenos.dm @@ -10,14 +10,14 @@ /** * This adds and removes alien spells upon addition, if a noncarbon tries to do this well... I blame adminbus */ -/obj/item/organ/internal/xenos/insert(mob/living/carbon/user, special = FALSE) +/obj/item/organ/internal/xenos/insert(mob/living/carbon/user, special = ORGAN_MANIPULATION_DEFAULT) ..() if(length(alien_powers)) for(var/power_to_add in alien_powers) user.AddSpell(new power_to_add) -/obj/item/organ/internal/xenos/remove(mob/living/carbon/user, special = FALSE) +/obj/item/organ/internal/xenos/remove(mob/living/carbon/user, special = ORGAN_MANIPULATION_DEFAULT) if(length(alien_powers)) for(var/power_to_remove in alien_powers) var/actual_spell = locate(power_to_remove) in user.mob_spell_list @@ -38,8 +38,8 @@ icon_state = "plasma" w_class = WEIGHT_CLASS_NORMAL origin_tech = "biotech=5;plasmatech=4" - parent_organ = "chest" - slot = "plasmavessel" + parent_organ_zone = BODY_ZONE_CHEST + slot = INTERNAL_ORGAN_PLASMAVESSEL alien_powers = list(/obj/effect/proc_holder/spell/alien_spell/plant_weeds, /obj/effect/proc_holder/spell/touch/alien_spell/transfer_plasma) /// Used as a marker for hud updates on Life(). Ridiculous initial value required to update hud on organ insertion. var/old_plasma_amount = 9999 @@ -128,8 +128,8 @@ /obj/item/organ/internal/xenos/acidgland name = "xeno acid gland" icon_state = "acid" - parent_organ = "head" - slot = "acid" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_ACIDGLAND origin_tech = "biotech=5;materials=2;combat=2" alien_powers = list(/obj/effect/proc_holder/spell/touch/alien_spell/corrosive_acid) @@ -152,21 +152,21 @@ /obj/item/organ/internal/xenos/hivenode name = "xeno hive node" icon_state = "hivenode" - parent_organ = "head" - slot = "hivenode" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_HIVENODE origin_tech = "biotech=5;magnets=4;bluespace=3" w_class = WEIGHT_CLASS_TINY alien_powers = list(/obj/effect/proc_holder/spell/alien_spell/whisper) -/obj/item/organ/internal/xenos/hivenode/insert(mob/living/carbon/M, special = 0) - ..() +/obj/item/organ/internal/xenos/hivenode/insert(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) + . = ..() M.faction |= "alien" M.add_language("Hivemind") M.add_language("Xenomorph") -/obj/item/organ/internal/xenos/hivenode/remove(mob/living/carbon/M, special = 0) +/obj/item/organ/internal/xenos/hivenode/remove(mob/living/carbon/M, special = ORGAN_MANIPULATION_DEFAULT) M.faction -= "alien" M.remove_language("Hivemind") M.remove_language("Xenomorph") @@ -176,17 +176,17 @@ /obj/item/organ/internal/xenos/neurotoxin name = "xeno neurotoxin gland" icon_state = "neurotox" - parent_organ = "head" - slot = "neurotox" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_NEUROTOXIN_GLAND origin_tech = "biotech=5;combat=5" alien_powers = list(/obj/effect/proc_holder/spell/alien_spell/neurotoxin) /obj/item/organ/internal/xenos/resinspinner name = "xeno resin organ"//...there tiger.... - parent_organ = "mouth" icon_state = "liver-x" - slot = "spinner" + parent_organ_zone = BODY_ZONE_PRECISE_MOUTH + slot = INTERNAL_ORGAN_RESIN_SPINNER origin_tech = "biotech=5;materials=4" alien_powers = list(/obj/effect/proc_holder/spell/alien_spell/build_resin) @@ -194,8 +194,8 @@ /obj/item/organ/internal/xenos/eggsac name = "xeno egg sac" icon_state = "eggsac" - parent_organ = "groin" - slot = "eggsac" + parent_organ_zone = BODY_ZONE_PRECISE_GROIN + slot = INTERNAL_ORGAN_EGGSAC w_class = WEIGHT_CLASS_BULKY origin_tech = "biotech=6" alien_powers = list(/obj/effect/proc_holder/spell/alien_spell/plant_weeds/eggs) diff --git a/code/modules/surgery/organs/vocal_cords.dm b/code/modules/surgery/organs/vocal_cords.dm index f884e4f15d5..40c26b903a2 100644 --- a/code/modules/surgery/organs/vocal_cords.dm +++ b/code/modules/surgery/organs/vocal_cords.dm @@ -38,8 +38,8 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) /obj/item/organ/internal/vocal_cords //organs that are activated through speech with the :x channel name = "vocal cords" icon_state = "appendix" - slot = "vocal_cords" - parent_organ = "mouth" + slot = INTERNAL_ORGAN_VOCALCORDS + parent_organ_zone = BODY_ZONE_PRECISE_MOUTH var/spans = null /obj/item/organ/internal/vocal_cords/proc/can_speak_with() //if there is any limitation to speaking with these cords @@ -54,8 +54,8 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) /obj/item/organ/internal/adamantine_resonator name = "adamantine resonator" desc = "Fragments of adamantine exist in all golems, stemming from their origins as purely magical constructs. These are used to \"hear\" messages from their leaders." - parent_organ = "head" - slot = "adamantine_resonator" + parent_organ_zone = BODY_ZONE_HEAD + slot = INTERNAL_ORGAN_RESONATOR icon_state = "adamantine_resonator" /obj/item/organ/internal/vocal_cords/adamantine @@ -64,7 +64,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) actions_types = list(/datum/action/item_action/organ_action/use/adamantine_vocal_cords) icon_state = "adamantine_cords" -/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger() +/datum/action/item_action/organ_action/use/adamantine_vocal_cords/Trigger(left_click = TRUE) if(!IsAvailable()) return var/message = input(owner, "Resonate a message to all nearby golems.", "Resonate") @@ -77,7 +77,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) for(var/m in GLOB.player_list) if(iscarbon(m)) var/mob/living/carbon/C = m - if(C.get_organ_slot("adamantine_resonator")) + if(C.get_organ_slot(INTERNAL_ORGAN_RESONATOR)) to_chat(C, msg) //Colossus drop, forces the listeners to obey certain commands @@ -114,7 +114,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) return FALSE return TRUE -/datum/action/item_action/organ_action/colossus/Trigger() +/datum/action/item_action/organ_action/colossus/Trigger(left_click = TRUE) . = ..() if(!IsAvailable()) if(world.time < cords.next_command) @@ -269,7 +269,7 @@ GLOBAL_DATUM_INIT(multispin_words, /regex, regex("like a record baby")) else if((findtext(message, GLOB.hurt_words))) for(var/V in listeners) var/mob/living/L = V - L.apply_damage(15 * power_multiplier, def_zone = "chest") + L.apply_damage(15 * power_multiplier, def_zone = BODY_ZONE_CHEST) next_command = world.time + cooldown_damage //BLEED diff --git a/code/modules/surgery/organs_internal.dm b/code/modules/surgery/organs_internal.dm index 1a24b156ff4..ac0ddef78c2 100644 --- a/code/modules/surgery/organs_internal.dm +++ b/code/modules/surgery/organs_internal.dm @@ -4,17 +4,30 @@ name = "Organ Manipulation" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/manipulate_organs, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + ) requires_organic_bodypart = 1 /datum/surgery/organ_manipulation/soft - possible_locs = list("groin", "eyes", "mouth") + possible_locs = list(BODY_ZONE_PRECISE_GROIN, BODY_ZONE_PRECISE_EYES, BODY_ZONE_PRECISE_MOUTH) steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize) requires_organic_bodypart = 1 /datum/surgery/organ_manipulation_boneless name = "Organ Manipulation" - possible_locs = list("chest","head","groin", "eyes", "mouth", "l_arm", "r_arm", "l_leg", "r_leg") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_PRECISE_EYES, + BODY_ZONE_PRECISE_MOUTH, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + ) steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize) requires_organic_bodypart = 1 @@ -22,11 +35,18 @@ name = "Plasmaman Organ Manipulation" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/open_encased/saw, /datum/surgery_step/open_encased/retract, /datum/surgery_step/internal/manipulate_organs, /datum/surgery_step/glue_bone/plasma, /datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + ) requires_organic_bodypart = 1 /datum/surgery/organ_manipulation/plasmaman/soft - possible_locs = list("groin", "eyes", "mouth") + possible_locs = list( + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_PRECISE_EYES, + BODY_ZONE_PRECISE_MOUTH, + ) steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize) requires_organic_bodypart = 1 @@ -34,17 +54,30 @@ name = "Insectoid Organ Manipulation" steps = list(/datum/surgery_step/open_encased/saw, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/internal/manipulate_organs, /datum/surgery_step/glue_bone, /datum/surgery_step/set_bone,/datum/surgery_step/finish_bone,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head", "groin") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_PRECISE_GROIN, + ) requires_organic_bodypart = 1 /datum/surgery/organ_manipulation/insect/soft - possible_locs = list("eyes", "mouth") + possible_locs = list( + BODY_ZONE_PRECISE_EYES, + BODY_ZONE_PRECISE_MOUTH, + ) steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/manipulate_organs,/datum/surgery_step/generic/cauterize) requires_organic_bodypart = 1 /datum/surgery/organ_manipulation/alien name = "Alien Organ Manipulation" - possible_locs = list("chest", "head", "groin", "eyes", "mouth") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_PRECISE_EYES, + BODY_ZONE_PRECISE_MOUTH, + ) allowed_mob = list(/mob/living/carbon/alien/humanoid) steps = list(/datum/surgery_step/saw_carapace,/datum/surgery_step/cut_carapace, /datum/surgery_step/retract_carapace,/datum/surgery_step/internal/manipulate_organs) @@ -157,11 +190,7 @@ current_type = "insert" I = tool - if(I.requires_robotic_bodypart) - to_chat(user, "[I] is an organ that requires a robotic interface[target].") - return -1 - - if(target_zone != I.parent_organ || target.get_organ_slot(I.slot)) + if(target_zone != I.parent_organ_zone || target.get_organ_slot(I.slot)) to_chat(user, "There is no room for [I] in [target]'s [parse_zone(target_zone)]!") return -1 @@ -196,9 +225,9 @@ if(C.reagents.has_reagent("mitocholide", 5)) var/list/dead_organs = list() - for(var/obj/item/organ/internal/P in affected.internal_organs) - if(P.status & ORGAN_DEAD) - dead_organs[P] = P.name + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(organ.is_dead()) + dead_organs[organ] = organ.name if(dead_organs.len >= 1) if(dead_organs.len == 1) I = dead_organs[1] @@ -219,21 +248,19 @@ "You notice there is not enough mitocholide in [tool].") return FALSE - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I) - if(C.reagents.total_volume <= 0) //end_step handles if there is not enough reagent - user.visible_message("[user] notices [tool] is empty.", \ - "You notice [tool] is empty.") - return FALSE + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(C.reagents.total_volume <= 0) //end_step handles if there is not enough reagent + user.visible_message("[user] notices [tool] is empty.", "You notice [tool] is empty.") + return FALSE - var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]." - var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]." - if(istype(C,/obj/item/reagent_containers/syringe)) - msg = "[user] begins injecting [tool] into [target]'s [I.name]." - self_msg = "You begin injecting [tool] into [target]'s [I.name]." - user.visible_message(msg, self_msg) - if(H && affected) - H.custom_pain("Something burns horribly in your [affected.name]!") + var/msg = "[user] starts pouring some of [tool] over [target]'s [I.name]." + var/self_msg = "You start pouring some of [tool] over [target]'s [I.name]." + if(istype(C,/obj/item/reagent_containers/syringe)) + msg = "[user] begins injecting [tool] into [target]'s [I.name]." + self_msg = "You begin injecting [tool] into [target]'s [I.name]." + user.visible_message(msg, self_msg) + if(H && affected) + H.custom_pain("Something burns horribly in your [affected.name]!") else if(implement_type in implements_finsh) //same as surgery step /datum/surgery_step/open_encased/close/ @@ -255,7 +282,7 @@ current_type = "extract" var/list/organs = target.get_organs_zone(target_zone) var/mob/living/simple_animal/borer/B = target.has_brain_worms() - if(target_zone == "head" && B) + if(target_zone == BODY_ZONE_HEAD && B) user.visible_message("[user] begins to extract [B] from [target]'s [parse_zone(target_zone)].", "You begin to extract [B] from [target]'s [parse_zone(target_zone)]...") return TRUE @@ -263,7 +290,7 @@ to_chat(user, "There are no removeable organs in [target]'s [parse_zone(target_zone)]!") return -1 - for(var/obj/item/organ/internal/O in organs) + for(var/obj/item/organ/internal/O as anything in organs) if(O.unremovable) continue O.on_find(user) @@ -296,23 +323,23 @@ to_chat(user, "They do not have organs to mend!") return - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I.damage) - var/can_treat_robotic = I.is_robotic() && istype(tool, /obj/item/stack/nanopaste) - var/can_treat_organic = !I.is_robotic() && !istype(tool, /obj/item/stack/nanopaste) + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(organ.damage) + var/can_treat_robotic = organ.is_robotic() && istype(tool, /obj/item/stack/nanopaste) + var/can_treat_organic = !organ.is_robotic() && !istype(tool, /obj/item/stack/nanopaste) if(can_treat_robotic || can_treat_organic) - if(I.status & ORGAN_DEAD) - to_chat(user, "You can't treat [I]! Dead organs can't be treated with [tool_name]!") + if(organ.is_dead()) + to_chat(user, "You can't treat [organ]! Dead organs can't be treated with [tool_name]!") continue - user.visible_message("[user] starts treating damage to [target]'s [I.name] with [tool_name].", \ - "You start treating damage to [target]'s [I.name] with [tool_name].") - if(can_treat_organic && !I.sterile) - spread_germs_to_organ(I, user, tool) + user.visible_message("[user] starts treating damage to [target]'s [organ.name] with [tool_name].", \ + "You start treating damage to [target]'s [organ.name] with [tool_name].") + if(can_treat_organic && !organ.sterile) + spread_germs_to_organ(organ, user, tool) else - to_chat(user, "[I] can't be treated with [tool_name].") + to_chat(user, "[organ] can't be treated with [tool_name].") else - to_chat(user, "[I] does not appear to be damaged.") + to_chat(user, "[organ] does not appear to be damaged.") if(affected) H.custom_pain("The pain in your [affected.name] is living hell!") @@ -336,23 +363,20 @@ if(!hasorgans(target)) return - for(var/obj/item/organ/internal/I in affected.internal_organs) - var/treated_robotic = I.is_robotic() && istype(tool, /obj/item/stack/nanopaste) - var/treated_organic = !I.is_robotic() && !istype(tool, /obj/item/stack/nanopaste) + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + var/treated_robotic = organ.is_robotic() && istype(tool, /obj/item/stack/nanopaste) + var/treated_organic = !organ.is_robotic() && !istype(tool, /obj/item/stack/nanopaste) if(treated_robotic || treated_organic) - if(I.status & ORGAN_DEAD) + if(organ.is_dead()) continue - if(I.damage) - user.visible_message("[user] treats damage to [target]'s [I.name] with [tool_name].", \ - "You treat damage to [target]'s [I.name] with [tool_name].") - I.damage = 0 - I.surgeryize() + if(organ.damage) + user.visible_message("[user] treats damage to [target]'s [organ.name] with [tool_name].", \ + "You treat damage to [target]'s [organ.name] with [tool_name].") + organ.damage = 0 + organ.surgeryize() else if(current_type == "insert") I = tool - if(I.requires_robotic_bodypart) - to_chat(user, "[I] is an organ that requires a robotic interface [target].") - return FALSE if(!user.drop_item_ground(I)) to_chat(user, "[I] is stuck to your hand, you can't put it in [target]!") return FALSE @@ -370,7 +394,7 @@ else if(current_type == "extract") var/mob/living/simple_animal/borer/B = target.has_brain_worms() - if(target_zone == "head" && B && B.host == target) + if(target_zone == BODY_ZONE_HEAD && B && B.host == target) user.visible_message("[user] successfully extracts [B] from [target]'s [parse_zone(target_zone)]!", "You successfully extract [B] from [target]'s [parse_zone(target_zone)].") add_attack_logs(user, target, "Surgically removed [B]. INTENT: [uppertext(user.a_intent)]") @@ -383,7 +407,7 @@ add_attack_logs(user, target, "Surgically removed [I.name]. INTENT: [uppertext(user.a_intent)]") spread_germs_to_organ(I, user, tool) var/obj/item/thing = I.remove(target) - if(thing) // some "organs", like egg infections, can have I.remove(target) return null, and so we can't use "thing" in that case + if(!QDELETED(thing)) // some "organs", like egg infections, can have I.remove(target) return null, and so we can't use "thing" in that case if(istype(thing)) thing.forceMove(get_turf(target)) user.put_in_hands(thing, ignore_anim = FALSE) @@ -433,27 +457,26 @@ spaceacillin = R.get_reagent_amount("spaceacillin") - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I) - if(R.total_volume < GHETTO_DISINFECT_AMOUNT) - user.visible_message("[user] notices there is not enough in [tool].", \ - "You notice there is not enough in [tool].") - return FALSE - if(I.germ_level < INFECTION_LEVEL_ONE / 2) - to_chat(user, "[I] does not appear to be infected.") - if(I.germ_level >= INFECTION_LEVEL_ONE / 2) - if(spaceacillin >= GHETTO_DISINFECT_AMOUNT) - I.germ_level = 0 - else - I.germ_level = max(I.germ_level-ethanol, 0) - if(istype(C,/obj/item/reagent_containers/syringe)) - user.visible_message("[user] has injected [tool] into [target]'s [I.name].", - "You have injected [tool] into [target]'s [I.name].") - else - user.visible_message("[user] has poured some of [tool] over [target]'s [I.name].", - "You have poured some of [tool] over [target]'s [I.name].") - R.trans_to(target, GHETTO_DISINFECT_AMOUNT) - R.reaction(target, REAGENT_INGEST) + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(R.total_volume < GHETTO_DISINFECT_AMOUNT) + user.visible_message("[user] notices there is not enough in [tool].", \ + "You notice there is not enough in [tool].") + return FALSE + if(organ.germ_level < INFECTION_LEVEL_ONE / 2) + to_chat(user, "[organ.name] does not appear to be infected.") + if(organ.germ_level >= INFECTION_LEVEL_ONE / 2) + if(spaceacillin >= GHETTO_DISINFECT_AMOUNT) + organ.germ_level = 0 + else + organ.germ_level = max(organ.germ_level-ethanol, 0) + if(istype(C,/obj/item/reagent_containers/syringe)) + user.visible_message("[user] has injected [tool] into [target]'s [organ.name].", + "You have injected [tool] into [target]'s [organ.name].") + else + user.visible_message("[user] has poured some of [tool] over [target]'s [organ.name].", + "You have poured some of [tool] over [target]'s [organ.name].") + R.trans_to(target, GHETTO_DISINFECT_AMOUNT) + R.reaction(target, REAGENT_INGEST) else if(current_type == "finish") if(affected && affected.encased) @@ -488,9 +511,9 @@ target.adjustToxLoss(10) affected.receive_damage(5) - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I && I.damage && !(I.tough)) - I.receive_damage(dam_amt,0) + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(organ.damage && !organ.tough) + organ.receive_damage(dam_amt, 0) return FALSE @@ -518,9 +541,9 @@ ethanol += alcohol.alcohol_perc * 300 ethanol /= C.reagents.reagent_list.len - for(var/obj/item/organ/internal/I in affected.internal_organs) - I.germ_level = max(I.germ_level-ethanol, 0) - I.receive_damage(rand(4,8),0) + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + organ.germ_level = max(organ.germ_level - ethanol, 0) + organ.receive_damage(rand(4,8), 0) R.trans_to(target, GHETTO_DISINFECT_AMOUNT * 10) R.reaction(target, REAGENT_INGEST) @@ -636,10 +659,10 @@ /datum/surgery_step/retract_carapace/begin_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) var/msg = "[user] starts to pry open the incision on [target]'s [target_zone] with [tool]." var/self_msg = "You start to pry open the incision on [target]'s [target_zone] with [tool]." - if(target_zone == "chest") + if(target_zone == BODY_ZONE_CHEST) msg = "[user] starts to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." self_msg = "You start to separate the ribcage and rearrange the organs in [target]'s torso with [tool]." - if(target_zone == "groin") + if(target_zone == BODY_ZONE_PRECISE_GROIN) msg = "[user] starts to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." self_msg = "You start to pry open the incision and rearrange the organs in [target]'s lower abdomen with [tool]." user.visible_message(msg, self_msg) @@ -648,10 +671,10 @@ /datum/surgery_step/retract_carapace/end_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) var/msg = "[user] keeps the incision open on [target]'s [target_zone] with [tool]." var/self_msg = "You keep the incision open on [target]'s [target_zone] with [tool]." - if(target_zone == "chest") + if(target_zone == BODY_ZONE_CHEST) msg = "[user] keeps the ribcage open on [target]'s torso with [tool]." self_msg = "You keep the ribcage open on [target]'s torso with [tool]." - if(target_zone == "groin") + if(target_zone == BODY_ZONE_PRECISE_GROIN) msg = "[user] keeps the incision open on [target]'s lower abdomen with [tool]." self_msg = "You keep the incision open on [target]'s lower abdomen with [tool]." user.visible_message(msg, self_msg) @@ -660,10 +683,10 @@ /datum/surgery_step/generic/retract_carapace/fail_step(mob/living/user, mob/living/carbon/target, target_zone, obj/item/tool,datum/surgery/surgery) var/msg = "[user]'s hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" var/self_msg = "Your hand slips, tearing the edges of incision on [target]'s [target_zone] with [tool]!" - if(target_zone == "chest") + if(target_zone == BODY_ZONE_CHEST) msg = "[user]'s hand slips, damaging several organs [target]'s torso with [tool]!" self_msg = "Your hand slips, damaging several organs [target]'s torso with [tool]!" - if(target_zone == "groin") + if(target_zone == BODY_ZONE_PRECISE_GROIN) msg = "[user]'s hand slips, damaging several organs [target]'s lower abdomen with [tool]" self_msg = "Your hand slips, damaging several organs [target]'s lower abdomen with [tool]!" user.visible_message(msg, self_msg) diff --git a/code/modules/surgery/other.dm b/code/modules/surgery/other.dm index cf65ee26ccf..d09b0305832 100644 --- a/code/modules/surgery/other.dm +++ b/code/modules/surgery/other.dm @@ -6,17 +6,59 @@ /datum/surgery/infection name = "External Infection Treatment" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot", "tail", "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/bleeding name = "Internal Bleeding" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin,/datum/surgery_step/fix_vein,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot", "tail", "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/debridement name = "Debridement" steps = list(/datum/surgery_step/generic/cut_open,/datum/surgery_step/generic/clamp_bleeders,/datum/surgery_step/generic/retract_skin,/datum/surgery_step/fix_dead_tissue,/datum/surgery_step/treat_necrosis,/datum/surgery_step/generic/cauterize) - possible_locs = list("chest","head","groin", "l_arm", "r_arm", "l_leg", "r_leg", "r_hand", "l_hand", "r_foot", "l_foot", "tail", "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/infection/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) @@ -36,7 +78,7 @@ if(!affected) return 0 - if(affected.internal_bleeding) + if(affected.has_internal_bleeding()) return 1 return 0 @@ -51,7 +93,7 @@ if(!affected) return 0 - if(!(affected.status & ORGAN_DEAD)) + if(!affected.is_dead()) return 0 return 1 @@ -75,7 +117,7 @@ if(!affected) return 0 - return affected.internal_bleeding + return affected.has_internal_bleeding() /datum/surgery_step/fix_vein/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) var/obj/item/organ/external/affected = target.get_organ(target_zone) @@ -89,7 +131,7 @@ user.visible_message(" [user] has patched the damaged vein in [target]'s [affected.name] with \the [tool].", \ " You have patched the damaged vein in [target]'s [affected.name] with \the [tool].") - affected.internal_bleeding = FALSE + affected.stop_internal_bleeding() if(ishuman(user) && prob(40)) var/mob/living/carbon/human/U = user U.bloody_hands(target, 0) @@ -126,7 +168,7 @@ if(!affected) return 0 - if(!(affected.status & ORGAN_DEAD)) + if(!affected.is_dead()) return 0 return 1 @@ -184,7 +226,7 @@ return 0 var/obj/item/organ/external/affected = target.get_organ(target_zone) - if(!(affected.status & ORGAN_DEAD)) + if(!affected.is_dead()) return 0 return 1 @@ -212,8 +254,7 @@ container.reagents.reaction(target, REAGENT_INGEST) //technically it's contact, but the reagents are being applied to internal tissue if(mitocholide) - affected.status &= ~ORGAN_DEAD - target.update_body() + affected.unnecrotize() user.visible_message(" [user] applies [trans] units of the solution to affected tissue in [target]'s [affected.name]", \ " You apply [trans] units of the solution to affected tissue in [target]'s [affected.name] with \the [tool].") @@ -243,13 +284,21 @@ /datum/surgery/remove_thrall name = "Remove Shadow Tumor" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/internal/dethrall, /datum/surgery_step/generic/cauterize) - possible_locs = list("head", "chest", "groin") + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_CHEST, + BODY_ZONE_PRECISE_GROIN, + ) /datum/surgery/remove_thrall/synth name = "Debug Shadow Tumor" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/internal/dethrall,/datum/surgery_step/robotics/external/close_hatch) - possible_locs = list("head", "chest", "groin") requires_organic_bodypart = 0 + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_CHEST, + BODY_ZONE_PRECISE_GROIN, + ) /datum/surgery/remove_thrall/can_start(mob/user, mob/living/carbon/human/target) if(!istype(target)) @@ -263,7 +312,7 @@ return 0 if(affected.is_robotic()) return 0 - if(!(B in affected.internal_organs)) + if(!LAZYIN(affected.internal_organs, B)) return 0 return 1 @@ -279,7 +328,7 @@ return 0 if(!affected.is_robotic()) return 0 - if(!(B in affected.internal_organs)) + if(!LAZYIN(affected.internal_organs, B)) return 0 return 1 @@ -298,9 +347,9 @@ return 1 /datum/surgery_step/internal/dethrall/begin_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) - var/braincase = target.named_organ_parent("brain") + var/obj/item/organ/internal/brain = target.get_organ_slot(INTERNAL_ORGAN_BRAIN) user.visible_message("[user] reaches into [target]'s head with [tool].", "You begin aligning [tool]'s light to the tumor on [target]'s brain...") - to_chat(target, "A small part of your [braincase] pulses with agony as the light impacts it.") + to_chat(target, "A small part of your [brain.parent_organ_zone] pulses with agony as the light impacts it.") ..() /datum/surgery_step/internal/dethrall/end_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool,datum/surgery/surgery) @@ -316,7 +365,7 @@ if(iscarbon(user)) var/mob/living/carbon/C = user C.Weaken(12 SECONDS) - C.apply_damage(20, BRUTE, "chest") + C.apply_damage(20, BRUTE, BODY_ZONE_CHEST) else if(issilicon(user)) var/mob/living/silicon/S = user S.Weaken(16 SECONDS) @@ -324,7 +373,7 @@ playsound(S, 'sound/effects/bang.ogg', 50, 1) return 0 var/obj/item/organ/internal/brain/B = target.get_int_organ(/obj/item/organ/internal/brain) - var/obj/item/organ/external/E = target.get_organ(check_zone(B.parent_organ)) + var/obj/item/organ/external/E = target.get_organ(check_zone(B.parent_organ_zone)) user.visible_message("[user] shines light onto the tumor in [target]'s [E]!", "You cleanse the contamination from [target]'s brain!") if(target.vision_type) //Turns off their darksight if it's still active. to_chat(target, "Your eyes are suddenly wrought with immense pain as your darksight is forcibly dismissed!") @@ -332,6 +381,6 @@ SSticker.mode.remove_thrall(target.mind, 0) target.visible_message("A strange black mass falls from [target]'s [E]!") var/obj/item/organ/thing = new /obj/item/organ/internal/shadowtumor(get_turf(target)) - thing.set_dna(target.dna) + thing.update_DNA(target.dna) user.put_in_hands(thing, ignore_anim = FALSE) return 1 diff --git a/code/modules/surgery/plastic_surgery.dm b/code/modules/surgery/plastic_surgery.dm index 37a671fc064..130a608a293 100644 --- a/code/modules/surgery/plastic_surgery.dm +++ b/code/modules/surgery/plastic_surgery.dm @@ -1,7 +1,7 @@ /datum/surgery/plastic_surgery name = "Plastic Surgery" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/reshape_face, /datum/surgery_step/generic/cauterize) - possible_locs = list("head") + possible_locs = list(BODY_ZONE_HEAD) /datum/surgery/plastic_surgery/can_start(mob/user, mob/living/carbon/target) if(ishuman(target)) @@ -25,8 +25,7 @@ /datum/surgery_step/reshape_face/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) var/obj/item/organ/external/head/head = target.get_organ(target_zone) var/species_names = target.dna.species.name - if(head.disfigured) - head.disfigured = FALSE + if(head.undisfigure()) user.visible_message("[user] successfully restores [target]'s appearance!", "You successfully restore [target]'s appearance.") else var/list/names = list() diff --git a/code/modules/surgery/plastic_surgery_robotics.dm b/code/modules/surgery/plastic_surgery_robotics.dm index 717855e8462..bd0195f9f8f 100644 --- a/code/modules/surgery/plastic_surgery_robotics.dm +++ b/code/modules/surgery/plastic_surgery_robotics.dm @@ -1,7 +1,7 @@ /datum/surgery/plastic_surgery_robotics name = "Name Changing Procedure" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/reshape_face_robotics,/datum/surgery_step/robotics/external/close_hatch) - possible_locs = list("head") + possible_locs = list(BODY_ZONE_HEAD) requires_organic_bodypart = 0 /datum/surgery/plastic_surgery_robotics/can_start(mob/user, mob/living/carbon/target) @@ -25,8 +25,7 @@ /datum/surgery_step/reshape_face_robotics/end_step(mob/user, mob/living/carbon/human/target, target_zone, obj/item/tool, datum/surgery/surgery) var/obj/item/organ/external/head/head = target.get_organ(target_zone) var/species_names = target.dna.species.name - if(head.disfigured) - head.disfigured = FALSE + if(head.undisfigure()) user.visible_message("[user] successfully restores [target]'s appearance!", "You successfully restore [target]'s appearance.") else var/list/names = list() diff --git a/code/modules/surgery/remove_embedded_object.dm b/code/modules/surgery/remove_embedded_object.dm index 5f2b92489fd..32040825eb0 100644 --- a/code/modules/surgery/remove_embedded_object.dm +++ b/code/modules/surgery/remove_embedded_object.dm @@ -1,7 +1,21 @@ /datum/surgery/embedded_removal name = "Removal of Embedded Objects" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/clamp_bleeders, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/remove_object,/datum/surgery_step/generic/cauterize) - possible_locs = list("head", "chest", "l_arm", "l_hand", "r_arm", "r_hand","r_leg", "r_foot", "l_leg", "l_foot", "groin", "tail", , "wing") + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/embedded_removal/synth steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/remove_object,/datum/surgery_step/robotics/external/close_hatch) @@ -46,19 +60,11 @@ /datum/surgery_step/remove_object/end_step(mob/user, mob/living/carbon/target, target_zone, obj/item/tool, datum/surgery/surgery) if(L) if(ishuman(target)) - var/mob/living/carbon/human/H = target - var/objects = 0 - for(var/obj/item/I in L.embedded_objects) - objects++ - I.forceMove(get_turf(H)) - L.embedded_objects -= I - if(!H.has_embedded_objects()) - H.clear_alert("embeddedobject") - - if(objects > 0) - user.visible_message("[user] sucessfully removes [objects] objects from [H]'s [L]!", "You successfully remove [objects] objects from [H]'s [L.name].") + var/objects_removed = L.remove_all_embedded_objects() + if(objects_removed) + user.visible_message("[user] sucessfully removes [objects_removed] embedded objects from [target]'s [L.name]!", "You successfully remove [objects_removed] embedded objects from [target]'s [L.name].") else - to_chat(user, "You find no objects embedded in [H]'s [L]!") + to_chat(user, "You find no objects embedded in [target]'s [L.name]!") else to_chat(user, "You can't find [target]'s [parse_zone(user.zone_selected)], let alone any objects embedded in it!") diff --git a/code/modules/surgery/robotics.dm b/code/modules/surgery/robotics.dm index 85215d1bcdf..43b7fa9f63b 100644 --- a/code/modules/surgery/robotics.dm +++ b/code/modules/surgery/robotics.dm @@ -6,20 +6,58 @@ /datum/surgery/cybernetic_repair name = "Cybernetic Repair" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/robotics/external/repair) - possible_locs = list("chest","head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin","tail", "wing") requires_organic_bodypart = 0 + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/cybernetic_repair/internal name = "Internal Component Manipulation" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch,/datum/surgery_step/robotics/external/open_hatch,/datum/surgery_step/robotics/manipulate_robotic_organs) - possible_locs = list("eyes", "mouth", "chest","head","groin","l_arm","r_arm", "l_leg", "r_leg") requires_organic_bodypart = 0 + possible_locs = list( + BODY_ZONE_PRECISE_EYES, + BODY_ZONE_PRECISE_MOUTH, + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_L_ARM, + BODY_ZONE_R_ARM, + BODY_ZONE_L_LEG, + BODY_ZONE_R_LEG, + ) /datum/surgery/cybernetic_amputation name = "Robotic Limb Amputation" steps = list(/datum/surgery_step/robotics/external/amputate) - possible_locs = list("chest","head","l_arm", "l_hand","r_arm","r_hand","r_leg","r_foot","l_leg","l_foot","groin","tail", "wing") requires_organic_bodypart = 0 + possible_locs = list( + BODY_ZONE_CHEST, + BODY_ZONE_HEAD, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) /datum/surgery/cybernetic_repair/can_start(mob/user, mob/living/carbon/target) @@ -222,7 +260,7 @@ else if(implement_type in implements_heal_brute) current_type = "brute" - if(!(affected.brute_dam > 0 || affected.disfigured)) + if(!(affected.brute_dam > 0 || affected.is_disfigured())) to_chat(user, "The [affected] does not require welding repair!") return -1 if(tool.tool_behaviour == TOOL_WELDER) @@ -246,12 +284,12 @@ if("brute") user.visible_message(" [user] finishes patching damage to [target]'s [affected.name] with \the [tool].", \ " You finish patching damage to [target]'s [affected.name] with \the [tool].") - affected.heal_damage(rand(30,50),0,1,1) - affected.disfigured = FALSE + affected.heal_damage(rand(30,50), 0, TRUE, TRUE) + affected.undisfigure() if("burn") user.visible_message(" [user] finishes splicing cable into [target]'s [affected.name].", \ " You finishes splicing new cable into [target]'s [affected.name].") - affected.heal_damage(0,rand(30,50),1,1) + affected.heal_damage(0, rand(30,50), TRUE, TRUE) if("finish") user.visible_message(" [user] closes and secures the hatch on [target]'s [affected.name] with \the [tool].", \ " You close and secure the hatch on [target]'s [affected.name] with \the [tool].") @@ -307,7 +345,7 @@ if(!I.is_robotic()) to_chat(user, "You can only implant cybernetic organs.") - if(target_zone != I.parent_organ || target.get_organ_slot(I.slot)) + if(target_zone != I.parent_organ_zone || target.get_organ_slot(I.slot)) to_chat(user, "There is no room for [I] in [target]'s [parse_zone(target_zone)]!") return -1 @@ -329,7 +367,7 @@ else if(istype(tool,/obj/item/mmi)) current_type = "install" - if(target_zone != "chest") + if(target_zone != BODY_ZONE_CHEST) to_chat(user, " You must target the chest cavity.") return -1 @@ -354,7 +392,7 @@ to_chat(user, "You have no idea what species this person is. Report this on the bug tracker.") return -1 - if(!target.dna.species.has_organ["brain"]) + if(!target.dna.species.has_organ[INTERNAL_ORGAN_BRAIN]) to_chat(user, "You're pretty sure [target.dna.species.name_plural] don't normally have a brain.") return -1 @@ -374,7 +412,7 @@ to_chat(user, "There is no removeable organs in [target]'s [parse_zone(target_zone)]!") return -1 else - for(var/obj/item/organ/internal/O in organs) + for(var/obj/item/organ/internal/O as anything in organs) O.on_find(user) organs -= O organs[O.name] = O @@ -397,10 +435,10 @@ var/obj/item/organ/external/affected = target.get_organ(target_zone) var/found_damaged_organ = FALSE - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I && I.damage && I.is_robotic()) - user.visible_message("[user] starts mending the damage to [target]'s [I.name]'s mechanisms.", \ - "You start mending the damage to [target]'s [I.name]'s mechanisms.") + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(organ.damage && organ.is_robotic()) + user.visible_message("[user] starts mending the damage to [target]'s [organ.name]'s mechanisms.", \ + "You start mending the damage to [target]'s [organ.name]'s mechanisms.") found_damaged_organ = TRUE if(!found_damaged_organ) @@ -422,13 +460,12 @@ if(!hasorgans(target)) return - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I && I.damage) - if(I.is_robotic()) - user.visible_message(" [user] repairs [target]'s [I.name] with [tool].", \ + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + if(organ.damage && organ.is_robotic()) + user.visible_message(" [user] repairs [target]'s [I.name] with [tool].", \ " You repair [target]'s [I.name] with [tool]." ) - I.damage = 0 - I.surgeryize() + organ.damage = 0 + organ.surgeryize() else if(current_type == "insert") var/obj/item/organ/internal/I = tool @@ -488,9 +525,8 @@ target.adjustToxLoss(5) affected.receive_damage(5) - for(var/obj/item/organ/internal/I in affected.internal_organs) - if(I) - I.receive_damage(rand(3,5),0) + for(var/obj/item/organ/internal/organ as anything in affected.internal_organs) + organ.receive_damage(rand(3,5),0) else if(current_type == "insert") user.visible_message(" [user]'s hand slips, disconnecting \the [tool].", \ @@ -550,7 +586,21 @@ /datum/surgery/cybernetic_customization name = "Cybernetic Appearance Customization" steps = list(/datum/surgery_step/robotics/external/unscrew_hatch, /datum/surgery_step/robotics/external/customize_appearance) - possible_locs = list("head", "chest", "l_arm", "l_hand", "r_arm", "r_hand", "r_leg", "r_foot", "l_leg", "l_foot", "groin", "tail", "wing") + possible_locs = list( + BODY_ZONE_HEAD, + BODY_ZONE_CHEST, + BODY_ZONE_L_ARM, + BODY_ZONE_PRECISE_L_HAND, + BODY_ZONE_R_ARM, + BODY_ZONE_PRECISE_R_HAND, + BODY_ZONE_R_LEG, + BODY_ZONE_PRECISE_R_FOOT, + BODY_ZONE_L_LEG, + BODY_ZONE_PRECISE_L_FOOT, + BODY_ZONE_PRECISE_GROIN, + BODY_ZONE_TAIL, + BODY_ZONE_WING, + ) requires_organic_bodypart = FALSE /datum/surgery/cybernetic_customization/can_start(mob/user, mob/living/carbon/human/target) @@ -558,7 +608,7 @@ var/obj/item/organ/external/affected = target.get_organ(user.zone_selected) if(!affected) return FALSE - if(!(affected.status & ORGAN_ROBOT)) + if(!affected.is_robotic()) return FALSE return TRUE @@ -585,7 +635,7 @@ if(!chosen_appearance) return FALSE var/obj/item/organ/external/affected = target.get_organ(target_zone) - affected.robotize(chosen_appearance, convert_all = FALSE) + affected.robotize(company = chosen_appearance, convert_all = FALSE) if(istype(affected, /obj/item/organ/external/head)) var/obj/item/organ/external/head/head = affected head.h_style = "Bald" // nearly all the appearance changes for heads are non-monitors; we want to get rid of a floating screen diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index a36acecb539..f441bb5fe4c 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -14,7 +14,7 @@ var/can_cancel = 1 var/step_in_progress = 0 var/list/in_progress = list() //Actively performing a Surgery - var/location = "chest" //Surgery location + var/location = BODY_ZONE_CHEST //Surgery location var/requires_organic_bodypart = 1 //Prevents you from performing an operation on robotic limbs var/list/possible_locs = list() //Multiple locations -- c0 var/obj/item/organ/organ_ref //Operable body part @@ -192,7 +192,7 @@ * * tool - The tool performing the operation. */ /proc/spread_germs_by_incision(obj/item/organ/external/E, obj/item/tool) - if(!isorgan(E)) + if(!isexternalorgan(E)) return var/germs = 0 @@ -209,11 +209,12 @@ if(tool && tool.blood_DNA && length(tool.blood_DNA)) //germs from blood-stained tools germs += 30 - if(length(E.internal_organs)) - germs = germs / (length(E.internal_organs) + 1) // +1 for the external limb this eventually applies to; let's not multiply germs now. - for(var/obj/item/organ/internal/O in E.internal_organs) - if(!O.is_robotic()) - O.germ_level += germs + var/internals_length = LAZYLEN(E.internal_organs) + if(internals_length) + germs = germs / (internals_length + 1) // +1 for the external limb this eventually applies to; let's not multiply germs now. + for(var/obj/item/organ/internal/organ as anything in E.internal_organs) + if(!organ.is_robotic()) + organ.germ_level += germs E.germ_level += germs diff --git a/code/modules/surgery/vocal_cords_surgery.dm b/code/modules/surgery/vocal_cords_surgery.dm index 4ddbf7b3a97..65df2949707 100644 --- a/code/modules/surgery/vocal_cords_surgery.dm +++ b/code/modules/surgery/vocal_cords_surgery.dm @@ -7,7 +7,7 @@ /datum/surgery/vocal_cords_surgery name = "Vocal Cords Tuning Surgery" steps = list(/datum/surgery_step/generic/cut_open, /datum/surgery_step/generic/retract_skin, /datum/surgery_step/tune_vocal_cords, /datum/surgery_step/generic/cauterize) - possible_locs = list("mouth") + possible_locs = list(BODY_ZONE_PRECISE_MOUTH) /datum/surgery/vocal_cords_surgery/can_start(mob/user, mob/living/carbon/target) if(!ishuman(target)) diff --git a/code/modules/tgui/modules/appearance_changer.dm b/code/modules/tgui/modules/appearance_changer.dm index 5ece7e8fbec..e630b8e20f8 100644 --- a/code/modules/tgui/modules/appearance_changer.dm +++ b/code/modules/tgui/modules/appearance_changer.dm @@ -20,7 +20,7 @@ /datum/ui_module/appearance_changer/New(datum/host, mob/living/carbon/human/H, check_species_whitelist = TRUE, list/species_whitelist = list(), list/species_blacklist = list()) ..() owner = H - head_organ = owner.get_organ("head") + head_organ = owner.get_organ(BODY_ZONE_HEAD) check_whitelist = check_species_whitelist whitelist = species_whitelist blacklist = species_blacklist @@ -38,7 +38,7 @@ if(owner.set_species(S.type)) cut_and_generate_data() // Species change creates new organs - runtimes ahoy if we forget this - head_organ = owner.get_organ("head") + head_organ = owner.get_organ(BODY_ZONE_HEAD) if("gender") if(can_change(APPEARANCE_GENDER)) @@ -195,7 +195,7 @@ if(can_change_alt_head() && (params["alt_head"] in valid_alt_head_styles)) if(owner.change_alt_head(params["alt_head"])) update_dna() - head_organ = owner.get_organ("head") //Update the head with the new information. + head_organ = owner.get_organ(BODY_ZONE_HEAD) //Update the head with the new information. cut_and_generate_data() @@ -267,7 +267,8 @@ data["change_tail_markings"] = can_change_markings("tail") if(data["change_tail_markings"]) - var/m_style = owner.bodypart_tail.m_styles["tail"] + var/obj/item/organ/external/tail/bodypart_tail = owner.get_organ(BODY_ZONE_TAIL) + var/m_style = bodypart_tail.m_styles["tail"] var/list/tail_marking_styles = list() for(var/tail_marking_style in valid_tail_marking_styles) tail_marking_styles += list(list("tailmarkingstyle" = tail_marking_style)) @@ -276,14 +277,16 @@ data["change_body_accessory"] = can_change_body_accessory() if(data["change_body_accessory"]) + var/obj/item/organ/external/tail/bodypart_tail = owner.get_organ(BODY_ZONE_TAIL) + var/obj/item/organ/external/wing/bodypart_wing = owner.get_organ(BODY_ZONE_WING) var/list/body_accessory_styles = list() for(var/body_accessory_style in valid_body_accessories) body_accessory_styles += list(list("bodyaccessorystyle" = body_accessory_style)) data["body_accessory_styles"] = body_accessory_styles - if(owner.bodypart_tail) - data["body_accessory_style"] = (owner.bodypart_tail.body_accessory ? owner.bodypart_tail.body_accessory.name : "None") - if(owner.bodypart_wing) - data["body_accessory_style"] = (owner.bodypart_wing.body_accessory ? owner.bodypart_wing.body_accessory.name : "None") + if(bodypart_tail) + data["body_accessory_style"] = (bodypart_tail.body_accessory ? bodypart_tail.body_accessory.name : "None") + if(bodypart_wing) + data["body_accessory_style"] = (bodypart_wing.body_accessory ? bodypart_wing.body_accessory.name : "None") data["change_alt_head"] = can_change_alt_head() if(data["change_alt_head"]) @@ -345,16 +348,20 @@ if(location == "body") marking_flag = HAS_BODY_MARKINGS if(location == "tail") - tailcheck = owner.bodypart_tail && (owner.bodypart_tail.dna.species.bodyflags & HAS_TAIL_MARKINGS & HAS_BODY_ACCESSORY) + var/obj/item/organ/external/tail/bodypart_tail = owner.get_organ(BODY_ZONE_TAIL) + tailcheck = bodypart_tail && (bodypart_tail.dna?.species?.bodyflags & HAS_TAIL_MARKINGS & HAS_BODY_ACCESSORY) if(location == "wing") - wingcheck = owner.bodypart_wing && (owner.bodypart_wing.dna.species.bodyflags & HAS_BODY_ACCESSORY) + var/obj/item/organ/external/wing/bodypart_wing = owner.get_organ(BODY_ZONE_WING) + wingcheck = bodypart_wing && (bodypart_wing.dna?.species?.bodyflags & HAS_BODY_ACCESSORY) return owner && (flags & APPEARANCE_MARKINGS) && (body_flags & marking_flag) && tailcheck && wingcheck /datum/ui_module/appearance_changer/proc/can_change_body_accessory() - if(owner.bodypart_tail) - return owner && (flags & APPEARANCE_BODY_ACCESSORY) && owner.bodypart_tail && HAS_BODY_ACCESSORY && check_rights(R_ADMIN, 0, owner) - if(owner.bodypart_wing) - return owner && (flags & APPEARANCE_BODY_ACCESSORY) && owner.bodypart_wing && HAS_BODY_ACCESSORY && check_rights(R_ADMIN, 0, owner) + var/obj/item/organ/external/tail/bodypart_tail = owner.get_organ(BODY_ZONE_TAIL) + var/obj/item/organ/external/wing/bodypart_wing = owner.get_organ(BODY_ZONE_WING) + if(bodypart_tail) + return owner && (flags & APPEARANCE_BODY_ACCESSORY) && bodypart_tail && HAS_BODY_ACCESSORY && check_rights(R_ADMIN, 0, owner) + if(bodypart_wing) + return owner && (flags & APPEARANCE_BODY_ACCESSORY) && bodypart_wing && HAS_BODY_ACCESSORY && check_rights(R_ADMIN, 0, owner) else return owner && (flags & APPEARANCE_BODY_ACCESSORY) && HAS_BODY_ACCESSORY && check_rights(R_ADMIN, 0, owner) diff --git a/code/modules/vehicle/ambulance.dm b/code/modules/vehicle/ambulance.dm index 402dd79b95b..fd4a5904fd1 100644 --- a/code/modules/vehicle/ambulance.dm +++ b/code/modules/vehicle/ambulance.dm @@ -22,7 +22,7 @@ var/cooldown = 0 -/datum/action/ambulance_alarm/Trigger() +/datum/action/ambulance_alarm/Trigger(left_click = TRUE) if(!..()) return FALSE diff --git a/code/modules/vehicle/janicart.dm b/code/modules/vehicle/janicart.dm index 1a94dff8b8f..b0b28c7f4d7 100644 --- a/code/modules/vehicle/janicart.dm +++ b/code/modules/vehicle/janicart.dm @@ -36,9 +36,9 @@ var/turf/tile = loc if(isturf(tile)) tile.clean_blood() - for(var/A in tile) - if(is_cleanable(A)) - qdel(A) + for(var/obj/effect/check in tile) + if(check.is_cleanable()) + qdel(check) /obj/vehicle/janicart/examine(mob/user) . = ..() diff --git a/config/example/emojis.txt b/config/example/emojis.txt new file mode 100644 index 00000000000..41806ce4931 --- /dev/null +++ b/config/example/emojis.txt @@ -0,0 +1,64 @@ +## Emoji list +################### +## GR - EX emoji ## +################### + +EMOJI clueless 1121108217888505977.png +EMOJI 1head 852660559093694474.png +EMOJI 2head 852660568389451808.png +EMOJI 3head 619086835116802051.png +EMOJI 4head 852660577246773249.png +EMOJI 5head 619086849264189460.png +EMOJI ache 829695261386211350.png +EMOJI afacepalm 947574263886524456.png +EMOJI alo 618440264771567626.png +EMOJI arolf 910196928657113128.png +EMOJI bigkek 751426772599439386.png +EMOJI keks 656620301320192010.png +EMOJI blessrng 618449016841306123.png +EMOJI catgigi 619108484834918417.png +EMOJI catkerz 619108485421858816.png +EMOJI catping 951390117879246878.png +EMOJI catpong 951390056222978078.png +EMOJI cats 619108484515889173.png +EMOJI 4cb 852699344888397834.png +EMOJI cemkaauf 772551376311418890.png +EMOJI cemkae 852699282342674493.png +EMOJI chad 988503823733620756.png +EMOJI coolstorybob 618449045853306893.png +EMOJI shocked 772549579572510780.png +EMOJI fearlul 852691120772743219.png +EMOJI gagaga 1176622673124655144.png +EMOJI hampter 1154473667842023555.png +EMOJI hss 751418350512635914.png +EMOJI jokerge 1069958367952519168.png +EMOJI kekwat 751418444460720138.png +EMOJI kotvshlyapi 896343514185617418.png +EMOJI neodobryaem 945992517374066698.png +EMOJI odobryaem 945992519802581043.png +EMOJI peepo 949203926027227199.png +EMOJI pepeangry 854807413496348723.png +EMOJI pepepoint 852661162335404102.png +EMOJI pepechill 751418747817951323.png +EMOJI angryclown 623234197989097492.png +EMOJI pepecool 751435240152760360.png +EMOJI pepecry 627932762170720266.png +EMOJI pepekotya 1043131822961344572.png +EMOJI pepeok 852661162243784734.png +EMOJI pepepizdec 975485750411931759.png +EMOJI peperot 788527487654559744.png +EMOJI pepesleep 620042375519272961.png +EMOJI pepetoxic 852699333114855475.png +EMOJI pepewut 618440230243926027.png +EMOJI prayge 829690142930632736.png +EMOJI ratge 852661162222026843.png +EMOJI sadge 772549607837794334.png +EMOJI yepp 829692964577476628.png +EMOJI pog 852664480500547584.png +EMOJI roflcat 975487235984097340.png +EMOJI seemsgood 618596234260906004.png +EMOJI shlepa 941689112073744405.png +EMOJI smilew 938010167671422976.png +EMOJI smorch 618596250849378317.png +EMOJI catahui 751426851171467276.png +EMOJI goblin 689541504070582287.png \ No newline at end of file diff --git a/html/changelogs/archive/2023-12.yml b/html/changelogs/archive/2023-12.yml index a000e464c2a..d067f9d3a5d 100644 --- a/html/changelogs/archive/2023-12.yml +++ b/html/changelogs/archive/2023-12.yml @@ -24,3 +24,77 @@ Vladisvell: - bugfix: fixed drasks breaking grille runtime (#3974) - bugfix: Runtime fixes of bleeding, ears, external organs and accesses. (#3973) +'2023-12-05': + Daeberdir: + - bugfix: correct loot dropping from "watchers" and fixed gems duping. (#3988) + - bugfix: mecha module cooldowns. (#3967) + Dimach: + - bugfix: proper name for channel (#3997) + LiquidPotroh: + - tweak: Reduced frequency of cold (#3983) + - tweak: gravgen has MALF_EFFECT resistance (#3975) + NightDawnFox: + - bugfix: first pack of lavaland minor fixes (#3979) + ROdenFL: + - tweak: north star dirslash (#3992) + - tweak: no falling while pulling someone walking (#3989) + - balance: Genetic Superiority (#3859) + ReloadKey: + - add: Diagnostic hud tajaran veil and SKills hud tajaran veil (#3923) + Vladisvell: + - qol: deal_overall_damage now can be configured to damage robotic limbs, Pentetic + Acid no longer damages robotic limbs (#3986) + - qol: pAI with empty name field no longer can be saved (#3985) + - add: Added ss_id for subsystems and Subsystem Breakdown (#3978) + - qol: Water tiles now extinguish burning mobs. (#3814) + WolfLox: + - tweak: rotation in ERT-vends, LWAP - normal, multi-immolator not usless (#3970) + Zwei: + - bugfix: Wooden Sound For Few Closets (#3987) + - refactor: Body Zones And Internal Organs Refactor (#3960) + captainnelly: + - balance: TC inflation (#3984) +'2023-12-06': + Dimach: + - tweak: not reset jobs subsystem if not needed (#4001) + - bugfix: reset occupations after game mod probing (#4006) + Vladisvell: + - bugfix: fixed monkeycube exploit server crash (#4008) +'2023-12-07': + ArtemDerp: + - add: organ smartfridge can store IV bags (#4000) + Dimach: + - refactor: remove outdated procs (#4003) + Etrnlmelancholy: + - tweak: uplink price tweaks (#4009) + ROdenFL: + - bugfix: defib paddles logic fix (#4013) + Vladisvell: + - bugfix: fixed Taipan lockers rendering (#4012) + - bugfix: fixed anomalies spawn on wrong spots, get_area_turfs fix (#4011) + Zwei: + - bugfix: No Comma In Cross Emote (#4015) + - bugfix: Contractor Teleport Fix (#4020) + - bugfix: Ghost Emotes Fix (#4017) + captainnelly: + - bugfix: TC inflation fixes (#4016) +'2023-12-08': + Daeberdir: + - add: ammo boxes and speedloaders for shotgun ammunition. (#3993) + Dimach: + - refactor: game_mode/can_start no longer modify global state (#4007) + Etrnlmelancholy: + - add: solgov stamps (#4010) + NightDawnFox: + - add: new dress and leather shoes in loadout (#3999) + ROdenFL: + - add: LOOC, OOC, dead chat emoji (#3998) + - bugfix: magic morph cant in magic (#4019) + Rinar21: + - tweak: mecha immolator update (#4005) + Vladisvell: + - bugfix: fixed Irish EMP Bomb runtimes (#4018) + Zwei: + - bugfix: Skrell Headpocket Handling (#4022) + - refactor: Implants Rework (#3966) + - add: Point Rework (#3962) diff --git a/icons/effects/effects.dmi b/icons/effects/effects.dmi index f5758e87583..a386dc0e9e0 100644 Binary files a/icons/effects/effects.dmi and b/icons/effects/effects.dmi differ diff --git a/icons/misc/paper_icons/large_stamp-solgov.png b/icons/misc/paper_icons/large_stamp-solgov.png new file mode 100644 index 00000000000..09e6486678f Binary files /dev/null and b/icons/misc/paper_icons/large_stamp-solgov.png differ diff --git a/icons/misc/paper_icons/solgovlogo.png b/icons/misc/paper_icons/solgovlogo.png new file mode 100644 index 00000000000..8e76e566e9b Binary files /dev/null and b/icons/misc/paper_icons/solgovlogo.png differ diff --git a/icons/mob/actions/actions.dmi b/icons/mob/actions/actions.dmi index cc9f7c27331..d0439308691 100644 Binary files a/icons/mob/actions/actions.dmi and b/icons/mob/actions/actions.dmi differ diff --git a/icons/mob/clothing/eyes.dmi b/icons/mob/clothing/eyes.dmi index c507ae267f4..d64644b0d50 100644 Binary files a/icons/mob/clothing/eyes.dmi and b/icons/mob/clothing/eyes.dmi differ diff --git a/icons/mob/human_races/r_diona.dmi b/icons/mob/human_races/r_diona.dmi index be8119aa67b..ab28728a61c 100644 Binary files a/icons/mob/human_races/r_diona.dmi and b/icons/mob/human_races/r_diona.dmi differ diff --git a/icons/obj/bureaucracy.dmi b/icons/obj/bureaucracy.dmi index 93a9bde1d83..a07b37854d8 100644 Binary files a/icons/obj/bureaucracy.dmi and b/icons/obj/bureaucracy.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index f2db7e511fa..0564edd3a27 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ diff --git a/icons/obj/hypo.dmi b/icons/obj/hypo.dmi index 205642c6572..c7464ede312 100644 Binary files a/icons/obj/hypo.dmi and b/icons/obj/hypo.dmi differ diff --git a/icons/obj/implants.dmi b/icons/obj/implants.dmi index 652d96e1899..34e586d72b8 100644 Binary files a/icons/obj/implants.dmi and b/icons/obj/implants.dmi differ diff --git a/icons/obj/weapons/ammo.dmi b/icons/obj/weapons/ammo.dmi index e825133d5fc..339e9620f66 100644 Binary files a/icons/obj/weapons/ammo.dmi and b/icons/obj/weapons/ammo.dmi differ diff --git a/paradise.dme b/paradise.dme index e8d581c46f4..1051285607f 100644 --- a/paradise.dme +++ b/paradise.dme @@ -54,6 +54,7 @@ #include "code\__DEFINES\genetics.dm" #include "code\__DEFINES\hud.dm" #include "code\__DEFINES\hydroponics.dm" +#include "code\__DEFINES\implants_defines.dm" #include "code\__DEFINES\instruments.dm" #include "code\__DEFINES\inventory.dm" #include "code\__DEFINES\is_helpers.dm" @@ -75,6 +76,7 @@ #include "code\__DEFINES\move_force.dm" #include "code\__DEFINES\muzzle_flash.dm" #include "code\__DEFINES\ninja.dm" +#include "code\__DEFINES\organ_defines.dm" #include "code\__DEFINES\pda.dm" #include "code\__DEFINES\pipes.dm" #include "code\__DEFINES\preferences.dm" @@ -1142,6 +1144,7 @@ #include "code\game\objects\items\weapons\dice.dm" #include "code\game\objects\items\weapons\disks.dm" #include "code\game\objects\items\weapons\dna_injector.dm" +#include "code\game\objects\items\weapons\dna_upgrader.dm" #include "code\game\objects\items\weapons\dnascrambler.dm" #include "code\game\objects\items\weapons\explosives.dm" #include "code\game\objects\items\weapons\extinguisher.dm" @@ -1201,26 +1204,33 @@ #include "code\game\objects\items\weapons\grenades\smokebomb.dm" #include "code\game\objects\items\weapons\grenades\spawnergrenade.dm" #include "code\game\objects\items\weapons\grenades\syndieminibomb.dm" -#include "code\game\objects\items\weapons\implants\health.dm" #include "code\game\objects\items\weapons\implants\implant.dm" #include "code\game\objects\items\weapons\implants\implant_abductor.dm" +#include "code\game\objects\items\weapons\implants\implant_adrenalin.dm" #include "code\game\objects\items\weapons\implants\implant_chem.dm" -#include "code\game\objects\items\weapons\implants\implant_clown.dm" +#include "code\game\objects\items\weapons\implants\implant_cortical_stack.dm" #include "code\game\objects\items\weapons\implants\implant_death_alarm.dm" +#include "code\game\objects\items\weapons\implants\implant_dust.dm" +#include "code\game\objects\items\weapons\implants\implant_emp.dm" +#include "code\game\objects\items\weapons\implants\implant_exile.dm" #include "code\game\objects\items\weapons\implants\implant_explosive.dm" #include "code\game\objects\items\weapons\implants\implant_freedom.dm" +#include "code\game\objects\items\weapons\implants\implant_health.dm" #include "code\game\objects\items\weapons\implants\implant_krav_maga.dm" #include "code\game\objects\items\weapons\implants\implant_mindshield.dm" -#include "code\game\objects\items\weapons\implants\implant_misc.dm" +#include "code\game\objects\items\weapons\implants\implant_sad_trombone.dm" #include "code\game\objects\items\weapons\implants\implant_stealth.dm" #include "code\game\objects\items\weapons\implants\implant_storage.dm" -#include "code\game\objects\items\weapons\implants\implant_track.dm" +#include "code\game\objects\items\weapons\implants\implant_supercharge.dm" +#include "code\game\objects\items\weapons\implants\implant_tracking.dm" #include "code\game\objects\items\weapons\implants\implant_traitor.dm" +#include "code\game\objects\items\weapons\implants\implant_uplink.dm" +#include "code\game\objects\items\weapons\implants\implant_weapon_auth.dm" #include "code\game\objects\items\weapons\implants\implantcase.dm" #include "code\game\objects\items\weapons\implants\implantchair.dm" #include "code\game\objects\items\weapons\implants\implanter.dm" +#include "code\game\objects\items\weapons\implants\implantfluff.dm" #include "code\game\objects\items\weapons\implants\implantpad.dm" -#include "code\game\objects\items\weapons\implants\implantuplink.dm" #include "code\game\objects\items\weapons\melee\energy.dm" #include "code\game\objects\items\weapons\melee\misc.dm" #include "code\game\objects\items\weapons\storage\artistic_toolbox.dm" @@ -1784,6 +1794,7 @@ #include "code\modules\economy\EFTPOS.dm" #include "code\modules\economy\Job_Departments.dm" #include "code\modules\economy\utils.dm" +#include "code\modules\emoji\emoji_parse.dm" #include "code\modules\error_handler\error_handler.dm" #include "code\modules\error_handler\error_viewer.dm" #include "code\modules\events\abductor.dm" @@ -2514,6 +2525,7 @@ #include "code\modules\pda\radio.dm" #include "code\modules\pda\utilities.dm" #include "code\modules\persistence\persistence.dm" +#include "code\modules\point\point.dm" #include "code\modules\power\apc.dm" #include "code\modules\power\cable.dm" #include "code\modules\power\cable_logic.dm" diff --git a/tgui/packages/tgui/interfaces/DNAModifyer.js b/tgui/packages/tgui/interfaces/DNAModifyer.js new file mode 100644 index 00000000000..88279ecb97d --- /dev/null +++ b/tgui/packages/tgui/interfaces/DNAModifyer.js @@ -0,0 +1,43 @@ +import { useBackend } from '../backend'; +import { Box, Button, Grid, LabeledList, ProgressBar, Section } from '../components'; +import { Window } from '../layouts'; + +export const DNAModifyer = (props, context) => { + const { act } = useBackend(context); + return ( + + +
+ + + + + + + +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/interfaces/ImplantPad.js b/tgui/packages/tgui/interfaces/ImplantPad.js new file mode 100644 index 00000000000..4efb4a657c0 --- /dev/null +++ b/tgui/packages/tgui/interfaces/ImplantPad.js @@ -0,0 +1,76 @@ +import { useBackend, useLocalState } from '../backend'; +import { Button, Section, Box, Input, Icon } from '../components'; +import { LabeledList, LabeledListItem } from '../components/LabeledList'; +import { Window } from '../layouts'; + +export const ImplantPad = (props, context) => { + const { act, data } = useBackend(context); + const { implant, contains_case, tag } = data; + const [newTag, setNewTag] = useLocalState(context, "newTag", tag); + + return ( + + +
+ {implant && contains_case ? ( + <> + + + {implant.name} + + + {implant.life} + {implant.notes} + {implant.function} + + + ) : contains_case ? ( + This bio-chip case has no implant! + ) : ( + Please insert a bio-chip casing! + )} +
+
+ {tag && contains_case ? ( + + act('tag', { newtag: newTag })} + onInput={(e, value) => setNewTag(value)} + /> + + + ) : null} + {contains_case ? ( +
+
+
+ ); +}; + + diff --git a/tgui/packages/tgui/interfaces/PrisonerImplantManager.js b/tgui/packages/tgui/interfaces/PrisonerImplantManager.js new file mode 100644 index 00000000000..0108da06838 --- /dev/null +++ b/tgui/packages/tgui/interfaces/PrisonerImplantManager.js @@ -0,0 +1,141 @@ +import { useBackend } from '../backend'; +import { Button, Section, Box, Flex } from '../components'; +import { LabeledList, LabeledListItem } from '../components/LabeledList'; +import { ComplexModal, modalOpen } from './common/ComplexModal'; +import { LoginInfo } from './common/LoginInfo'; +import { LoginScreen } from './common/LoginScreen'; +import { Window } from '../layouts'; + +export const PrisonerImplantManager = (props, context) => { + const { act, data } = useBackend(context); + const { loginState, prisonerInfo, chemicalInfo, trackingInfo } = data; + + let body; + if (!loginState.logged_in) { + return ( + + + + + + ); + } + + let injectionAmount = [1, 5, 10]; // used for auto generating chemical implant inject buttons + + return ( + + + + +
+ + +
+
+ {trackingInfo.map(implant => ( + <> + Subject: {implant.subject} + + + + {implant.location} + + + {implant.health} + + +
+
+ {chemicalInfo.map(implant => ( + <> + Subject: {implant.name} + + + + {implant.volume} + + + {injectionAmount.map(amount => ( +
+
+
+ ); +}; diff --git a/tgui/packages/tgui/public/tgui.bundle.js b/tgui/packages/tgui/public/tgui.bundle.js index 29b83fb7b94..873f8b9b811 100644 --- a/tgui/packages/tgui/public/tgui.bundle.js +++ b/tgui/packages/tgui/public/tgui.bundle.js @@ -1,4 +1,4 @@ -!function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=200)}([function(e,t,n){"use strict";t.__esModule=!0;var o=n(415);Object.keys(o).forEach((function(e){"default"!==e&&"__esModule"!==e&&(t[e]=o[e])}))},function(e,t,n){"use strict";t.__esModule=!0,t.useSharedState=t.deleteLocalState=t.useLocalState=t.useBackend=t.backendReducer=t.backendDeleteSharedState=t.backendSetSharedState=t.backendUpdate=void 0;var o=n(23),r=n(49);t.backendUpdate=function(e){return{type:"backend/update",payload:e}};var i=function(e,t){return{type:"backend/setSharedState",payload:{key:e,nextState:t}}};t.backendSetSharedState=i;var a=function(e){return{type:"backend/deleteSharedState",payload:e}};t.backendDeleteSharedState=a;t.backendReducer=function(e,t){var n=t.type,o=t.payload;if("backend/update"===n){var i=Object.assign({},e.config,{},o.config),a=Object.assign({},e.data,{},o.static_data,{},o.data),c=Object.assign({},e.shared);if(o.shared)for(var l=0,s=Object.keys(o.shared);l1?n-1:0),r=1;r0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(6),r=n(108),i=n(19),a=n(69),c=n(112),l=n(152),s=r("wks"),d=o.Symbol,u=l?d:d&&d.withoutSetter||a;e.exports=function(e){return i(s,e)||(c&&i(d,e)?s[e]=d[e]:s[e]=u("Symbol."+e)),s[e]}},function(e,t,n){"use strict";var o=n(9),r=n(146),i=n(10),a=n(36),c=Object.defineProperty;t.f=o?c:function(e,t,n){if(i(e),t=a(t,!0),i(n),r)try{return c(e,t,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";t.__esModule=!0,t.rad2deg=t.keyOfMatchingRange=t.inRange=t.toFixed=t.round=t.scale=t.clamp01=t.clamp=void 0;t.clamp=function(e,t,n){return en?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,i=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(i>0)),(r?e:Math.round(e))/n);var n,o,r,i};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n1?n-1:0),r=1;r0?r(o(e),9007199254740991):0}},function(e,t,n){"use strict";var o=n(6),r=n(110),i=n(19),a=n(69),c=n(114),l=n(152),s=r("wks"),d=o.Symbol,u=l?d:d&&d.withoutSetter||a;e.exports=function(e){return i(s,e)||(c&&i(d,e)?s[e]=d[e]:s[e]=u("Symbol."+e)),s[e]}},function(e,t,n){"use strict";var o=n(9),r=n(146),i=n(10),a=n(36),c=Object.defineProperty;t.f=o?c:function(e,t,n){if(i(e),t=a(t,!0),i(n),r)try{return c(e,t,n)}catch(o){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";t.__esModule=!0,t.rad2deg=t.keyOfMatchingRange=t.inRange=t.toFixed=t.round=t.scale=t.clamp01=t.clamp=void 0;t.clamp=function(e,t,n){return en?n:e};t.clamp01=function(e){return e<0?0:e>1?1:e};t.scale=function(e,t,n){return(e-t)/(n-t)};t.round=function(e,t){return!e||isNaN(e)?e:(t|=0,i=(e*=n=Math.pow(10,t))>0|-(e<0),r=Math.abs(e%1)>=.4999999999854481,o=Math.floor(e),r&&(e=o+(i>0)),(r?e:Math.round(e))/n);var n,o,r,i};t.toFixed=function(e,t){return void 0===t&&(t=0),Number(e).toFixed(Math.max(t,0))};var o=function(e,t){return t&&e>=t[0]&&e<=t[1]};t.inRange=o;t.keyOfMatchingRange=function(e,t){for(var n=0,r=Object.keys(t);n",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";var o={}.hasOwnProperty;e.exports=function(e,t){return o.call(e,t)}},function(e,t,n){"use strict";var o=n(81),r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===r.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";var o=n(55),r=n(68),i=n(16),a=n(12),c=n(74),l=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,d=4==e,u=6==e,p=5==e||u;return function(m,h,f,C){for(var g,N,b=i(m),V=r(b),v=o(h,f,3),x=a(V.length),y=0,k=C||c,w=t?k(m,x):n?k(m,0):undefined;x>y;y++)if((p||y in V)&&(N=v(g=V[y],y,b),e))if(t)w[y]=N;else if(N)switch(e){case 3:return!0;case 5:return g;case 6:return y;case 2:l.call(w,g)}else if(d)return!1;return u?-1:s||d?d:w}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(e,t,n){"use strict";var o=n(9),r=n(83),i=n(53),a=n(28),c=n(36),l=n(19),s=n(146),d=Object.getOwnPropertyDescriptor;t.f=o?d:function(e,t){if(e=a(e),t=c(t,!0),s)try{return d(e,t)}catch(n){}if(l(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";function o(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(o,r)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0; + */t.__esModule=!0,t.buildQueryString=t.decodeHtmlEntities=t.toTitleCase=t.capitalize=t.createSearch=t.createGlobPattern=t.multiline=void 0;t.multiline=function i(e){if(Array.isArray(e))return i(e.join(""));for(var t,n,r=e.split("\n"),a=o(r);!(n=a()).done;)for(var c=n.value,l=0;l",apos:"'"};return e.replace(/
/gi,"\n").replace(/<\/?[a-z0-9-_]+[^>]*>/gi,"").replace(/&(nbsp|amp|quot|lt|gt|apos);/g,(function(e,n){return t[n]})).replace(/&#?([0-9]+);/gi,(function(e,t){var n=parseInt(t,10);return String.fromCharCode(n)})).replace(/&#x?([0-9a-f]+);/gi,(function(e,t){var n=parseInt(t,16);return String.fromCharCode(n)}))};t.buildQueryString=function(e){return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&")}},function(e,t,n){"use strict";var o={}.hasOwnProperty;e.exports=function(e,t){return o.call(e,t)}},function(e,t,n){"use strict";var o=n(81),r=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],i=["scalar","sequence","mapping"];e.exports=function(e,t){var n,a;if(t=t||{},Object.keys(t).forEach((function(t){if(-1===r.indexOf(t))throw new o('Unknown option "'+t+'" is met in definition of "'+e+'" YAML type.')})),this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.defaultStyle=t.defaultStyle||null,this.styleAliases=(n=t.styleAliases||null,a={},null!==n&&Object.keys(n).forEach((function(e){n[e].forEach((function(t){a[String(t)]=e}))})),a),-1===i.indexOf(this.kind))throw new o('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}},function(e,t,n){"use strict";var o=n(56),r=n(68),i=n(16),a=n(12),c=n(74),l=[].push,s=function(e){var t=1==e,n=2==e,s=3==e,d=4==e,u=6==e,p=5==e||u;return function(m,h,f,C){for(var g,N,b=i(m),V=r(b),v=o(h,f,3),x=a(V.length),y=0,k=C||c,w=t?k(m,x):n?k(m,0):undefined;x>y;y++)if((p||y in V)&&(N=v(g=V[y],y,b),e))if(t)w[y]=N;else if(N)switch(e){case 3:return!0;case 5:return g;case 6:return y;case 2:l.call(w,g)}else if(d)return!1;return u?-1:s||d?d:w}};e.exports={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6)}},function(e,t,n){"use strict";var o=n(9),r=n(83),i=n(54),a=n(28),c=n(36),l=n(19),s=n(146),d=Object.getOwnPropertyDescriptor;t.f=o?d:function(e,t){if(e=a(e),t=c(t,!0),s)try{return d(e,t)}catch(n){}if(l(e,t))return i(!r.f.call(e,t),e[t])}},function(e,t,n){"use strict";function o(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(o,r)}t.__esModule=!0,t.winset=t.winget=t.runCommand=t.callByondAsync=t.callByond=t.IS_IE8=void 0; /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -var r=window.Byond,i=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),a=null!==i&&i<=6;t.IS_IE8=a;var c=function(e,t){void 0===t&&(t={}),r.call(e,t)};t.callByond=c;var l=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,o=new Promise((function(e){window.__callbacks__.push(e)}));return r.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),o};t.callByondAsync=l;t.runCommand=function(e){return c("winset",{command:e})};var s=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l("winget",{id:e,property:t});case 2:return o=n.sent,n.abrupt("return",o[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function c(e){o(a,r,i,c,l,"next",e)}function l(e){o(a,r,i,c,l,"throw",e)}c(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=s;t.winset=function(e,t,n){var o;return c("winset",((o={})[e+"."+t]=n,o))}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.reduce=t.sortBy=t.map=t.filter=t.toKeyedArray=t.toArray=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oc)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n"+a+""}},function(e,t,n){"use strict";var o=n(5);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var o=n(9),r=n(14),i=n(53);e.exports=o?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var o={}.toString;e.exports=function(e){return o.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o,r,i,a=n(148),c=n(6),l=n(8),s=n(32),d=n(19),u=n(84),p=n(70),m=c.WeakMap;if(a){var h=new m,f=h.get,C=h.has,g=h.set;o=function(e,t){return g.call(h,e,t),t},r=function(e){return f.call(h,e)||{}},i=function(e){return C.call(h,e)}}else{var N=u("state");p[N]=!0,o=function(e,t){return s(e,N,t),t},r=function(e){return d(e,N)?e[N]:{}},i=function(e){return d(e,N)}}e.exports={set:o,get:r,has:i,enforce:function(e){return i(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=n(19),r=n(16),i=n(84),a=n(119),c=i("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),o(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var o=n(150),r=n(6),i=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?i(o[e])||i(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var o=n(5);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(9),a=n(132),c=n(11),l=n(89),s=n(61),d=n(53),u=n(32),p=n(12),m=n(164),h=n(179),f=n(36),C=n(19),g=n(86),N=n(8),b=n(45),V=n(57),v=n(54).f,x=n(180),y=n(21).forEach,k=n(60),w=n(14),_=n(22),B=n(37),S=n(91),L=B.get,A=B.set,E=w.f,I=_.f,D=Math.round,T=r.RangeError,F=l.ArrayBuffer,M=l.DataView,P=c.NATIVE_ARRAY_BUFFER_VIEWS,O=c.TYPED_ARRAY_TAG,R=c.TypedArray,j=c.TypedArrayPrototype,U=c.aTypedArrayConstructor,z=c.isTypedArray,W=function(e,t){for(var n=0,o=t.length,r=new(U(e))(o);o>n;)r[n]=t[n++];return r},H=function(e,t){E(e,t,{get:function(){return L(this)[t]}})},K=function(e){var t;return e instanceof F||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},Y=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},G=function(e,t){return Y(e,t=f(t,!0))?d(2,e[t]):I(e,t)},q=function(e,t,n){return!(Y(e,t=f(t,!0))&&N(n)&&C(n,"value"))||C(n,"get")||C(n,"set")||n.configurable||C(n,"writable")&&!n.writable||C(n,"enumerable")&&!n.enumerable?E(e,t,n):(e[t]=n.value,e)};i?(P||(_.f=G,w.f=q,H(j,"buffer"),H(j,"byteOffset"),H(j,"byteLength"),H(j,"length")),o({target:"Object",stat:!0,forced:!P},{getOwnPropertyDescriptor:G,defineProperty:q}),e.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",l="get"+e,d="set"+e,f=r[c],C=f,g=C&&C.prototype,w={},_=function(e,t){E(e,t,{get:function(){return function(e,t){var n=L(e);return n.view[l](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=L(e);n&&(o=(o=D(o))<0?0:o>255?255:255&o),r.view[d](t*i+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};P?a&&(C=t((function(e,t,n,o){return s(e,C,c),S(N(t)?K(t)?o!==undefined?new f(t,h(n,i),o):n!==undefined?new f(t,h(n,i)):new f(t):z(t)?W(C,t):x.call(C,t):new f(m(t)),e,C)})),V&&V(C,R),y(v(f),(function(e){e in C||u(C,e,f[e])})),C.prototype=g):(C=t((function(e,t,n,o){s(e,C,c);var r,a,l,d=0,u=0;if(N(t)){if(!K(t))return z(t)?W(C,t):x.call(C,t);r=t,u=h(n,i);var f=t.byteLength;if(o===undefined){if(f%i)throw T("Wrong length");if((a=f-u)<0)throw T("Wrong length")}else if((a=p(o)*i)+u>f)throw T("Wrong length");l=a/i}else l=m(t),r=new F(a=l*i);for(A(e,{buffer:r,byteOffset:u,byteLength:a,length:l,view:new M(r)});d1?r-1:0),a=1;a1?o-1:0),i=1;i"+e+"<\/script>"},h=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var e,t;h=o?function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):((t=s("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=r(e),n=new p,p.prototype=null,n[u]=e):n=h(),t===undefined?n:i(n,t)}},function(e,t,n){"use strict";var o=n(14).f,r=n(19),i=n(13)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var o=n(13),r=n(45),i=n(14),a=o("unscopables"),c=Array.prototype;c[a]==undefined&&i.f(c,a,{configurable:!0,value:r(null)}),e.exports=function(e){c[a][e]=!0}},function(e,t,n){"use strict";var o=n(10),r=n(34),i=n(13)("species");e.exports=function(e,t){var n,a=o(e).constructor;return a===undefined||(n=o(a)[i])==undefined?t:r(n)}},function(e,t,n){"use strict";t.__esModule=!0,t.timeAgo=t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{command:"#526aff",procedure:"#e3027a",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Soviet",freq:1217,color:"#f7941d"},{name:"SyndTaipan",freq:1227,color:"#ffec8b"},{name:"Spider Clan",freq:1265,color:"#3cfd1e"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"},{name:"Alpha wave",freq:1522,color:"#88910f"},{name:"Beta wave",freq:1532,color:"#1d83f7"},{name:"Gamma wave",freq:1542,color:"#d46549"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color};t.timeAgo=function(e,t){if(e>t)return"in the future";var n=(t/=10)-(e/=10);if(n>3600){var o=Math.round(n/3600);return o+" hour"+(1===o?"":"s")+" ago"}if(n>60){var r=Math.round(n/60);return r+" minute"+(1===r?"":"s")+" ago"}var i=Math.round(n);return i+" second"+(1===i?"":"s")+" ago"}},function(e,t,n){"use strict";t.__esModule=!0,t.FlexItem=t.computeFlexItemProps=t.Flex=t.computeFlexProps=void 0;var o=n(0),r=n(7),i=n(23),a=n(17);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var r=window.Byond,i=function(){var e=navigator.userAgent.match(/Trident\/(\d+).+?;/i);if(!e)return null;var t=e[1];return t?parseInt(t,10):null}(),a=null!==i&&i<=6;t.IS_IE8=a;var c=function(e,t){void 0===t&&(t={}),r.call(e,t)};t.callByond=c;var l=function(e,t){void 0===t&&(t={}),window.__callbacks__=window.__callbacks__||[];var n=window.__callbacks__.length,o=new Promise((function(e){window.__callbacks__.push(e)}));return r.call(e,Object.assign({},t,{callback:"__callbacks__["+n+"]"})),o};t.callByondAsync=l;t.runCommand=function(e){return c("winset",{command:e})};var s=function(){var e,t=(e=regeneratorRuntime.mark((function n(e,t){var o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,l("winget",{id:e,property:t});case 2:return o=n.sent,n.abrupt("return",o[t]);case 4:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(r,i){var a=e.apply(t,n);function c(e){o(a,r,i,c,l,"next",e)}function l(e){o(a,r,i,c,l,"throw",e)}c(undefined)}))});return function(e,n){return t.apply(this,arguments)}}();t.winget=s;t.winset=function(e,t,n){var o;return c("winset",((o={})[e+"."+t]=n,o))}},function(e,t,n){"use strict";t.__esModule=!0,t.zipWith=t.zip=t.uniqBy=t.reduce=t.sortBy=t.map=t.filter=t.toKeyedArray=t.toArray=void 0;t.toArray=function(e){if(Array.isArray(e))return e;if("object"==typeof e){var t=Object.prototype.hasOwnProperty,n=[];for(var o in e)t.call(e,o)&&n.push(e[o]);return n}return[]};t.toKeyedArray=function(e,t){return void 0===t&&(t="key"),o((function(e,n){var o;return Object.assign(((o={})[t]=n,o),e)}))(e)};t.filter=function(e){return function(t){if(null===t&&t===undefined)return t;if(Array.isArray(t)){for(var n=[],o=0;oc)return 1}return 0};t.sortBy=function(){for(var e=arguments.length,t=new Array(e),n=0;n"+a+""}},function(e,t,n){"use strict";var o=n(5);e.exports=function(e){return o((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))}},function(e,t,n){"use strict";var o=n(9),r=n(14),i=n(54);e.exports=o?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";var o=Math.ceil,r=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?r:o)(e)}},function(e,t,n){"use strict";e.exports=function(e){if("function"!=typeof e)throw TypeError(String(e)+" is not a function");return e}},function(e,t,n){"use strict";var o={}.toString;e.exports=function(e){return o.call(e).slice(8,-1)}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){"use strict";var o,r,i,a=n(148),c=n(6),l=n(8),s=n(32),d=n(19),u=n(84),p=n(70),m=c.WeakMap;if(a){var h=new m,f=h.get,C=h.has,g=h.set;o=function(e,t){return g.call(h,e,t),t},r=function(e){return f.call(h,e)||{}},i=function(e){return C.call(h,e)}}else{var N=u("state");p[N]=!0,o=function(e,t){return s(e,N,t),t},r=function(e){return d(e,N)?e[N]:{}},i=function(e){return d(e,N)}}e.exports={set:o,get:r,has:i,enforce:function(e){return i(e)?r(e):o(e,{})},getterFor:function(e){return function(t){var n;if(!l(t)||(n=r(t)).type!==e)throw TypeError("Incompatible receiver, "+e+" required");return n}}}},function(e,t,n){"use strict";var o=n(19),r=n(16),i=n(84),a=n(121),c=i("IE_PROTO"),l=Object.prototype;e.exports=a?Object.getPrototypeOf:function(e){return e=r(e),o(e,c)?e[c]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?l:null}},function(e,t,n){"use strict";var o=n(150),r=n(6),i=function(e){return"function"==typeof e?e:undefined};e.exports=function(e,t){return arguments.length<2?i(o[e])||i(r[e]):o[e]&&o[e][t]||r[e]&&r[e][t]}},function(e,t,n){"use strict";e.exports=!1},function(e,t,n){"use strict";var o=n(5);e.exports=function(e,t){var n=[][e];return!!n&&o((function(){n.call(null,t||function(){throw 1},1)}))}},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(9),a=n(134),c=n(11),l=n(89),s=n(62),d=n(54),u=n(32),p=n(12),m=n(164),h=n(179),f=n(36),C=n(19),g=n(86),N=n(8),b=n(46),V=n(58),v=n(55).f,x=n(180),y=n(21).forEach,k=n(61),w=n(14),_=n(22),B=n(37),S=n(91),L=B.get,A=B.set,I=w.f,E=_.f,D=Math.round,T=r.RangeError,F=l.ArrayBuffer,M=l.DataView,P=c.NATIVE_ARRAY_BUFFER_VIEWS,O=c.TYPED_ARRAY_TAG,R=c.TypedArray,j=c.TypedArrayPrototype,U=c.aTypedArrayConstructor,z=c.isTypedArray,W=function(e,t){for(var n=0,o=t.length,r=new(U(e))(o);o>n;)r[n]=t[n++];return r},H=function(e,t){I(e,t,{get:function(){return L(this)[t]}})},K=function(e){var t;return e instanceof F||"ArrayBuffer"==(t=g(e))||"SharedArrayBuffer"==t},G=function(e,t){return z(e)&&"symbol"!=typeof t&&t in e&&String(+t)==String(t)},Y=function(e,t){return G(e,t=f(t,!0))?d(2,e[t]):E(e,t)},q=function(e,t,n){return!(G(e,t=f(t,!0))&&N(n)&&C(n,"value"))||C(n,"get")||C(n,"set")||n.configurable||C(n,"writable")&&!n.writable||C(n,"enumerable")&&!n.enumerable?I(e,t,n):(e[t]=n.value,e)};i?(P||(_.f=Y,w.f=q,H(j,"buffer"),H(j,"byteOffset"),H(j,"byteLength"),H(j,"length")),o({target:"Object",stat:!0,forced:!P},{getOwnPropertyDescriptor:Y,defineProperty:q}),e.exports=function(e,t,n){var i=e.match(/\d+$/)[0]/8,c=e+(n?"Clamped":"")+"Array",l="get"+e,d="set"+e,f=r[c],C=f,g=C&&C.prototype,w={},_=function(e,t){I(e,t,{get:function(){return function(e,t){var n=L(e);return n.view[l](t*i+n.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var r=L(e);n&&(o=(o=D(o))<0?0:o>255?255:255&o),r.view[d](t*i+r.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};P?a&&(C=t((function(e,t,n,o){return s(e,C,c),S(N(t)?K(t)?o!==undefined?new f(t,h(n,i),o):n!==undefined?new f(t,h(n,i)):new f(t):z(t)?W(C,t):x.call(C,t):new f(m(t)),e,C)})),V&&V(C,R),y(v(f),(function(e){e in C||u(C,e,f[e])})),C.prototype=g):(C=t((function(e,t,n,o){s(e,C,c);var r,a,l,d=0,u=0;if(N(t)){if(!K(t))return z(t)?W(C,t):x.call(C,t);r=t,u=h(n,i);var f=t.byteLength;if(o===undefined){if(f%i)throw T("Wrong length");if((a=f-u)<0)throw T("Wrong length")}else if((a=p(o)*i)+u>f)throw T("Wrong length");l=a/i}else l=m(t),r=new F(a=l*i);for(A(e,{buffer:r,byteOffset:u,byteLength:a,length:l,view:new M(r)});d1?r-1:0),a=1;a1?o-1:0),i=1;i"+e+"<\/script>"},h=function(){try{o=document.domain&&new ActiveXObject("htmlfile")}catch(r){}var e,t;h=o?function(e){e.write(m("")),e.close();var t=e.parentWindow.Object;return e=null,t}(o):((t=s("iframe")).style.display="none",l.appendChild(t),t.src=String("javascript:"),(e=t.contentWindow.document).open(),e.write(m("document.F=Object")),e.close(),e.F);for(var n=a.length;n--;)delete h.prototype[a[n]];return h()};c[u]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(p.prototype=r(e),n=new p,p.prototype=null,n[u]=e):n=h(),t===undefined?n:i(n,t)}},function(e,t,n){"use strict";var o=n(14).f,r=n(19),i=n(13)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){"use strict";var o=n(13),r=n(46),i=n(14),a=o("unscopables"),c=Array.prototype;c[a]==undefined&&i.f(c,a,{configurable:!0,value:r(null)}),e.exports=function(e){c[a][e]=!0}},function(e,t,n){"use strict";var o=n(10),r=n(34),i=n(13)("species");e.exports=function(e,t){var n,a=o(e).constructor;return a===undefined||(n=o(a)[i])==undefined?t:r(n)}},function(e,t,n){"use strict";t.__esModule=!0,t.timeAgo=t.getGasColor=t.getGasLabel=t.RADIO_CHANNELS=t.CSS_COLORS=t.COLORS=t.UI_CLOSE=t.UI_DISABLED=t.UI_UPDATE=t.UI_INTERACTIVE=void 0;t.UI_INTERACTIVE=2;t.UI_UPDATE=1;t.UI_DISABLED=0;t.UI_CLOSE=-1;t.COLORS={department:{command:"#526aff",procedure:"#e3027a",security:"#CF0000",medical:"#009190",science:"#993399",engineering:"#A66300",supply:"#9F8545",service:"#80A000",centcom:"#78789B",other:"#C38312"},damageType:{oxy:"#3498db",toxin:"#2ecc71",burn:"#e67e22",brute:"#e74c3c"}};t.CSS_COLORS=["black","white","red","orange","yellow","olive","green","teal","blue","violet","purple","pink","brown","grey","good","average","bad","label"];t.RADIO_CHANNELS=[{name:"Syndicate",freq:1213,color:"#a52a2a"},{name:"SyndTeam",freq:1244,color:"#a52a2a"},{name:"Soviet",freq:1217,color:"#f7941d"},{name:"SyndTaipan",freq:1227,color:"#ffec8b"},{name:"Spider Clan",freq:1265,color:"#3cfd1e"},{name:"Red Team",freq:1215,color:"#ff4444"},{name:"Blue Team",freq:1217,color:"#3434fd"},{name:"Response Team",freq:1345,color:"#2681a5"},{name:"Special Ops",freq:1341,color:"#2681a5"},{name:"Supply",freq:1347,color:"#b88646"},{name:"Service",freq:1349,color:"#6ca729"},{name:"Science",freq:1351,color:"#c68cfa"},{name:"Command",freq:1353,color:"#5177ff"},{name:"Procedure",freq:1339,color:"#F70285"},{name:"Medical",freq:1355,color:"#57b8f0"},{name:"Medical(I)",freq:1485,color:"#57b8f0"},{name:"Engineering",freq:1357,color:"#f37746"},{name:"Security",freq:1359,color:"#dd3535"},{name:"Security(I)",freq:1475,color:"#dd3535"},{name:"AI Private",freq:1343,color:"#d65d95"},{name:"Common",freq:1459,color:"#1ecc43"},{name:"Alpha wave",freq:1522,color:"#88910f"},{name:"Beta wave",freq:1532,color:"#1d83f7"},{name:"Gamma wave",freq:1542,color:"#d46549"}];var o=[{id:"o2",name:"Oxygen",label:"O\u2082",color:"blue"},{id:"n2",name:"Nitrogen",label:"N\u2082",color:"red"},{id:"co2",name:"Carbon Dioxide",label:"CO\u2082",color:"grey"},{id:"plasma",name:"Plasma",label:"Plasma",color:"pink"},{id:"water_vapor",name:"Water Vapor",label:"H\u2082O",color:"grey"},{id:"nob",name:"Hyper-noblium",label:"Hyper-nob",color:"teal"},{id:"n2o",name:"Nitrous Oxide",label:"N\u2082O",color:"red"},{id:"no2",name:"Nitryl",label:"NO\u2082",color:"brown"},{id:"tritium",name:"Tritium",label:"Tritium",color:"green"},{id:"bz",name:"BZ",label:"BZ",color:"purple"},{id:"stim",name:"Stimulum",label:"Stimulum",color:"purple"},{id:"pluox",name:"Pluoxium",label:"Pluoxium",color:"blue"},{id:"miasma",name:"Miasma",label:"Miasma",color:"olive"},{id:"hydrogen",name:"Hydrogen",label:"H\u2082",color:"white"}];t.getGasLabel=function(e,t){var n=String(e).toLowerCase(),r=o.find((function(e){return e.id===n||e.name.toLowerCase()===n}));return r&&r.label||t||e};t.getGasColor=function(e){var t=String(e).toLowerCase(),n=o.find((function(e){return e.id===t||e.name.toLowerCase()===t}));return n&&n.color};t.timeAgo=function(e,t){if(e>t)return"in the future";var n=(t/=10)-(e/=10);if(n>3600){var o=Math.round(n/3600);return o+" hour"+(1===o?"":"s")+" ago"}if(n>60){var r=Math.round(n/60);return r+" minute"+(1===r?"":"s")+" ago"}var i=Math.round(n);return i+" second"+(1===i?"":"s")+" ago"}},function(e,t,n){"use strict";t.__esModule=!0,t.FlexItem=t.computeFlexItemProps=t.Flex=t.computeFlexProps=void 0;var o=n(0),r=n(7),i=n(23),a=n(17);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var l=function(e){var t=e.className,n=e.direction,o=e.wrap,a=e.align,l=e.alignContent,s=e.justify,d=e.inline,u=e.spacing,p=void 0===u?0:u,m=e.spacingPrecise,h=void 0===m?0:m,f=c(e,["className","direction","wrap","align","alignContent","justify","inline","spacing","spacingPrecise"]);return Object.assign({className:(0,r.classes)(["Flex",i.IS_IE8&&("column"===n?"Flex--ie8--column":"Flex--ie8"),d&&"Flex--inline",p>0&&"Flex--spacing--"+p,h>0&&"Flex--spacingPrecise--"+h,t]),style:Object.assign({},f.style,{"flex-direction":n,"flex-wrap":o,"align-items":a,"align-content":l,"justify-content":s})},f)};t.computeFlexProps=l;var s=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},l(e))))};t.Flex=s,s.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.grow,o=e.order,l=e.shrink,s=e.basis,d=void 0===s?e.width:s,u=e.align,p=c(e,["className","grow","order","shrink","basis","align"]);return Object.assign({className:(0,r.classes)(["Flex__item",i.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},p.style,{"flex-grow":n,"flex-shrink":l,"flex-basis":(0,a.unit)(d),order:o,"align-self":u})},p)};t.computeFlexItemProps=d;var u=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},d(e))))};t.FlexItem=u,u.defaultHooks=r.pureComponentHooks,s.Item=u},function(e,t,n){"use strict";t.__esModule=!0,t.ComplexModal=t.modalClose=t.modalAnswer=t.modalRegisterBodyOverride=t.modalOpen=void 0;var o=n(0),r=n(1),i=n(2),a={};t.modalOpen=function(e,t,n){var o=(0,r.useBackend)(e),i=o.act,a=o.data,c=Object.assign(a.modal?a.modal.args:{},n||{});i("modal_open",{id:t,arguments:JSON.stringify(c)})};t.modalRegisterBodyOverride=function(e,t){a[e]=t};var c=function(e,t,n,o){var i=(0,r.useBackend)(e),a=i.act,c=i.data;if(c.modal){var l=Object.assign(c.modal.args||{},o||{});a("modal_answer",{id:t,answer:n,arguments:JSON.stringify(l)})}};t.modalAnswer=c;var l=function(e,t){(0,(0,r.useBackend)(e).act)("modal_close",{id:t})};t.modalClose=l;t.ComplexModal=function(e,t){var n=(0,r.useBackend)(t).data;if(n.modal){var s,d,u=n.modal,p=u.id,m=u.text,h=u.type,f=(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){return l(t)}}),C="auto";if(a[p])d=a[p](n.modal,t);else if("input"===h){var g=n.modal.value;s=function(e){return c(t,p,g)},d=(0,o.createComponentVNode)(2,i.Input,{value:n.modal.value,placeholder:"ENTER to submit",width:"100%",my:"0.5rem",autofocus:!0,onChange:function(e,t){g=t}}),f=(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Cancel",color:"grey",onClick:function(){return l(t)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"check",content:"Confirm",color:"good",float:"right",m:"0",onClick:function(){return c(t,p,g)}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})}else if("choice"===h){var N="object"==typeof n.modal.choices?Object.values(n.modal.choices):n.modal.choices;d=(0,o.createComponentVNode)(2,i.Dropdown,{options:N,selected:n.modal.value,width:"100%",my:"0.5rem",onSelected:function(e){return c(t,p,e)}}),C="initial"}else"bento"===h?d=(0,o.createComponentVNode)(2,i.Flex,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:n.modal.choices.map((function(e,r){return(0,o.createComponentVNode)(2,i.Flex.Item,{flex:"1 1 auto",children:(0,o.createComponentVNode)(2,i.Button,{selected:r+1===parseInt(n.modal.value,10),onClick:function(){return c(t,p,r+1)},children:(0,o.createVNode)(1,"img",null,null,1,{src:e})})},r)}))}):"boolean"===h&&(f=(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:n.modal.no_text,color:"bad",float:"left",mb:"0",onClick:function(){return c(t,p,0)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"check",content:n.modal.yes_text,color:"good",float:"right",m:"0",onClick:function(){return c(t,p,1)}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]}));return(0,o.createComponentVNode)(2,i.Modal,{maxWidth:e.maxWidth||window.innerWidth/2+"px",maxHeight:e.maxHeight||window.innerHeight/2+"px",onEnter:s,mx:"auto",overflowY:C,children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline",children:m}),d,f]})}}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=t.RndRoute=t.RndNavButton=t.RndNavbar=t.MainMenu=t.LatheSearch=t.LatheMenu=t.LatheMaterialStorage=t.LatheMaterials=t.LatheMainMenu=t.LatheChemicalStorage=t.LatheCategory=t.DeconstructionMenu=t.DataDiskMenu=t.CurrentLevels=void 0;var o=n(618);t.CurrentLevels=o.CurrentLevels;var r=n(619);t.DataDiskMenu=r.DataDiskMenu;var i=n(620);t.DeconstructionMenu=i.DeconstructionMenu;var a=n(621);t.LatheCategory=a.LatheCategory;var c=n(622);t.LatheChemicalStorage=c.LatheChemicalStorage;var l=n(623);t.LatheMainMenu=l.LatheMainMenu;var s=n(624);t.LatheMaterials=s.LatheMaterials;var d=n(625);t.LatheMaterialStorage=d.LatheMaterialStorage;var u=n(626);t.LatheMenu=u.LatheMenu;var p=n(627);t.LatheSearch=p.LatheSearch;var m=n(628);t.MainMenu=m.MainMenu;var h=n(629);t.RndNavbar=h.RndNavbar;var f=n(630);t.RndNavButton=f.RndNavButton;var C=n(199);t.RndRoute=C.RndRoute;var g=n(631);t.SettingsMenu=g.SettingsMenu},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(151),r=n(110).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(34);e.exports=function(e,t,n){if(o(e),t===undefined)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var o=n(36),r=n(14),i=n(53);e.exports=function(e,t,n){var a=o(t);a in e?r.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){"use strict";var o=n(10),r=n(162);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return o(n),r(i),t?e.call(n,i):n.__proto__=i,n}}():undefined)},function(e,t,n){"use strict";var o=n(70),r=n(8),i=n(19),a=n(14).f,c=n(69),l=n(78),s=c("meta"),d=0,u=Object.isExtensible||function(){return!0},p=function(e){a(e,s,{value:{objectID:"O"+ ++d,weakData:{}}})},m=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,s)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[s].objectID},getWeakData:function(e,t){if(!i(e,s)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[s].weakData},onFreeze:function(e){return l&&m.REQUIRED&&u(e)&&!i(e,s)&&p(e),e}};o[s]=!0},function(e,t,n){"use strict";var o=n(35);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(39),r=n(14),i=n(13),a=n(9),c=i("species");e.exports=function(e){var t=o(e),n=r.f;a&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var o=n(25),r="["+n(93)+"]",i=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),c=function(e){return function(t){var n=String(o(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(182);var o=n(23),r=0,i=1,a=2,c=3,l=4,s=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i=a){var c=[t].concat(r).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;(0,o.callByond)("",{src:window.__ref__,action:"tgui:log",log:c})}},d=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),o=0;o0&&"Flex--spacing--"+p,h>0&&"Flex--spacingPrecise--"+h,t]),style:Object.assign({},f.style,{"flex-direction":n,"flex-wrap":o,"align-items":a,"align-content":l,"justify-content":s})},f)};t.computeFlexProps=l;var s=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},l(e))))};t.Flex=s,s.defaultHooks=r.pureComponentHooks;var d=function(e){var t=e.className,n=e.grow,o=e.order,l=e.shrink,s=e.basis,d=void 0===s?e.width:s,u=e.align,p=c(e,["className","grow","order","shrink","basis","align"]);return Object.assign({className:(0,r.classes)(["Flex__item",i.IS_IE8&&"Flex__item--ie8",t]),style:Object.assign({},p.style,{"flex-grow":n,"flex-shrink":l,"flex-basis":(0,a.unit)(d),order:o,"align-self":u})},p)};t.computeFlexItemProps=d;var u=function(e){return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({},d(e))))};t.FlexItem=u,u.defaultHooks=r.pureComponentHooks,s.Item=u},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledListDivider=t.LabeledListItem=t.LabeledList=void 0;var o=n(0),r=n(7),i=n(17),a=n(187); /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -var c=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,l=e.color,s=e.textAlign,d=e.verticalAlign,u=e.buttons,p=e.content,m=e.children,h=e.noColon,f=void 0!==h&&h,C=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","label","labelColor","color","textAlign","verticalAlign","buttons","content","children","noColon"]),g=f?"":":";return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,i.Box,{as:"td",color:c,verticalAlign:d,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+g:null}),(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({as:"td",color:l,textAlign:s,verticalAlign:d,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:u?undefined:2},C,{children:[p,m]}))),u&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",u,0)],0)};t.LabeledListItem=l,l.defaultHooks=r.pureComponentHooks;var s=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=s,s.defaultHooks=r.pureComponentHooks,c.Item=l,c.Divider=s},function(e,t,n){"use strict";function o(e){return null==e}e.exports.isNothing=o,e.exports.isObject=function(e){return"object"==typeof e&&null!==e},e.exports.toArray=function(e){return Array.isArray(e)?e:o(e)?[]:[e]},e.exports.repeat=function(e,t){var n,o="";for(n=0;nd;)if((c=l[d++])!=c)return!0}else for(;s>d;d++)if((e||d in l)&&l[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var o=n(5),r=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=l&&("function"==typeof t?o(t):!!t)},a=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},c=i.data={},l=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var o=n(151),r=n(110);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(8),r=n(59),i=n(13)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[i])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var o=n(5),r=n(13),i=n(113),a=r("species");e.exports=function(e){return i>=51||!o((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(26);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){"use strict";var o=n(5);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var o=n(10),r=n(115),i=n(12),a=n(55),c=n(116),l=n(159),s=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,d,u){var p,m,h,f,C,g,N,b=a(t,n,d?2:1);if(u)p=e;else{if("function"!=typeof(m=c(e)))throw TypeError("Target is not iterable");if(r(m)){for(h=0,f=i(e.length);f>h;h++)if((C=d?b(o(N=e[h])[0],N[1]):b(e[h]))&&C instanceof s)return C;return new s(!1)}p=m.call(e)}for(g=p.next;!(N=g.call(p)).done;)if("object"==typeof(C=l(p,b,N.value,d))&&C&&C instanceof s)return C;return new s(!1)}).stop=function(e){return new s(!0,e)}},function(e,t,n){"use strict";t.__esModule=!0,t.TableCell=t.TableRow=t.Table=void 0;var o=n(0),r=n(7),i=n(17);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var c=function(e){var t=e.children;return(0,o.createVNode)(1,"table","LabeledList",t,0)};t.LabeledList=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.label,a=e.labelColor,c=void 0===a?"label":a,l=e.color,s=e.textAlign,d=e.verticalAlign,u=e.buttons,p=e.content,m=e.children,h=e.noColon,f=void 0!==h&&h,C=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","label","labelColor","color","textAlign","verticalAlign","buttons","content","children","noColon"]),g=f?"":":";return(0,o.createVNode)(1,"tr",(0,r.classes)(["LabeledList__row",t]),[(0,o.createComponentVNode)(2,i.Box,{as:"td",color:c,verticalAlign:d,className:(0,r.classes)(["LabeledList__cell","LabeledList__label"]),children:n?n+g:null}),(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({as:"td",color:l,textAlign:s,verticalAlign:d,className:(0,r.classes)(["LabeledList__cell","LabeledList__content"]),colSpan:u?undefined:2},C,{children:[p,m]}))),u&&(0,o.createVNode)(1,"td","LabeledList__cell LabeledList__buttons",u,0)],0)};t.LabeledListItem=l,l.defaultHooks=r.pureComponentHooks;var s=function(e){var t=e.size?(0,i.unit)(Math.max(0,e.size-1)):0;return(0,o.createVNode)(1,"tr","LabeledList__row",(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Divider),2,{colSpan:3,style:{"padding-top":t,"padding-bottom":t}}),2)};t.LabeledListDivider=s,s.defaultHooks=r.pureComponentHooks,c.Item=l,c.Divider=s},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=t.RndRoute=t.RndNavButton=t.RndNavbar=t.MainMenu=t.LatheSearch=t.LatheMenu=t.LatheMaterialStorage=t.LatheMaterials=t.LatheMainMenu=t.LatheChemicalStorage=t.LatheCategory=t.DeconstructionMenu=t.DataDiskMenu=t.CurrentLevels=void 0;var o=n(621);t.CurrentLevels=o.CurrentLevels;var r=n(622);t.DataDiskMenu=r.DataDiskMenu;var i=n(623);t.DeconstructionMenu=i.DeconstructionMenu;var a=n(624);t.LatheCategory=a.LatheCategory;var c=n(625);t.LatheChemicalStorage=c.LatheChemicalStorage;var l=n(626);t.LatheMainMenu=l.LatheMainMenu;var s=n(627);t.LatheMaterials=s.LatheMaterials;var d=n(628);t.LatheMaterialStorage=d.LatheMaterialStorage;var u=n(629);t.LatheMenu=u.LatheMenu;var p=n(630);t.LatheSearch=p.LatheSearch;var m=n(631);t.MainMenu=m.MainMenu;var h=n(632);t.RndNavbar=h.RndNavbar;var f=n(633);t.RndNavButton=f.RndNavButton;var C=n(199);t.RndRoute=C.RndRoute;var g=n(634);t.SettingsMenu=g.SettingsMenu},function(e,t,n){"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){"use strict";var o=n(151),r=n(112).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(34);e.exports=function(e,t,n){if(o(e),t===undefined)return e;switch(n){case 0:return function(){return e.call(t)};case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t,n){"use strict";var o=n(36),r=n(14),i=n(54);e.exports=function(e,t,n){var a=o(t);a in e?r.f(e,a,i(0,n)):e[a]=n}},function(e,t,n){"use strict";var o=n(10),r=n(162);e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,t=!1,n={};try{(e=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),t=n instanceof Array}catch(i){}return function(n,i){return o(n),r(i),t?e.call(n,i):n.__proto__=i,n}}():undefined)},function(e,t,n){"use strict";var o=n(70),r=n(8),i=n(19),a=n(14).f,c=n(69),l=n(78),s=c("meta"),d=0,u=Object.isExtensible||function(){return!0},p=function(e){a(e,s,{value:{objectID:"O"+ ++d,weakData:{}}})},m=e.exports={REQUIRED:!1,fastKey:function(e,t){if(!r(e))return"symbol"==typeof e?e:("string"==typeof e?"S":"P")+e;if(!i(e,s)){if(!u(e))return"F";if(!t)return"E";p(e)}return e[s].objectID},getWeakData:function(e,t){if(!i(e,s)){if(!u(e))return!0;if(!t)return!1;p(e)}return e[s].weakData},onFreeze:function(e){return l&&m.REQUIRED&&u(e)&&!i(e,s)&&p(e),e}};o[s]=!0},function(e,t,n){"use strict";var o=n(35);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){"use strict";var o=n(39),r=n(14),i=n(13),a=n(9),c=i("species");e.exports=function(e){var t=o(e),n=r.f;a&&t&&!t[c]&&n(t,c,{configurable:!0,get:function(){return this}})}},function(e,t,n){"use strict";e.exports=function(e,t,n){if(!(e instanceof t))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return e}},function(e,t,n){"use strict";var o=n(25),r="["+n(93)+"]",i=RegExp("^"+r+r+"*"),a=RegExp(r+r+"*$"),c=function(e){return function(t){var n=String(o(t));return 1&e&&(n=n.replace(i,"")),2&e&&(n=n.replace(a,"")),n}};e.exports={start:c(1),end:c(2),trim:c(3)}},function(e,t,n){"use strict";t.__esModule=!0,t.logger=t.createLogger=void 0;n(182);var o=n(23),r=0,i=1,a=2,c=3,l=4,s=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i=a){var c=[t].concat(r).map((function(e){return"string"==typeof e?e:e instanceof Error?e.stack||String(e):JSON.stringify(e)})).filter((function(e){return e})).join(" ")+"\nUser Agent: "+navigator.userAgent;(0,o.callByond)("",{src:window.__ref__,action:"tgui:log",log:c})}},d=function(e){return{debug:function(){for(var t=arguments.length,n=new Array(t),o=0;od;)if((c=l[d++])!=c)return!0}else for(;s>d;d++)if((e||d in l)&&l[d]===n)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},function(e,t,n){"use strict";var o=n(5),r=/#|\.prototype\./,i=function(e,t){var n=c[a(e)];return n==s||n!=l&&("function"==typeof t?o(t):!!t)},a=i.normalize=function(e){return String(e).replace(r,".").toLowerCase()},c=i.data={},l=i.NATIVE="N",s=i.POLYFILL="P";e.exports=i},function(e,t,n){"use strict";var o=n(151),r=n(112);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t,n){"use strict";var o=n(8),r=n(60),i=n(13)("species");e.exports=function(e,t){var n;return r(e)&&("function"!=typeof(n=e.constructor)||n!==Array&&!r(n.prototype)?o(n)&&null===(n=n[i])&&(n=undefined):n=undefined),new(n===undefined?Array:n)(0===t?0:t)}},function(e,t,n){"use strict";var o=n(5),r=n(13),i=n(115),a=r("species");e.exports=function(e){return i>=51||!o((function(){var t=[];return(t.constructor={})[a]=function(){return{foo:1}},1!==t[e](Boolean).foo}))}},function(e,t,n){"use strict";e.exports={}},function(e,t,n){"use strict";var o=n(26);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){"use strict";var o=n(5);e.exports=!o((function(){return Object.isExtensible(Object.preventExtensions({}))}))},function(e,t,n){"use strict";var o=n(10),r=n(117),i=n(12),a=n(56),c=n(118),l=n(159),s=function(e,t){this.stopped=e,this.result=t};(e.exports=function(e,t,n,d,u){var p,m,h,f,C,g,N,b=a(t,n,d?2:1);if(u)p=e;else{if("function"!=typeof(m=c(e)))throw TypeError("Target is not iterable");if(r(m)){for(h=0,f=i(e.length);f>h;h++)if((C=d?b(o(N=e[h])[0],N[1]):b(e[h]))&&C instanceof s)return C;return new s(!1)}p=m.call(e)}for(g=p.next;!(N=g.call(p)).done;)if("object"==typeof(C=l(p,b,N.value,d))&&C&&C instanceof s)return C;return new s(!1)}).stop=function(e){return new s(!0,e)}},function(e,t,n){"use strict";t.__esModule=!0,t.TableCell=t.TableRow=t.Table=void 0;var o=n(0),r=n(7),i=n(17);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var c=function(e){var t=e.className,n=e.collapsing,c=e.children,l=a(e,["className","collapsing","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"table",(0,r.classes)(["Table",n&&"Table--collapsing",t,(0,i.computeBoxClassName)(l)]),(0,o.createVNode)(1,"tbody",null,c,0),2,Object.assign({},(0,i.computeBoxProps)(l))))};t.Table=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.header,c=a(e,["className","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"tr",(0,r.classes)(["Table__row",n&&"Table__row--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(c))))};t.TableRow=l,l.defaultHooks=r.pureComponentHooks;var s=function(e){var t=e.className,n=e.collapsing,c=e.header,l=a(e,["className","collapsing","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"td",(0,r.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(l))))};t.TableCell=s,s.defaultHooks=r.pureComponentHooks,c.Row=l,c.Cell=s},function(e,t,n){"use strict";function o(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=o},function(e,t,n){"use strict";var o=n(66);e.exports=new o({include:[n(193)],implicit:[n(505),n(506)],explicit:[n(507),n(512),n(513),n(514)]})},function(e,t,n){"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!o.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},function(e,t,n){"use strict";var o=n(108),r=n(69),i=o("keys");e.exports=function(e){return i[e]||(i[e]=r(e))}},function(e,t,n){"use strict";var o=n(39);e.exports=o("navigator","userAgent")||""},function(e,t,n){"use strict";var o=n(117),r=n(35),i=n(13)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=o?r:function(e){var t,n,o;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){"use strict";var o=n(13)("iterator"),r=!1;try{var i=0,a={next:function(){return{done:!!i++}},"return":function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i={};i[o]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(c){}return n}},function(e,t,n){"use strict";var o=n(34),r=n(16),i=n(68),a=n(12),c=function(e){return function(t,n,c,l){o(n);var s=r(t),d=i(s),u=a(s.length),p=e?u-1:0,m=e?-1:1;if(c<2)for(;;){if(p in d){l=d[p],p+=m;break}if(p+=m,e?p<0:u<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:u>p;p+=m)p in d&&(l=n(l,d[p],p,s));return l}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){"use strict";var o=n(6),r=n(9),i=n(120),a=n(32),c=n(77),l=n(5),s=n(61),d=n(33),u=n(12),p=n(164),m=n(247),h=n(38),f=n(57),C=n(54).f,g=n(14).f,N=n(114),b=n(46),V=n(37),v=V.get,x=V.set,y=o.ArrayBuffer,k=y,w=o.DataView,_=w&&w.prototype,B=Object.prototype,S=o.RangeError,L=m.pack,A=m.unpack,E=function(e){return[255&e]},I=function(e){return[255&e,e>>8&255]},D=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},T=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},F=function(e){return L(e,23,4)},M=function(e){return L(e,52,8)},P=function(e,t){g(e.prototype,t,{get:function(){return v(this)[t]}})},O=function(e,t,n,o){var r=p(n),i=v(e);if(r+t>i.byteLength)throw S("Wrong index");var a=v(i.buffer).bytes,c=r+i.byteOffset,l=a.slice(c,c+t);return o?l:l.reverse()},R=function(e,t,n,o,r,i){var a=p(n),c=v(e);if(a+t>c.byteLength)throw S("Wrong index");for(var l=v(c.buffer).bytes,s=a+c.byteOffset,d=o(+r),u=0;uW;)(j=z[W++])in k||a(k,j,y[j]);U.constructor=k}f&&h(_)!==B&&f(_,B);var H=new w(new k(2)),K=_.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(_,{setInt8:function(e,t){K.call(this,e,t<<24>>24)},setUint8:function(e,t){K.call(this,e,t<<24>>24)}},{unsafe:!0})}else k=function(e){s(this,k,"ArrayBuffer");var t=p(e);x(this,{bytes:N.call(new Array(t),0),byteLength:t}),r||(this.byteLength=t)},w=function(e,t,n){s(this,w,"DataView"),s(e,k,"DataView");var o=v(e).byteLength,i=d(t);if(i<0||i>o)throw S("Wrong offset");if(i+(n=n===undefined?o-i:u(n))>o)throw S("Wrong length");x(this,{buffer:e,byteLength:n,byteOffset:i}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},r&&(P(k,"byteLength"),P(w,"buffer"),P(w,"byteLength"),P(w,"byteOffset")),c(w.prototype,{getInt8:function(e){return O(this,1,e)[0]<<24>>24},getUint8:function(e){return O(this,1,e)[0]},getInt16:function(e){var t=O(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=O(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return T(O(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return T(O(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return A(O(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return A(O(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){R(this,1,e,E,t)},setUint8:function(e,t){R(this,1,e,E,t)},setInt16:function(e,t){R(this,2,e,I,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){R(this,2,e,I,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){R(this,4,e,D,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){R(this,4,e,D,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){R(this,4,e,F,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){R(this,8,e,M,t,arguments.length>2?arguments[2]:undefined)}});b(k,"ArrayBuffer"),b(w,"DataView"),e.exports={ArrayBuffer:k,DataView:w}},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(72),a=n(26),c=n(58),l=n(79),s=n(61),d=n(8),u=n(5),p=n(87),m=n(46),h=n(91);e.exports=function(e,t,n){var f=-1!==e.indexOf("Map"),C=-1!==e.indexOf("Weak"),g=f?"set":"add",N=r[e],b=N&&N.prototype,V=N,v={},x=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(C&&!d(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return C&&!d(e)?undefined:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(C&&!d(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof N||!(C||b.forEach&&!u((function(){(new N).entries().next()})))))V=n.getConstructor(t,e,f,g),c.REQUIRED=!0;else if(i(e,!0)){var y=new V,k=y[g](C?{}:-0,1)!=y,w=u((function(){y.has(1)})),_=p((function(e){new N(e)})),B=!C&&u((function(){for(var e=new N,t=5;t--;)e[g](t,t);return!e.has(-0)}));_||((V=t((function(t,n){s(t,V,e);var o=h(new N,t,V);return n!=undefined&&l(n,o[g],o,f),o}))).prototype=b,b.constructor=V),(w||B)&&(x("delete"),x("has"),f&&x("get")),(B||k)&&x(g),C&&b.clear&&delete b.clear}return v[e]=V,o({global:!0,forced:V!=N},v),m(V,e),C||n.setStrong(V,e,f),V}},function(e,t,n){"use strict";var o=n(8),r=n(57);e.exports=function(e,t,n){var i,a;return r&&"function"==typeof(i=t.constructor)&&i!==n&&o(a=i.prototype)&&a!==n.prototype&&r(e,a),e}},function(e,t,n){"use strict";var o=Math.expm1,r=Math.exp;e.exports=!o||o(10)>22025.465794806718||o(10)<22025.465794806718||-2e-17!=o(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:o},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var o=n(40),r=n(6),i=n(5);e.exports=o||!i((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}))},function(e,t,n){"use strict";var o=n(10);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o,r,i=n(95),a=n(126),c=RegExp.prototype.exec,l=String.prototype.replace,s=c,d=(o=/a/,r=/b*/g,c.call(o,"a"),c.call(r,"a"),0!==o.lastIndex||0!==r.lastIndex),u=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=/()??/.exec("")[1]!==undefined;(d||p||u)&&(s=function(e){var t,n,o,r,a=this,s=u&&a.sticky,m=i.call(a),h=a.source,f=0,C=e;return s&&(-1===(m=m.replace("y","")).indexOf("g")&&(m+="g"),C=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",C=" "+C,f++),n=new RegExp("^(?:"+h+")",m)),p&&(n=new RegExp("^"+h+"$(?!\\s)",m)),d&&(t=a.lastIndex),o=c.call(s?n:a,C),s?o?(o.input=o.input.slice(f),o[0]=o[0].slice(f),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:d&&o&&(a.lastIndex=a.global?o.index+o[0].length:t),p&&o&&o.length>1&&l.call(o[0],n,(function(){for(r=1;r")})),d="$0"==="a".replace(/./,"$0"),u=i("replace"),p=!!/./[u]&&""===/./[u]("a","$0"),m=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,u){var h=i(e),f=!r((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),C=f&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!f||!C||"replace"===e&&(!s||!d||p)||"split"===e&&!m){var g=/./[h],N=n(h,""[e],(function(e,t,n,o,r){return t.exec===a?f&&!r?{done:!0,value:g.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}}),{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=N[0],V=N[1];o(String.prototype,e,b),o(RegExp.prototype,h,2==t?function(e,t){return V.call(e,this,t)}:function(e){return V.call(e,this)})}u&&c(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var o=n(35),r=n(96);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0,t.AccessList=void 0;var o=n(0),r=n(24),i=n(1),a=n(2);function c(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt?2+3*s-c:0;return((0,o.toFixed)(p,m)+" "+u+n).trim()}; + */var c=function(e){var t=e.className,n=e.collapsing,c=e.children,l=a(e,["className","collapsing","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"table",(0,r.classes)(["Table",n&&"Table--collapsing",t,(0,i.computeBoxClassName)(l)]),(0,o.createVNode)(1,"tbody",null,c,0),2,Object.assign({},(0,i.computeBoxProps)(l))))};t.Table=c,c.defaultHooks=r.pureComponentHooks;var l=function(e){var t=e.className,n=e.header,c=a(e,["className","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"tr",(0,r.classes)(["Table__row",n&&"Table__row--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(c))))};t.TableRow=l,l.defaultHooks=r.pureComponentHooks;var s=function(e){var t=e.className,n=e.collapsing,c=e.header,l=a(e,["className","collapsing","header"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"td",(0,r.classes)(["Table__cell",n&&"Table__cell--collapsing",c&&"Table__cell--header",t,(0,i.computeBoxClassName)(e)]),null,1,Object.assign({},(0,i.computeBoxProps)(l))))};t.TableCell=s,s.defaultHooks=r.pureComponentHooks,c.Row=l,c.Cell=s},function(e,t,n){"use strict";function o(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}o.prototype=Object.create(Error.prototype),o.prototype.constructor=o,o.prototype.toString=function(e){var t=this.name+": ";return t+=this.reason||"(unknown reason)",!e&&this.mark&&(t+=" "+this.mark.toString()),t},e.exports=o},function(e,t,n){"use strict";var o=n(66);e.exports=new o({include:[n(193)],implicit:[n(505),n(506)],explicit:[n(507),n(512),n(513),n(514)]})},function(e,t,n){"use strict";var o={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!o.call({1:2},1);t.f=i?function(e){var t=r(this,e);return!!t&&t.enumerable}:o},function(e,t,n){"use strict";var o=n(110),r=n(69),i=o("keys");e.exports=function(e){return i[e]||(i[e]=r(e))}},function(e,t,n){"use strict";var o=n(39);e.exports=o("navigator","userAgent")||""},function(e,t,n){"use strict";var o=n(119),r=n(35),i=n(13)("toStringTag"),a="Arguments"==r(function(){return arguments}());e.exports=o?r:function(e){var t,n,o;return e===undefined?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(n){}}(t=Object(e),i))?n:a?r(t):"Object"==(o=r(t))&&"function"==typeof t.callee?"Arguments":o}},function(e,t,n){"use strict";var o=n(13)("iterator"),r=!1;try{var i=0,a={next:function(){return{done:!!i++}},"return":function(){r=!0}};a[o]=function(){return this},Array.from(a,(function(){throw 2}))}catch(c){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i={};i[o]=function(){return{next:function(){return{done:n=!0}}}},e(i)}catch(c){}return n}},function(e,t,n){"use strict";var o=n(34),r=n(16),i=n(68),a=n(12),c=function(e){return function(t,n,c,l){o(n);var s=r(t),d=i(s),u=a(s.length),p=e?u-1:0,m=e?-1:1;if(c<2)for(;;){if(p in d){l=d[p],p+=m;break}if(p+=m,e?p<0:u<=p)throw TypeError("Reduce of empty array with no initial value")}for(;e?p>=0:u>p;p+=m)p in d&&(l=n(l,d[p],p,s));return l}};e.exports={left:c(!1),right:c(!0)}},function(e,t,n){"use strict";var o=n(6),r=n(9),i=n(122),a=n(32),c=n(77),l=n(5),s=n(62),d=n(33),u=n(12),p=n(164),m=n(247),h=n(38),f=n(58),C=n(55).f,g=n(14).f,N=n(116),b=n(47),V=n(37),v=V.get,x=V.set,y=o.ArrayBuffer,k=y,w=o.DataView,_=w&&w.prototype,B=Object.prototype,S=o.RangeError,L=m.pack,A=m.unpack,I=function(e){return[255&e]},E=function(e){return[255&e,e>>8&255]},D=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},T=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},F=function(e){return L(e,23,4)},M=function(e){return L(e,52,8)},P=function(e,t){g(e.prototype,t,{get:function(){return v(this)[t]}})},O=function(e,t,n,o){var r=p(n),i=v(e);if(r+t>i.byteLength)throw S("Wrong index");var a=v(i.buffer).bytes,c=r+i.byteOffset,l=a.slice(c,c+t);return o?l:l.reverse()},R=function(e,t,n,o,r,i){var a=p(n),c=v(e);if(a+t>c.byteLength)throw S("Wrong index");for(var l=v(c.buffer).bytes,s=a+c.byteOffset,d=o(+r),u=0;uW;)(j=z[W++])in k||a(k,j,y[j]);U.constructor=k}f&&h(_)!==B&&f(_,B);var H=new w(new k(2)),K=_.setInt8;H.setInt8(0,2147483648),H.setInt8(1,2147483649),!H.getInt8(0)&&H.getInt8(1)||c(_,{setInt8:function(e,t){K.call(this,e,t<<24>>24)},setUint8:function(e,t){K.call(this,e,t<<24>>24)}},{unsafe:!0})}else k=function(e){s(this,k,"ArrayBuffer");var t=p(e);x(this,{bytes:N.call(new Array(t),0),byteLength:t}),r||(this.byteLength=t)},w=function(e,t,n){s(this,w,"DataView"),s(e,k,"DataView");var o=v(e).byteLength,i=d(t);if(i<0||i>o)throw S("Wrong offset");if(i+(n=n===undefined?o-i:u(n))>o)throw S("Wrong length");x(this,{buffer:e,byteLength:n,byteOffset:i}),r||(this.buffer=e,this.byteLength=n,this.byteOffset=i)},r&&(P(k,"byteLength"),P(w,"buffer"),P(w,"byteLength"),P(w,"byteOffset")),c(w.prototype,{getInt8:function(e){return O(this,1,e)[0]<<24>>24},getUint8:function(e){return O(this,1,e)[0]},getInt16:function(e){var t=O(this,2,e,arguments.length>1?arguments[1]:undefined);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=O(this,2,e,arguments.length>1?arguments[1]:undefined);return t[1]<<8|t[0]},getInt32:function(e){return T(O(this,4,e,arguments.length>1?arguments[1]:undefined))},getUint32:function(e){return T(O(this,4,e,arguments.length>1?arguments[1]:undefined))>>>0},getFloat32:function(e){return A(O(this,4,e,arguments.length>1?arguments[1]:undefined),23)},getFloat64:function(e){return A(O(this,8,e,arguments.length>1?arguments[1]:undefined),52)},setInt8:function(e,t){R(this,1,e,I,t)},setUint8:function(e,t){R(this,1,e,I,t)},setInt16:function(e,t){R(this,2,e,E,t,arguments.length>2?arguments[2]:undefined)},setUint16:function(e,t){R(this,2,e,E,t,arguments.length>2?arguments[2]:undefined)},setInt32:function(e,t){R(this,4,e,D,t,arguments.length>2?arguments[2]:undefined)},setUint32:function(e,t){R(this,4,e,D,t,arguments.length>2?arguments[2]:undefined)},setFloat32:function(e,t){R(this,4,e,F,t,arguments.length>2?arguments[2]:undefined)},setFloat64:function(e,t){R(this,8,e,M,t,arguments.length>2?arguments[2]:undefined)}});b(k,"ArrayBuffer"),b(w,"DataView"),e.exports={ArrayBuffer:k,DataView:w}},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(72),a=n(26),c=n(59),l=n(79),s=n(62),d=n(8),u=n(5),p=n(87),m=n(47),h=n(91);e.exports=function(e,t,n){var f=-1!==e.indexOf("Map"),C=-1!==e.indexOf("Weak"),g=f?"set":"add",N=r[e],b=N&&N.prototype,V=N,v={},x=function(e){var t=b[e];a(b,e,"add"==e?function(e){return t.call(this,0===e?0:e),this}:"delete"==e?function(e){return!(C&&!d(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return C&&!d(e)?undefined:t.call(this,0===e?0:e)}:"has"==e?function(e){return!(C&&!d(e))&&t.call(this,0===e?0:e)}:function(e,n){return t.call(this,0===e?0:e,n),this})};if(i(e,"function"!=typeof N||!(C||b.forEach&&!u((function(){(new N).entries().next()})))))V=n.getConstructor(t,e,f,g),c.REQUIRED=!0;else if(i(e,!0)){var y=new V,k=y[g](C?{}:-0,1)!=y,w=u((function(){y.has(1)})),_=p((function(e){new N(e)})),B=!C&&u((function(){for(var e=new N,t=5;t--;)e[g](t,t);return!e.has(-0)}));_||((V=t((function(t,n){s(t,V,e);var o=h(new N,t,V);return n!=undefined&&l(n,o[g],o,f),o}))).prototype=b,b.constructor=V),(w||B)&&(x("delete"),x("has"),f&&x("get")),(B||k)&&x(g),C&&b.clear&&delete b.clear}return v[e]=V,o({global:!0,forced:V!=N},v),m(V,e),C||n.setStrong(V,e,f),V}},function(e,t,n){"use strict";var o=n(8),r=n(58);e.exports=function(e,t,n){var i,a;return r&&"function"==typeof(i=t.constructor)&&i!==n&&o(a=i.prototype)&&a!==n.prototype&&r(e,a),e}},function(e,t,n){"use strict";var o=Math.expm1,r=Math.exp;e.exports=!o||o(10)>22025.465794806718||o(10)<22025.465794806718||-2e-17!=o(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:r(e)-1}:o},function(e,t,n){"use strict";e.exports="\t\n\x0B\f\r \xa0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029\ufeff"},function(e,t,n){"use strict";var o=n(40),r=n(6),i=n(5);e.exports=o||!i((function(){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete r[e]}))},function(e,t,n){"use strict";var o=n(10);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o,r,i=n(95),a=n(128),c=RegExp.prototype.exec,l=String.prototype.replace,s=c,d=(o=/a/,r=/b*/g,c.call(o,"a"),c.call(r,"a"),0!==o.lastIndex||0!==r.lastIndex),u=a.UNSUPPORTED_Y||a.BROKEN_CARET,p=/()??/.exec("")[1]!==undefined;(d||p||u)&&(s=function(e){var t,n,o,r,a=this,s=u&&a.sticky,m=i.call(a),h=a.source,f=0,C=e;return s&&(-1===(m=m.replace("y","")).indexOf("g")&&(m+="g"),C=String(e).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==e[a.lastIndex-1])&&(h="(?: "+h+")",C=" "+C,f++),n=new RegExp("^(?:"+h+")",m)),p&&(n=new RegExp("^"+h+"$(?!\\s)",m)),d&&(t=a.lastIndex),o=c.call(s?n:a,C),s?o?(o.input=o.input.slice(f),o[0]=o[0].slice(f),o.index=a.lastIndex,a.lastIndex+=o[0].length):a.lastIndex=0:d&&o&&(a.lastIndex=a.global?o.index+o[0].length:t),p&&o&&o.length>1&&l.call(o[0],n,(function(){for(r=1;r")})),d="$0"==="a".replace(/./,"$0"),u=i("replace"),p=!!/./[u]&&""===/./[u]("a","$0"),m=!r((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));e.exports=function(e,t,n,u){var h=i(e),f=!r((function(){var t={};return t[h]=function(){return 7},7!=""[e](t)})),C=f&&!r((function(){var t=!1,n=/a/;return"split"===e&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[h]=/./[h]),n.exec=function(){return t=!0,null},n[h](""),!t}));if(!f||!C||"replace"===e&&(!s||!d||p)||"split"===e&&!m){var g=/./[h],N=n(h,""[e],(function(e,t,n,o,r){return t.exec===a?f&&!r?{done:!0,value:g.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}}),{REPLACE_KEEPS_$0:d,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:p}),b=N[0],V=N[1];o(String.prototype,e,b),o(RegExp.prototype,h,2==t?function(e,t){return V.call(e,this,t)}:function(e){return V.call(e,this)})}u&&c(RegExp.prototype[h],"sham",!0)}},function(e,t,n){"use strict";var o=n(35),r=n(96);e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==o(e))throw TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginInfo=void 0;var o=n(0),r=n(1),i=n(2);t.LoginInfo=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.loginState;if(c)return(0,o.createComponentVNode)(2,i.NoticeBox,{info:!0,children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:["Logged in as: ",l.name," (",l.rank,")"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"Logout",color:"good",float:"right",onClick:function(){return a("login_logout")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:!l.id,content:"Eject ID",color:"good",float:"right",onClick:function(){return a("login_eject")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginScreen=void 0;var o=n(0),r=n(1),i=n(2);t.LoginScreen=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.loginState,s=c.isAI,d=c.isRobot,u=c.isAdmin;return(0,o.createComponentVNode)(2,i.Section,{title:"Welcome",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,o.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:["ID:",(0,o.createComponentVNode)(2,i.Button,{icon:"id-card",content:l.id?l.id:"----------",ml:"0.5rem",onClick:function(){return a("login_insert")}})]}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",disabled:!l.id,content:"Login",onClick:function(){return a("login_login",{login_type:1})}}),!!s&&(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return a("login_login",{login_type:2})}}),!!d&&(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return a("login_login",{login_type:3})}}),!!u&&(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){return a("login_login",{login_type:4})}})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccessList=void 0;var o=n(0),r=n(24),i=n(1),a=n(2);function c(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return l(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt?2+3*s-c:0;return((0,o.toFixed)(p,m)+" "+u+n).trim()}; /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */t.formatSiUnit=a;t.formatPower=function(e,t){return void 0===t&&(t=0),a(e,t,"W")};t.formatMoney=function(e,t){if(void 0===t&&(t=0),!Number.isFinite(e))return e;var n=(0,o.round)(e,t);t>0&&(n=(0,o.toFixed)(e,t));var r=(n=String(n)).length,i=n.indexOf(".");-1===i&&(i=r);for(var a="",c=0;c0&&c=0||(r[n]=e[n]);return r}(e,["format"]),i=new Date(this.state.value).toISOString().slice(11,19);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Box,Object.assign({as:"span"},n,{children:t?t(this.state.value,i):i})))},i}(o.Component);t.Countdown=i,i.defaultProps={rate:1e3}},function(e,t,n){"use strict";t.__esModule=!0,t.SimpleRecords=void 0;var o=n(0),r=n(1),i=n(18),a=n(43),c=n(24),l=n(2);t.SimpleRecords=function(e,t){var n=e.data.records;return(0,o.createComponentVNode)(2,l.Box,{children:n?(0,o.createComponentVNode)(2,d,{data:e.data,recordType:e.recordType}):(0,o.createComponentVNode)(2,s,{data:e.data})})};var s=function(e,t){var n=(0,r.useBackend)(t).act,s=e.data.recordsList,d=(0,r.useLocalState)(t,"searchText",""),u=d[0],p=d[1],m=function(e,t){void 0===t&&(t="");var n=(0,i.createSearch)(t,(function(e){return e.Name}));return(0,a.flow)([(0,c.filter)((function(e){return null==e?void 0:e.Name})),t&&(0,c.filter)(n),(0,c.sortBy)((function(e){return e.Name}))])(s)}(0,u);return(0,o.createComponentVNode)(2,l.Box,{children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(e,t){return p(t)}}),m.map((function(e){return(0,o.createComponentVNode)(2,l.Box,{children:(0,o.createComponentVNode)(2,l.Button,{content:e.Name,icon:"user",onClick:function(){return n("Records",{target:e.uid})}})},e)}))]})},d=function(e,t){var n,i=(0,r.useBackend)(t).act,a=e.data.records,c=a.general,s=a.medical,d=a.security;switch(e.recordType){case"MED":n=(0,o.createComponentVNode)(2,l.Section,{level:2,title:"Medical Data",children:s?(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Blood Type",children:s.blood_type}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Minor Disabilities",children:s.mi_dis}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.mi_dis_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Major Disabilities",children:s.ma_dis}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.ma_dis_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Allergies",children:s.alg}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.alg_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Current Diseases",children:s.cdi}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.cdi_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Important Notes",children:s.notes})]}):(0,o.createComponentVNode)(2,l.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":n=(0,o.createComponentVNode)(2,l.Section,{level:2,title:"Security Data",children:d?(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Criminal Status",children:d.criminal}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Minor Crimes",children:d.mi_crim}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:d.mi_crim_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Major Crimes",children:d.ma_crim}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:d.ma_crim_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Important Notes",children:d.notes})]}):(0,o.createComponentVNode)(2,l.Box,{color:"red",bold:!0,children:"Security record lost!"})})}return(0,o.createComponentVNode)(2,l.Box,{children:[(0,o.createComponentVNode)(2,l.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("Back")}}),(0,o.createComponentVNode)(2,l.Section,{level:2,title:"General Data",children:c?(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Name",children:c.name}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Sex",children:c.sex}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Species",children:c.species}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Age",children:c.age}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Rank",children:c.rank}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Fingerprint",children:c.fingerprint}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Physical Status",children:c.p_stat}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Mental Status",children:c.m_stat})]}):(0,o.createComponentVNode)(2,l.Box,{color:"red",bold:!0,children:"General record lost!"})}),n]})}},function(e,t,n){"use strict";var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(r){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,n){"use strict";var o=n(6),r=n(8),i=o.document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";var o=n(6),r=n(32);e.exports=function(e,t){try{r(o,e,t)}catch(n){o[e]=t}return t}},function(e,t,n){"use strict";var o=n(147),r=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return r.call(e)}),e.exports=o.inspectSource},function(e,t,n){"use strict";var o=n(40),r=n(147);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var o=n(39),r=n(54),i=n(111),a=n(10);e.exports=o("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(5);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var o,r,i=n(6),a=n(85),c=i.process,l=c&&c.versions,s=l&&l.v8;s?r=(o=s.split("."))[0]+o[1]:a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(r=o[1]),e.exports=r&&+r},function(e,t,n){"use strict";var o=n(16),r=n(44),i=n(12);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,c=r(a>1?arguments[1]:undefined,n),l=a>2?arguments[2]:undefined,s=l===undefined?n:r(l,n);s>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var o=n(13),r=n(76),i=o("iterator"),a=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var o=n(86),r=n(76),i=n(13)("iterator");e.exports=function(e){if(e!=undefined)return e[i]||e["@@iterator"]||r[o(e)]}},function(e,t,n){"use strict";var o={};o[n(13)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t,n){"use strict";var o=n(4),r=n(232),i=n(38),a=n(57),c=n(46),l=n(32),s=n(26),d=n(13),u=n(40),p=n(76),m=n(161),h=m.IteratorPrototype,f=m.BUGGY_SAFARI_ITERATORS,C=d("iterator"),g=function(){return this};e.exports=function(e,t,n,d,m,N,b){r(n,t,d);var V,v,x,y=function(e){if(e===m&&S)return S;if(!f&&e in _)return _[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",w=!1,_=e.prototype,B=_[C]||_["@@iterator"]||m&&_[m],S=!f&&B||y(m),L="Array"==t&&_.entries||B;if(L&&(V=i(L.call(new e)),h!==Object.prototype&&V.next&&(u||i(V)===h||(a?a(V,h):"function"!=typeof V[C]&&l(V,C,g)),c(V,k,!0,!0),u&&(p[k]=g))),"values"==m&&B&&"values"!==B.name&&(w=!0,S=function(){return B.call(this)}),u&&!b||_[C]===S||l(_,C,S),p[t]=S,m)if(v={values:y("values"),keys:N?S:y("keys"),entries:y("entries")},b)for(x in v)(f||w||!(x in _))&&s(_,x,v[x]);else o({target:t,proto:!0,forced:f||w},v);return v}},function(e,t,n){"use strict";var o=n(5);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var o=n(12),r=n(122),i=n(25),a=Math.ceil,c=function(e){return function(t,n,c){var l,s,d=String(i(t)),u=d.length,p=c===undefined?" ":String(c),m=o(n);return m<=u||""==p?d:(l=m-u,(s=r.call(p,a(l/p.length))).length>l&&(s=s.slice(0,l)),e?d+s:s+d)}};e.exports={start:c(!1),end:c(!0)}},function(e,t,n){"use strict";var o=n(33),r=n(25);e.exports="".repeat||function(e){var t=String(r(this)),n="",i=o(e);if(i<0||i==Infinity)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var o,r,i,a=n(6),c=n(5),l=n(35),s=n(55),d=n(154),u=n(105),p=n(173),m=a.location,h=a.setImmediate,f=a.clearImmediate,C=a.process,g=a.MessageChannel,N=a.Dispatch,b=0,V={},v=function(e){if(V.hasOwnProperty(e)){var t=V[e];delete V[e],t()}},x=function(e){return function(){v(e)}},y=function(e){v(e.data)},k=function(e){a.postMessage(e+"",m.protocol+"//"+m.host)};h&&f||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return V[++b]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},o(b),b},f=function(e){delete V[e]},"process"==l(C)?o=function(e){C.nextTick(x(e))}:N&&N.now?o=function(e){N.now(x(e))}:g&&!p?(i=(r=new g).port2,r.port1.onmessage=y,o=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(k)||"file:"===m.protocol?o="onreadystatechange"in u("script")?function(e){d.appendChild(u("script")).onreadystatechange=function(){d.removeChild(this),v(e)}}:function(e){setTimeout(x(e),0)}:(o=k,a.addEventListener("message",y,!1))),e.exports={set:h,clear:f}},function(e,t,n){"use strict";var o=n(8),r=n(35),i=n(13)("match");e.exports=function(e){var t;return o(e)&&((t=e[i])!==undefined?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(5);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var o=n(33),r=n(25),i=function(e){return function(t,n){var i,a,c=String(r(t)),l=o(n),s=c.length;return l<0||l>=s?e?"":undefined:(i=c.charCodeAt(l))<55296||i>56319||l+1===s||(a=c.charCodeAt(l+1))<56320||a>57343?e?c.charAt(l):i:e?c.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var o=n(125);e.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var o=n(13)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(r){}}return!1}},function(e,t,n){"use strict";var o=n(127).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},function(e,t,n){"use strict";var o=n(5),r=n(93);e.exports=function(e){return o((function(){return!!r[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||r[e].name!==e}))}},function(e,t,n){"use strict";var o=n(6),r=n(5),i=n(87),a=n(11).NATIVE_ARRAY_BUFFER_VIEWS,c=o.ArrayBuffer,l=o.Int8Array;e.exports=!a||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!i((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new c(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.hotKeyReducer=t.hotKeyMiddleware=t.releaseHeldKeys=t.KEY_MINUS=t.KEY_EQUAL=t.KEY_Z=t.KEY_Y=t.KEY_X=t.KEY_W=t.KEY_V=t.KEY_U=t.KEY_T=t.KEY_S=t.KEY_R=t.KEY_Q=t.KEY_P=t.KEY_O=t.KEY_N=t.KEY_M=t.KEY_L=t.KEY_K=t.KEY_J=t.KEY_I=t.KEY_H=t.KEY_G=t.KEY_F=t.KEY_E=t.KEY_D=t.KEY_C=t.KEY_B=t.KEY_A=t.KEY_9=t.KEY_8=t.KEY_7=t.KEY_6=t.KEY_5=t.KEY_4=t.KEY_3=t.KEY_2=t.KEY_1=t.KEY_0=t.KEY_SPACE=t.KEY_ESCAPE=t.KEY_ALT=t.KEY_CTRL=t.KEY_SHIFT=t.KEY_ENTER=t.KEY_TAB=t.KEY_BACKSPACE=void 0;var o=n(23),r=(0,n(63).createLogger)("hotkeys");t.KEY_BACKSPACE=8;t.KEY_TAB=9;t.KEY_ENTER=13;t.KEY_SHIFT=16;t.KEY_CTRL=17;t.KEY_ALT=18;t.KEY_ESCAPE=27;t.KEY_SPACE=32;t.KEY_0=48;t.KEY_1=49;t.KEY_2=50;t.KEY_3=51;t.KEY_4=52;t.KEY_5=53;t.KEY_6=54;t.KEY_7=55;t.KEY_8=56;t.KEY_9=57;t.KEY_A=65;t.KEY_B=66;t.KEY_C=67;t.KEY_D=68;t.KEY_E=69;t.KEY_F=70;t.KEY_G=71;t.KEY_H=72;t.KEY_I=73;t.KEY_J=74;t.KEY_K=75;t.KEY_L=76;t.KEY_M=77;t.KEY_N=78;t.KEY_O=79;t.KEY_P=80;t.KEY_Q=81;t.KEY_R=82;t.KEY_S=83;t.KEY_T=84;t.KEY_U=85;t.KEY_V=86;t.KEY_W=87;t.KEY_X=88;t.KEY_Y=89;t.KEY_Z=90;t.KEY_EQUAL=187;t.KEY_MINUS=189;var i=[17,18,16],a=[27,13,32,9,17,16,18],c={},l=function(e,t,n,o){var r="";return e&&(r+="Ctrl+"),t&&(r+="Alt+"),n&&(r+="Shift+"),r+=o>=48&&o<=90?String.fromCharCode(o):"["+o+"]"},s=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,o=e.altKey,r=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:o,shiftKey:r,hasModifierKeys:n||o||r,keyString:l(n,o,r,t)}},d=function(e,t){if(!e.defaultPrevented){var n=e.target&&e.target.localName;if("input"!==n&&"textarea"!==n){var i=s(e),l=i.keyCode,d=i.ctrlKey,u=i.shiftKey,p=function(e){var t={16:"Shift",17:"Ctrl",18:"Alt",33:"Northeast",34:"Southeast",35:"Southwest",36:"Northwest",37:"West",38:"North",39:"East",40:"South",45:"Insert",46:"Delete"};return t[e]?t[e]:e>=48&&e<=57||e>=65&&e<=90?String.fromCharCode(e):e>=96&&e<=105?"Numpad"+(e-96):e>=112&&e<=123?"F"+(e-111):188===e?",":189===e?"-":190===e?".":void 0}(l);if(!a.includes(l)){if("keyup"===t&&c[l])return r.debug("passthrough",t,i),(0,o.callByond)("",{__keyup:p});if(!d&&!u)return"keydown"!==t||c[l]?void 0:(r.debug("passthrough",t,i),(0,o.callByond)("",{__keydown:p}))}}}},u=function(){for(var e=0,t=Object.keys(c);e0&&(n=(0,o.toFixed)(e,t));var r=(n=String(n)).length,i=n.indexOf(".");-1===i&&(i=r);for(var a="",c=0;c0&&c=0||(r[n]=e[n]);return r}(e,["format"]),i=new Date(this.state.value).toISOString().slice(11,19);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Box,Object.assign({as:"span"},n,{children:t?t(this.state.value,i):i})))},i}(o.Component);t.Countdown=i,i.defaultProps={rate:1e3}},function(e,t,n){"use strict";t.__esModule=!0,t.SimpleRecords=void 0;var o=n(0),r=n(1),i=n(18),a=n(43),c=n(24),l=n(2);t.SimpleRecords=function(e,t){var n=e.data.records;return(0,o.createComponentVNode)(2,l.Box,{children:n?(0,o.createComponentVNode)(2,d,{data:e.data,recordType:e.recordType}):(0,o.createComponentVNode)(2,s,{data:e.data})})};var s=function(e,t){var n=(0,r.useBackend)(t).act,s=e.data.recordsList,d=(0,r.useLocalState)(t,"searchText",""),u=d[0],p=d[1],m=function(e,t){void 0===t&&(t="");var n=(0,i.createSearch)(t,(function(e){return e.Name}));return(0,a.flow)([(0,c.filter)((function(e){return null==e?void 0:e.Name})),t&&(0,c.filter)(n),(0,c.sortBy)((function(e){return e.Name}))])(s)}(0,u);return(0,o.createComponentVNode)(2,l.Box,{children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search records...",onInput:function(e,t){return p(t)}}),m.map((function(e){return(0,o.createComponentVNode)(2,l.Box,{children:(0,o.createComponentVNode)(2,l.Button,{content:e.Name,icon:"user",onClick:function(){return n("Records",{target:e.uid})}})},e)}))]})},d=function(e,t){var n,i=(0,r.useBackend)(t).act,a=e.data.records,c=a.general,s=a.medical,d=a.security;switch(e.recordType){case"MED":n=(0,o.createComponentVNode)(2,l.Section,{level:2,title:"Medical Data",children:s?(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Blood Type",children:s.blood_type}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Minor Disabilities",children:s.mi_dis}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.mi_dis_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Major Disabilities",children:s.ma_dis}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.ma_dis_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Allergies",children:s.alg}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.alg_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Current Diseases",children:s.cdi}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:s.cdi_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Important Notes",children:s.notes})]}):(0,o.createComponentVNode)(2,l.Box,{color:"red",bold:!0,children:"Medical record lost!"})});break;case"SEC":n=(0,o.createComponentVNode)(2,l.Section,{level:2,title:"Security Data",children:d?(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Criminal Status",children:d.criminal}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Minor Crimes",children:d.mi_crim}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:d.mi_crim_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Major Crimes",children:d.ma_crim}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Details",children:d.ma_crim_d}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Important Notes",children:d.notes})]}):(0,o.createComponentVNode)(2,l.Box,{color:"red",bold:!0,children:"Security record lost!"})})}return(0,o.createComponentVNode)(2,l.Box,{children:[(0,o.createComponentVNode)(2,l.Button,{content:"Back",icon:"arrow-left",onClick:function(){return i("Back")}}),(0,o.createComponentVNode)(2,l.Section,{level:2,title:"General Data",children:c?(0,o.createComponentVNode)(2,l.LabeledList,{children:[(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Name",children:c.name}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Sex",children:c.sex}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Species",children:c.species}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Age",children:c.age}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Rank",children:c.rank}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Fingerprint",children:c.fingerprint}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Physical Status",children:c.p_stat}),(0,o.createComponentVNode)(2,l.LabeledList.Item,{label:"Mental Status",children:c.m_stat})]}):(0,o.createComponentVNode)(2,l.Box,{color:"red",bold:!0,children:"General record lost!"})}),n]})}},function(e,t,n){"use strict";var o;o=function(){return this}();try{o=o||new Function("return this")()}catch(r){"object"==typeof window&&(o=window)}e.exports=o},function(e,t,n){"use strict";var o=n(6),r=n(8),i=o.document,a=r(i)&&r(i.createElement);e.exports=function(e){return a?i.createElement(e):{}}},function(e,t,n){"use strict";var o=n(6),r=n(32);e.exports=function(e,t){try{r(o,e,t)}catch(n){o[e]=t}return t}},function(e,t,n){"use strict";var o=n(147),r=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(e){return r.call(e)}),e.exports=o.inspectSource},function(e,t,n){"use strict";var o=n(40),r=n(147);(e.exports=function(e,t){return r[e]||(r[e]=t!==undefined?t:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xa9 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){"use strict";var o=n(39),r=n(55),i=n(113),a=n(10);e.exports=o("Reflect","ownKeys")||function(e){var t=r.f(a(e)),n=i.f;return n?t.concat(n(e)):t}},function(e,t,n){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(e,t,n){"use strict";t.f=Object.getOwnPropertySymbols},function(e,t,n){"use strict";var o=n(5);e.exports=!!Object.getOwnPropertySymbols&&!o((function(){return!String(Symbol())}))},function(e,t,n){"use strict";var o,r,i=n(6),a=n(85),c=i.process,l=c&&c.versions,s=l&&l.v8;s?r=(o=s.split("."))[0]+o[1]:a&&(!(o=a.match(/Edge\/(\d+)/))||o[1]>=74)&&(o=a.match(/Chrome\/(\d+)/))&&(r=o[1]),e.exports=r&&+r},function(e,t,n){"use strict";var o=n(16),r=n(45),i=n(12);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,c=r(a>1?arguments[1]:undefined,n),l=a>2?arguments[2]:undefined,s=l===undefined?n:r(l,n);s>c;)t[c++]=e;return t}},function(e,t,n){"use strict";var o=n(13),r=n(76),i=o("iterator"),a=Array.prototype;e.exports=function(e){return e!==undefined&&(r.Array===e||a[i]===e)}},function(e,t,n){"use strict";var o=n(86),r=n(76),i=n(13)("iterator");e.exports=function(e){if(e!=undefined)return e[i]||e["@@iterator"]||r[o(e)]}},function(e,t,n){"use strict";var o={};o[n(13)("toStringTag")]="z",e.exports="[object z]"===String(o)},function(e,t,n){"use strict";var o=n(4),r=n(232),i=n(38),a=n(58),c=n(47),l=n(32),s=n(26),d=n(13),u=n(40),p=n(76),m=n(161),h=m.IteratorPrototype,f=m.BUGGY_SAFARI_ITERATORS,C=d("iterator"),g=function(){return this};e.exports=function(e,t,n,d,m,N,b){r(n,t,d);var V,v,x,y=function(e){if(e===m&&S)return S;if(!f&&e in _)return _[e];switch(e){case"keys":case"values":case"entries":return function(){return new n(this,e)}}return function(){return new n(this)}},k=t+" Iterator",w=!1,_=e.prototype,B=_[C]||_["@@iterator"]||m&&_[m],S=!f&&B||y(m),L="Array"==t&&_.entries||B;if(L&&(V=i(L.call(new e)),h!==Object.prototype&&V.next&&(u||i(V)===h||(a?a(V,h):"function"!=typeof V[C]&&l(V,C,g)),c(V,k,!0,!0),u&&(p[k]=g))),"values"==m&&B&&"values"!==B.name&&(w=!0,S=function(){return B.call(this)}),u&&!b||_[C]===S||l(_,C,S),p[t]=S,m)if(v={values:y("values"),keys:N?S:y("keys"),entries:y("entries")},b)for(x in v)(f||w||!(x in _))&&s(_,x,v[x]);else o({target:t,proto:!0,forced:f||w},v);return v}},function(e,t,n){"use strict";var o=n(5);e.exports=!o((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))},function(e,t,n){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},function(e,t,n){"use strict";var o=n(12),r=n(124),i=n(25),a=Math.ceil,c=function(e){return function(t,n,c){var l,s,d=String(i(t)),u=d.length,p=c===undefined?" ":String(c),m=o(n);return m<=u||""==p?d:(l=m-u,(s=r.call(p,a(l/p.length))).length>l&&(s=s.slice(0,l)),e?d+s:s+d)}};e.exports={start:c(!1),end:c(!0)}},function(e,t,n){"use strict";var o=n(33),r=n(25);e.exports="".repeat||function(e){var t=String(r(this)),n="",i=o(e);if(i<0||i==Infinity)throw RangeError("Wrong number of repetitions");for(;i>0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t,n){"use strict";e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t,n){"use strict";var o,r,i,a=n(6),c=n(5),l=n(35),s=n(56),d=n(154),u=n(107),p=n(173),m=a.location,h=a.setImmediate,f=a.clearImmediate,C=a.process,g=a.MessageChannel,N=a.Dispatch,b=0,V={},v=function(e){if(V.hasOwnProperty(e)){var t=V[e];delete V[e],t()}},x=function(e){return function(){v(e)}},y=function(e){v(e.data)},k=function(e){a.postMessage(e+"",m.protocol+"//"+m.host)};h&&f||(h=function(e){for(var t=[],n=1;arguments.length>n;)t.push(arguments[n++]);return V[++b]=function(){("function"==typeof e?e:Function(e)).apply(undefined,t)},o(b),b},f=function(e){delete V[e]},"process"==l(C)?o=function(e){C.nextTick(x(e))}:N&&N.now?o=function(e){N.now(x(e))}:g&&!p?(i=(r=new g).port2,r.port1.onmessage=y,o=s(i.postMessage,i,1)):!a.addEventListener||"function"!=typeof postMessage||a.importScripts||c(k)||"file:"===m.protocol?o="onreadystatechange"in u("script")?function(e){d.appendChild(u("script")).onreadystatechange=function(){d.removeChild(this),v(e)}}:function(e){setTimeout(x(e),0)}:(o=k,a.addEventListener("message",y,!1))),e.exports={set:h,clear:f}},function(e,t,n){"use strict";var o=n(8),r=n(35),i=n(13)("match");e.exports=function(e){var t;return o(e)&&((t=e[i])!==undefined?!!t:"RegExp"==r(e))}},function(e,t,n){"use strict";var o=n(5);function r(e,t){return RegExp(e,t)}t.UNSUPPORTED_Y=o((function(){var e=r("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),t.BROKEN_CARET=o((function(){var e=r("^r","gy");return e.lastIndex=2,null!=e.exec("str")}))},function(e,t,n){"use strict";var o=n(33),r=n(25),i=function(e){return function(t,n){var i,a,c=String(r(t)),l=o(n),s=c.length;return l<0||l>=s?e?"":undefined:(i=c.charCodeAt(l))<55296||i>56319||l+1===s||(a=c.charCodeAt(l+1))<56320||a>57343?e?c.charAt(l):i:e?c.slice(l,l+2):a-56320+(i-55296<<10)+65536}};e.exports={codeAt:i(!1),charAt:i(!0)}},function(e,t,n){"use strict";var o=n(127);e.exports=function(e){if(o(e))throw TypeError("The method doesn't accept regular expressions");return e}},function(e,t,n){"use strict";var o=n(13)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,"/./"[e](t)}catch(r){}}return!1}},function(e,t,n){"use strict";var o=n(129).charAt;e.exports=function(e,t,n){return t+(n?o(e,t).length:1)}},function(e,t,n){"use strict";var o=n(5),r=n(93);e.exports=function(e){return o((function(){return!!r[e]()||"\u200b\x85\u180e"!="\u200b\x85\u180e"[e]()||r[e].name!==e}))}},function(e,t,n){"use strict";var o=n(6),r=n(5),i=n(87),a=n(11).NATIVE_ARRAY_BUFFER_VIEWS,c=o.ArrayBuffer,l=o.Int8Array;e.exports=!a||!r((function(){l(1)}))||!r((function(){new l(-1)}))||!i((function(e){new l,new l(null),new l(1.5),new l(e)}),!0)||r((function(){return 1!==new l(new c(2),1,undefined).length}))},function(e,t,n){"use strict";t.__esModule=!0,t.hotKeyReducer=t.hotKeyMiddleware=t.releaseHeldKeys=t.KEY_MINUS=t.KEY_EQUAL=t.KEY_Z=t.KEY_Y=t.KEY_X=t.KEY_W=t.KEY_V=t.KEY_U=t.KEY_T=t.KEY_S=t.KEY_R=t.KEY_Q=t.KEY_P=t.KEY_O=t.KEY_N=t.KEY_M=t.KEY_L=t.KEY_K=t.KEY_J=t.KEY_I=t.KEY_H=t.KEY_G=t.KEY_F=t.KEY_E=t.KEY_D=t.KEY_C=t.KEY_B=t.KEY_A=t.KEY_9=t.KEY_8=t.KEY_7=t.KEY_6=t.KEY_5=t.KEY_4=t.KEY_3=t.KEY_2=t.KEY_1=t.KEY_0=t.KEY_SPACE=t.KEY_ESCAPE=t.KEY_ALT=t.KEY_CTRL=t.KEY_SHIFT=t.KEY_ENTER=t.KEY_TAB=t.KEY_BACKSPACE=void 0;var o=n(23),r=(0,n(64).createLogger)("hotkeys");t.KEY_BACKSPACE=8;t.KEY_TAB=9;t.KEY_ENTER=13;t.KEY_SHIFT=16;t.KEY_CTRL=17;t.KEY_ALT=18;t.KEY_ESCAPE=27;t.KEY_SPACE=32;t.KEY_0=48;t.KEY_1=49;t.KEY_2=50;t.KEY_3=51;t.KEY_4=52;t.KEY_5=53;t.KEY_6=54;t.KEY_7=55;t.KEY_8=56;t.KEY_9=57;t.KEY_A=65;t.KEY_B=66;t.KEY_C=67;t.KEY_D=68;t.KEY_E=69;t.KEY_F=70;t.KEY_G=71;t.KEY_H=72;t.KEY_I=73;t.KEY_J=74;t.KEY_K=75;t.KEY_L=76;t.KEY_M=77;t.KEY_N=78;t.KEY_O=79;t.KEY_P=80;t.KEY_Q=81;t.KEY_R=82;t.KEY_S=83;t.KEY_T=84;t.KEY_U=85;t.KEY_V=86;t.KEY_W=87;t.KEY_X=88;t.KEY_Y=89;t.KEY_Z=90;t.KEY_EQUAL=187;t.KEY_MINUS=189;var i=[17,18,16],a=[27,13,32,9,17,16,18],c={},l=function(e,t,n,o){var r="";return e&&(r+="Ctrl+"),t&&(r+="Alt+"),n&&(r+="Shift+"),r+=o>=48&&o<=90?String.fromCharCode(o):"["+o+"]"},s=function(e){var t=window.event?e.which:e.keyCode,n=e.ctrlKey,o=e.altKey,r=e.shiftKey;return{keyCode:t,ctrlKey:n,altKey:o,shiftKey:r,hasModifierKeys:n||o||r,keyString:l(n,o,r,t)}},d=function(e,t){if(!e.defaultPrevented){var n=e.target&&e.target.localName;if("input"!==n&&"textarea"!==n){var i=s(e),l=i.keyCode,d=i.ctrlKey,u=i.shiftKey,p=function(e){var t={16:"Shift",17:"Ctrl",18:"Alt",33:"Northeast",34:"Southeast",35:"Southwest",36:"Northwest",37:"West",38:"North",39:"East",40:"South",45:"Insert",46:"Delete"};return t[e]?t[e]:e>=48&&e<=57||e>=65&&e<=90?String.fromCharCode(e):e>=96&&e<=105?"Numpad"+(e-96):e>=112&&e<=123?"F"+(e-111):188===e?",":189===e?"-":190===e?".":void 0}(l);if(!a.includes(l)){if("keyup"===t&&c[l])return r.debug("passthrough",t,i),(0,o.callByond)("",{__keyup:p});if(!d&&!u)return"keydown"!==t||c[l]?void 0:(r.debug("passthrough",t,i),(0,o.callByond)("",{__keydown:p}))}}}},u=function(){for(var e=0,t=Object.keys(c);e=0||(r[n]=e[n]);return r} +var i=function(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e)},a=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={value:0},i(t.initial)?n.state.value=t.initial:i(t.value)&&(n.state.value=Number(t.value)),n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state,n=Number(t.value),o=Number(e.value);if(i(o)){var r=.5*n+.5*o;this.setState({value:r})}},a.componentDidMount=function(){var e=this;this.timer=setInterval((function(){return e.tick()}),50)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){var e=this.props,t=this.state,n=e.format,r=e.children,a=t.value,c=e.value;if(!i(c))return c||null;var l=a;if(n)l=n(a);else{var s=String(c).split(".")[1],d=s?s.length:0;l=(0,o.toFixed)(a,(0,o.clamp)(d,0,8))}return"function"==typeof r?r(l,a):l},r}(r.Component);t.AnimatedNumber=a},function(e,t,n){"use strict";t.__esModule=!0,t.ButtonInput=t.ButtonConfirm=t.ButtonCheckbox=t.Button=void 0;var o=n(0),r=n(7),i=n(23),a=n(135),c=n(3),l=n(64),s=n(17),d=n(140),u=n(184);function p(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function m(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov @@ -53,19 +53,19 @@ var i=function(e){return"number"==typeof e&&Number.isFinite(e)&&!Number.isNaN(e) * @copyright 2020 Aleksej Komarov * @license MIT */ -var a=/-o$/,c=function(e){var t=e.name,n=e.size,c=e.spin,l=e.className,s=e.style,d=void 0===s?{}:s,u=e.rotation,p=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["name","size","spin","className","style","rotation"]);n&&(d["font-size"]=100*n+"%"),"number"==typeof u&&(d.transform="rotate("+u+"deg)");var m=a.test(t),h=t.replace(a,"");return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({as:"i",className:(0,r.classes)([l,m?"far":"fas","fa-"+h,c&&"fa-spin"]),style:d},p)))};t.Icon=c,c.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var o=n(0),r=n(15),i=n(7),a=n(23),c=n(136),l=n(17); +var a=/-o$/,c=function(e){var t=e.name,n=e.size,c=e.spin,l=e.className,s=e.style,d=void 0===s?{}:s,u=e.rotation,p=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["name","size","spin","className","style","rotation"]);n&&(d["font-size"]=100*n+"%"),"number"==typeof u&&(d.transform="rotate("+u+"deg)");var m=a.test(t),h=t.replace(a,"");return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({as:"i",className:(0,r.classes)([l,m?"far":"fas","fa-"+h,c&&"fa-spin"]),style:d},p)))};t.Icon=c,c.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.NumberInput=void 0;var o=n(0),r=n(15),i=n(7),a=n(23),c=n(138),l=n(17); /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -var s=function(e){var t,n;function s(t){var n;n=e.call(this,t)||this;var i=t.value;return n.inputRef=(0,o.createRef)(),n.state={value:i,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,i=n.props.onDrag;o&&i&&i(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,i=t.maxValue,a=t.step,c=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),l=n.origin-e.screenY;if(t.dragging){var s=Number.isFinite(o)?o%a:0;n.internalValue=(0,r.clamp)(n.internalValue+l*a/c,o-a,i+a),n.value=(0,r.clamp)(n.internalValue-n.internalValue%a+s,o,i),n.origin=e.screenY}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,i=n.state,a=i.dragging,c=i.value,l=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=l;try{s.focus(),s.select()}catch(d){}}},n}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,s.prototype.render=function(){var e=this,t=this.state,n=t.dragging,s=t.editing,d=t.value,u=t.suppressingFlicker,p=this.props,m=p.className,h=p.fluid,f=p.animated,C=p.value,g=p.unit,N=p.minValue,b=p.maxValue,V=p.height,v=p.width,x=p.lineHeight,y=p.fontSize,k=p.format,w=p.onChange,_=p.onDrag,B=C;(n||u)&&(B=d);var S=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(g?" "+g:""),0,{unselectable:a.IS_IE8})},L=f&&!n&&!u&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:B,format:k,children:S})||S(k?k(B):B);return(0,o.createComponentVNode)(2,l.Box,{className:(0,i.classes)(["NumberInput",h&&"NumberInput--fluid",m]),minWidth:v,minHeight:V,lineHeight:x,fontSize:y,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"div","NumberInput__barContainer",(0,o.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,r.clamp)((B-N)/(b-N)*100,0,100)+"%"}}),2),L,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:s?undefined:"none",height:V,"line-height":x,"font-size":y},onBlur:function(t){if(s){var n=(0,r.clamp)(t.target.value,N,b);e.setState({editing:!1,value:n}),e.suppressFlicker(),w&&w(t,n),_&&_(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,N,b);return e.setState({editing:!1,value:n}),e.suppressFlicker(),w&&w(t,n),void(_&&_(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},s}(o.Component);t.NumberInput=s,s.defaultHooks=i.pureComponentHooks,s.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginInfo=void 0;var o=n(0),r=n(1),i=n(2);t.LoginInfo=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.loginState;if(c)return(0,o.createComponentVNode)(2,i.NoticeBox,{info:!0,children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:["Logged in as: ",l.name," (",l.rank,")"]}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",content:"Logout",color:"good",float:"right",onClick:function(){return a("login_logout")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:!l.id,content:"Eject ID",color:"good",float:"right",onClick:function(){return a("login_eject")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LoginScreen=void 0;var o=n(0),r=n(1),i=n(2);t.LoginScreen=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.loginState,s=c.isAI,d=c.isRobot,u=c.isAdmin;return(0,o.createComponentVNode)(2,i.Section,{title:"Welcome",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",align:"center",justify:"center",children:(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"center",mt:"-2rem",children:[(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-circle",verticalAlign:"middle",size:3,mr:"1rem"}),"Guest"]}),(0,o.createComponentVNode)(2,i.Box,{color:"label",my:"1rem",children:["ID:",(0,o.createComponentVNode)(2,i.Button,{icon:"id-card",content:l.id?l.id:"----------",ml:"0.5rem",onClick:function(){return a("login_insert")}})]}),(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",disabled:!l.id,content:"Login",onClick:function(){return a("login_login",{login_type:1})}}),!!s&&(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Login as AI",onClick:function(){return a("login_login",{login_type:2})}}),!!d&&(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Login as Cyborg",onClick:function(){return a("login_login",{login_type:3})}}),!!u&&(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"CentComm Secure Login",onClick:function(){return a("login_login",{login_type:4})}})]})})})}},function(e,t,n){"use strict";var o=n(66);e.exports=new o({explicit:[n(498),n(499),n(500)]})},function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(0),r=n(2),i=n(522),a=function(e){var t=e.beakerLoaded,n=e.beakerContents,i=void 0===n?[]:n,a=e.buttons;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===i.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),i.map((function(e,t){return(0,o.createComponentVNode)(2,r.Box,{width:"100%",children:[(0,o.createComponentVNode)(2,r.Box,{color:"label",display:"inline",verticalAlign:"middle",children:[(n=e.volume,n+" unit"+(1===n?"":"s"))," of ",e.name]}),!!a&&(0,o.createComponentVNode)(2,r.Box,{float:"right",display:"inline",children:a(e,t)}),(0,o.createComponentVNode)(2,r.Box,{clear:"both"})]},e.name);var n}))]})};t.BeakerContents=a,a.propTypes={beakerLoaded:i.bool,beakerContents:i.array,buttons:i.arrayOf(i.element)}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewManifest=void 0;var o=n(0),r=n(1),i=n(2),a=n(18),c=n(49).COLORS.department,l=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel"],s=function(e){return-1!==l.indexOf(e)||"Quartermaster"===e},d=function(e){return e.length>0&&(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"50%",children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"35%",children:"Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"15%",children:"Active"})]}),e.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{color:(t=e.rank,-1!==l.indexOf(t)?"green":"Quartermaster"===t?"yellow":"orange"),bold:s(e.rank),children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,a.decodeHtmlEntities)(e.name)}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,a.decodeHtmlEntities)(e.rank)}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.active})]},e.name+e.rank);var t}))]})};t.CrewManifest=function(e,t){var n;(0,r.useBackend)(t).act;e.data?n=e.data:n=(0,r.useBackend)(t).data;var a=n.manifest,l=a.heads,s=a.pro,u=a.sec,p=a.eng,m=a.med,h=a.sci,f=a.ser,C=a.sup,g=a.misc;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.command,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:d(l)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.procedure,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Procedure"})}),level:2,children:d(s)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.security,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:d(u)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.engineering,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:d(p)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.medical,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:d(m)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.science,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:d(h)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.service,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:d(f)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.supply,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:d(C)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:d(g)})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var o=n(0),r=n(1),i=n(2);t.TemporaryNotice=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data.temp;if(l){var s=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},s,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";var o=n(9),r=n(5),i=n(105);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var o=n(6),r=n(106),i=o["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=i},function(e,t,n){"use strict";var o=n(6),r=n(107),i=o.WeakMap;e.exports="function"==typeof i&&/native code/.test(r(i))},function(e,t,n){"use strict";var o=n(19),r=n(109),i=n(22),a=n(14);e.exports=function(e,t){for(var n=r(t),c=a.f,l=i.f,s=0;sl;)o(c,n=t[l++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){"use strict";var o=n(112);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(9),r=n(14),i=n(10),a=n(73);e.exports=o?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),c=o.length,l=0;c>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(39);e.exports=o("document","documentElement")},function(e,t,n){"use strict";var o=n(28),r=n(54).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return r(e)}catch(t){return a.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(13);t.f=o},function(e,t,n){"use strict";var o=n(16),r=n(44),i=n(12),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),c=i(n.length),l=r(e,c),s=r(t,c),d=arguments.length>2?arguments[2]:undefined,u=a((d===undefined?c:r(d,c))-s,c-l),p=1;for(s0;)s in n?n[l]=n[s]:delete n[l],l+=p,s+=p;return n}},function(e,t,n){"use strict";var o=n(59),r=n(12),i=n(55);e.exports=function a(e,t,n,c,l,s,d,u){for(var p,m=l,h=0,f=!!d&&i(d,u,3);h0&&o(p))m=a(e,t,p,r(p.length),m,s-1)-1;else{if(m>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[m]=p}m++}h++}return m}},function(e,t,n){"use strict";var o=n(10);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(a){var i=e["return"];throw i!==undefined&&o(i.call(e)),a}}},function(e,t,n){"use strict";var o=n(28),r=n(47),i=n(76),a=n(37),c=n(118),l=a.set,s=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:o(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var o,r,i,a=n(38),c=n(32),l=n(19),s=n(13),d=n(40),u=s("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(r=a(a(i)))!==Object.prototype&&(o=r):p=!0),o==undefined&&(o={}),d||l(o,u)||c(o,u,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var o=n(28),r=n(33),i=n(12),a=n(41),c=n(27),l=Math.min,s=[].lastIndexOf,d=!!s&&1/[1].lastIndexOf(1,-0)<0,u=a("lastIndexOf"),p=c("indexOf",{ACCESSORS:!0,1:0}),m=d||!u||!p;e.exports=m?function(e){if(d)return s.apply(this,arguments)||0;var t=o(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=l(a,r(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},function(e,t,n){"use strict";var o=n(33),r=n(12);e.exports=function(e){if(e===undefined)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var o=n(34),r=n(8),i=[].slice,a={},c=function(e,t,n){if(!(t in a)){for(var o=[],r=0;r1?arguments[1]:undefined,3);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),i(d.prototype,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return C(this,0===e?0:e,t)}}:{add:function(e){return C(this,e=0===e?0:e,e)}}),u&&o(d.prototype,"size",{get:function(){return m(this).size}}),d},setStrong:function(e,t,n){var o=t+" Iterator",r=f(t),i=f(o);s(e,t,(function(e,t){h(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){"use strict";var o=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:o(1+e)}},function(e,t,n){"use strict";var o=n(8),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(6),r=n(62).trim,i=n(93),a=o.parseInt,c=/^[+-]?0[Xx]/,l=8!==a(i+"08")||22!==a(i+"0x16");e.exports=l?function(e,t){var n=r(String(e));return a(n,t>>>0||(c.test(n)?16:10))}:a},function(e,t,n){"use strict";var o=n(9),r=n(73),i=n(28),a=n(83).f,c=function(e){return function(t){for(var n,c=i(t),l=r(c),s=l.length,d=0,u=[];s>d;)n=l[d++],o&&!a.call(c,n)||u.push(e?[n,c[n]]:c[n]);return u}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(6);e.exports=o.Promise},function(e,t,n){"use strict";var o=n(85);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(o)},function(e,t,n){"use strict";var o,r,i,a,c,l,s,d,u=n(6),p=n(22).f,m=n(35),h=n(124).set,f=n(173),C=u.MutationObserver||u.WebKitMutationObserver,g=u.process,N=u.Promise,b="process"==m(g),V=p(u,"queueMicrotask"),v=V&&V.value;v||(o=function(){var e,t;for(b&&(e=g.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?a():i=undefined,n}}i=undefined,e&&e.enter()},b?a=function(){g.nextTick(o)}:C&&!f?(c=!0,l=document.createTextNode(""),new C(o).observe(l,{characterData:!0}),a=function(){l.data=c=!c}):N&&N.resolve?(s=N.resolve(undefined),d=s.then,a=function(){d.call(s,o)}):a=function(){h.call(u,o)}),e.exports=v||function(e){var t={fn:e,next:undefined};i&&(i.next=t),r||(r=t,a()),i=t}},function(e,t,n){"use strict";var o=n(10),r=n(8),i=n(176);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(34),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(4),r=n(96);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){"use strict";var o=n(85);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},function(e,t,n){"use strict";var o=n(376);e.exports=function(e,t){var n=o(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){"use strict";var o=n(16),r=n(12),i=n(116),a=n(115),c=n(55),l=n(11).aTypedArrayConstructor;e.exports=function(e){var t,n,s,d,u,p,m=o(e),h=arguments.length,f=h>1?arguments[1]:undefined,C=f!==undefined,g=i(m);if(g!=undefined&&!a(g))for(p=(u=g.call(m)).next,m=[];!(d=p.call(u)).done;)m.push(d.value);for(C&&h>2&&(f=c(f,arguments[2],2)),n=r(m.length),s=new(l(this))(n),t=0;n>t;t++)s[t]=C?f(m[t],t):m[t];return s}},function(e,t,n){"use strict";var o=n(77),r=n(58).getWeakData,i=n(10),a=n(8),c=n(61),l=n(79),s=n(21),d=n(19),u=n(37),p=u.set,m=u.getterFor,h=s.find,f=s.findIndex,C=0,g=function(e){return e.frozen||(e.frozen=new N)},N=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};N.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=f(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,s){var u=e((function(e,o){c(e,u,t),p(e,{type:t,id:C++,frozen:undefined}),o!=undefined&&l(o,e[s],e,n)})),h=m(t),f=function(e,t,n){var o=h(e),a=r(i(t),!0);return!0===a?g(o).set(t,n):a[o.id]=n,e};return o(u.prototype,{"delete":function(e){var t=h(this);if(!a(e))return!1;var n=r(e);return!0===n?g(t)["delete"](e):n&&d(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!a(e))return!1;var n=r(e);return!0===n?g(t).has(e):n&&d(n,t.id)}}),o(u.prototype,n?{get:function(e){var t=h(this);if(a(e)){var n=r(e);return!0===n?g(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return f(this,e,t)}}:{add:function(e){return f(this,e,!0)}}),u}}},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.resizeStartHandler=t.dragStartHandler=t.setupDrag=void 0;var o=n(418),r=n(23);function i(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(o,r)} +var s=function(e){var t,n;function s(t){var n;n=e.call(this,t)||this;var i=t.value;return n.inputRef=(0,o.createRef)(),n.state={value:i,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props.value;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:e.screenY,value:t,internalValue:t}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,i=n.props.onDrag;o&&i&&i(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,i=t.maxValue,a=t.step,c=t.stepPixelSize;n.setState((function(t){var n=Object.assign({},t),l=n.origin-e.screenY;if(t.dragging){var s=Number.isFinite(o)?o%a:0;n.internalValue=(0,r.clamp)(n.internalValue+l*a/c,o-a,i+a),n.value=(0,r.clamp)(n.internalValue-n.internalValue%a+s,o,i),n.origin=e.screenY}else Math.abs(l)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,i=n.state,a=i.dragging,c=i.value,l=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=l;try{s.focus(),s.select()}catch(d){}}},n}return n=e,(t=s).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,s.prototype.render=function(){var e=this,t=this.state,n=t.dragging,s=t.editing,d=t.value,u=t.suppressingFlicker,p=this.props,m=p.className,h=p.fluid,f=p.animated,C=p.value,g=p.unit,N=p.minValue,b=p.maxValue,V=p.height,v=p.width,x=p.lineHeight,y=p.fontSize,k=p.format,w=p.onChange,_=p.onDrag,B=C;(n||u)&&(B=d);var S=function(e){return(0,o.createVNode)(1,"div","NumberInput__content",e+(g?" "+g:""),0,{unselectable:a.IS_IE8})},L=f&&!n&&!u&&(0,o.createComponentVNode)(2,c.AnimatedNumber,{value:B,format:k,children:S})||S(k?k(B):B);return(0,o.createComponentVNode)(2,l.Box,{className:(0,i.classes)(["NumberInput",h&&"NumberInput--fluid",m]),minWidth:v,minHeight:V,lineHeight:x,fontSize:y,onMouseDown:this.handleDragStart,children:[(0,o.createVNode)(1,"div","NumberInput__barContainer",(0,o.createVNode)(1,"div","NumberInput__bar",null,1,{style:{height:(0,r.clamp)((B-N)/(b-N)*100,0,100)+"%"}}),2),L,(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:s?undefined:"none",height:V,"line-height":x,"font-size":y},onBlur:function(t){if(s){var n=(0,r.clamp)(t.target.value,N,b);e.setState({editing:!1,value:n}),e.suppressFlicker(),w&&w(t,n),_&&_(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,N,b);return e.setState({editing:!1,value:n}),e.suppressFlicker(),w&&w(t,n),void(_&&_(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef)]})},s}(o.Component);t.NumberInput=s,s.defaultHooks=i.pureComponentHooks,s.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50}},function(e,t,n){"use strict";var o=n(66);e.exports=new o({explicit:[n(498),n(499),n(500)]})},function(e,t,n){"use strict";t.__esModule=!0,t.BeakerContents=void 0;var o=n(0),r=n(2),i=n(522),a=function(e){var t=e.beakerLoaded,n=e.beakerContents,i=void 0===n?[]:n,a=e.buttons;return(0,o.createComponentVNode)(2,r.Box,{children:[!t&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"No beaker loaded."})||0===i.length&&(0,o.createComponentVNode)(2,r.Box,{color:"label",children:"Beaker is empty."}),i.map((function(e,t){return(0,o.createComponentVNode)(2,r.Box,{width:"100%",children:[(0,o.createComponentVNode)(2,r.Box,{color:"label",display:"inline",verticalAlign:"middle",children:[(n=e.volume,n+" unit"+(1===n?"":"s"))," of ",e.name]}),!!a&&(0,o.createComponentVNode)(2,r.Box,{float:"right",display:"inline",children:a(e,t)}),(0,o.createComponentVNode)(2,r.Box,{clear:"both"})]},e.name);var n}))]})};t.BeakerContents=a,a.propTypes={beakerLoaded:i.bool,beakerContents:i.array,buttons:i.arrayOf(i.element)}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewManifest=void 0;var o=n(0),r=n(1),i=n(2),a=n(18),c=n(50).COLORS.department,l=["Captain","Head of Security","Chief Engineer","Chief Medical Officer","Research Director","Head of Personnel"],s=function(e){return-1!==l.indexOf(e)||"Quartermaster"===e},d=function(e){return e.length>0&&(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,color:"white",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"50%",children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"35%",children:"Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"15%",children:"Active"})]}),e.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{color:(t=e.rank,-1!==l.indexOf(t)?"green":"Quartermaster"===t?"yellow":"orange"),bold:s(e.rank),children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,a.decodeHtmlEntities)(e.name)}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,a.decodeHtmlEntities)(e.rank)}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.active})]},e.name+e.rank);var t}))]})};t.CrewManifest=function(e,t){var n;(0,r.useBackend)(t).act;e.data?n=e.data:n=(0,r.useBackend)(t).data;var a=n.manifest,l=a.heads,s=a.pro,u=a.sec,p=a.eng,m=a.med,h=a.sci,f=a.ser,C=a.sup,g=a.misc;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.command,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Command"})}),level:2,children:d(l)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.procedure,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Procedure"})}),level:2,children:d(s)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.security,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Security"})}),level:2,children:d(u)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.engineering,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Engineering"})}),level:2,children:d(p)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.medical,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Medical"})}),level:2,children:d(m)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.science,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Science"})}),level:2,children:d(h)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.service,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Service"})}),level:2,children:d(f)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{backgroundColor:c.supply,m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Supply"})}),level:2,children:d(C)}),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{m:-1,pt:1,pb:1,children:(0,o.createComponentVNode)(2,i.Box,{ml:1,textAlign:"center",fontSize:1.4,children:"Misc"})}),level:2,children:d(g)})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.TemporaryNotice=void 0;var o=n(0),r=n(1),i=n(2);t.TemporaryNotice=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data.temp;if(l){var s=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.NoticeBox,Object.assign({},s,{children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,i.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,i.Box,{clear:"both"})]})))}}},function(e,t,n){"use strict";var o=n(9),r=n(5),i=n(107);e.exports=!o&&!r((function(){return 7!=Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){"use strict";var o=n(6),r=n(108),i=o["__core-js_shared__"]||r("__core-js_shared__",{});e.exports=i},function(e,t,n){"use strict";var o=n(6),r=n(109),i=o.WeakMap;e.exports="function"==typeof i&&/native code/.test(r(i))},function(e,t,n){"use strict";var o=n(19),r=n(111),i=n(22),a=n(14);e.exports=function(e,t){for(var n=r(t),c=a.f,l=i.f,s=0;sl;)o(c,n=t[l++])&&(~i(s,n)||s.push(n));return s}},function(e,t,n){"use strict";var o=n(114);e.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(e,t,n){"use strict";var o=n(9),r=n(14),i=n(10),a=n(73);e.exports=o?Object.defineProperties:function(e,t){i(e);for(var n,o=a(t),c=o.length,l=0;c>l;)r.f(e,n=o[l++],t[n]);return e}},function(e,t,n){"use strict";var o=n(39);e.exports=o("document","documentElement")},function(e,t,n){"use strict";var o=n(28),r=n(55).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return r(e)}catch(t){return a.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(13);t.f=o},function(e,t,n){"use strict";var o=n(16),r=n(45),i=n(12),a=Math.min;e.exports=[].copyWithin||function(e,t){var n=o(this),c=i(n.length),l=r(e,c),s=r(t,c),d=arguments.length>2?arguments[2]:undefined,u=a((d===undefined?c:r(d,c))-s,c-l),p=1;for(s0;)s in n?n[l]=n[s]:delete n[l],l+=p,s+=p;return n}},function(e,t,n){"use strict";var o=n(60),r=n(12),i=n(56);e.exports=function a(e,t,n,c,l,s,d,u){for(var p,m=l,h=0,f=!!d&&i(d,u,3);h0&&o(p))m=a(e,t,p,r(p.length),m,s-1)-1;else{if(m>=9007199254740991)throw TypeError("Exceed the acceptable array length");e[m]=p}m++}h++}return m}},function(e,t,n){"use strict";var o=n(10);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(a){var i=e["return"];throw i!==undefined&&o(i.call(e)),a}}},function(e,t,n){"use strict";var o=n(28),r=n(48),i=n(76),a=n(37),c=n(120),l=a.set,s=a.getterFor("Array Iterator");e.exports=c(Array,"Array",(function(e,t){l(this,{type:"Array Iterator",target:o(e),index:0,kind:t})}),(function(){var e=s(this),t=e.target,n=e.kind,o=e.index++;return!t||o>=t.length?(e.target=undefined,{value:undefined,done:!0}):"keys"==n?{value:o,done:!1}:"values"==n?{value:t[o],done:!1}:{value:[o,t[o]],done:!1}}),"values"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},function(e,t,n){"use strict";var o,r,i,a=n(38),c=n(32),l=n(19),s=n(13),d=n(40),u=s("iterator"),p=!1;[].keys&&("next"in(i=[].keys())?(r=a(a(i)))!==Object.prototype&&(o=r):p=!0),o==undefined&&(o={}),d||l(o,u)||c(o,u,(function(){return this})),e.exports={IteratorPrototype:o,BUGGY_SAFARI_ITERATORS:p}},function(e,t,n){"use strict";var o=n(8);e.exports=function(e){if(!o(e)&&null!==e)throw TypeError("Can't set "+String(e)+" as a prototype");return e}},function(e,t,n){"use strict";var o=n(28),r=n(33),i=n(12),a=n(41),c=n(27),l=Math.min,s=[].lastIndexOf,d=!!s&&1/[1].lastIndexOf(1,-0)<0,u=a("lastIndexOf"),p=c("indexOf",{ACCESSORS:!0,1:0}),m=d||!u||!p;e.exports=m?function(e){if(d)return s.apply(this,arguments)||0;var t=o(this),n=i(t.length),a=n-1;for(arguments.length>1&&(a=l(a,r(arguments[1]))),a<0&&(a=n+a);a>=0;a--)if(a in t&&t[a]===e)return a||0;return-1}:s},function(e,t,n){"use strict";var o=n(33),r=n(12);e.exports=function(e){if(e===undefined)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length or index");return n}},function(e,t,n){"use strict";var o=n(34),r=n(8),i=[].slice,a={},c=function(e,t,n){if(!(t in a)){for(var o=[],r=0;r1?arguments[1]:undefined,3);t=t?t.next:n.first;)for(o(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!g(this,e)}}),i(d.prototype,n?{get:function(e){var t=g(this,e);return t&&t.value},set:function(e,t){return C(this,0===e?0:e,t)}}:{add:function(e){return C(this,e=0===e?0:e,e)}}),u&&o(d.prototype,"size",{get:function(){return m(this).size}}),d},setStrong:function(e,t,n){var o=t+" Iterator",r=f(t),i=f(o);s(e,t,(function(e,t){h(this,{type:o,target:e,state:r(e),kind:t,last:undefined})}),(function(){for(var e=i(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return e.target&&(e.last=n=n?n.next:e.state.first)?"keys"==t?{value:n.key,done:!1}:"values"==t?{value:n.value,done:!1}:{value:[n.key,n.value],done:!1}:(e.target=undefined,{value:undefined,done:!0})}),n?"entries":"values",!n,!0),d(t)}}},function(e,t,n){"use strict";var o=Math.log;e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:o(1+e)}},function(e,t,n){"use strict";var o=n(8),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t,n){"use strict";var o=n(6),r=n(63).trim,i=n(93),a=o.parseInt,c=/^[+-]?0[Xx]/,l=8!==a(i+"08")||22!==a(i+"0x16");e.exports=l?function(e,t){var n=r(String(e));return a(n,t>>>0||(c.test(n)?16:10))}:a},function(e,t,n){"use strict";var o=n(9),r=n(73),i=n(28),a=n(83).f,c=function(e){return function(t){for(var n,c=i(t),l=r(c),s=l.length,d=0,u=[];s>d;)n=l[d++],o&&!a.call(c,n)||u.push(e?[n,c[n]]:c[n]);return u}};e.exports={entries:c(!0),values:c(!1)}},function(e,t,n){"use strict";e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(6);e.exports=o.Promise},function(e,t,n){"use strict";var o=n(85);e.exports=/(iphone|ipod|ipad).*applewebkit/i.test(o)},function(e,t,n){"use strict";var o,r,i,a,c,l,s,d,u=n(6),p=n(22).f,m=n(35),h=n(126).set,f=n(173),C=u.MutationObserver||u.WebKitMutationObserver,g=u.process,N=u.Promise,b="process"==m(g),V=p(u,"queueMicrotask"),v=V&&V.value;v||(o=function(){var e,t;for(b&&(e=g.domain)&&e.exit();r;){t=r.fn,r=r.next;try{t()}catch(n){throw r?a():i=undefined,n}}i=undefined,e&&e.enter()},b?a=function(){g.nextTick(o)}:C&&!f?(c=!0,l=document.createTextNode(""),new C(o).observe(l,{characterData:!0}),a=function(){l.data=c=!c}):N&&N.resolve?(s=N.resolve(undefined),d=s.then,a=function(){d.call(s,o)}):a=function(){h.call(u,o)}),e.exports=v||function(e){var t={fn:e,next:undefined};i&&(i.next=t),r||(r=t,a()),i=t}},function(e,t,n){"use strict";var o=n(10),r=n(8),i=n(176);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(34),r=function(e){var t,n;this.promise=new e((function(e,o){if(t!==undefined||n!==undefined)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)};e.exports.f=function(e){return new r(e)}},function(e,t,n){"use strict";var o=n(4),r=n(96);o({target:"RegExp",proto:!0,forced:/./.exec!==r},{exec:r})},function(e,t,n){"use strict";var o=n(85);e.exports=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(o)},function(e,t,n){"use strict";var o=n(376);e.exports=function(e,t){var n=o(e);if(n%t)throw RangeError("Wrong offset");return n}},function(e,t,n){"use strict";var o=n(16),r=n(12),i=n(118),a=n(117),c=n(56),l=n(11).aTypedArrayConstructor;e.exports=function(e){var t,n,s,d,u,p,m=o(e),h=arguments.length,f=h>1?arguments[1]:undefined,C=f!==undefined,g=i(m);if(g!=undefined&&!a(g))for(p=(u=g.call(m)).next,m=[];!(d=p.call(u)).done;)m.push(d.value);for(C&&h>2&&(f=c(f,arguments[2],2)),n=r(m.length),s=new(l(this))(n),t=0;n>t;t++)s[t]=C?f(m[t],t):m[t];return s}},function(e,t,n){"use strict";var o=n(77),r=n(59).getWeakData,i=n(10),a=n(8),c=n(62),l=n(79),s=n(21),d=n(19),u=n(37),p=u.set,m=u.getterFor,h=s.find,f=s.findIndex,C=0,g=function(e){return e.frozen||(e.frozen=new N)},N=function(){this.entries=[]},b=function(e,t){return h(e.entries,(function(e){return e[0]===t}))};N.prototype={get:function(e){var t=b(this,e);if(t)return t[1]},has:function(e){return!!b(this,e)},set:function(e,t){var n=b(this,e);n?n[1]=t:this.entries.push([e,t])},"delete":function(e){var t=f(this.entries,(function(t){return t[0]===e}));return~t&&this.entries.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,s){var u=e((function(e,o){c(e,u,t),p(e,{type:t,id:C++,frozen:undefined}),o!=undefined&&l(o,e[s],e,n)})),h=m(t),f=function(e,t,n){var o=h(e),a=r(i(t),!0);return!0===a?g(o).set(t,n):a[o.id]=n,e};return o(u.prototype,{"delete":function(e){var t=h(this);if(!a(e))return!1;var n=r(e);return!0===n?g(t)["delete"](e):n&&d(n,t.id)&&delete n[t.id]},has:function(e){var t=h(this);if(!a(e))return!1;var n=r(e);return!0===n?g(t).has(e):n&&d(n,t.id)}}),o(u.prototype,n?{get:function(e){var t=h(this);if(a(e)){var n=r(e);return!0===n?g(t).get(e):n?n[t.id]:undefined}},set:function(e,t){return f(this,e,t)}}:{add:function(e){return f(this,e,!0)}}),u}}},function(e,t,n){"use strict";t.__esModule=!0,t.setupHotReloading=t.sendLogEntry=void 0;t.sendLogEntry=function(e,t){};t.setupHotReloading=function(){0}},function(e,t,n){"use strict";t.__esModule=!0,t.resizeStartHandler=t.dragStartHandler=t.setupDrag=void 0;var o=n(418),r=n(23);function i(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(o,r)} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -var a,c,l,s,d,u=(0,n(63).createLogger)("drag"),p=!1,m=!1,h=[0,0],f=function(e){return(0,r.winget)(e,"pos").then((function(e){return[e.x,e.y]}))},C=function(e,t){return(0,r.winset)(e,"pos",t[0]+","+t[1])},g=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t,o,r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u.log("setting up"),a=e.config.window,n.next=4,f(a);case 4:t=n.sent,h=[t[0]-window.screenLeft,t[1]-window.screenTop],o=N(t),r=o[0],i=o[1],r&&C(a,i),u.debug("current state",{ref:a,screenOffset:h});case 9:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var a=e.apply(t,n);function c(e){i(a,o,r,c,l,"next",e)}function l(e){i(a,o,r,c,l,"throw",e)}c(undefined)}))});return function(e){return t.apply(this,arguments)}}();t.setupDrag=g;var N=function(e){var t=e[0],n=e[1],o=!1;return t<0?(t=0,o=!0):t+window.innerWidth>window.screen.availWidth&&(t=window.screen.availWidth-window.innerWidth,o=!0),n<0?(n=0,o=!0):n+window.innerHeight>window.screen.availHeight&&(n=window.screen.availHeight-window.innerHeight,o=!0),[o,[t,n]]};t.dragStartHandler=function(e){u.log("drag start"),p=!0,c=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",V),document.addEventListener("mouseup",b),V(e)};var b=function y(e){u.log("drag end"),V(e),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",y),p=!1},V=function(e){p&&(e.preventDefault(),C(a,(0,o.vecAdd)([e.screenX,e.screenY],h,c)))};t.resizeStartHandler=function(e,t){return function(n){l=[e,t],u.log("resize start",l),m=!0,c=[window.screenLeft-n.screenX,window.screenTop-n.screenY],s=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",x),document.addEventListener("mouseup",v),x(n)}};var v=function k(e){u.log("resize end",d),x(e),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),m=!1},x=function(e){m&&(e.preventDefault(),(d=(0,o.vecAdd)(s,(0,o.vecMultiply)(l,(0,o.vecAdd)([e.screenX,e.screenY],(0,o.vecInverse)([window.screenLeft,window.screenTop]),c,[1,1]))))[0]=Math.max(d[0],250),d[1]=Math.max(d[1],120),function(e,t){(0,r.winset)(e,"size",t[0]+","+t[1])}(a,d))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tooltip=void 0;var o=n(0),r=n(7);t.Tooltip=function(e){var t=e.content,n=e.title,i=e.position,a=void 0===i?"bottom":i,c="string"==typeof t&&t.length>35,l=!(0,r.isFalsy)(n)?n+"\n \n"+t:t;return(0,o.createVNode)(1,"div",(0,r.classes)(["Tooltip",c&&"Tooltip--long",a&&"Tooltip--"+a]),null,1,{"data-tooltip":l})}},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=t.getBoundingBox=void 0;var o=n(0),r=n(7),i=n(443),a=n(23),c=n(63),l=n(17);function s(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var a,c,l,s,d,u=(0,n(64).createLogger)("drag"),p=!1,m=!1,h=[0,0],f=function(e){return(0,r.winget)(e,"pos").then((function(e){return[e.x,e.y]}))},C=function(e,t){return(0,r.winset)(e,"pos",t[0]+","+t[1])},g=function(){var e,t=(e=regeneratorRuntime.mark((function n(e){var t,o,r,i;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return u.log("setting up"),a=e.config.window,n.next=4,f(a);case 4:t=n.sent,h=[t[0]-window.screenLeft,t[1]-window.screenTop],o=N(t),r=o[0],i=o[1],r&&C(a,i),u.debug("current state",{ref:a,screenOffset:h});case 9:case"end":return n.stop()}}),n)})),function(){var t=this,n=arguments;return new Promise((function(o,r){var a=e.apply(t,n);function c(e){i(a,o,r,c,l,"next",e)}function l(e){i(a,o,r,c,l,"throw",e)}c(undefined)}))});return function(e){return t.apply(this,arguments)}}();t.setupDrag=g;var N=function(e){var t=e[0],n=e[1],o=!1;return t<0?(t=0,o=!0):t+window.innerWidth>window.screen.availWidth&&(t=window.screen.availWidth-window.innerWidth,o=!0),n<0?(n=0,o=!0):n+window.innerHeight>window.screen.availHeight&&(n=window.screen.availHeight-window.innerHeight,o=!0),[o,[t,n]]};t.dragStartHandler=function(e){u.log("drag start"),p=!0,c=[window.screenLeft-e.screenX,window.screenTop-e.screenY],document.addEventListener("mousemove",V),document.addEventListener("mouseup",b),V(e)};var b=function y(e){u.log("drag end"),V(e),document.removeEventListener("mousemove",V),document.removeEventListener("mouseup",y),p=!1},V=function(e){p&&(e.preventDefault(),C(a,(0,o.vecAdd)([e.screenX,e.screenY],h,c)))};t.resizeStartHandler=function(e,t){return function(n){l=[e,t],u.log("resize start",l),m=!0,c=[window.screenLeft-n.screenX,window.screenTop-n.screenY],s=[window.innerWidth,window.innerHeight],document.addEventListener("mousemove",x),document.addEventListener("mouseup",v),x(n)}};var v=function k(e){u.log("resize end",d),x(e),document.removeEventListener("mousemove",x),document.removeEventListener("mouseup",k),m=!1},x=function(e){m&&(e.preventDefault(),(d=(0,o.vecAdd)(s,(0,o.vecMultiply)(l,(0,o.vecAdd)([e.screenX,e.screenY],(0,o.vecInverse)([window.screenLeft,window.screenTop]),c,[1,1]))))[0]=Math.max(d[0],250),d[1]=Math.max(d[1],120),function(e,t){(0,r.winset)(e,"size",t[0]+","+t[1])}(a,d))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tooltip=void 0;var o=n(0),r=n(7);t.Tooltip=function(e){var t=e.content,n=e.title,i=e.position,a=void 0===i?"bottom":i,c="string"==typeof t&&t.length>35,l=!(0,r.isFalsy)(n)?n+"\n \n"+t:t;return(0,o.createVNode)(1,"div",(0,r.classes)(["Tooltip",c&&"Tooltip--long",a&&"Tooltip--"+a]),null,1,{"data-tooltip":l})}},function(e,t,n){"use strict";t.__esModule=!0,t.ByondUi=t.getBoundingBox=void 0;var o=n(0),r=n(7),i=n(443),a=n(23),c=n(64),l=n(17);function s(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov @@ -81,31 +81,31 @@ var d=(0,c.createLogger)("ByondUi"),u=[];window.addEventListener("beforeunload", * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var c=function(e){var t=e.children,n=a(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table,Object.assign({},n,{children:(0,o.createComponentVNode)(2,r.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var l=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=l,c.defaultHooks=i.pureComponentHooks,c.Column=l},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var o=n(0),r=n(15),i=n(7),a=n(136); + */var c=function(e){var t=e.children,n=a(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table,Object.assign({},n,{children:(0,o.createComponentVNode)(2,r.Table.Row,{children:t})})))};t.Grid=c,c.defaultHooks=i.pureComponentHooks;var l=function(e){var t=e.size,n=void 0===t?1:t,i=e.style,c=a(e,["size","style"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Table.Cell,Object.assign({style:Object.assign({width:n+"%"},i)},c)))};t.GridColumn=l,c.defaultHooks=i.pureComponentHooks,c.Column=l},function(e,t,n){"use strict";t.__esModule=!0,t.DraggableControl=void 0;var o=n(0),r=n(15),i=n(7),a=n(138); /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -var c=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},l=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).inputRef=(0,o.createRef)(),n.state={value:t.value,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,o=t.value,r=t.dragMatrix;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:c(e,r),value:o,internalValue:o}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,i=n.props.onDrag;o&&i&&i(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,i=t.maxValue,a=t.step,l=t.stepPixelSize,s=t.dragMatrix;n.setState((function(t){var n=Object.assign({},t),d=c(e,s)-n.origin;if(t.dragging){var u=Number.isFinite(o)?o%a:0;n.internalValue=(0,r.clamp)(n.internalValue+d*a/l,o-a,i+a),n.value=(0,r.clamp)(n.internalValue-n.internalValue%a+u,o,i),n.origin=c(e,s)}else Math.abs(d)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,i=n.state,a=i.dragging,c=i.value,l=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=l;try{s.focus(),s.select()}catch(d){}}},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this,t=this.state,n=t.dragging,i=t.editing,c=t.value,l=t.suppressingFlicker,s=this.props,d=s.animated,u=s.value,p=s.unit,m=s.minValue,h=s.maxValue,f=s.format,C=s.onChange,g=s.onDrag,N=s.children,b=s.height,V=s.lineHeight,v=s.fontSize,x=u;(n||l)&&(x=c);var y=function(e){return e+(p?" "+p:"")},k=d&&!n&&!l&&(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:x,format:f,children:y})||y(f?f(x):x),w=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:i?undefined:"none",height:b,"line-height":V,"font-size":v},onBlur:function(t){if(i){var n=(0,r.clamp)(t.target.value,m,h);e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),g&&g(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,m,h);return e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),void(g&&g(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef);return N({dragging:n,editing:i,value:u,displayValue:x,displayElement:k,inputElement:w,handleDragStart:this.handleDragStart})},i}(o.Component);t.DraggableControl=l,l.defaultHooks=i.pureComponentHooks,l.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(0),r=n(15),i=n(7),a=n(23),c=n(17),l=n(189),s=n(139);t.Slider=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,d=e.maxValue,u=e.minValue,p=e.onChange,m=e.onDrag,h=e.step,f=e.stepPixelSize,C=e.suppressFlicker,g=e.unit,N=e.value,b=e.className,V=e.fillValue,v=e.color,x=e.ranges,y=void 0===x?{}:x,k=e.children,w=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var c=function(e,t){return e.screenX*t[0]+e.screenY*t[1]},l=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).inputRef=(0,o.createRef)(),n.state={value:t.value,dragging:!1,editing:!1,internalValue:null,origin:null,suppressingFlicker:!1},n.flickerTimer=null,n.suppressFlicker=function(){var e=n.props.suppressFlicker;e>0&&(n.setState({suppressingFlicker:!0}),clearTimeout(n.flickerTimer),n.flickerTimer=setTimeout((function(){return n.setState({suppressingFlicker:!1})}),e))},n.handleDragStart=function(e){var t=n.props,o=t.value,r=t.dragMatrix;n.state.editing||(document.body.style["pointer-events"]="none",n.ref=e.target,n.setState({dragging:!1,origin:c(e,r),value:o,internalValue:o}),n.timer=setTimeout((function(){n.setState({dragging:!0})}),250),n.dragInterval=setInterval((function(){var t=n.state,o=t.dragging,r=t.value,i=n.props.onDrag;o&&i&&i(e,r)}),500),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd))},n.handleDragMove=function(e){var t=n.props,o=t.minValue,i=t.maxValue,a=t.step,l=t.stepPixelSize,s=t.dragMatrix;n.setState((function(t){var n=Object.assign({},t),d=c(e,s)-n.origin;if(t.dragging){var u=Number.isFinite(o)?o%a:0;n.internalValue=(0,r.clamp)(n.internalValue+d*a/l,o-a,i+a),n.value=(0,r.clamp)(n.internalValue-n.internalValue%a+u,o,i),n.origin=c(e,s)}else Math.abs(d)>4&&(n.dragging=!0);return n}))},n.handleDragEnd=function(e){var t=n.props,o=t.onChange,r=t.onDrag,i=n.state,a=i.dragging,c=i.value,l=i.internalValue;if(document.body.style["pointer-events"]="auto",clearTimeout(n.timer),clearInterval(n.dragInterval),n.setState({dragging:!1,editing:!a,origin:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),a)n.suppressFlicker(),o&&o(e,c),r&&r(e,c);else if(n.inputRef){var s=n.inputRef.current;s.value=l;try{s.focus(),s.select()}catch(d){}}},n}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i.prototype.render=function(){var e=this,t=this.state,n=t.dragging,i=t.editing,c=t.value,l=t.suppressingFlicker,s=this.props,d=s.animated,u=s.value,p=s.unit,m=s.minValue,h=s.maxValue,f=s.format,C=s.onChange,g=s.onDrag,N=s.children,b=s.height,V=s.lineHeight,v=s.fontSize,x=u;(n||l)&&(x=c);var y=function(e){return e+(p?" "+p:"")},k=d&&!n&&!l&&(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:x,format:f,children:y})||y(f?f(x):x),w=(0,o.createVNode)(64,"input","NumberInput__input",null,1,{style:{display:i?undefined:"none",height:b,"line-height":V,"font-size":v},onBlur:function(t){if(i){var n=(0,r.clamp)(t.target.value,m,h);e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),g&&g(t,n)}},onKeyDown:function(t){if(13===t.keyCode){var n=(0,r.clamp)(t.target.value,m,h);return e.setState({editing:!1,value:n}),e.suppressFlicker(),C&&C(t,n),void(g&&g(t,n))}27!==t.keyCode||e.setState({editing:!1})}},null,this.inputRef);return N({dragging:n,editing:i,value:u,displayValue:x,displayElement:k,inputElement:w,handleDragStart:this.handleDragStart})},i}(o.Component);t.DraggableControl=l,l.defaultHooks=i.pureComponentHooks,l.defaultProps={minValue:-Infinity,maxValue:+Infinity,step:1,stepPixelSize:1,suppressFlicker:50,dragMatrix:[1,0]}},function(e,t,n){"use strict";t.__esModule=!0,t.Slider=void 0;var o=n(0),r=n(15),i=n(7),a=n(23),c=n(17),l=n(189),s=n(141);t.Slider=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,d=e.maxValue,u=e.minValue,p=e.onChange,m=e.onDrag,h=e.step,f=e.stepPixelSize,C=e.suppressFlicker,g=e.unit,N=e.value,b=e.className,V=e.fillValue,v=e.color,x=e.ranges,y=void 0===x?{}:x,k=e.children,w=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),_=k!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:d,minValue:u,onChange:p,onDrag:m,step:h,stepPixelSize:f,suppressFlicker:C,unit:g,value:N},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,l=e.displayElement,s=e.inputElement,p=e.handleDragStart,m=V!==undefined&&null!==V,h=((0,r.scale)(n,u,d),(0,r.scale)(null!=V?V:a,u,d)),f=(0,r.scale)(a,u,d),C=v||(0,r.keyOfMatchingRange)(null!=V?V:n,y)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+C,b,(0,c.computeBoxClassName)(w)]),[(0,o.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",m&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,r.clamp01)(h)+"%",opacity:.4}}),(0,o.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,r.clamp01)(Math.min(h,f))+"%"}}),(0,o.createVNode)(1,"div","Slider__cursorOffset",[(0,o.createVNode)(1,"div","Slider__cursor"),(0,o.createVNode)(1,"div","Slider__pointer"),t&&(0,o.createVNode)(1,"div","Slider__popupValue",l,0)],0,{style:{width:100*(0,r.clamp01)(f)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",_?k:l,0),s],0,Object.assign({},(0,c.computeBoxProps)(w),{onMouseDown:p})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Window=void 0;var o=n(0),r=n(7),i=n(18),a=n(1),c=n(23),l=n(2),s=n(49),d=n(183),u=n(133),p=n(63),m=n(135); + */(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","fillValue","color","ranges","children"]),_=k!==undefined;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[1,0]},{animated:t,format:n,maxValue:d,minValue:u,onChange:p,onDrag:m,step:h,stepPixelSize:f,suppressFlicker:C,unit:g,value:N},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,l=e.displayElement,s=e.inputElement,p=e.handleDragStart,m=V!==undefined&&null!==V,h=((0,r.scale)(n,u,d),(0,r.scale)(null!=V?V:a,u,d)),f=(0,r.scale)(a,u,d),C=v||(0,r.keyOfMatchingRange)(null!=V?V:n,y)||"default";return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Slider","ProgressBar","ProgressBar--color--"+C,b,(0,c.computeBoxClassName)(w)]),[(0,o.createVNode)(1,"div",(0,i.classes)(["ProgressBar__fill",m&&"ProgressBar__fill--animated"]),null,1,{style:{width:100*(0,r.clamp01)(h)+"%",opacity:.4}}),(0,o.createVNode)(1,"div","ProgressBar__fill",null,1,{style:{width:100*(0,r.clamp01)(Math.min(h,f))+"%"}}),(0,o.createVNode)(1,"div","Slider__cursorOffset",[(0,o.createVNode)(1,"div","Slider__cursor"),(0,o.createVNode)(1,"div","Slider__pointer"),t&&(0,o.createVNode)(1,"div","Slider__popupValue",l,0)],0,{style:{width:100*(0,r.clamp01)(f)+"%"}}),(0,o.createVNode)(1,"div","ProgressBar__content",_?k:l,0),s],0,Object.assign({},(0,c.computeBoxProps)(w),{onMouseDown:p})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.Window=void 0;var o=n(0),r=n(7),i=n(18),a=n(1),c=n(23),l=n(2),s=n(50),d=n(183),u=n(135),p=n(64),m=n(137); /** * @file * @copyright 2020 Aleksej Komarov * @license MIT */ -var h=(0,p.createLogger)("Window"),f=function(e){var t,n;function l(){return e.apply(this,arguments)||this}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var p=l.prototype;return p.componentDidMount=function(){(0,m.refocusLayout)()},p.render=function(){var e=this.props,t=e.resizable,n=e.theme,l=e.children,p=(0,a.useBackend)(this.context),f=p.config,C=p.debugLayout,N=f.observer?f.statusa?"average":t>c?"bad":"good"),children:[e.val,e.units]},e.entry);var t,n,r,a,c}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MessengerList=t.ActiveConversation=t.pda_messenger=void 0;var o=n(0),r=n(24),i=n(1),a=n(2);t.pda_messenger=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data);return r.active_convo?(0,o.createComponentVNode)(2,c,{data:r}):(0,o.createComponentVNode)(2,l,{data:r})};var c=function(e,t){var n=(0,i.useBackend)(t).act,c=e.data,l=c.convo_name,s=c.convo_job,d=c.messages,u=c.active_convo,p=(0,i.useLocalState)(t,"clipboardMode",!1),m=p[0],h=p[1],f=(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return n("Back")}}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Conversation with "+l+" ("+s+")",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:m,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!m)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,a.Section,{height:"97%",overflowY:"auto",children:(0,r.filter)((function(e){return e.target===u}))(d).map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{textAlign:e.sent?"right":"left",position:"relative",mb:1,children:[(0,o.createComponentVNode)(2,a.Icon,{fontSize:2.5,color:e.sent?"#3e6189":"#565656",position:"absolute",left:e.sent?null:"0px",right:e.sent?"0px":null,bottom:"-5px",style:{"z-index":"0",transform:e.sent?"scale(-1, 1)":null},name:"comment"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,backgroundColor:e.sent?"#3e6189":"#565656",p:1,maxWidth:"100%",position:"relative",textAlign:"left",style:{"z-index":"1","border-radius":"5px","word-break":"normal","word-wrap":"break-word"},children:e.message})]},t)}))}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:u})},content:"Reply"})})]})]});return m&&(f=(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return n("Back")}}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Conversation with "+l+" ("+s+")",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:m,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!m)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,a.Section,{style:{height:"97%","overflow-y":"auto"},children:(0,r.filter)((function(e){return e.target===u}))(d).map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{color:e.sent?"#2185d0":"#aaaaaa",style:{"word-break":"normal"},children:[e.sent?"You:":"Them:"," ",e.message]},t)}))}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:u})},content:"Reply"})})]})]})),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Messenger Functions",children:(0,o.createComponentVNode)(2,a.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"Convo"})},children:"Delete Conversations"})})}),f]})};t.ActiveConversation=c;var l=function(e,t){var n=(0,i.useBackend)(t).act,r=e.data,c=r.convopdas,l=r.pdas,d=r.charges,u=r.silent,p=r.toff,m=(0,i.useLocalState)(t,"searchTerm",""),h=m[0],f=m[1];return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Messenger Functions",children:[(0,o.createComponentVNode)(2,a.Button,{selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return n("Toggle Ringer")},children:["Ringer: ",u?"Off":"On"]}),(0,o.createComponentVNode)(2,a.Button,{color:p?"bad":"green",icon:"power-off",onClick:function(){return n("Toggle Messenger")},children:["Messenger: ",p?"Off":"On"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"bell",onClick:function(){return n("Ringtone")},children:"Set Ringtone"}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"All"})},children:"Delete All Conversations"})]})}),!p&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[!!d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cartridge Special Function",children:[d," charges left."]})}),!c.length&&!l.length&&(0,o.createComponentVNode)(2,a.Box,{children:"No current conversations"})||(0,o.createComponentVNode)(2,a.Box,{children:["Search: ",(0,o.createComponentVNode)(2,a.Input,{value:h,onInput:function(e,t){f(t)}}),(0,o.createComponentVNode)(2,s,{title:"Current Conversations",data:r,pdas:c,msgAct:"Select Conversation",searchTerm:h}),(0,o.createComponentVNode)(2,s,{title:"Other PDAs",pdas:l,msgAct:"Message",data:r,searchTerm:h})]})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Messenger Offline."})]})};t.MessengerList=l;var s=function(e,t){var n=(0,i.useBackend)(t).act,r=e.data,c=e.pdas,l=e.title,s=e.msgAct,d=e.searchTerm,u=r.charges,p=r.plugins;return c&&c.length?(0,o.createComponentVNode)(2,a.Section,{level:2,title:l,children:c.filter((function(e){return e.Name.toLowerCase().includes(d.toLowerCase())})).map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:e.Name,onClick:function(){return n(s,{target:e.uid})}}),!!u&&p.map((function(t){return(0,o.createComponentVNode)(2,a.Button,{icon:t.icon,content:t.name,onClick:function(){return n("Messenger Plugin",{plugin:t.uid,target:e.uid})}},t.uid)}))]},e.uid)}))}):(0,o.createComponentVNode)(2,a.Section,{level:2,title:l,children:"No PDAs found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(15),i=n(1),a=n(2);t.Signaler=function(e,t){var n=(0,i.useBackend)(t).act,c=e.data,l=c.code,s=c.frequency,d=c.minFrequency,u=c.maxFrequency;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Frequency",children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return n("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onDrag:function(e,t){return n("code",{code:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PowerMonitorMainContent=t.PowerMonitor=void 0;var o=n(0),r=n(24),i=n(43),a=n(15),c=n(7),l=n(18),s=n(1),d=n(2),u=n(3),p=6e5;t.PowerMonitor=function(e,t){return(0,o.createComponentVNode)(2,u.Window,{resizeable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,m)})})};var m=function(e,t){var n=(0,s.useBackend)(t),r=(n.act,n.data),i=r.powermonitor,a=r.can_select_monitor;return(0,o.createComponentVNode)(2,d.Box,{m:0,children:[!i&&a&&(0,o.createComponentVNode)(2,h),i&&(0,o.createComponentVNode)(2,f)]})};t.PowerMonitorMainContent=m;var h=function(e,t){var n=(0,s.useBackend)(t),r=n.act,i=n.data.powermonitors;return i?(0,o.createComponentVNode)(2,d.Section,{title:"Select Power Monitor",children:Object.keys(i).sort((function(e,t){return i[e]50?"battery-half":"battery-quarter")||"C"===t&&"bolt"||"F"===t&&"battery-full"||"M"===t&&"slash",color:"N"===t&&(n>50?"yellow":"red")||"C"===t&&"yellow"||"F"===t&&"green"||"M"===t&&"orange"}),(0,o.createComponentVNode)(2,d.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,a.toFixed)(n)+"%"})],4)};C.defaultHooks=c.pureComponentHooks;var g=function(e){var t,n;switch(e.status){case"AOn":t=!0,n=!0;break;case"AOff":t=!0,n=!1;break;case"On":t=!1,n=!0;break;case"Off":t=!1,n=!1}var r=(n?"On":"Off")+" ["+(t?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,d.ColorBox,{color:n?"good":"bad",content:t?undefined:"M",title:r})};g.defaultHooks=c.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.RndRoute=void 0;var o=n(1);t.RndRoute=function(e,t){var n=e.render,r=(0,o.useBackend)(t).data,i=r.menu,a=r.submenu,c=function(e,t){return null===e||e===undefined||("function"==typeof e?e(t):e===t)};return c(e.menu,i)&&c(e.submenu,a)?n():null}},function(e,t,n){e.exports=n(201)},function(e,t,n){"use strict";n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(227),n(229),n(230),n(231),n(160),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(248),n(249),n(250),n(251),n(252),n(254),n(255),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(286),n(287),n(288),n(289),n(290),n(291),n(293),n(294),n(296),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(322),n(323),n(324),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(177),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414);var o=n(0),r=n(416);n(417);n(182);var i=n(1),a=n(23),c=n(183),l=n(63);n(419),n(420),n(421),n(422),n(423);var s=n(424);n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(435),n(436),n(437),n(438);var d,u=n(439),p=(Date.now(),(0,s.createStore)()),m=!0,h=function(){for(p.subscribe((function(){!function(){try{var e=p.getState();m&&(l.logger.log("initial render",e),(0,c.setupDrag)(e));var t=(0,n(134).getRoutedComponent)(e),r=(0,o.createComponentVNode)(2,s.StoreProvider,{store:p,children:(0,o.createComponentVNode)(2,t)});d||(d=document.getElementById("react-root")),(0,o.render)(r,d)}catch(i){throw l.logger.error("rendering error",i),i}m&&(m=!1)}()})),(0,u.captureExternalLinks)(),window.update=function(e){var t="string"==typeof e?function(e){var t=function(e,t){return"object"==typeof t&&null!==t&&t.__number__?parseFloat(t.__number__):t};a.IS_IE8&&(t=undefined);try{return JSON.parse(e,t)}catch(o){l.logger.log(o),l.logger.log("What we got:",e);var n=o&&o.message;throw new Error("JSON parsing error: "+n)}}(e):e;p.dispatch((0,i.backendUpdate)(t))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}(0,r.loadCSS)("font-awesome.css")}; +var h=(0,p.createLogger)("Window"),f=function(e){var t,n;function l(){return e.apply(this,arguments)||this}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var p=l.prototype;return p.componentDidMount=function(){(0,m.refocusLayout)()},p.render=function(){var e=this.props,t=e.resizable,n=e.theme,l=e.children,p=(0,a.useBackend)(this.context),f=p.config,C=p.debugLayout,N=f.observer?f.statusa?"average":t>c?"bad":"good"),children:[e.val,e.units]},e.entry);var t,n,r,a,c}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MessengerList=t.ActiveConversation=t.pda_messenger=void 0;var o=n(0),r=n(24),i=n(1),a=n(2);t.pda_messenger=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data);return r.active_convo?(0,o.createComponentVNode)(2,c,{data:r}):(0,o.createComponentVNode)(2,l,{data:r})};var c=function(e,t){var n=(0,i.useBackend)(t).act,c=e.data,l=c.convo_name,s=c.convo_job,d=c.messages,u=c.active_convo,p=(0,i.useLocalState)(t,"clipboardMode",!1),m=p[0],h=p[1],f=(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return n("Back")}}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Conversation with "+l+" ("+s+")",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:m,tooltip:"Enter Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!m)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,a.Section,{height:"97%",overflowY:"auto",children:(0,r.filter)((function(e){return e.target===u}))(d).map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{textAlign:e.sent?"right":"left",position:"relative",mb:1,children:[(0,o.createComponentVNode)(2,a.Icon,{fontSize:2.5,color:e.sent?"#3e6189":"#565656",position:"absolute",left:e.sent?null:"0px",right:e.sent?"0px":null,bottom:"-5px",style:{"z-index":"0",transform:e.sent?"scale(-1, 1)":null},name:"comment"}),(0,o.createComponentVNode)(2,a.Box,{inline:!0,backgroundColor:e.sent?"#3e6189":"#565656",p:1,maxWidth:"100%",position:"relative",textAlign:"left",style:{"z-index":"1","border-radius":"5px","word-break":"normal","word-wrap":"break-word"},children:e.message})]},t)}))}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:u})},content:"Reply"})})]})]});return m&&(f=(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"Back",icon:"arrow-left",onClick:function(){return n("Back")}}),(0,o.createComponentVNode)(2,a.Section,{level:2,title:"Conversation with "+l+" ("+s+")",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eye",selected:m,tooltip:"Exit Clipboard Mode",tooltipPosition:"bottom-left",onClick:function(){return h(!m)}}),height:"415px",stretchContents:!0,children:[(0,o.createComponentVNode)(2,a.Section,{style:{height:"97%","overflow-y":"auto"},children:(0,r.filter)((function(e){return e.target===u}))(d).map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{color:e.sent?"#2185d0":"#aaaaaa",style:{"word-break":"normal"},children:[e.sent?"You:":"Them:"," ",e.message]},t)}))}),(0,o.createComponentVNode)(2,a.Box,{textAlign:"right",children:(0,o.createComponentVNode)(2,a.Button,{mt:1,icon:"comment",onClick:function(){return n("Message",{target:u})},content:"Reply"})})]})]})),(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Messenger Functions",children:(0,o.createComponentVNode)(2,a.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"Convo"})},children:"Delete Conversations"})})}),f]})};t.ActiveConversation=c;var l=function(e,t){var n=(0,i.useBackend)(t).act,r=e.data,c=r.convopdas,l=r.pdas,d=r.charges,u=r.silent,p=r.toff,m=(0,i.useLocalState)(t,"searchTerm",""),h=m[0],f=m[1];return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Messenger Functions",children:[(0,o.createComponentVNode)(2,a.Button,{selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return n("Toggle Ringer")},children:["Ringer: ",u?"Off":"On"]}),(0,o.createComponentVNode)(2,a.Button,{color:p?"bad":"green",icon:"power-off",onClick:function(){return n("Toggle Messenger")},children:["Messenger: ",p?"Off":"On"]}),(0,o.createComponentVNode)(2,a.Button,{icon:"bell",onClick:function(){return n("Ringtone")},children:"Set Ringtone"}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",color:"bad",onClick:function(){return n("Clear",{option:"All"})},children:"Delete All Conversations"})]})}),!p&&(0,o.createComponentVNode)(2,a.Box,{mt:2,children:[!!d&&(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Cartridge Special Function",children:[d," charges left."]})}),!c.length&&!l.length&&(0,o.createComponentVNode)(2,a.Box,{children:"No current conversations"})||(0,o.createComponentVNode)(2,a.Box,{children:["Search: ",(0,o.createComponentVNode)(2,a.Input,{value:h,onInput:function(e,t){f(t)}}),(0,o.createComponentVNode)(2,s,{title:"Current Conversations",data:r,pdas:c,msgAct:"Select Conversation",searchTerm:h}),(0,o.createComponentVNode)(2,s,{title:"Other PDAs",pdas:l,msgAct:"Message",data:r,searchTerm:h})]})]})||(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Messenger Offline."})]})};t.MessengerList=l;var s=function(e,t){var n=(0,i.useBackend)(t).act,r=e.data,c=e.pdas,l=e.title,s=e.msgAct,d=e.searchTerm,u=r.charges,p=r.plugins;return c&&c.length?(0,o.createComponentVNode)(2,a.Section,{level:2,title:l,children:c.filter((function(e){return e.Name.toLowerCase().includes(d.toLowerCase())})).map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-circle-down",content:e.Name,onClick:function(){return n(s,{target:e.uid})}}),!!u&&p.map((function(t){return(0,o.createComponentVNode)(2,a.Button,{icon:t.icon,content:t.name,onClick:function(){return n("Messenger Plugin",{plugin:t.uid,target:e.uid})}},t.uid)}))]},e.uid)}))}):(0,o.createComponentVNode)(2,a.Section,{level:2,title:l,children:"No PDAs found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Signaler=void 0;var o=n(0),r=n(15),i=n(1),a=n(2);t.Signaler=function(e,t){var n=(0,i.useBackend)(t).act,c=e.data,l=c.code,s=c.frequency,d=c.minFrequency,u=c.maxFrequency;return(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Frequency",children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onDrag:function(e,t){return n("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Code",children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:l,width:"80px",onDrag:function(e,t){return n("code",{code:t})}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,icon:"arrow-up",content:"Send Signal",textAlign:"center",onClick:function(){return n("signal")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PowerMonitorMainContent=t.PowerMonitor=void 0;var o=n(0),r=n(24),i=n(43),a=n(15),c=n(7),l=n(18),s=n(1),d=n(2),u=n(3),p=6e5;t.PowerMonitor=function(e,t){return(0,o.createComponentVNode)(2,u.Window,{resizeable:!0,children:(0,o.createComponentVNode)(2,u.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,m)})})};var m=function(e,t){var n=(0,s.useBackend)(t),r=(n.act,n.data),i=r.powermonitor,a=r.can_select_monitor;return(0,o.createComponentVNode)(2,d.Box,{m:0,children:[!i&&a&&(0,o.createComponentVNode)(2,h),i&&(0,o.createComponentVNode)(2,f)]})};t.PowerMonitorMainContent=m;var h=function(e,t){var n=(0,s.useBackend)(t),r=n.act,i=n.data.powermonitors;return i?(0,o.createComponentVNode)(2,d.Section,{title:"Select Power Monitor",children:Object.keys(i).sort((function(e,t){return i[e]50?"battery-half":"battery-quarter")||"C"===t&&"bolt"||"F"===t&&"battery-full"||"M"===t&&"slash",color:"N"===t&&(n>50?"yellow":"red")||"C"===t&&"yellow"||"F"===t&&"green"||"M"===t&&"orange"}),(0,o.createComponentVNode)(2,d.Box,{inline:!0,width:"36px",textAlign:"right",children:(0,a.toFixed)(n)+"%"})],4)};C.defaultHooks=c.pureComponentHooks;var g=function(e){var t,n;switch(e.status){case"AOn":t=!0,n=!0;break;case"AOff":t=!0,n=!1;break;case"On":t=!1,n=!0;break;case"Off":t=!1,n=!1}var r=(n?"On":"Off")+" ["+(t?"auto":"manual")+"]";return(0,o.createComponentVNode)(2,d.ColorBox,{color:n?"good":"bad",content:t?undefined:"M",title:r})};g.defaultHooks=c.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.RndRoute=void 0;var o=n(1);t.RndRoute=function(e,t){var n=e.render,r=(0,o.useBackend)(t).data,i=r.menu,a=r.submenu,c=function(e,t){return null===e||e===undefined||("function"==typeof e?e(t):e===t)};return c(e.menu,i)&&c(e.submenu,a)?n():null}},function(e,t,n){e.exports=n(201)},function(e,t,n){"use strict";n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(227),n(229),n(230),n(231),n(160),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(248),n(249),n(250),n(251),n(252),n(254),n(255),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(264),n(265),n(266),n(267),n(268),n(269),n(270),n(272),n(273),n(274),n(275),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(286),n(287),n(288),n(289),n(290),n(291),n(293),n(294),n(296),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(322),n(323),n(324),n(327),n(328),n(329),n(330),n(331),n(332),n(333),n(334),n(335),n(336),n(337),n(338),n(339),n(340),n(341),n(177),n(342),n(343),n(344),n(345),n(346),n(347),n(348),n(349),n(350),n(351),n(352),n(353),n(354),n(355),n(356),n(357),n(358),n(359),n(360),n(361),n(362),n(363),n(364),n(365),n(366),n(367),n(368),n(369),n(370),n(371),n(372),n(373),n(374),n(375),n(377),n(378),n(379),n(380),n(381),n(382),n(383),n(384),n(385),n(386),n(387),n(388),n(389),n(390),n(391),n(392),n(393),n(394),n(395),n(396),n(397),n(398),n(399),n(400),n(401),n(402),n(403),n(404),n(405),n(406),n(407),n(408),n(409),n(410),n(411),n(412),n(413),n(414);var o=n(0),r=n(416);n(417);n(182);var i=n(1),a=n(23),c=n(183),l=n(64);n(419),n(420),n(421),n(422),n(423);var s=n(424);n(426),n(427),n(428),n(429),n(430),n(431),n(432),n(433),n(434),n(435),n(436),n(437),n(438);var d,u=n(439),p=(Date.now(),(0,s.createStore)()),m=!0,h=function(){for(p.subscribe((function(){!function(){try{var e=p.getState();m&&(l.logger.log("initial render",e),(0,c.setupDrag)(e));var t=(0,n(136).getRoutedComponent)(e),r=(0,o.createComponentVNode)(2,s.StoreProvider,{store:p,children:(0,o.createComponentVNode)(2,t)});d||(d=document.getElementById("react-root")),(0,o.render)(r,d)}catch(i){throw l.logger.error("rendering error",i),i}m&&(m=!1)}()})),(0,u.captureExternalLinks)(),window.update=function(e){var t="string"==typeof e?function(e){var t=function(e,t){return"object"==typeof t&&null!==t&&t.__number__?parseFloat(t.__number__):t};a.IS_IE8&&(t=undefined);try{return JSON.parse(e,t)}catch(o){l.logger.log(o),l.logger.log("What we got:",e);var n=o&&o.message;throw new Error("JSON parsing error: "+n)}}(e):e;p.dispatch((0,i.backendUpdate)(t))};;){var e=window.__updateQueue__.shift();if(!e)break;window.update(e)}(0,r.loadCSS)("font-awesome.css")}; /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */"loading"===document.readyState?document.addEventListener("DOMContentLoaded",h):h()},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(39),a=n(40),c=n(9),l=n(112),s=n(152),d=n(5),u=n(19),p=n(59),m=n(8),h=n(10),f=n(16),C=n(28),g=n(36),N=n(53),b=n(45),V=n(73),v=n(54),x=n(155),y=n(111),k=n(22),w=n(14),_=n(83),B=n(32),S=n(26),L=n(108),A=n(84),E=n(70),I=n(69),D=n(13),T=n(156),F=n(29),M=n(46),P=n(37),O=n(21).forEach,R=A("hidden"),j=D("toPrimitive"),U=P.set,z=P.getterFor("Symbol"),W=Object.prototype,H=r.Symbol,K=i("JSON","stringify"),Y=k.f,G=w.f,q=x.f,X=_.f,J=L("symbols"),$=L("op-symbols"),Z=L("string-to-symbol-registry"),Q=L("symbol-to-string-registry"),ee=L("wks"),te=r.QObject,ne=!te||!te.prototype||!te.prototype.findChild,oe=c&&d((function(){return 7!=b(G({},"a",{get:function(){return G(this,"a",{value:7}).a}})).a}))?function(e,t,n){var o=Y(W,t);o&&delete W[t],G(e,t,n),o&&e!==W&&G(W,t,o)}:G,re=function(e,t){var n=J[e]=b(H.prototype);return U(n,{type:"Symbol",tag:e,description:t}),c||(n.description=t),n},ie=s?function(e){return"symbol"==typeof e}:function(e){return Object(e)instanceof H},ae=function(e,t,n){e===W&&ae($,t,n),h(e);var o=g(t,!0);return h(n),u(J,o)?(n.enumerable?(u(e,R)&&e[R][o]&&(e[R][o]=!1),n=b(n,{enumerable:N(0,!1)})):(u(e,R)||G(e,R,N(1,{})),e[R][o]=!0),oe(e,o,n)):G(e,o,n)},ce=function(e,t){h(e);var n=C(t),o=V(n).concat(pe(n));return O(o,(function(t){c&&!se.call(n,t)||ae(e,t,n[t])})),e},le=function(e,t){return t===undefined?b(e):ce(b(e),t)},se=function(e){var t=g(e,!0),n=X.call(this,t);return!(this===W&&u(J,t)&&!u($,t))&&(!(n||!u(this,t)||!u(J,t)||u(this,R)&&this[R][t])||n)},de=function(e,t){var n=C(e),o=g(t,!0);if(n!==W||!u(J,o)||u($,o)){var r=Y(n,o);return!r||!u(J,o)||u(n,R)&&n[R][o]||(r.enumerable=!0),r}},ue=function(e){var t=q(C(e)),n=[];return O(t,(function(e){u(J,e)||u(E,e)||n.push(e)})),n},pe=function(e){var t=e===W,n=q(t?$:C(e)),o=[];return O(n,(function(e){!u(J,e)||t&&!u(W,e)||o.push(J[e])})),o};(l||(S((H=function(){if(this instanceof H)throw TypeError("Symbol is not a constructor");var e=arguments.length&&arguments[0]!==undefined?String(arguments[0]):undefined,t=I(e),n=function o(e){this===W&&o.call($,e),u(this,R)&&u(this[R],t)&&(this[R][t]=!1),oe(this,t,N(1,e))};return c&&ne&&oe(W,t,{configurable:!0,set:n}),re(t,e)}).prototype,"toString",(function(){return z(this).tag})),S(H,"withoutSetter",(function(e){return re(I(e),e)})),_.f=se,w.f=ae,k.f=de,v.f=x.f=ue,y.f=pe,T.f=function(e){return re(D(e),e)},c&&(G(H.prototype,"description",{configurable:!0,get:function(){return z(this).description}}),a||S(W,"propertyIsEnumerable",se,{unsafe:!0}))),o({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:H}),O(V(ee),(function(e){F(e)})),o({target:"Symbol",stat:!0,forced:!l},{"for":function(e){var t=String(e);if(u(Z,t))return Z[t];var n=H(t);return Z[t]=n,Q[n]=t,n},keyFor:function(e){if(!ie(e))throw TypeError(e+" is not a symbol");if(u(Q,e))return Q[e]},useSetter:function(){ne=!0},useSimple:function(){ne=!1}}),o({target:"Object",stat:!0,forced:!l,sham:!c},{create:le,defineProperty:ae,defineProperties:ce,getOwnPropertyDescriptor:de}),o({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ue,getOwnPropertySymbols:pe}),o({target:"Object",stat:!0,forced:d((function(){y.f(1)}))},{getOwnPropertySymbols:function(e){return y.f(f(e))}}),K)&&o({target:"JSON",stat:!0,forced:!l||d((function(){var e=H();return"[null]"!=K([e])||"{}"!=K({a:e})||"{}"!=K(Object(e))}))},{stringify:function(e,t,n){for(var o,r=[e],i=1;arguments.length>i;)r.push(arguments[i++]);if(o=t,(m(t)||e!==undefined)&&!ie(e))return p(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!ie(t))return t}),r[1]=t,K.apply(null,r)}});H.prototype[j]||B(H.prototype,j,H.prototype.valueOf),M(H,"Symbol"),E[R]=!0},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(6),a=n(19),c=n(8),l=n(14).f,s=n(149),d=i.Symbol;if(r&&"function"==typeof d&&(!("description"in d.prototype)||d().description!==undefined)){var u={},p=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]),t=this instanceof p?new d(e):e===undefined?d():d(e);return""===e&&(u[t]=!0),t};s(p,d);var m=p.prototype=d.prototype;m.constructor=p;var h=m.toString,f="Symbol(test)"==String(d("test")),C=/^Symbol\((.*)\)[^)]+$/;l(m,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=h.call(e);if(a(u,e))return"";var n=f?t.slice(7,-1):t.replace(C,"$1");return""===n?undefined:n}}),o({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){"use strict";n(29)("asyncIterator")},function(e,t,n){"use strict";n(29)("hasInstance")},function(e,t,n){"use strict";n(29)("isConcatSpreadable")},function(e,t,n){"use strict";n(29)("iterator")},function(e,t,n){"use strict";n(29)("match")},function(e,t,n){"use strict";n(29)("replace")},function(e,t,n){"use strict";n(29)("search")},function(e,t,n){"use strict";n(29)("species")},function(e,t,n){"use strict";n(29)("split")},function(e,t,n){"use strict";n(29)("toPrimitive")},function(e,t,n){"use strict";n(29)("toStringTag")},function(e,t,n){"use strict";n(29)("unscopables")},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(59),a=n(8),c=n(16),l=n(12),s=n(56),d=n(74),u=n(75),p=n(13),m=n(113),h=p("isConcatSpreadable"),f=m>=51||!r((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),C=u("concat"),g=function(e){if(!a(e))return!1;var t=e[h];return t!==undefined?!!t:i(e)};o({target:"Array",proto:!0,forced:!f||!C},{concat:function(e){var t,n,o,r,i,a=c(this),u=d(a,0),p=0;for(t=-1,o=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(u,p++,i)}return u.length=p,u}})},function(e,t,n){"use strict";var o=n(4),r=n(157),i=n(47);o({target:"Array",proto:!0},{copyWithin:r}),i("copyWithin")},function(e,t,n){"use strict";var o=n(4),r=n(21).every,i=n(41),a=n(27),c=i("every"),l=a("every");o({target:"Array",proto:!0,forced:!c||!l},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(114),i=n(47);o({target:"Array",proto:!0},{fill:r}),i("fill")},function(e,t,n){"use strict";var o=n(4),r=n(21).filter,i=n(75),a=n(27),c=i("filter"),l=a("filter");o({target:"Array",proto:!0,forced:!c||!l},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(21).find,i=n(47),a=n(27),c=!0,l=a("find");"find"in[]&&Array(1).find((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),i("find")},function(e,t,n){"use strict";var o=n(4),r=n(21).findIndex,i=n(47),a=n(27),c=!0,l=a("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),i("findIndex")},function(e,t,n){"use strict";var o=n(4),r=n(158),i=n(16),a=n(12),c=n(33),l=n(74);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=i(this),n=a(t.length),o=l(t,0);return o.length=r(o,t,t,n,0,e===undefined?1:c(e)),o}})},function(e,t,n){"use strict";var o=n(4),r=n(158),i=n(16),a=n(12),c=n(34),l=n(74);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=i(this),o=a(n.length);return c(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var o=n(4),r=n(226);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(21).forEach,r=n(41),i=n(27),a=r("forEach"),c=i("forEach");e.exports=a&&c?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var o=n(4),r=n(228);o({target:"Array",stat:!0,forced:!n(87)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var o=n(55),r=n(16),i=n(159),a=n(115),c=n(12),l=n(56),s=n(116);e.exports=function(e){var t,n,d,u,p,m,h=r(e),f="function"==typeof this?this:Array,C=arguments.length,g=C>1?arguments[1]:undefined,N=g!==undefined,b=s(h),V=0;if(N&&(g=o(g,C>2?arguments[2]:undefined,2)),b==undefined||f==Array&&a(b))for(n=new f(t=c(h.length));t>V;V++)m=N?g(h[V],V):h[V],l(n,V,m);else for(p=(u=b.call(h)).next,n=new f;!(d=p.call(u)).done;V++)m=N?i(u,g,[d.value,V],!0):d.value,l(n,V,m);return n.length=V,n}},function(e,t,n){"use strict";var o=n(4),r=n(71).includes,i=n(47);o({target:"Array",proto:!0,forced:!n(27)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),i("includes")},function(e,t,n){"use strict";var o=n(4),r=n(71).indexOf,i=n(41),a=n(27),c=[].indexOf,l=!!c&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),d=a("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:l||!s||!d},{indexOf:function(e){return l?c.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";n(4)({target:"Array",stat:!0},{isArray:n(59)})},function(e,t,n){"use strict";var o=n(161).IteratorPrototype,r=n(45),i=n(53),a=n(46),c=n(76),l=function(){return this};e.exports=function(e,t,n){var s=t+" Iterator";return e.prototype=r(o,{next:i(1,n)}),a(e,s,!1,!0),c[s]=l,e}},function(e,t,n){"use strict";var o=n(4),r=n(68),i=n(28),a=n(41),c=[].join,l=r!=Object,s=a("join",",");o({target:"Array",proto:!0,forced:l||!s},{join:function(e){return c.call(i(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var o=n(4),r=n(163);o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var o=n(4),r=n(21).map,i=n(75),a=n(27),c=i("map"),l=a("map");o({target:"Array",proto:!0,forced:!c||!l},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(56);o({target:"Array",stat:!0,forced:r((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(4),r=n(88).left,i=n(41),a=n(27),c=i("reduce"),l=a("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(88).right,i=n(41),a=n(27),c=i("reduceRight"),l=a("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(59),a=n(44),c=n(12),l=n(28),s=n(56),d=n(13),u=n(75),p=n(27),m=u("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),f=d("species"),C=[].slice,g=Math.max;o({target:"Array",proto:!0,forced:!m||!h},{slice:function(e,t){var n,o,d,u=l(this),p=c(u.length),m=a(e,p),h=a(t===undefined?p:t,p);if(i(u)&&("function"!=typeof(n=u.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[f])&&(n=undefined):n=undefined,n===Array||n===undefined))return C.call(u,m,h);for(o=new(n===undefined?Array:n)(g(h-m,0)),d=0;m1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(34),i=n(16),a=n(5),c=n(41),l=[],s=l.sort,d=a((function(){l.sort(undefined)})),u=a((function(){l.sort(null)})),p=c("sort");o({target:"Array",proto:!0,forced:d||!u||!p},{sort:function(e){return e===undefined?s.call(i(this)):s.call(i(this),r(e))}})},function(e,t,n){"use strict";n(60)("Array")},function(e,t,n){"use strict";var o=n(4),r=n(44),i=n(33),a=n(12),c=n(16),l=n(74),s=n(56),d=n(75),u=n(27),p=d("splice"),m=u("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,f=Math.min;o({target:"Array",proto:!0,forced:!p||!m},{splice:function(e,t){var n,o,d,u,p,m,C=c(this),g=a(C.length),N=r(e,g),b=arguments.length;if(0===b?n=o=0:1===b?(n=0,o=g-N):(n=b-2,o=f(h(i(t),0),g-N)),g+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(d=l(C,o),u=0;ug-o+n;u--)delete C[u-1]}else if(n>o)for(u=g-o;u>N;u--)m=u+n-1,(p=u+o-1)in C?C[m]=C[p]:delete C[m];for(u=0;u>1,f=23===t?r(2,-24)-r(2,-77):0,C=e<0||0===e&&1/e<0?1:0,g=0;for((e=o(e))!=e||e===1/0?(s=e!=e?1:0,l=m):(l=i(a(e)/c),e*(d=r(2,-l))<1&&(l--,d*=2),(e+=l+h>=1?f/d:f*r(2,1-h))*d>=2&&(l++,d/=2),l+h>=m?(s=0,l=m):l+h>=1?(s=(e*d-1)*r(2,t),l+=h):(s=e*r(2,h-1)*r(2,t),l=0));t>=8;u[g++]=255&s,s/=256,t-=8);for(l=l<0;u[g++]=255&l,l/=256,p-=8);return u[--g]|=128*C,u},unpack:function(e,t){var n,o=e.length,i=8*o-t-1,a=(1<>1,l=i-7,s=o-1,d=e[s--],u=127&d;for(d>>=7;l>0;u=256*u+e[s],s--,l-=8);for(n=u&(1<<-l)-1,u>>=-l,l+=t;l>0;n=256*n+e[s],s--,l-=8);if(0===u)u=1-c;else{if(u===a)return n?NaN:d?-1/0:1/0;n+=r(2,t),u-=c}return(d?-1:1)*n*r(2,u-t)}}},function(e,t,n){"use strict";var o=n(4),r=n(11);o({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(89),a=n(10),c=n(44),l=n(12),s=n(48),d=i.ArrayBuffer,u=i.DataView,p=d.prototype.slice;o({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:r((function(){return!new d(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(p!==undefined&&t===undefined)return p.call(a(this),e);for(var n=a(this).byteLength,o=c(e,n),r=c(t===undefined?n:t,n),i=new(s(this,d))(l(r-o)),m=new u(this),h=new u(i),f=0;o9999?"+":"";return n+r(i(e),n?6:4,0)+"-"+r(this.getUTCMonth()+1,2,0)+"-"+r(this.getUTCDate(),2,0)+"T"+r(this.getUTCHours(),2,0)+":"+r(this.getUTCMinutes(),2,0)+":"+r(this.getUTCSeconds(),2,0)+"."+r(t,3,0)+"Z"}:l},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(16),a=n(36);o({target:"Date",proto:!0,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var o=n(32),r=n(256),i=n(13)("toPrimitive"),a=Date.prototype;i in a||o(a,i,r)},function(e,t,n){"use strict";var o=n(10),r=n(36);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!==e)}},function(e,t,n){"use strict";var o=n(26),r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&o(r,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){"use strict";n(4)({target:"Function",proto:!0},{bind:n(165)})},function(e,t,n){"use strict";var o=n(8),r=n(14),i=n(38),a=n(13)("hasInstance"),c=Function.prototype;a in c||r.f(c,a,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){"use strict";var o=n(9),r=n(14).f,i=Function.prototype,a=i.toString,c=/^\s*function ([^ (]*)/;o&&!("name"in i)&&r(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(6);n(46)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";var o=n(90),r=n(166);e.exports=o("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(167),i=Math.acosh,a=Math.log,c=Math.sqrt,l=Math.LN2;o({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?a(e)+l:r(e-1+c(e-1)*c(e+1))}})},function(e,t,n){"use strict";var o=n(4),r=Math.asinh,i=Math.log,a=Math.sqrt;o({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function c(e){return isFinite(e=+e)&&0!=e?e<0?-c(-e):i(e+a(e*e+1)):e}})},function(e,t,n){"use strict";var o=n(4),r=Math.atanh,i=Math.log;o({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:i((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var o=n(4),r=n(123),i=Math.abs,a=Math.pow;o({target:"Math",stat:!0},{cbrt:function(e){return r(e=+e)*a(i(e),1/3)}})},function(e,t,n){"use strict";var o=n(4),r=Math.floor,i=Math.log,a=Math.LOG2E;o({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-r(i(e+.5)*a):32}})},function(e,t,n){"use strict";var o=n(4),r=n(92),i=Math.cosh,a=Math.abs,c=Math.E;o({target:"Math",stat:!0,forced:!i||i(710)===Infinity},{cosh:function(e){var t=r(a(e)-1)+1;return(t+1/(t*c*c))*(c/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(92);o({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{fround:n(271)})},function(e,t,n){"use strict";var o=n(123),r=Math.abs,i=Math.pow,a=i(2,-52),c=i(2,-23),l=i(2,127)*(2-c),s=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=r(e),d=o(e);return il||n!=n?d*Infinity:d*n}},function(e,t,n){"use strict";var o=n(4),r=Math.hypot,i=Math.abs,a=Math.sqrt;o({target:"Math",stat:!0,forced:!!r&&r(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,o,r=0,c=0,l=arguments.length,s=0;c0?(o=n/s)*o:n;return s===Infinity?Infinity:s*a(r)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=Math.imul;o({target:"Math",stat:!0,forced:r((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(e,t){var n=+e,o=+t,r=65535&n,i=65535&o;return 0|r*i+((65535&n>>>16)*i+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){"use strict";var o=n(4),r=Math.log,i=Math.LOG10E;o({target:"Math",stat:!0},{log10:function(e){return r(e)*i}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log1p:n(167)})},function(e,t,n){"use strict";var o=n(4),r=Math.log,i=Math.LN2;o({target:"Math",stat:!0},{log2:function(e){return r(e)/i}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{sign:n(123)})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(92),a=Math.abs,c=Math.exp,l=Math.E;o({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(i(e)-i(-e))/2:(c(e-1)-c(-e-1))*(l/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(92),i=Math.exp;o({target:"Math",stat:!0},{tanh:function(e){var t=r(e=+e),n=r(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){"use strict";n(46)(Math,"Math",!0)},function(e,t,n){"use strict";var o=n(4),r=Math.ceil,i=Math.floor;o({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:r)(e)}})},function(e,t,n){"use strict";var o=n(9),r=n(6),i=n(72),a=n(26),c=n(19),l=n(35),s=n(91),d=n(36),u=n(5),p=n(45),m=n(54).f,h=n(22).f,f=n(14).f,C=n(62).trim,g=r.Number,N=g.prototype,b="Number"==l(p(N)),V=function(e){var t,n,o,r,i,a,c,l,s=d(e,!1);if("string"==typeof s&&s.length>2)if(43===(t=(s=C(s)).charCodeAt(0))||45===t){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+s}for(a=(i=s.slice(2)).length,c=0;cr)return NaN;return parseInt(i,o)}return+s};if(i("Number",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var v,x=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof x&&(b?u((function(){N.valueOf.call(n)})):"Number"!=l(n))?s(new g(V(t)),n,x):V(t)},y=o?m(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;y.length>k;k++)c(g,v=y[k])&&!c(x,v)&&f(x,v,h(g,v));x.prototype=N,N.constructor=x,a(r,"Number",x)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isFinite:n(285)})},function(e,t,n){"use strict";var o=n(6).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isInteger:n(168)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var o=n(4),r=n(168),i=Math.abs;o({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var o=n(4),r=n(292);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(6),r=n(62).trim,i=n(93),a=o.parseFloat,c=1/a(i+"-0")!=-Infinity;e.exports=c?function(e){var t=r(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){"use strict";var o=n(4),r=n(169);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o=n(4),r=n(33),i=n(295),a=n(122),c=n(5),l=1..toFixed,s=Math.floor,d=function u(e,t,n){return 0===t?n:t%2==1?u(e,t-1,n*e):u(e*e,t/2,n)};o({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){l.call({})}))},{toFixed:function(e){var t,n,o,c,l=i(this),u=r(e),p=[0,0,0,0,0,0],m="",h="0",f=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*p[n],p[n]=o%1e7,o=s(o/1e7)},C=function(e){for(var t=6,n=0;--t>=0;)n+=p[t],p[t]=s(n/e),n=n%e*1e7},g=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==p[e]){var n=String(p[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t};if(u<0||u>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(m="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*d(2,69,1))-69)<0?l*d(2,-t,1):l/d(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),o=u;o>=7;)f(1e7,0),o-=7;for(f(d(10,o,1),0),o=t-1;o>=23;)C(1<<23),o-=23;C(1<0?m+((c=h.length)<=u?"0."+a.call("0",u-c)+h:h.slice(0,c-u)+"."+h.slice(c-u)):m+h}})},function(e,t,n){"use strict";var o=n(35);e.exports=function(e){if("number"!=typeof e&&"Number"!=o(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var o=n(4),r=n(297);o({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(9),r=n(5),i=n(73),a=n(111),c=n(83),l=n(16),s=n(68),d=Object.assign,u=Object.defineProperty;e.exports=!d||r((function(){if(o&&1!==d({b:1},d(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var n=l(e),r=arguments.length,d=1,u=a.f,p=c.f;r>d;)for(var m,h=s(arguments[d++]),f=u?i(h).concat(u(h)):i(h),C=f.length,g=0;C>g;)m=f[g++],o&&!p.call(h,m)||(n[m]=h[m]);return n}:d},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0,sham:!n(9)},{create:n(45)})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(34),l=n(14);r&&o({target:"Object",proto:!0,forced:i},{__defineGetter__:function(e,t){l.f(a(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(9);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(153)})},function(e,t,n){"use strict";var o=n(4),r=n(9);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(14).f})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(34),l=n(14);r&&o({target:"Object",proto:!0,forced:i},{__defineSetter__:function(e,t){l.f(a(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(170).entries;o({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(78),i=n(5),a=n(8),c=n(58).onFreeze,l=Object.freeze;o({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!r},{freeze:function(e){return l&&a(e)?l(c(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(79),i=n(56);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){i(t,e,n)}),undefined,!0),t}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(28),a=n(22).f,c=n(9),l=r((function(){a(1)}));o({target:"Object",stat:!0,forced:!c||l,sham:!c},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(109),a=n(28),c=n(22),l=n(56);o({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,o=a(e),r=c.f,s=i(o),d={},u=0;s.length>u;)(n=r(o,t=s[u++]))!==undefined&&l(d,t,n);return d}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(155).f;o({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(16),a=n(38),c=n(119);o({target:"Object",stat:!0,forced:r((function(){a(1)})),sham:!c},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{is:n(171)})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(8),a=Object.isExtensible;o({target:"Object",stat:!0,forced:r((function(){a(1)}))},{isExtensible:function(e){return!!i(e)&&(!a||a(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(8),a=Object.isFrozen;o({target:"Object",stat:!0,forced:r((function(){a(1)}))},{isFrozen:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(8),a=Object.isSealed;o({target:"Object",stat:!0,forced:r((function(){a(1)}))},{isSealed:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(16),i=n(73);o({target:"Object",stat:!0,forced:n(5)((function(){i(1)}))},{keys:function(e){return i(r(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(36),l=n(38),s=n(22).f;r&&o({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(e){var t,n=a(this),o=c(e,!0);do{if(t=s(n,o))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(36),l=n(38),s=n(22).f;r&&o({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(e){var t,n=a(this),o=c(e,!0);do{if(t=s(n,o))return t.set}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(58).onFreeze,a=n(78),c=n(5),l=Object.preventExtensions;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!a},{preventExtensions:function(e){return l&&r(e)?l(i(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(58).onFreeze,a=n(78),c=n(5),l=Object.seal;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!a},{seal:function(e){return l&&r(e)?l(i(e)):e}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{setPrototypeOf:n(57)})},function(e,t,n){"use strict";var o=n(117),r=n(26),i=n(321);o||r(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var o=n(117),r=n(86);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(170).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(169);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o,r,i,a,c=n(4),l=n(40),s=n(6),d=n(39),u=n(172),p=n(26),m=n(77),h=n(46),f=n(60),C=n(8),g=n(34),N=n(61),b=n(35),V=n(107),v=n(79),x=n(87),y=n(48),k=n(124).set,w=n(174),_=n(175),B=n(325),S=n(176),L=n(326),A=n(37),E=n(72),I=n(13),D=n(113),T=I("species"),F="Promise",M=A.get,P=A.set,O=A.getterFor(F),R=u,j=s.TypeError,U=s.document,z=s.process,W=d("fetch"),H=S.f,K=H,Y="process"==b(z),G=!!(U&&U.createEvent&&s.dispatchEvent),q=E(F,(function(){if(!(V(R)!==String(R))){if(66===D)return!0;if(!Y&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!R.prototype["finally"])return!0;if(D>=51&&/native code/.test(R))return!1;var e=R.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[T]=t,!(e.then((function(){}))instanceof t)})),X=q||!x((function(e){R.all(e)["catch"]((function(){}))})),J=function(e){var t;return!(!C(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,n){if(!t.notified){t.notified=!0;var o=t.reactions;w((function(){for(var r=t.value,i=1==t.state,a=0;o.length>a;){var c,l,s,d=o[a++],u=i?d.ok:d.fail,p=d.resolve,m=d.reject,h=d.domain;try{u?(i||(2===t.rejection&&te(e,t),t.rejection=1),!0===u?c=r:(h&&h.enter(),c=u(r),h&&(h.exit(),s=!0)),c===d.promise?m(j("Promise-chain cycle")):(l=J(c))?l.call(c,p,m):p(c)):m(r)}catch(f){h&&!s&&h.exit(),m(f)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Q(e,t)}))}},Z=function(e,t,n){var o,r;G?((o=U.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),s.dispatchEvent(o)):o={promise:t,reason:n},(r=s["on"+e])?r(o):"unhandledrejection"===e&&B("Unhandled promise rejection",n)},Q=function(e,t){k.call(s,(function(){var n,o=t.value;if(ee(t)&&(n=L((function(){Y?z.emit("unhandledRejection",o,e):Z("unhandledrejection",e,o)})),t.rejection=Y||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){k.call(s,(function(){Y?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,n,o){return function(r){e(t,n,r,o)}},oe=function(e,t,n,o){t.done||(t.done=!0,o&&(t=o),t.value=n,t.state=2,$(e,t,!0))},re=function ie(e,t,n,o){if(!t.done){t.done=!0,o&&(t=o);try{if(e===n)throw j("Promise can't be resolved itself");var r=J(n);r?w((function(){var o={done:!1};try{r.call(n,ne(ie,e,o,t),ne(oe,e,o,t))}catch(i){oe(e,o,i,t)}})):(t.value=n,t.state=1,$(e,t,!1))}catch(i){oe(e,{done:!1},i,t)}}};q&&(R=function(e){N(this,R,F),g(e),o.call(this);var t=M(this);try{e(ne(re,this,t),ne(oe,this,t))}catch(n){oe(this,t,n)}},(o=function(e){P(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=m(R.prototype,{then:function(e,t){var n=O(this),o=H(y(this,R));return o.ok="function"!=typeof e||e,o.fail="function"==typeof t&&t,o.domain=Y?z.domain:undefined,n.parent=!0,n.reactions.push(o),0!=n.state&&$(this,n,!1),o.promise},"catch":function(e){return this.then(undefined,e)}}),r=function(){var e=new o,t=M(e);this.promise=e,this.resolve=ne(re,e,t),this.reject=ne(oe,e,t)},S.f=H=function(e){return e===R||e===i?new r(e):K(e)},l||"function"!=typeof u||(a=u.prototype.then,p(u.prototype,"then",(function(e,t){var n=this;return new R((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof W&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return _(R,W.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:R}),h(R,F,!1,!0),f(F),i=d(F),c({target:F,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(undefined,e),t.promise}}),c({target:F,stat:!0,forced:l||q},{resolve:function(e){return _(l&&this===i?R:this,e)}}),c({target:F,stat:!0,forced:X},{all:function(e){var t=this,n=H(t),o=n.resolve,r=n.reject,i=L((function(){var n=g(t.resolve),i=[],a=0,c=1;v(e,(function(e){var l=a++,s=!1;i.push(undefined),c++,n.call(t,e).then((function(e){s||(s=!0,i[l]=e,--c||o(i))}),r)})),--c||o(i)}));return i.error&&r(i.value),n.promise},race:function(e){var t=this,n=H(t),o=n.reject,r=L((function(){var r=g(t.resolve);v(e,(function(e){r.call(t,e).then(n.resolve,o)}))}));return r.error&&o(r.value),n.promise}})},function(e,t,n){"use strict";var o=n(6);e.exports=function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var o=n(4),r=n(40),i=n(172),a=n(5),c=n(39),l=n(48),s=n(175),d=n(26);o({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=l(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}}),r||"function"!=typeof i||i.prototype["finally"]||d(i.prototype,"finally",c("Promise").prototype["finally"])},function(e,t,n){"use strict";var o=n(4),r=n(39),i=n(34),a=n(10),c=n(5),l=r("Reflect","apply"),s=Function.apply;o({target:"Reflect",stat:!0,forced:!c((function(){l((function(){}))}))},{apply:function(e,t,n){return i(e),a(n),l?l(e,t,n):s.call(e,t,n)}})},function(e,t,n){"use strict";var o=n(4),r=n(39),i=n(34),a=n(10),c=n(8),l=n(45),s=n(165),d=n(5),u=r("Reflect","construct"),p=d((function(){function e(){}return!(u((function(){}),[],e)instanceof e)})),m=!d((function(){u((function(){}))})),h=p||m;o({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(m&&!p)return u(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(s.apply(e,o))}var r=n.prototype,d=l(c(r)?r:Object.prototype),h=Function.apply.call(e,d,t);return c(h)?h:d}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(10),a=n(36),c=n(14);o({target:"Reflect",stat:!0,forced:n(5)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(e,t,n){i(e);var o=a(t,!0);i(n);try{return c.f(e,o,n),!0}catch(r){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(22).f;o({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=i(r(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(10),a=n(19),c=n(22),l=n(38);o({target:"Reflect",stat:!0},{get:function s(e,t){var n,o,d=arguments.length<3?e:arguments[2];return i(e)===d?e[t]:(n=c.f(e,t))?a(n,"value")?n.value:n.get===undefined?undefined:n.get.call(d):r(o=l(e))?s(o,t,d):void 0}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(10),a=n(22);o({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return a.f(i(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(38);o({target:"Reflect",stat:!0,sham:!n(119)},{getPrototypeOf:function(e){return i(r(e))}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=Object.isExtensible;o({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),!i||i(e)}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{ownKeys:n(109)})},function(e,t,n){"use strict";var o=n(4),r=n(39),i=n(10);o({target:"Reflect",stat:!0,sham:!n(78)},{preventExtensions:function(e){i(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(8),a=n(19),c=n(5),l=n(14),s=n(22),d=n(38),u=n(53);o({target:"Reflect",stat:!0,forced:c((function(){var e=l.f({},"a",{configurable:!0});return!1!==Reflect.set(d(e),"a",1,e)}))},{set:function p(e,t,n){var o,c,m=arguments.length<4?e:arguments[3],h=s.f(r(e),t);if(!h){if(i(c=d(e)))return p(c,t,n,m);h=u(0)}if(a(h,"value")){if(!1===h.writable||!i(m))return!1;if(o=s.f(m,t)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,l.f(m,t,o)}else l.f(m,t,u(0,n));return!0}return h.set!==undefined&&(h.set.call(m,n),!0)}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(162),a=n(57);a&&o({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),i(t);try{return a(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(9),r=n(6),i=n(72),a=n(91),c=n(14).f,l=n(54).f,s=n(125),d=n(95),u=n(126),p=n(26),m=n(5),h=n(37).set,f=n(60),C=n(13)("match"),g=r.RegExp,N=g.prototype,b=/a/g,V=/a/g,v=new g(b)!==b,x=u.UNSUPPORTED_Y;if(o&&i("RegExp",!v||x||m((function(){return V[C]=!1,g(b)!=b||g(V)==V||"/a/i"!=g(b,"i")})))){for(var y=function(e,t){var n,o=this instanceof y,r=s(e),i=t===undefined;if(!o&&r&&e.constructor===y&&i)return e;v?r&&!i&&(e=e.source):e instanceof y&&(i&&(t=d.call(e)),e=e.source),x&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=a(v?new g(e,t):g(e,t),o?this:N,y);return x&&n&&h(c,{sticky:n}),c},k=function(e){e in y||c(y,e,{configurable:!0,get:function(){return g[e]},set:function(t){g[e]=t}})},w=l(g),_=0;w.length>_;)k(w[_++]);N.constructor=y,y.prototype=N,p(r,"RegExp",y)}f("RegExp")},function(e,t,n){"use strict";var o=n(9),r=n(14),i=n(95),a=n(126).UNSUPPORTED_Y;o&&("g"!=/./g.flags||a)&&r.f(RegExp.prototype,"flags",{configurable:!0,get:i})},function(e,t,n){"use strict";var o=n(26),r=n(10),i=n(5),a=n(95),c=RegExp.prototype,l=c.toString,s=i((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d="toString"!=l.name;(s||d)&&o(RegExp.prototype,"toString",(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===undefined&&e instanceof RegExp&&!("flags"in c)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var o=n(90),r=n(166);e.exports=o("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(127).codeAt;o({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o,r=n(4),i=n(22).f,a=n(12),c=n(128),l=n(25),s=n(129),d=n(40),u="".endsWith,p=Math.min,m=s("endsWith");r({target:"String",proto:!0,forced:!!(d||m||(o=i(String.prototype,"endsWith"),!o||o.writable))&&!m},{endsWith:function(e){var t=String(l(this));c(e);var n=arguments.length>1?arguments[1]:undefined,o=a(t.length),r=n===undefined?o:p(a(n),o),i=String(e);return u?u.call(t,i,r):t.slice(r-i.length,r)===i}})},function(e,t,n){"use strict";var o=n(4),r=n(44),i=String.fromCharCode,a=String.fromCodePoint;o({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var o=n(4),r=n(128),i=n(25);o({target:"String",proto:!0,forced:!n(129)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(r(e),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(127).charAt,r=n(37),i=n(118),a=r.set,c=r.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:undefined,done:!0}:(e=o(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(97),r=n(10),i=n(12),a=n(25),c=n(130),l=n(98);o("match",1,(function(e,t,n){return[function(t){var n=a(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var a=r(e),s=String(this);if(!a.global)return l(a,s);var d=a.unicode;a.lastIndex=0;for(var u,p=[],m=0;null!==(u=l(a,s));){var h=String(u[0]);p[m]=h,""===h&&(a.lastIndex=c(s,i(a.lastIndex),d)),m++}return 0===m?null:p}]}))},function(e,t,n){"use strict";var o=n(4),r=n(121).end;o({target:"String",proto:!0,forced:n(178)},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(121).start;o({target:"String",proto:!0,forced:n(178)},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(28),i=n(12);o({target:"String",stat:!0},{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],c=0;n>c;)a.push(String(t[c++])),c]*>)/g,f=/\$([$&'`]|\d\d?)/g;o("replace",2,(function(e,t,n,o){var C=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=o.REPLACE_KEEPS_$0,N=C?"$":"$0";return[function(n,o){var r=l(this),i=n==undefined?undefined:n[e];return i!==undefined?i.call(n,r,o):t.call(String(r),n,o)},function(e,o){if(!C&&g||"string"==typeof o&&-1===o.indexOf(N)){var i=n(t,e,this,o);if(i.done)return i.value}var l=r(e),m=String(this),h="function"==typeof o;h||(o=String(o));var f=l.global;if(f){var V=l.unicode;l.lastIndex=0}for(var v=[];;){var x=d(l,m);if(null===x)break;if(v.push(x),!f)break;""===String(x[0])&&(l.lastIndex=s(m,a(l.lastIndex),V))}for(var y,k="",w=0,_=0;_=w&&(k+=m.slice(w,S)+D,w=S+B.length)}return k+m.slice(w)}];function b(e,n,o,r,a,c){var l=o+e.length,s=r.length,d=f;return a!==undefined&&(a=i(a),d=h),t.call(c,d,(function(t,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,o);case"'":return n.slice(l);case"<":c=a[i.slice(1,-1)];break;default:var d=+i;if(0===d)return t;if(d>s){var u=m(d/10);return 0===u?t:u<=s?r[u-1]===undefined?i.charAt(1):r[u-1]+i.charAt(1):t}c=r[d-1]}return c===undefined?"":c}))}}))},function(e,t,n){"use strict";var o=n(97),r=n(10),i=n(25),a=n(171),c=n(98);o("search",1,(function(e,t,n){return[function(t){var n=i(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var i=r(e),l=String(this),s=i.lastIndex;a(s,0)||(i.lastIndex=0);var d=c(i,l);return a(i.lastIndex,s)||(i.lastIndex=s),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var o=n(97),r=n(125),i=n(10),a=n(25),c=n(48),l=n(130),s=n(12),d=n(98),u=n(96),p=n(5),m=[].push,h=Math.min,f=!p((function(){return!RegExp(4294967295,"y")}));o("split",2,(function(e,t,n){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var o=String(a(this)),i=n===undefined?4294967295:n>>>0;if(0===i)return[];if(e===undefined)return[o];if(!r(e))return t.call(o,e,i);for(var c,l,s,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,f=new RegExp(e.source,p+"g");(c=u.call(f,o))&&!((l=f.lastIndex)>h&&(d.push(o.slice(h,c.index)),c.length>1&&c.index=i));)f.lastIndex===c.index&&f.lastIndex++;return h===o.length?!s&&f.test("")||d.push(""):d.push(o.slice(h)),d.length>i?d.slice(0,i):d}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=a(this),i=t==undefined?undefined:t[e];return i!==undefined?i.call(t,r,n):o.call(String(r),t,n)},function(e,r){var a=n(o,e,this,r,o!==t);if(a.done)return a.value;var u=i(e),p=String(this),m=c(u,RegExp),C=u.unicode,g=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(f?"y":"g"),N=new m(f?u:"^(?:"+u.source+")",g),b=r===undefined?4294967295:r>>>0;if(0===b)return[];if(0===p.length)return null===d(N,p)?[p]:[];for(var V=0,v=0,x=[];v1?arguments[1]:undefined,t.length)),o=String(e);return u?u.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";var o=n(4),r=n(62).trim;o({target:"String",proto:!0,forced:n(131)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";var o=n(4),r=n(62).end,i=n(131)("trimEnd"),a=i?function(){return r(this)}:"".trimEnd;o({target:"String",proto:!0,forced:i},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var o=n(4),r=n(62).start,i=n(131)("trimStart"),a=i?function(){return r(this)}:"".trimStart;o({target:"String",proto:!0,forced:i},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(42)("Float32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(33);e.exports=function(e){var t=o(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(42)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(42)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(11),r=n(157),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return r.call(i(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).every,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(114),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){return r.apply(i(this),arguments)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).filter,i=n(48),a=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("filter",(function(e){for(var t=r(a(this),e,arguments.length>1?arguments[1]:undefined),n=i(this,this.constructor),o=0,l=t.length,s=new(c(n))(l);l>o;)s[o]=t[o++];return s}))},function(e,t,n){"use strict";var o=n(11),r=n(21).find,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).findIndex,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).forEach,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function(e){r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(132);(0,n(11).exportTypedArrayStaticMethod)("from",n(180),o)},function(e,t,n){"use strict";var o=n(11),r=n(71).includes,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(71).indexOf,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(6),r=n(11),i=n(160),a=n(13)("iterator"),c=o.Uint8Array,l=i.values,s=i.keys,d=i.entries,u=r.aTypedArray,p=r.exportTypedArrayMethod,m=c&&c.prototype[a],h=!!m&&("values"==m.name||m.name==undefined),f=function(){return l.call(u(this))};p("entries",(function(){return d.call(u(this))})),p("keys",(function(){return s.call(u(this))})),p("values",f,!h),p(a,f,!h)},function(e,t,n){"use strict";var o=n(11),r=o.aTypedArray,i=o.exportTypedArrayMethod,a=[].join;i("join",(function(e){return a.apply(r(this),arguments)}))},function(e,t,n){"use strict";var o=n(11),r=n(163),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){return r.apply(i(this),arguments)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).map,i=n(48),a=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("map",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(c(i(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var o=n(11),r=n(132),i=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(i(this))(t);t>e;)n[e]=arguments[e++];return n}),r)},function(e,t,n){"use strict";var o=n(11),r=n(88).left,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function(e){return r(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(88).right,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function(e){return r(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=o.aTypedArray,i=o.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=r(this).length,n=a(t/2),o=0;o1?arguments[1]:undefined,1),n=this.length,o=a(e),c=r(o.length),s=0;if(c+t>n)throw RangeError("Wrong length");for(;si;)d[i]=n[i++];return d}),i((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var o=n(11),r=n(21).some,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=o.aTypedArray,i=o.exportTypedArrayMethod,a=[].sort;i("sort",(function(e){return a.call(r(this),e)}))},function(e,t,n){"use strict";var o=n(11),r=n(12),i=n(44),a=n(48),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),o=n.length,l=i(e,o);return new(a(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((t===undefined?o:i(t,o))-l))}))},function(e,t,n){"use strict";var o=n(6),r=n(11),i=n(5),a=o.Int8Array,c=r.aTypedArray,l=r.exportTypedArrayMethod,s=[].toLocaleString,d=[].slice,u=!!a&&i((function(){s.call(new a(1))}));l("toLocaleString",(function(){return s.apply(u?d.call(c(this)):c(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var o=n(11).exportTypedArrayMethod,r=n(5),i=n(6).Uint8Array,a=i&&i.prototype||{},c=[].toString,l=[].join;r((function(){c.call({})}))&&(c=function(){return l.call(this)});var s=a.toString!=c;o("toString",c,s)},function(e,t,n){"use strict";var o,r=n(6),i=n(77),a=n(58),c=n(90),l=n(181),s=n(8),d=n(37).enforce,u=n(148),p=!r.ActiveXObject&&"ActiveXObject"in r,m=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},f=e.exports=c("WeakMap",h,l);if(u&&p){o=l.getConstructor(h,"WeakMap",!0),a.REQUIRED=!0;var C=f.prototype,g=C["delete"],N=C.has,b=C.get,V=C.set;i(C,{"delete":function(e){if(s(e)&&!m(e)){var t=d(this);return t.frozen||(t.frozen=new o),g.call(this,e)||t.frozen["delete"](e)}return g.call(this,e)},has:function(e){if(s(e)&&!m(e)){var t=d(this);return t.frozen||(t.frozen=new o),N.call(this,e)||t.frozen.has(e)}return N.call(this,e)},get:function(e){if(s(e)&&!m(e)){var t=d(this);return t.frozen||(t.frozen=new o),N.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(s(e)&&!m(e)){var n=d(this);n.frozen||(n.frozen=new o),N.call(this,e)?V.call(this,e,t):n.frozen.set(e,t)}else V.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(90)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(181))},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(124);o({global:!0,bind:!0,enumerable:!0,forced:!r.setImmediate||!r.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(174),a=n(35),c=r.process,l="process"==a(c);o({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=l&&c.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(85),a=[].slice,c=function(e){return function(t,n){var o=arguments.length>2,r=o?a.call(arguments,2):undefined;return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};o({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t._CI=Se,t._HI=P,t._M=Le,t._MCCC=De,t._ME=Ee,t._MFCC=Te,t._MP=_e,t._MR=Ne,t.__render=Re,t.createComponentVNode=function(e,t,n,o,r){var a=new L(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),o,function(e,t,n){var o=(32768&e?t.render:t).defaultProps;if(i(o))return n;if(i(n))return d(o,null);return B(n,o)}(e,t,n),function(e,t,n){if(4&e)return n;var o=(32768&e?t.render:t).defaultHooks;if(i(o))return n;if(i(n))return o;return B(n,o)}(e,t,r),t);k.createVNode&&k.createVNode(a);return a},t.createFragment=I,t.createPortal=function(e,t){var n=P(e);return A(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,o,r){e||(e=t),je(n,e,o,r)}},t.createTextVNode=E,t.createVNode=A,t.directClone=D,t.findDOMfromVNode=b,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(c(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&i(e.children)&&M(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?d(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.render=je,t.rerender=Ye,t.version=t.options=t.Fragment=t.EMPTY_OBJ=t.Component=void 0;var o=Array.isArray;function r(e){var t=typeof e;return"string"===t||"number"===t}function i(e){return null==e}function a(e){return null===e||!1===e||!0===e||void 0===e}function c(e){return"function"==typeof e}function l(e){return"string"==typeof e}function s(e){return null===e}function d(e,t){var n={};if(e)for(var o in e)n[o]=e[o];if(t)for(var r in t)n[r]=t[r];return n}function u(e){return!s(e)&&"object"==typeof e}var p={};t.EMPTY_OBJ=p;function m(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function f(e,t,n){s(n)?h(e,t):e.insertBefore(t,n)}function C(e,t){e.removeChild(t)}function g(e){for(var t=0;t0,h=s(p),f=l(p)&&"$"===p[0];m||h||f?(n=n||t.slice(0,d),(m||f)&&(u=D(u)),(h||f)&&(u.key="$"+d),n.push(u)):n&&n.push(u),u.flags|=65536}}i=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=D(t)),i=2;return e.children=n,e.childFlags=i,e}function P(e){return a(e)||r(e)?E(e,null):o(e)?I(e,0,null):16384&e.flags?D(e):e}var O="http://www.w3.org/1999/xlink",R="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":O,"xlink:arcrole":O,"xlink:href":O,"xlink:role":O,"xlink:show":O,"xlink:title":O,"xlink:type":O,"xml:base":R,"xml:lang":R,"xml:space":R};function U(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=U(0),W=U(null),H=U(!0);function K(e,t){var n=t.$EV;return n||(n=t.$EV=U(null)),n[e]||1==++z[e]&&(W[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?G(t,!0,e,$(t)):t.stopPropagation()}}(e):function(e){return function(t){G(t,!1,e,$(t))}}(e);return document.addEventListener(m(e),t),t}(e)),n}function Y(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(m(e),W[e]),W[e]=null),n[e]=null)}function G(e,t,n,o){var r=function(e){return c(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&r.disabled)return;var i=r.$EV;if(i){var a=i[n];if(a&&(o.dom=r,a.event?a.event(a.data,e):a(e),e.cancelBubble))return}r=r.parentNode}while(!s(r))}function q(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function X(){return this.defaultPrevented}function J(){return this.cancelBubble}function $(e){var t={dom:document};return e.isDefaultPrevented=X,e.isPropagationStopped=J,e.stopPropagation=q,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function Z(e,t,n){if(e[t]){var o=e[t];o.event?o.event(o.data,n):o(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function Q(e,t){var n=function(n){var o=this.$V;if(o){var r=o.props||p,i=o.dom;if(l(e))Z(r,e,n);else for(var a=0;a-1&&t.options[a]&&(c=t.options[a].value),n&&i(c)&&(c=e.defaultValue),ae(o,c)}}var se,de,ue=Q("onInput",me),pe=Q("onChange");function me(e,t,n){var o=e.value,r=t.value;if(i(o)){if(n){var a=e.defaultValue;i(a)||a===r||(t.defaultValue=a,t.value=a)}}else r!==o&&(t.defaultValue=o,t.value=o)}function he(e,t,n,o,r,i){64&e?ie(o,n):256&e?le(o,n,r,t):128&e&&me(o,n,r),i&&(n.$V=t)}function fe(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",oe),ee(e,"click",re)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ce)}(t):128&e&&function(e,t){ee(e,"input",ue),t.onChange&&ee(e,"change",pe)}(t,n)}function Ce(e){return e.type&&te(e.type)?!i(e.checked):!i(e.value)}function ge(e){e&&!S(e,null)&&e.current&&(e.current=null)}function Ne(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){S(e,t)||void 0===e.current||(e.current=t)}))}function be(e,t){Ve(e),V(e,t)}function Ve(e){var t,n=e.flags,o=e.children;if(481&n){t=e.ref;var r=e.props;ge(t);var a=e.childFlags;if(!s(r))for(var l=Object.keys(r),d=0,u=l.length;d0;for(var c in a&&(i=Ce(n))&&fe(t,o,n),n)we(c,null,n[c],o,r,i,null);a&&he(t,e,o,n,!0,i)}function Be(e,t,n){var o=P(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=d(n,e.getChildContext())),e.$CX=r,o}function Se(e,t,n,o,r,i){var a=new t(n,o),l=a.$N=Boolean(t.getDerivedStateFromProps||a.getSnapshotBeforeUpdate);if(a.$SVG=r,a.$L=i,e.children=a,a.$BS=!1,a.context=o,a.props===p&&(a.props=n),l)a.state=x(a,n,a.state);else if(c(a.componentWillMount)){a.$BR=!0,a.componentWillMount();var d=a.$PS;if(!s(d)){var u=a.state;if(s(u))a.state=d;else for(var m in d)u[m]=d[m];a.$PS=null}a.$BR=!1}return a.$LI=Be(a,n,o),a}function Le(e,t,n,o,r,i){var a=e.flags|=16384;481&a?Ee(e,t,n,o,r,i):4&a?function(e,t,n,o,r,i){var a=Se(e,e.type,e.props||p,n,o,i);Le(a.$LI,t,a.$CX,o,r,i),De(e.ref,a,i)}(e,t,n,o,r,i):8&a?(!function(e,t,n,o,r,i){Le(e.children=P(function(e,t){return 32768&e.flags?e.type.render(e.props||p,e.ref,t):e.type(e.props||p,t)}(e,n)),t,n,o,r,i)}(e,t,n,o,r,i),Te(e,i)):512&a||16&a?Ae(e,t,r):8192&a?function(e,t,n,o,r,i){var a=e.children,c=e.childFlags;12&c&&0===a.length&&(c=e.childFlags=2,a=e.children=T());2===c?Le(a,n,r,o,r,i):Ie(a,n,t,o,r,i)}(e,n,t,o,r,i):1024&a&&function(e,t,n,o,r){Le(e.children,e.ref,t,!1,null,r);var i=T();Ae(i,n,o),e.dom=i.dom}(e,n,t,r,i)}function Ae(e,t,n){var o=e.dom=document.createTextNode(e.children);s(t)||f(t,o,n)}function Ee(e,t,n,o,r,a){var c=e.flags,l=e.props,d=e.className,u=e.children,p=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(i(d)||""===d||(o?m.setAttribute("class",d):m.className=d),16===p)w(m,u);else if(1!==p){var h=o&&"foreignObject"!==e.type;2===p?(16384&u.flags&&(e.children=u=D(u)),Le(u,m,n,h,null,a)):8!==p&&4!==p||Ie(u,m,n,h,null,a)}s(t)||f(t,m,r),s(l)||_e(e,c,l,m,o),Ne(e.ref,m,a)}function Ie(e,t,n,o,r,i){for(var a=0;a0,s!==d){var h=s||p;if((c=d||p)!==p)for(var f in(u=(448&r)>0)&&(m=Ce(c)),c){var C=h[f],g=c[f];C!==g&&we(f,C,g,l,o,m,e)}if(h!==p)for(var N in h)i(c[N])&&!i(h[N])&&we(N,h[N],null,l,o,m,e)}var b=t.children,V=t.className;e.className!==V&&(i(V)?l.removeAttribute("class"):o?l.setAttribute("class",V):l.className=V);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,b):Me(e.childFlags,t.childFlags,e.children,b,l,n,o&&"foreignObject"!==t.type,null,e,a);u&&he(r,t,l,c,!1,m);var v=t.ref,x=e.ref;x!==v&&(ge(x),Ne(v,l,a))}(e,t,o,r,m,u):4&m?function(e,t,n,o,r,i,a){var l=t.children=e.children;if(s(l))return;l.$L=a;var u=t.props||p,m=t.ref,h=e.ref,f=l.state;if(!l.$N){if(c(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(u,o),l.$UN)return;l.$BR=!1}s(l.$PS)||(f=d(f,l.$PS),l.$PS=null)}Pe(l,f,u,n,o,r,!1,i,a),h!==m&&(ge(h),Ne(m,l,a))}(e,t,n,o,r,l,u):8&m?function(e,t,n,o,r,a,l){var s=!0,d=t.props||p,u=t.ref,m=e.props,h=!i(u),f=e.children;h&&c(u.onComponentShouldUpdate)&&(s=u.onComponentShouldUpdate(m,d));if(!1!==s){h&&c(u.onComponentWillUpdate)&&u.onComponentWillUpdate(m,d);var C=t.type,g=P(32768&t.flags?C.render(d,u,o):C(d,o));Fe(f,g,n,o,r,a,l),t.children=g,h&&c(u.onComponentDidUpdate)&&u.onComponentDidUpdate(m,d)}else t.children=f}(e,t,n,o,r,l,u):16&m?function(e,t){var n=t.children,o=t.dom=e.dom;n!==e.children&&(o.nodeValue=n)}(e,t):512&m?t.dom=e.dom:8192&m?function(e,t,n,o,r,i){var a=e.children,c=t.children,l=e.childFlags,s=t.childFlags,d=null;12&s&&0===c.length&&(s=t.childFlags=2,c=t.children=T());var u=0!=(2&s);if(12&l){var p=a.length;(8&l&&8&s||u||!u&&c.length>p)&&(d=b(a[p-1],!1).nextSibling)}Me(l,s,a,c,n,o,r,d,e,i)}(e,t,n,o,r,u):function(e,t,n,o){var r=e.ref,i=t.ref,c=t.children;if(Me(e.childFlags,t.childFlags,e.children,c,r,n,!1,null,e,o),t.dom=e.dom,r!==i&&!a(c)){var l=c.dom;C(r,l),h(i,l)}}(e,t,o,u)}function Me(e,t,n,o,r,i,a,c,l,s){switch(e){case 2:switch(t){case 2:Fe(n,o,r,i,a,c,s);break;case 1:be(n,r);break;case 16:Ve(n),w(r,o);break;default:!function(e,t,n,o,r,i){Ve(e),Ie(t,n,o,r,b(e,!0),i),V(e,n)}(n,o,r,i,a,s)}break;case 1:switch(t){case 2:Le(o,r,i,a,c,s);break;case 1:break;case 16:w(r,o);break;default:Ie(o,r,i,a,c,s)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:w(n,t))}(n,o,r);break;case 2:xe(r),Le(o,r,i,a,c,s);break;case 1:xe(r);break;default:xe(r),Ie(o,r,i,a,c,s)}break;default:switch(t){case 16:ve(n),w(r,o);break;case 2:ye(r,l,n),Le(o,r,i,a,c,s);break;case 1:ye(r,l,n);break;default:var d=0|n.length,u=0|o.length;0===d?u>0&&Ie(o,r,i,a,c,s):0===u?ye(r,l,n):8===t&&8===e?function(e,t,n,o,r,i,a,c,l,s){var d,u,p=i-1,m=a-1,h=0,f=e[h],C=t[h];e:{for(;f.key===C.key;){if(16384&C.flags&&(t[h]=C=D(C)),Fe(f,C,n,o,r,c,s),e[h]=C,++h>p||h>m)break e;f=e[h],C=t[h]}for(f=e[p],C=t[m];f.key===C.key;){if(16384&C.flags&&(t[m]=C=D(C)),Fe(f,C,n,o,r,c,s),e[p]=C,p--,m--,h>p||h>m)break e;f=e[p],C=t[m]}}if(h>p){if(h<=m)for(u=(d=m+1)m)for(;h<=p;)be(e[h++],n);else!function(e,t,n,o,r,i,a,c,l,s,d,u,p){var m,h,f,C=0,g=c,N=c,V=i-c+1,x=a-c+1,y=new Int32Array(x+1),k=V===o,w=!1,_=0,B=0;if(r<4||(V|x)<32)for(C=g;C<=i;++C)if(m=e[C],Bc?w=!0:_=c,16384&h.flags&&(t[c]=h=D(h)),Fe(m,h,l,n,s,d,p),++B;break}!k&&c>a&&be(m,l)}else k||be(m,l);else{var S={};for(C=N;C<=a;++C)S[t[C].key]=C;for(C=g;C<=i;++C)if(m=e[C],Bg;)be(e[g++],l);y[c-N]=C+1,_>c?w=!0:_=c,16384&(h=t[c]).flags&&(t[c]=h=D(h)),Fe(m,h,l,n,s,d,p),++B}else k||be(m,l);else k||be(m,l)}if(k)ye(l,u,e),Ie(t,l,n,s,d,p);else if(w){var L=function(e){var t=0,n=0,o=0,r=0,i=0,a=0,c=0,l=e.length;l>Oe&&(Oe=l,se=new Int32Array(l),de=new Int32Array(l));for(;n>1]]0&&(de[n]=se[i-1]),se[i]=n)}i=r+1;var s=new Int32Array(i);a=se[i-1];for(;i-- >0;)s[i]=a,a=de[a],se[i]=0;return s}(y);for(c=L.length-1,C=x-1;C>=0;C--)0===y[C]?(16384&(h=t[_=C+N]).flags&&(t[_]=h=D(h)),Le(h,l,n,s,(f=_+1)=0;C--)0===y[C]&&(16384&(h=t[_=C+N]).flags&&(t[_]=h=D(h)),Le(h,l,n,s,(f=_+1)a?a:i,p=0;pa)for(p=u;pi;)r.push(arguments[i++]);if(o=t,(m(t)||e!==undefined)&&!ie(e))return p(t)||(t=function(e,t){if("function"==typeof o&&(t=o.call(this,e,t)),!ie(t))return t}),r[1]=t,K.apply(null,r)}});H.prototype[j]||B(H.prototype,j,H.prototype.valueOf),M(H,"Symbol"),I[R]=!0},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(6),a=n(19),c=n(8),l=n(14).f,s=n(149),d=i.Symbol;if(r&&"function"==typeof d&&(!("description"in d.prototype)||d().description!==undefined)){var u={},p=function(){var e=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]),t=this instanceof p?new d(e):e===undefined?d():d(e);return""===e&&(u[t]=!0),t};s(p,d);var m=p.prototype=d.prototype;m.constructor=p;var h=m.toString,f="Symbol(test)"==String(d("test")),C=/^Symbol\((.*)\)[^)]+$/;l(m,"description",{configurable:!0,get:function(){var e=c(this)?this.valueOf():this,t=h.call(e);if(a(u,e))return"";var n=f?t.slice(7,-1):t.replace(C,"$1");return""===n?undefined:n}}),o({global:!0,forced:!0},{Symbol:p})}},function(e,t,n){"use strict";n(29)("asyncIterator")},function(e,t,n){"use strict";n(29)("hasInstance")},function(e,t,n){"use strict";n(29)("isConcatSpreadable")},function(e,t,n){"use strict";n(29)("iterator")},function(e,t,n){"use strict";n(29)("match")},function(e,t,n){"use strict";n(29)("replace")},function(e,t,n){"use strict";n(29)("search")},function(e,t,n){"use strict";n(29)("species")},function(e,t,n){"use strict";n(29)("split")},function(e,t,n){"use strict";n(29)("toPrimitive")},function(e,t,n){"use strict";n(29)("toStringTag")},function(e,t,n){"use strict";n(29)("unscopables")},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(60),a=n(8),c=n(16),l=n(12),s=n(57),d=n(74),u=n(75),p=n(13),m=n(115),h=p("isConcatSpreadable"),f=m>=51||!r((function(){var e=[];return e[h]=!1,e.concat()[0]!==e})),C=u("concat"),g=function(e){if(!a(e))return!1;var t=e[h];return t!==undefined?!!t:i(e)};o({target:"Array",proto:!0,forced:!f||!C},{concat:function(e){var t,n,o,r,i,a=c(this),u=d(a,0),p=0;for(t=-1,o=arguments.length;t9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");s(u,p++,i)}return u.length=p,u}})},function(e,t,n){"use strict";var o=n(4),r=n(157),i=n(48);o({target:"Array",proto:!0},{copyWithin:r}),i("copyWithin")},function(e,t,n){"use strict";var o=n(4),r=n(21).every,i=n(41),a=n(27),c=i("every"),l=a("every");o({target:"Array",proto:!0,forced:!c||!l},{every:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(116),i=n(48);o({target:"Array",proto:!0},{fill:r}),i("fill")},function(e,t,n){"use strict";var o=n(4),r=n(21).filter,i=n(75),a=n(27),c=i("filter"),l=a("filter");o({target:"Array",proto:!0,forced:!c||!l},{filter:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(21).find,i=n(48),a=n(27),c=!0,l=a("find");"find"in[]&&Array(1).find((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{find:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),i("find")},function(e,t,n){"use strict";var o=n(4),r=n(21).findIndex,i=n(48),a=n(27),c=!0,l=a("findIndex");"findIndex"in[]&&Array(1).findIndex((function(){c=!1})),o({target:"Array",proto:!0,forced:c||!l},{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),i("findIndex")},function(e,t,n){"use strict";var o=n(4),r=n(158),i=n(16),a=n(12),c=n(33),l=n(74);o({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:undefined,t=i(this),n=a(t.length),o=l(t,0);return o.length=r(o,t,t,n,0,e===undefined?1:c(e)),o}})},function(e,t,n){"use strict";var o=n(4),r=n(158),i=n(16),a=n(12),c=n(34),l=n(74);o({target:"Array",proto:!0},{flatMap:function(e){var t,n=i(this),o=a(n.length);return c(e),(t=l(n,0)).length=r(t,n,n,o,0,1,e,arguments.length>1?arguments[1]:undefined),t}})},function(e,t,n){"use strict";var o=n(4),r=n(226);o({target:"Array",proto:!0,forced:[].forEach!=r},{forEach:r})},function(e,t,n){"use strict";var o=n(21).forEach,r=n(41),i=n(27),a=r("forEach"),c=i("forEach");e.exports=a&&c?[].forEach:function(e){return o(this,e,arguments.length>1?arguments[1]:undefined)}},function(e,t,n){"use strict";var o=n(4),r=n(228);o({target:"Array",stat:!0,forced:!n(87)((function(e){Array.from(e)}))},{from:r})},function(e,t,n){"use strict";var o=n(56),r=n(16),i=n(159),a=n(117),c=n(12),l=n(57),s=n(118);e.exports=function(e){var t,n,d,u,p,m,h=r(e),f="function"==typeof this?this:Array,C=arguments.length,g=C>1?arguments[1]:undefined,N=g!==undefined,b=s(h),V=0;if(N&&(g=o(g,C>2?arguments[2]:undefined,2)),b==undefined||f==Array&&a(b))for(n=new f(t=c(h.length));t>V;V++)m=N?g(h[V],V):h[V],l(n,V,m);else for(p=(u=b.call(h)).next,n=new f;!(d=p.call(u)).done;V++)m=N?i(u,g,[d.value,V],!0):d.value,l(n,V,m);return n.length=V,n}},function(e,t,n){"use strict";var o=n(4),r=n(71).includes,i=n(48);o({target:"Array",proto:!0,forced:!n(27)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}}),i("includes")},function(e,t,n){"use strict";var o=n(4),r=n(71).indexOf,i=n(41),a=n(27),c=[].indexOf,l=!!c&&1/[1].indexOf(1,-0)<0,s=i("indexOf"),d=a("indexOf",{ACCESSORS:!0,1:0});o({target:"Array",proto:!0,forced:l||!s||!d},{indexOf:function(e){return l?c.apply(this,arguments)||0:r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";n(4)({target:"Array",stat:!0},{isArray:n(60)})},function(e,t,n){"use strict";var o=n(161).IteratorPrototype,r=n(46),i=n(54),a=n(47),c=n(76),l=function(){return this};e.exports=function(e,t,n){var s=t+" Iterator";return e.prototype=r(o,{next:i(1,n)}),a(e,s,!1,!0),c[s]=l,e}},function(e,t,n){"use strict";var o=n(4),r=n(68),i=n(28),a=n(41),c=[].join,l=r!=Object,s=a("join",",");o({target:"Array",proto:!0,forced:l||!s},{join:function(e){return c.call(i(this),e===undefined?",":e)}})},function(e,t,n){"use strict";var o=n(4),r=n(163);o({target:"Array",proto:!0,forced:r!==[].lastIndexOf},{lastIndexOf:r})},function(e,t,n){"use strict";var o=n(4),r=n(21).map,i=n(75),a=n(27),c=i("map"),l=a("map");o({target:"Array",proto:!0,forced:!c||!l},{map:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(57);o({target:"Array",stat:!0,forced:r((function(){function e(){}return!(Array.of.call(e)instanceof e)}))},{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)i(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(4),r=n(88).left,i=n(41),a=n(27),c=i("reduce"),l=a("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduce:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(88).right,i=n(41),a=n(27),c=i("reduceRight"),l=a("reduce",{1:0});o({target:"Array",proto:!0,forced:!c||!l},{reduceRight:function(e){return r(this,e,arguments.length,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(60),a=n(45),c=n(12),l=n(28),s=n(57),d=n(13),u=n(75),p=n(27),m=u("slice"),h=p("slice",{ACCESSORS:!0,0:0,1:2}),f=d("species"),C=[].slice,g=Math.max;o({target:"Array",proto:!0,forced:!m||!h},{slice:function(e,t){var n,o,d,u=l(this),p=c(u.length),m=a(e,p),h=a(t===undefined?p:t,p);if(i(u)&&("function"!=typeof(n=u.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[f])&&(n=undefined):n=undefined,n===Array||n===undefined))return C.call(u,m,h);for(o=new(n===undefined?Array:n)(g(h-m,0)),d=0;m1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(34),i=n(16),a=n(5),c=n(41),l=[],s=l.sort,d=a((function(){l.sort(undefined)})),u=a((function(){l.sort(null)})),p=c("sort");o({target:"Array",proto:!0,forced:d||!u||!p},{sort:function(e){return e===undefined?s.call(i(this)):s.call(i(this),r(e))}})},function(e,t,n){"use strict";n(61)("Array")},function(e,t,n){"use strict";var o=n(4),r=n(45),i=n(33),a=n(12),c=n(16),l=n(74),s=n(57),d=n(75),u=n(27),p=d("splice"),m=u("splice",{ACCESSORS:!0,0:0,1:2}),h=Math.max,f=Math.min;o({target:"Array",proto:!0,forced:!p||!m},{splice:function(e,t){var n,o,d,u,p,m,C=c(this),g=a(C.length),N=r(e,g),b=arguments.length;if(0===b?n=o=0:1===b?(n=0,o=g-N):(n=b-2,o=f(h(i(t),0),g-N)),g+n-o>9007199254740991)throw TypeError("Maximum allowed length exceeded");for(d=l(C,o),u=0;ug-o+n;u--)delete C[u-1]}else if(n>o)for(u=g-o;u>N;u--)m=u+n-1,(p=u+o-1)in C?C[m]=C[p]:delete C[m];for(u=0;u>1,f=23===t?r(2,-24)-r(2,-77):0,C=e<0||0===e&&1/e<0?1:0,g=0;for((e=o(e))!=e||e===1/0?(s=e!=e?1:0,l=m):(l=i(a(e)/c),e*(d=r(2,-l))<1&&(l--,d*=2),(e+=l+h>=1?f/d:f*r(2,1-h))*d>=2&&(l++,d/=2),l+h>=m?(s=0,l=m):l+h>=1?(s=(e*d-1)*r(2,t),l+=h):(s=e*r(2,h-1)*r(2,t),l=0));t>=8;u[g++]=255&s,s/=256,t-=8);for(l=l<0;u[g++]=255&l,l/=256,p-=8);return u[--g]|=128*C,u},unpack:function(e,t){var n,o=e.length,i=8*o-t-1,a=(1<>1,l=i-7,s=o-1,d=e[s--],u=127&d;for(d>>=7;l>0;u=256*u+e[s],s--,l-=8);for(n=u&(1<<-l)-1,u>>=-l,l+=t;l>0;n=256*n+e[s],s--,l-=8);if(0===u)u=1-c;else{if(u===a)return n?NaN:d?-1/0:1/0;n+=r(2,t),u-=c}return(d?-1:1)*n*r(2,u-t)}}},function(e,t,n){"use strict";var o=n(4),r=n(11);o({target:"ArrayBuffer",stat:!0,forced:!r.NATIVE_ARRAY_BUFFER_VIEWS},{isView:r.isView})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(89),a=n(10),c=n(45),l=n(12),s=n(49),d=i.ArrayBuffer,u=i.DataView,p=d.prototype.slice;o({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:r((function(){return!new d(2).slice(1,undefined).byteLength}))},{slice:function(e,t){if(p!==undefined&&t===undefined)return p.call(a(this),e);for(var n=a(this).byteLength,o=c(e,n),r=c(t===undefined?n:t,n),i=new(s(this,d))(l(r-o)),m=new u(this),h=new u(i),f=0;o9999?"+":"";return n+r(i(e),n?6:4,0)+"-"+r(this.getUTCMonth()+1,2,0)+"-"+r(this.getUTCDate(),2,0)+"T"+r(this.getUTCHours(),2,0)+":"+r(this.getUTCMinutes(),2,0)+":"+r(this.getUTCSeconds(),2,0)+"."+r(t,3,0)+"Z"}:l},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(16),a=n(36);o({target:"Date",proto:!0,forced:r((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(e){var t=i(this),n=a(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){"use strict";var o=n(32),r=n(256),i=n(13)("toPrimitive"),a=Date.prototype;i in a||o(a,i,r)},function(e,t,n){"use strict";var o=n(10),r=n(36);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!==e)}},function(e,t,n){"use strict";var o=n(26),r=Date.prototype,i=r.toString,a=r.getTime;new Date(NaN)+""!="Invalid Date"&&o(r,"toString",(function(){var e=a.call(this);return e==e?i.call(this):"Invalid Date"}))},function(e,t,n){"use strict";n(4)({target:"Function",proto:!0},{bind:n(165)})},function(e,t,n){"use strict";var o=n(8),r=n(14),i=n(38),a=n(13)("hasInstance"),c=Function.prototype;a in c||r.f(c,a,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=i(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){"use strict";var o=n(9),r=n(14).f,i=Function.prototype,a=i.toString,c=/^\s*function ([^ (]*)/;o&&!("name"in i)&&r(i,"name",{configurable:!0,get:function(){try{return a.call(this).match(c)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(6);n(47)(o.JSON,"JSON",!0)},function(e,t,n){"use strict";var o=n(90),r=n(166);e.exports=o("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(167),i=Math.acosh,a=Math.log,c=Math.sqrt,l=Math.LN2;o({target:"Math",stat:!0,forced:!i||710!=Math.floor(i(Number.MAX_VALUE))||i(Infinity)!=Infinity},{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?a(e)+l:r(e-1+c(e-1)*c(e+1))}})},function(e,t,n){"use strict";var o=n(4),r=Math.asinh,i=Math.log,a=Math.sqrt;o({target:"Math",stat:!0,forced:!(r&&1/r(0)>0)},{asinh:function c(e){return isFinite(e=+e)&&0!=e?e<0?-c(-e):i(e+a(e*e+1)):e}})},function(e,t,n){"use strict";var o=n(4),r=Math.atanh,i=Math.log;o({target:"Math",stat:!0,forced:!(r&&1/r(-0)<0)},{atanh:function(e){return 0==(e=+e)?e:i((1+e)/(1-e))/2}})},function(e,t,n){"use strict";var o=n(4),r=n(125),i=Math.abs,a=Math.pow;o({target:"Math",stat:!0},{cbrt:function(e){return r(e=+e)*a(i(e),1/3)}})},function(e,t,n){"use strict";var o=n(4),r=Math.floor,i=Math.log,a=Math.LOG2E;o({target:"Math",stat:!0},{clz32:function(e){return(e>>>=0)?31-r(i(e+.5)*a):32}})},function(e,t,n){"use strict";var o=n(4),r=n(92),i=Math.cosh,a=Math.abs,c=Math.E;o({target:"Math",stat:!0,forced:!i||i(710)===Infinity},{cosh:function(e){var t=r(a(e)-1)+1;return(t+1/(t*c*c))*(c/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(92);o({target:"Math",stat:!0,forced:r!=Math.expm1},{expm1:r})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{fround:n(271)})},function(e,t,n){"use strict";var o=n(125),r=Math.abs,i=Math.pow,a=i(2,-52),c=i(2,-23),l=i(2,127)*(2-c),s=i(2,-126);e.exports=Math.fround||function(e){var t,n,i=r(e),d=o(e);return il||n!=n?d*Infinity:d*n}},function(e,t,n){"use strict";var o=n(4),r=Math.hypot,i=Math.abs,a=Math.sqrt;o({target:"Math",stat:!0,forced:!!r&&r(Infinity,NaN)!==Infinity},{hypot:function(e,t){for(var n,o,r=0,c=0,l=arguments.length,s=0;c0?(o=n/s)*o:n;return s===Infinity?Infinity:s*a(r)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=Math.imul;o({target:"Math",stat:!0,forced:r((function(){return-5!=i(4294967295,5)||2!=i.length}))},{imul:function(e,t){var n=+e,o=+t,r=65535&n,i=65535&o;return 0|r*i+((65535&n>>>16)*i+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){"use strict";var o=n(4),r=Math.log,i=Math.LOG10E;o({target:"Math",stat:!0},{log10:function(e){return r(e)*i}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{log1p:n(167)})},function(e,t,n){"use strict";var o=n(4),r=Math.log,i=Math.LN2;o({target:"Math",stat:!0},{log2:function(e){return r(e)/i}})},function(e,t,n){"use strict";n(4)({target:"Math",stat:!0},{sign:n(125)})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(92),a=Math.abs,c=Math.exp,l=Math.E;o({target:"Math",stat:!0,forced:r((function(){return-2e-17!=Math.sinh(-2e-17)}))},{sinh:function(e){return a(e=+e)<1?(i(e)-i(-e))/2:(c(e-1)-c(-e-1))*(l/2)}})},function(e,t,n){"use strict";var o=n(4),r=n(92),i=Math.exp;o({target:"Math",stat:!0},{tanh:function(e){var t=r(e=+e),n=r(-e);return t==Infinity?1:n==Infinity?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){"use strict";n(47)(Math,"Math",!0)},function(e,t,n){"use strict";var o=n(4),r=Math.ceil,i=Math.floor;o({target:"Math",stat:!0},{trunc:function(e){return(e>0?i:r)(e)}})},function(e,t,n){"use strict";var o=n(9),r=n(6),i=n(72),a=n(26),c=n(19),l=n(35),s=n(91),d=n(36),u=n(5),p=n(46),m=n(55).f,h=n(22).f,f=n(14).f,C=n(63).trim,g=r.Number,N=g.prototype,b="Number"==l(p(N)),V=function(e){var t,n,o,r,i,a,c,l,s=d(e,!1);if("string"==typeof s&&s.length>2)if(43===(t=(s=C(s)).charCodeAt(0))||45===t){if(88===(n=s.charCodeAt(2))||120===n)return NaN}else if(48===t){switch(s.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+s}for(a=(i=s.slice(2)).length,c=0;cr)return NaN;return parseInt(i,o)}return+s};if(i("Number",!g(" 0o1")||!g("0b1")||g("+0x1"))){for(var v,x=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof x&&(b?u((function(){N.valueOf.call(n)})):"Number"!=l(n))?s(new g(V(t)),n,x):V(t)},y=o?m(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),k=0;y.length>k;k++)c(g,v=y[k])&&!c(x,v)&&f(x,v,h(g,v));x.prototype=N,N.constructor=x,a(r,"Number",x)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{EPSILON:Math.pow(2,-52)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isFinite:n(285)})},function(e,t,n){"use strict";var o=n(6).isFinite;e.exports=Number.isFinite||function(e){return"number"==typeof e&&o(e)}},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isInteger:n(168)})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{isNaN:function(e){return e!=e}})},function(e,t,n){"use strict";var o=n(4),r=n(168),i=Math.abs;o({target:"Number",stat:!0},{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){"use strict";n(4)({target:"Number",stat:!0},{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){"use strict";var o=n(4),r=n(292);o({target:"Number",stat:!0,forced:Number.parseFloat!=r},{parseFloat:r})},function(e,t,n){"use strict";var o=n(6),r=n(63).trim,i=n(93),a=o.parseFloat,c=1/a(i+"-0")!=-Infinity;e.exports=c?function(e){var t=r(String(e)),n=a(t);return 0===n&&"-"==t.charAt(0)?-0:n}:a},function(e,t,n){"use strict";var o=n(4),r=n(169);o({target:"Number",stat:!0,forced:Number.parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o=n(4),r=n(33),i=n(295),a=n(124),c=n(5),l=1..toFixed,s=Math.floor,d=function u(e,t,n){return 0===t?n:t%2==1?u(e,t-1,n*e):u(e*e,t/2,n)};o({target:"Number",proto:!0,forced:l&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!c((function(){l.call({})}))},{toFixed:function(e){var t,n,o,c,l=i(this),u=r(e),p=[0,0,0,0,0,0],m="",h="0",f=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*p[n],p[n]=o%1e7,o=s(o/1e7)},C=function(e){for(var t=6,n=0;--t>=0;)n+=p[t],p[t]=s(n/e),n=n%e*1e7},g=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==p[e]){var n=String(p[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t};if(u<0||u>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(m="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*d(2,69,1))-69)<0?l*d(2,-t,1):l/d(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),o=u;o>=7;)f(1e7,0),o-=7;for(f(d(10,o,1),0),o=t-1;o>=23;)C(1<<23),o-=23;C(1<0?m+((c=h.length)<=u?"0."+a.call("0",u-c)+h:h.slice(0,c-u)+"."+h.slice(c-u)):m+h}})},function(e,t,n){"use strict";var o=n(35);e.exports=function(e){if("number"!=typeof e&&"Number"!=o(e))throw TypeError("Incorrect invocation");return+e}},function(e,t,n){"use strict";var o=n(4),r=n(297);o({target:"Object",stat:!0,forced:Object.assign!==r},{assign:r})},function(e,t,n){"use strict";var o=n(9),r=n(5),i=n(73),a=n(113),c=n(83),l=n(16),s=n(68),d=Object.assign,u=Object.defineProperty;e.exports=!d||r((function(){if(o&&1!==d({b:1},d(u({},"a",{enumerable:!0,get:function(){u(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},n=Symbol();return e[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(e){t[e]=e})),7!=d({},e)[n]||"abcdefghijklmnopqrst"!=i(d({},t)).join("")}))?function(e,t){for(var n=l(e),r=arguments.length,d=1,u=a.f,p=c.f;r>d;)for(var m,h=s(arguments[d++]),f=u?i(h).concat(u(h)):i(h),C=f.length,g=0;C>g;)m=f[g++],o&&!p.call(h,m)||(n[m]=h[m]);return n}:d},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0,sham:!n(9)},{create:n(46)})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(34),l=n(14);r&&o({target:"Object",proto:!0,forced:i},{__defineGetter__:function(e,t){l.f(a(this),e,{get:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(9);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperties:n(153)})},function(e,t,n){"use strict";var o=n(4),r=n(9);o({target:"Object",stat:!0,forced:!r,sham:!r},{defineProperty:n(14).f})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(34),l=n(14);r&&o({target:"Object",proto:!0,forced:i},{__defineSetter__:function(e,t){l.f(a(this),e,{set:c(t),enumerable:!0,configurable:!0})}})},function(e,t,n){"use strict";var o=n(4),r=n(170).entries;o({target:"Object",stat:!0},{entries:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(78),i=n(5),a=n(8),c=n(59).onFreeze,l=Object.freeze;o({target:"Object",stat:!0,forced:i((function(){l(1)})),sham:!r},{freeze:function(e){return l&&a(e)?l(c(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(79),i=n(57);o({target:"Object",stat:!0},{fromEntries:function(e){var t={};return r(e,(function(e,n){i(t,e,n)}),undefined,!0),t}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(28),a=n(22).f,c=n(9),l=r((function(){a(1)}));o({target:"Object",stat:!0,forced:!c||l,sham:!c},{getOwnPropertyDescriptor:function(e,t){return a(i(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(111),a=n(28),c=n(22),l=n(57);o({target:"Object",stat:!0,sham:!r},{getOwnPropertyDescriptors:function(e){for(var t,n,o=a(e),r=c.f,s=i(o),d={},u=0;s.length>u;)(n=r(o,t=s[u++]))!==undefined&&l(d,t,n);return d}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(155).f;o({target:"Object",stat:!0,forced:r((function(){return!Object.getOwnPropertyNames(1)}))},{getOwnPropertyNames:i})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(16),a=n(38),c=n(121);o({target:"Object",stat:!0,forced:r((function(){a(1)})),sham:!c},{getPrototypeOf:function(e){return a(i(e))}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{is:n(171)})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(8),a=Object.isExtensible;o({target:"Object",stat:!0,forced:r((function(){a(1)}))},{isExtensible:function(e){return!!i(e)&&(!a||a(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(8),a=Object.isFrozen;o({target:"Object",stat:!0,forced:r((function(){a(1)}))},{isFrozen:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(5),i=n(8),a=Object.isSealed;o({target:"Object",stat:!0,forced:r((function(){a(1)}))},{isSealed:function(e){return!i(e)||!!a&&a(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(16),i=n(73);o({target:"Object",stat:!0,forced:n(5)((function(){i(1)}))},{keys:function(e){return i(r(e))}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(36),l=n(38),s=n(22).f;r&&o({target:"Object",proto:!0,forced:i},{__lookupGetter__:function(e){var t,n=a(this),o=c(e,!0);do{if(t=s(n,o))return t.get}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(94),a=n(16),c=n(36),l=n(38),s=n(22).f;r&&o({target:"Object",proto:!0,forced:i},{__lookupSetter__:function(e){var t,n=a(this),o=c(e,!0);do{if(t=s(n,o))return t.set}while(n=l(n))}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(59).onFreeze,a=n(78),c=n(5),l=Object.preventExtensions;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!a},{preventExtensions:function(e){return l&&r(e)?l(i(e)):e}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(59).onFreeze,a=n(78),c=n(5),l=Object.seal;o({target:"Object",stat:!0,forced:c((function(){l(1)})),sham:!a},{seal:function(e){return l&&r(e)?l(i(e)):e}})},function(e,t,n){"use strict";n(4)({target:"Object",stat:!0},{setPrototypeOf:n(58)})},function(e,t,n){"use strict";var o=n(119),r=n(26),i=n(321);o||r(Object.prototype,"toString",i,{unsafe:!0})},function(e,t,n){"use strict";var o=n(119),r=n(86);e.exports=o?{}.toString:function(){return"[object "+r(this)+"]"}},function(e,t,n){"use strict";var o=n(4),r=n(170).values;o({target:"Object",stat:!0},{values:function(e){return r(e)}})},function(e,t,n){"use strict";var o=n(4),r=n(169);o({global:!0,forced:parseInt!=r},{parseInt:r})},function(e,t,n){"use strict";var o,r,i,a,c=n(4),l=n(40),s=n(6),d=n(39),u=n(172),p=n(26),m=n(77),h=n(47),f=n(61),C=n(8),g=n(34),N=n(62),b=n(35),V=n(109),v=n(79),x=n(87),y=n(49),k=n(126).set,w=n(174),_=n(175),B=n(325),S=n(176),L=n(326),A=n(37),I=n(72),E=n(13),D=n(115),T=E("species"),F="Promise",M=A.get,P=A.set,O=A.getterFor(F),R=u,j=s.TypeError,U=s.document,z=s.process,W=d("fetch"),H=S.f,K=H,G="process"==b(z),Y=!!(U&&U.createEvent&&s.dispatchEvent),q=I(F,(function(){if(!(V(R)!==String(R))){if(66===D)return!0;if(!G&&"function"!=typeof PromiseRejectionEvent)return!0}if(l&&!R.prototype["finally"])return!0;if(D>=51&&/native code/.test(R))return!1;var e=R.resolve(1),t=function(e){e((function(){}),(function(){}))};return(e.constructor={})[T]=t,!(e.then((function(){}))instanceof t)})),X=q||!x((function(e){R.all(e)["catch"]((function(){}))})),J=function(e){var t;return!(!C(e)||"function"!=typeof(t=e.then))&&t},$=function(e,t,n){if(!t.notified){t.notified=!0;var o=t.reactions;w((function(){for(var r=t.value,i=1==t.state,a=0;o.length>a;){var c,l,s,d=o[a++],u=i?d.ok:d.fail,p=d.resolve,m=d.reject,h=d.domain;try{u?(i||(2===t.rejection&&te(e,t),t.rejection=1),!0===u?c=r:(h&&h.enter(),c=u(r),h&&(h.exit(),s=!0)),c===d.promise?m(j("Promise-chain cycle")):(l=J(c))?l.call(c,p,m):p(c)):m(r)}catch(f){h&&!s&&h.exit(),m(f)}}t.reactions=[],t.notified=!1,n&&!t.rejection&&Q(e,t)}))}},Z=function(e,t,n){var o,r;Y?((o=U.createEvent("Event")).promise=t,o.reason=n,o.initEvent(e,!1,!0),s.dispatchEvent(o)):o={promise:t,reason:n},(r=s["on"+e])?r(o):"unhandledrejection"===e&&B("Unhandled promise rejection",n)},Q=function(e,t){k.call(s,(function(){var n,o=t.value;if(ee(t)&&(n=L((function(){G?z.emit("unhandledRejection",o,e):Z("unhandledrejection",e,o)})),t.rejection=G||ee(t)?2:1,n.error))throw n.value}))},ee=function(e){return 1!==e.rejection&&!e.parent},te=function(e,t){k.call(s,(function(){G?z.emit("rejectionHandled",e):Z("rejectionhandled",e,t.value)}))},ne=function(e,t,n,o){return function(r){e(t,n,r,o)}},oe=function(e,t,n,o){t.done||(t.done=!0,o&&(t=o),t.value=n,t.state=2,$(e,t,!0))},re=function ie(e,t,n,o){if(!t.done){t.done=!0,o&&(t=o);try{if(e===n)throw j("Promise can't be resolved itself");var r=J(n);r?w((function(){var o={done:!1};try{r.call(n,ne(ie,e,o,t),ne(oe,e,o,t))}catch(i){oe(e,o,i,t)}})):(t.value=n,t.state=1,$(e,t,!1))}catch(i){oe(e,{done:!1},i,t)}}};q&&(R=function(e){N(this,R,F),g(e),o.call(this);var t=M(this);try{e(ne(re,this,t),ne(oe,this,t))}catch(n){oe(this,t,n)}},(o=function(e){P(this,{type:F,done:!1,notified:!1,parent:!1,reactions:[],rejection:!1,state:0,value:undefined})}).prototype=m(R.prototype,{then:function(e,t){var n=O(this),o=H(y(this,R));return o.ok="function"!=typeof e||e,o.fail="function"==typeof t&&t,o.domain=G?z.domain:undefined,n.parent=!0,n.reactions.push(o),0!=n.state&&$(this,n,!1),o.promise},"catch":function(e){return this.then(undefined,e)}}),r=function(){var e=new o,t=M(e);this.promise=e,this.resolve=ne(re,e,t),this.reject=ne(oe,e,t)},S.f=H=function(e){return e===R||e===i?new r(e):K(e)},l||"function"!=typeof u||(a=u.prototype.then,p(u.prototype,"then",(function(e,t){var n=this;return new R((function(e,t){a.call(n,e,t)})).then(e,t)}),{unsafe:!0}),"function"==typeof W&&c({global:!0,enumerable:!0,forced:!0},{fetch:function(e){return _(R,W.apply(s,arguments))}}))),c({global:!0,wrap:!0,forced:q},{Promise:R}),h(R,F,!1,!0),f(F),i=d(F),c({target:F,stat:!0,forced:q},{reject:function(e){var t=H(this);return t.reject.call(undefined,e),t.promise}}),c({target:F,stat:!0,forced:l||q},{resolve:function(e){return _(l&&this===i?R:this,e)}}),c({target:F,stat:!0,forced:X},{all:function(e){var t=this,n=H(t),o=n.resolve,r=n.reject,i=L((function(){var n=g(t.resolve),i=[],a=0,c=1;v(e,(function(e){var l=a++,s=!1;i.push(undefined),c++,n.call(t,e).then((function(e){s||(s=!0,i[l]=e,--c||o(i))}),r)})),--c||o(i)}));return i.error&&r(i.value),n.promise},race:function(e){var t=this,n=H(t),o=n.reject,r=L((function(){var r=g(t.resolve);v(e,(function(e){r.call(t,e).then(n.resolve,o)}))}));return r.error&&o(r.value),n.promise}})},function(e,t,n){"use strict";var o=n(6);e.exports=function(e,t){var n=o.console;n&&n.error&&(1===arguments.length?n.error(e):n.error(e,t))}},function(e,t,n){"use strict";e.exports=function(e){try{return{error:!1,value:e()}}catch(t){return{error:!0,value:t}}}},function(e,t,n){"use strict";var o=n(4),r=n(40),i=n(172),a=n(5),c=n(39),l=n(49),s=n(175),d=n(26);o({target:"Promise",proto:!0,real:!0,forced:!!i&&a((function(){i.prototype["finally"].call({then:function(){}},(function(){}))}))},{"finally":function(e){var t=l(this,c("Promise")),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}}),r||"function"!=typeof i||i.prototype["finally"]||d(i.prototype,"finally",c("Promise").prototype["finally"])},function(e,t,n){"use strict";var o=n(4),r=n(39),i=n(34),a=n(10),c=n(5),l=r("Reflect","apply"),s=Function.apply;o({target:"Reflect",stat:!0,forced:!c((function(){l((function(){}))}))},{apply:function(e,t,n){return i(e),a(n),l?l(e,t,n):s.call(e,t,n)}})},function(e,t,n){"use strict";var o=n(4),r=n(39),i=n(34),a=n(10),c=n(8),l=n(46),s=n(165),d=n(5),u=r("Reflect","construct"),p=d((function(){function e(){}return!(u((function(){}),[],e)instanceof e)})),m=!d((function(){u((function(){}))})),h=p||m;o({target:"Reflect",stat:!0,forced:h,sham:h},{construct:function(e,t){i(e),a(t);var n=arguments.length<3?e:i(arguments[2]);if(m&&!p)return u(e,t,n);if(e==n){switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3])}var o=[null];return o.push.apply(o,t),new(s.apply(e,o))}var r=n.prototype,d=l(c(r)?r:Object.prototype),h=Function.apply.call(e,d,t);return c(h)?h:d}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(10),a=n(36),c=n(14);o({target:"Reflect",stat:!0,forced:n(5)((function(){Reflect.defineProperty(c.f({},1,{value:1}),1,{value:2})})),sham:!r},{defineProperty:function(e,t,n){i(e);var o=a(t,!0);i(n);try{return c.f(e,o,n),!0}catch(r){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(22).f;o({target:"Reflect",stat:!0},{deleteProperty:function(e,t){var n=i(r(e),t);return!(n&&!n.configurable)&&delete e[t]}})},function(e,t,n){"use strict";var o=n(4),r=n(8),i=n(10),a=n(19),c=n(22),l=n(38);o({target:"Reflect",stat:!0},{get:function s(e,t){var n,o,d=arguments.length<3?e:arguments[2];return i(e)===d?e[t]:(n=c.f(e,t))?a(n,"value")?n.value:n.get===undefined?undefined:n.get.call(d):r(o=l(e))?s(o,t,d):void 0}})},function(e,t,n){"use strict";var o=n(4),r=n(9),i=n(10),a=n(22);o({target:"Reflect",stat:!0,sham:!r},{getOwnPropertyDescriptor:function(e,t){return a.f(i(e),t)}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(38);o({target:"Reflect",stat:!0,sham:!n(121)},{getPrototypeOf:function(e){return i(r(e))}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{has:function(e,t){return t in e}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=Object.isExtensible;o({target:"Reflect",stat:!0},{isExtensible:function(e){return r(e),!i||i(e)}})},function(e,t,n){"use strict";n(4)({target:"Reflect",stat:!0},{ownKeys:n(111)})},function(e,t,n){"use strict";var o=n(4),r=n(39),i=n(10);o({target:"Reflect",stat:!0,sham:!n(78)},{preventExtensions:function(e){i(e);try{var t=r("Object","preventExtensions");return t&&t(e),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(8),a=n(19),c=n(5),l=n(14),s=n(22),d=n(38),u=n(54);o({target:"Reflect",stat:!0,forced:c((function(){var e=l.f({},"a",{configurable:!0});return!1!==Reflect.set(d(e),"a",1,e)}))},{set:function p(e,t,n){var o,c,m=arguments.length<4?e:arguments[3],h=s.f(r(e),t);if(!h){if(i(c=d(e)))return p(c,t,n,m);h=u(0)}if(a(h,"value")){if(!1===h.writable||!i(m))return!1;if(o=s.f(m,t)){if(o.get||o.set||!1===o.writable)return!1;o.value=n,l.f(m,t,o)}else l.f(m,t,u(0,n));return!0}return h.set!==undefined&&(h.set.call(m,n),!0)}})},function(e,t,n){"use strict";var o=n(4),r=n(10),i=n(162),a=n(58);a&&o({target:"Reflect",stat:!0},{setPrototypeOf:function(e,t){r(e),i(t);try{return a(e,t),!0}catch(n){return!1}}})},function(e,t,n){"use strict";var o=n(9),r=n(6),i=n(72),a=n(91),c=n(14).f,l=n(55).f,s=n(127),d=n(95),u=n(128),p=n(26),m=n(5),h=n(37).set,f=n(61),C=n(13)("match"),g=r.RegExp,N=g.prototype,b=/a/g,V=/a/g,v=new g(b)!==b,x=u.UNSUPPORTED_Y;if(o&&i("RegExp",!v||x||m((function(){return V[C]=!1,g(b)!=b||g(V)==V||"/a/i"!=g(b,"i")})))){for(var y=function(e,t){var n,o=this instanceof y,r=s(e),i=t===undefined;if(!o&&r&&e.constructor===y&&i)return e;v?r&&!i&&(e=e.source):e instanceof y&&(i&&(t=d.call(e)),e=e.source),x&&(n=!!t&&t.indexOf("y")>-1)&&(t=t.replace(/y/g,""));var c=a(v?new g(e,t):g(e,t),o?this:N,y);return x&&n&&h(c,{sticky:n}),c},k=function(e){e in y||c(y,e,{configurable:!0,get:function(){return g[e]},set:function(t){g[e]=t}})},w=l(g),_=0;w.length>_;)k(w[_++]);N.constructor=y,y.prototype=N,p(r,"RegExp",y)}f("RegExp")},function(e,t,n){"use strict";var o=n(9),r=n(14),i=n(95),a=n(128).UNSUPPORTED_Y;o&&("g"!=/./g.flags||a)&&r.f(RegExp.prototype,"flags",{configurable:!0,get:i})},function(e,t,n){"use strict";var o=n(26),r=n(10),i=n(5),a=n(95),c=RegExp.prototype,l=c.toString,s=i((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),d="toString"!=l.name;(s||d)&&o(RegExp.prototype,"toString",(function(){var e=r(this),t=String(e.source),n=e.flags;return"/"+t+"/"+String(n===undefined&&e instanceof RegExp&&!("flags"in c)?a.call(e):n)}),{unsafe:!0})},function(e,t,n){"use strict";var o=n(90),r=n(166);e.exports=o("Set",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),r)},function(e,t,n){"use strict";var o=n(4),r=n(129).codeAt;o({target:"String",proto:!0},{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o,r=n(4),i=n(22).f,a=n(12),c=n(130),l=n(25),s=n(131),d=n(40),u="".endsWith,p=Math.min,m=s("endsWith");r({target:"String",proto:!0,forced:!!(d||m||(o=i(String.prototype,"endsWith"),!o||o.writable))&&!m},{endsWith:function(e){var t=String(l(this));c(e);var n=arguments.length>1?arguments[1]:undefined,o=a(t.length),r=n===undefined?o:p(a(n),o),i=String(e);return u?u.call(t,i,r):t.slice(r-i.length,r)===i}})},function(e,t,n){"use strict";var o=n(4),r=n(45),i=String.fromCharCode,a=String.fromCodePoint;o({target:"String",stat:!0,forced:!!a&&1!=a.length},{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){"use strict";var o=n(4),r=n(130),i=n(25);o({target:"String",proto:!0,forced:!n(131)("includes")},{includes:function(e){return!!~String(i(this)).indexOf(r(e),arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(129).charAt,r=n(37),i=n(120),a=r.set,c=r.getterFor("String Iterator");i(String,"String",(function(e){a(this,{type:"String Iterator",string:String(e),index:0})}),(function(){var e,t=c(this),n=t.string,r=t.index;return r>=n.length?{value:undefined,done:!0}:(e=o(n,r),t.index+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(97),r=n(10),i=n(12),a=n(25),c=n(132),l=n(98);o("match",1,(function(e,t,n){return[function(t){var n=a(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var a=r(e),s=String(this);if(!a.global)return l(a,s);var d=a.unicode;a.lastIndex=0;for(var u,p=[],m=0;null!==(u=l(a,s));){var h=String(u[0]);p[m]=h,""===h&&(a.lastIndex=c(s,i(a.lastIndex),d)),m++}return 0===m?null:p}]}))},function(e,t,n){"use strict";var o=n(4),r=n(123).end;o({target:"String",proto:!0,forced:n(178)},{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(123).start;o({target:"String",proto:!0,forced:n(178)},{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:undefined)}})},function(e,t,n){"use strict";var o=n(4),r=n(28),i=n(12);o({target:"String",stat:!0},{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],c=0;n>c;)a.push(String(t[c++])),c]*>)/g,f=/\$([$&'`]|\d\d?)/g;o("replace",2,(function(e,t,n,o){var C=o.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,g=o.REPLACE_KEEPS_$0,N=C?"$":"$0";return[function(n,o){var r=l(this),i=n==undefined?undefined:n[e];return i!==undefined?i.call(n,r,o):t.call(String(r),n,o)},function(e,o){if(!C&&g||"string"==typeof o&&-1===o.indexOf(N)){var i=n(t,e,this,o);if(i.done)return i.value}var l=r(e),m=String(this),h="function"==typeof o;h||(o=String(o));var f=l.global;if(f){var V=l.unicode;l.lastIndex=0}for(var v=[];;){var x=d(l,m);if(null===x)break;if(v.push(x),!f)break;""===String(x[0])&&(l.lastIndex=s(m,a(l.lastIndex),V))}for(var y,k="",w=0,_=0;_=w&&(k+=m.slice(w,S)+D,w=S+B.length)}return k+m.slice(w)}];function b(e,n,o,r,a,c){var l=o+e.length,s=r.length,d=f;return a!==undefined&&(a=i(a),d=h),t.call(c,d,(function(t,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return e;case"`":return n.slice(0,o);case"'":return n.slice(l);case"<":c=a[i.slice(1,-1)];break;default:var d=+i;if(0===d)return t;if(d>s){var u=m(d/10);return 0===u?t:u<=s?r[u-1]===undefined?i.charAt(1):r[u-1]+i.charAt(1):t}c=r[d-1]}return c===undefined?"":c}))}}))},function(e,t,n){"use strict";var o=n(97),r=n(10),i=n(25),a=n(171),c=n(98);o("search",1,(function(e,t,n){return[function(t){var n=i(this),o=t==undefined?undefined:t[e];return o!==undefined?o.call(t,n):new RegExp(t)[e](String(n))},function(e){var o=n(t,e,this);if(o.done)return o.value;var i=r(e),l=String(this),s=i.lastIndex;a(s,0)||(i.lastIndex=0);var d=c(i,l);return a(i.lastIndex,s)||(i.lastIndex=s),null===d?-1:d.index}]}))},function(e,t,n){"use strict";var o=n(97),r=n(127),i=n(10),a=n(25),c=n(49),l=n(132),s=n(12),d=n(98),u=n(96),p=n(5),m=[].push,h=Math.min,f=!p((function(){return!RegExp(4294967295,"y")}));o("split",2,(function(e,t,n){var o;return o="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,n){var o=String(a(this)),i=n===undefined?4294967295:n>>>0;if(0===i)return[];if(e===undefined)return[o];if(!r(e))return t.call(o,e,i);for(var c,l,s,d=[],p=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),h=0,f=new RegExp(e.source,p+"g");(c=u.call(f,o))&&!((l=f.lastIndex)>h&&(d.push(o.slice(h,c.index)),c.length>1&&c.index=i));)f.lastIndex===c.index&&f.lastIndex++;return h===o.length?!s&&f.test("")||d.push(""):d.push(o.slice(h)),d.length>i?d.slice(0,i):d}:"0".split(undefined,0).length?function(e,n){return e===undefined&&0===n?[]:t.call(this,e,n)}:t,[function(t,n){var r=a(this),i=t==undefined?undefined:t[e];return i!==undefined?i.call(t,r,n):o.call(String(r),t,n)},function(e,r){var a=n(o,e,this,r,o!==t);if(a.done)return a.value;var u=i(e),p=String(this),m=c(u,RegExp),C=u.unicode,g=(u.ignoreCase?"i":"")+(u.multiline?"m":"")+(u.unicode?"u":"")+(f?"y":"g"),N=new m(f?u:"^(?:"+u.source+")",g),b=r===undefined?4294967295:r>>>0;if(0===b)return[];if(0===p.length)return null===d(N,p)?[p]:[];for(var V=0,v=0,x=[];v1?arguments[1]:undefined,t.length)),o=String(e);return u?u.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";var o=n(4),r=n(63).trim;o({target:"String",proto:!0,forced:n(133)("trim")},{trim:function(){return r(this)}})},function(e,t,n){"use strict";var o=n(4),r=n(63).end,i=n(133)("trimEnd"),a=i?function(){return r(this)}:"".trimEnd;o({target:"String",proto:!0,forced:i},{trimEnd:a,trimRight:a})},function(e,t,n){"use strict";var o=n(4),r=n(63).start,i=n(133)("trimStart"),a=i?function(){return r(this)}:"".trimStart;o({target:"String",proto:!0,forced:i},{trimStart:a,trimLeft:a})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("anchor")},{anchor:function(e){return r(this,"a","name",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("big")},{big:function(){return r(this,"big","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("blink")},{blink:function(){return r(this,"blink","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("bold")},{bold:function(){return r(this,"b","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fixed")},{fixed:function(){return r(this,"tt","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontcolor")},{fontcolor:function(e){return r(this,"font","color",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("fontsize")},{fontsize:function(e){return r(this,"font","size",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("italics")},{italics:function(){return r(this,"i","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("link")},{link:function(e){return r(this,"a","href",e)}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("small")},{small:function(){return r(this,"small","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("strike")},{strike:function(){return r(this,"strike","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sub")},{sub:function(){return r(this,"sub","","")}})},function(e,t,n){"use strict";var o=n(4),r=n(30);o({target:"String",proto:!0,forced:n(31)("sup")},{sup:function(){return r(this,"sup","","")}})},function(e,t,n){"use strict";n(42)("Float32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(33);e.exports=function(e){var t=o(e);if(t<0)throw RangeError("The argument can't be less than 0");return t}},function(e,t,n){"use strict";n(42)("Float64",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Int8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Int16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Int32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Uint8",(function(e){return function(t,n,o){return e(this,t,n,o)}}),!0)},function(e,t,n){"use strict";n(42)("Uint16",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";n(42)("Uint32",(function(e){return function(t,n,o){return e(this,t,n,o)}}))},function(e,t,n){"use strict";var o=n(11),r=n(157),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("copyWithin",(function(e,t){return r.call(i(this),e,t,arguments.length>2?arguments[2]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).every,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("every",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(116),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("fill",(function(e){return r.apply(i(this),arguments)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).filter,i=n(49),a=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("filter",(function(e){for(var t=r(a(this),e,arguments.length>1?arguments[1]:undefined),n=i(this,this.constructor),o=0,l=t.length,s=new(c(n))(l);l>o;)s[o]=t[o++];return s}))},function(e,t,n){"use strict";var o=n(11),r=n(21).find,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("find",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).findIndex,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("findIndex",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).forEach,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("forEach",(function(e){r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(134);(0,n(11).exportTypedArrayStaticMethod)("from",n(180),o)},function(e,t,n){"use strict";var o=n(11),r=n(71).includes,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("includes",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(71).indexOf,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("indexOf",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(6),r=n(11),i=n(160),a=n(13)("iterator"),c=o.Uint8Array,l=i.values,s=i.keys,d=i.entries,u=r.aTypedArray,p=r.exportTypedArrayMethod,m=c&&c.prototype[a],h=!!m&&("values"==m.name||m.name==undefined),f=function(){return l.call(u(this))};p("entries",(function(){return d.call(u(this))})),p("keys",(function(){return s.call(u(this))})),p("values",f,!h),p(a,f,!h)},function(e,t,n){"use strict";var o=n(11),r=o.aTypedArray,i=o.exportTypedArrayMethod,a=[].join;i("join",(function(e){return a.apply(r(this),arguments)}))},function(e,t,n){"use strict";var o=n(11),r=n(163),i=o.aTypedArray;(0,o.exportTypedArrayMethod)("lastIndexOf",(function(e){return r.apply(i(this),arguments)}))},function(e,t,n){"use strict";var o=n(11),r=n(21).map,i=n(49),a=o.aTypedArray,c=o.aTypedArrayConstructor;(0,o.exportTypedArrayMethod)("map",(function(e){return r(a(this),e,arguments.length>1?arguments[1]:undefined,(function(e,t){return new(c(i(e,e.constructor)))(t)}))}))},function(e,t,n){"use strict";var o=n(11),r=n(134),i=o.aTypedArrayConstructor;(0,o.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,n=new(i(this))(t);t>e;)n[e]=arguments[e++];return n}),r)},function(e,t,n){"use strict";var o=n(11),r=n(88).left,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduce",(function(e){return r(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=n(88).right,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("reduceRight",(function(e){return r(i(this),e,arguments.length,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=o.aTypedArray,i=o.exportTypedArrayMethod,a=Math.floor;i("reverse",(function(){for(var e,t=r(this).length,n=a(t/2),o=0;o1?arguments[1]:undefined,1),n=this.length,o=a(e),c=r(o.length),s=0;if(c+t>n)throw RangeError("Wrong length");for(;si;)d[i]=n[i++];return d}),i((function(){new Int8Array(1).slice()})))},function(e,t,n){"use strict";var o=n(11),r=n(21).some,i=o.aTypedArray;(0,o.exportTypedArrayMethod)("some",(function(e){return r(i(this),e,arguments.length>1?arguments[1]:undefined)}))},function(e,t,n){"use strict";var o=n(11),r=o.aTypedArray,i=o.exportTypedArrayMethod,a=[].sort;i("sort",(function(e){return a.call(r(this),e)}))},function(e,t,n){"use strict";var o=n(11),r=n(12),i=n(45),a=n(49),c=o.aTypedArray;(0,o.exportTypedArrayMethod)("subarray",(function(e,t){var n=c(this),o=n.length,l=i(e,o);return new(a(n,n.constructor))(n.buffer,n.byteOffset+l*n.BYTES_PER_ELEMENT,r((t===undefined?o:i(t,o))-l))}))},function(e,t,n){"use strict";var o=n(6),r=n(11),i=n(5),a=o.Int8Array,c=r.aTypedArray,l=r.exportTypedArrayMethod,s=[].toLocaleString,d=[].slice,u=!!a&&i((function(){s.call(new a(1))}));l("toLocaleString",(function(){return s.apply(u?d.call(c(this)):c(this),arguments)}),i((function(){return[1,2].toLocaleString()!=new a([1,2]).toLocaleString()}))||!i((function(){a.prototype.toLocaleString.call([1,2])})))},function(e,t,n){"use strict";var o=n(11).exportTypedArrayMethod,r=n(5),i=n(6).Uint8Array,a=i&&i.prototype||{},c=[].toString,l=[].join;r((function(){c.call({})}))&&(c=function(){return l.call(this)});var s=a.toString!=c;o("toString",c,s)},function(e,t,n){"use strict";var o,r=n(6),i=n(77),a=n(59),c=n(90),l=n(181),s=n(8),d=n(37).enforce,u=n(148),p=!r.ActiveXObject&&"ActiveXObject"in r,m=Object.isExtensible,h=function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}},f=e.exports=c("WeakMap",h,l);if(u&&p){o=l.getConstructor(h,"WeakMap",!0),a.REQUIRED=!0;var C=f.prototype,g=C["delete"],N=C.has,b=C.get,V=C.set;i(C,{"delete":function(e){if(s(e)&&!m(e)){var t=d(this);return t.frozen||(t.frozen=new o),g.call(this,e)||t.frozen["delete"](e)}return g.call(this,e)},has:function(e){if(s(e)&&!m(e)){var t=d(this);return t.frozen||(t.frozen=new o),N.call(this,e)||t.frozen.has(e)}return N.call(this,e)},get:function(e){if(s(e)&&!m(e)){var t=d(this);return t.frozen||(t.frozen=new o),N.call(this,e)?b.call(this,e):t.frozen.get(e)}return b.call(this,e)},set:function(e,t){if(s(e)&&!m(e)){var n=d(this);n.frozen||(n.frozen=new o),N.call(this,e)?V.call(this,e,t):n.frozen.set(e,t)}else V.call(this,e,t);return this}})}},function(e,t,n){"use strict";n(90)("WeakSet",(function(e){return function(){return e(this,arguments.length?arguments[0]:undefined)}}),n(181))},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(126);o({global:!0,bind:!0,enumerable:!0,forced:!r.setImmediate||!r.clearImmediate},{setImmediate:i.set,clearImmediate:i.clear})},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(174),a=n(35),c=r.process,l="process"==a(c);o({global:!0,enumerable:!0,noTargetGet:!0},{queueMicrotask:function(e){var t=l&&c.domain;i(t?t.bind(e):e)}})},function(e,t,n){"use strict";var o=n(4),r=n(6),i=n(85),a=[].slice,c=function(e){return function(t,n){var o=arguments.length>2,r=o?a.call(arguments,2):undefined;return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};o({global:!0,bind:!0,forced:/MSIE .\./.test(i)},{setTimeout:c(r.setTimeout),setInterval:c(r.setInterval)})},function(e,t,n){"use strict";t.__esModule=!0,t._CI=Se,t._HI=P,t._M=Le,t._MCCC=De,t._ME=Ie,t._MFCC=Te,t._MP=_e,t._MR=Ne,t.__render=Re,t.createComponentVNode=function(e,t,n,o,r){var a=new L(1,null,null,e=function(e,t){if(12&e)return e;if(t.prototype&&t.prototype.render)return 4;if(t.render)return 32776;return 8}(e,t),o,function(e,t,n){var o=(32768&e?t.render:t).defaultProps;if(i(o))return n;if(i(n))return d(o,null);return B(n,o)}(e,t,n),function(e,t,n){if(4&e)return n;var o=(32768&e?t.render:t).defaultHooks;if(i(o))return n;if(i(n))return o;return B(n,o)}(e,t,r),t);k.createVNode&&k.createVNode(a);return a},t.createFragment=E,t.createPortal=function(e,t){var n=P(e);return A(1024,1024,null,n,0,null,n.key,t)},t.createRef=function(){return{current:null}},t.createRenderer=function(e){return function(t,n,o,r){e||(e=t),je(n,e,o,r)}},t.createTextVNode=I,t.createVNode=A,t.directClone=D,t.findDOMfromVNode=b,t.forwardRef=function(e){return{render:e}},t.getFlagsForElementVnode=function(e){switch(e){case"svg":return 32;case"input":return 64;case"select":return 256;case"textarea":return 128;case"$F":return 8192;default:return 1}},t.linkEvent=function(e,t){if(c(t))return{data:e,event:t};return null},t.normalizeProps=function(e){var t=e.props;if(t){var n=e.flags;481&n&&(void 0!==t.children&&i(e.children)&&M(e,t.children),void 0!==t.className&&(e.className=t.className||null,t.className=undefined)),void 0!==t.key&&(e.key=t.key,t.key=undefined),void 0!==t.ref&&(e.ref=8&n?d(e.ref,t.ref):t.ref,t.ref=undefined)}return e},t.render=je,t.rerender=Ge,t.version=t.options=t.Fragment=t.EMPTY_OBJ=t.Component=void 0;var o=Array.isArray;function r(e){var t=typeof e;return"string"===t||"number"===t}function i(e){return null==e}function a(e){return null===e||!1===e||!0===e||void 0===e}function c(e){return"function"==typeof e}function l(e){return"string"==typeof e}function s(e){return null===e}function d(e,t){var n={};if(e)for(var o in e)n[o]=e[o];if(t)for(var r in t)n[r]=t[r];return n}function u(e){return!s(e)&&"object"==typeof e}var p={};t.EMPTY_OBJ=p;function m(e){return e.substr(2).toLowerCase()}function h(e,t){e.appendChild(t)}function f(e,t,n){s(n)?h(e,t):e.insertBefore(t,n)}function C(e,t){e.removeChild(t)}function g(e){for(var t=0;t0,h=s(p),f=l(p)&&"$"===p[0];m||h||f?(n=n||t.slice(0,d),(m||f)&&(u=D(u)),(h||f)&&(u.key="$"+d),n.push(u)):n&&n.push(u),u.flags|=65536}}i=0===(n=n||t).length?1:8}else(n=t).flags|=65536,81920&t.flags&&(n=D(t)),i=2;return e.children=n,e.childFlags=i,e}function P(e){return a(e)||r(e)?I(e,null):o(e)?E(e,0,null):16384&e.flags?D(e):e}var O="http://www.w3.org/1999/xlink",R="http://www.w3.org/XML/1998/namespace",j={"xlink:actuate":O,"xlink:arcrole":O,"xlink:href":O,"xlink:role":O,"xlink:show":O,"xlink:title":O,"xlink:type":O,"xml:base":R,"xml:lang":R,"xml:space":R};function U(e){return{onClick:e,onDblClick:e,onFocusIn:e,onFocusOut:e,onKeyDown:e,onKeyPress:e,onKeyUp:e,onMouseDown:e,onMouseMove:e,onMouseUp:e,onTouchEnd:e,onTouchMove:e,onTouchStart:e}}var z=U(0),W=U(null),H=U(!0);function K(e,t){var n=t.$EV;return n||(n=t.$EV=U(null)),n[e]||1==++z[e]&&(W[e]=function(e){var t="onClick"===e||"onDblClick"===e?function(e){return function(t){0===t.button?Y(t,!0,e,$(t)):t.stopPropagation()}}(e):function(e){return function(t){Y(t,!1,e,$(t))}}(e);return document.addEventListener(m(e),t),t}(e)),n}function G(e,t){var n=t.$EV;n&&n[e]&&(0==--z[e]&&(document.removeEventListener(m(e),W[e]),W[e]=null),n[e]=null)}function Y(e,t,n,o){var r=function(e){return c(e.composedPath)?e.composedPath()[0]:e.target}(e);do{if(t&&r.disabled)return;var i=r.$EV;if(i){var a=i[n];if(a&&(o.dom=r,a.event?a.event(a.data,e):a(e),e.cancelBubble))return}r=r.parentNode}while(!s(r))}function q(){this.cancelBubble=!0,this.immediatePropagationStopped||this.stopImmediatePropagation()}function X(){return this.defaultPrevented}function J(){return this.cancelBubble}function $(e){var t={dom:document};return e.isDefaultPrevented=X,e.isPropagationStopped=J,e.stopPropagation=q,Object.defineProperty(e,"currentTarget",{configurable:!0,get:function(){return t.dom}}),t}function Z(e,t,n){if(e[t]){var o=e[t];o.event?o.event(o.data,n):o(n)}else{var r=t.toLowerCase();e[r]&&e[r](n)}}function Q(e,t){var n=function(n){var o=this.$V;if(o){var r=o.props||p,i=o.dom;if(l(e))Z(r,e,n);else for(var a=0;a-1&&t.options[a]&&(c=t.options[a].value),n&&i(c)&&(c=e.defaultValue),ae(o,c)}}var se,de,ue=Q("onInput",me),pe=Q("onChange");function me(e,t,n){var o=e.value,r=t.value;if(i(o)){if(n){var a=e.defaultValue;i(a)||a===r||(t.defaultValue=a,t.value=a)}}else r!==o&&(t.defaultValue=o,t.value=o)}function he(e,t,n,o,r,i){64&e?ie(o,n):256&e?le(o,n,r,t):128&e&&me(o,n,r),i&&(n.$V=t)}function fe(e,t,n){64&e?function(e,t){te(t.type)?(ee(e,"change",oe),ee(e,"click",re)):ee(e,"input",ne)}(t,n):256&e?function(e){ee(e,"change",ce)}(t):128&e&&function(e,t){ee(e,"input",ue),t.onChange&&ee(e,"change",pe)}(t,n)}function Ce(e){return e.type&&te(e.type)?!i(e.checked):!i(e.value)}function ge(e){e&&!S(e,null)&&e.current&&(e.current=null)}function Ne(e,t,n){e&&(c(e)||void 0!==e.current)&&n.push((function(){S(e,t)||void 0===e.current||(e.current=t)}))}function be(e,t){Ve(e),V(e,t)}function Ve(e){var t,n=e.flags,o=e.children;if(481&n){t=e.ref;var r=e.props;ge(t);var a=e.childFlags;if(!s(r))for(var l=Object.keys(r),d=0,u=l.length;d0;for(var c in a&&(i=Ce(n))&&fe(t,o,n),n)we(c,null,n[c],o,r,i,null);a&&he(t,e,o,n,!0,i)}function Be(e,t,n){var o=P(e.render(t,e.state,n)),r=n;return c(e.getChildContext)&&(r=d(n,e.getChildContext())),e.$CX=r,o}function Se(e,t,n,o,r,i){var a=new t(n,o),l=a.$N=Boolean(t.getDerivedStateFromProps||a.getSnapshotBeforeUpdate);if(a.$SVG=r,a.$L=i,e.children=a,a.$BS=!1,a.context=o,a.props===p&&(a.props=n),l)a.state=x(a,n,a.state);else if(c(a.componentWillMount)){a.$BR=!0,a.componentWillMount();var d=a.$PS;if(!s(d)){var u=a.state;if(s(u))a.state=d;else for(var m in d)u[m]=d[m];a.$PS=null}a.$BR=!1}return a.$LI=Be(a,n,o),a}function Le(e,t,n,o,r,i){var a=e.flags|=16384;481&a?Ie(e,t,n,o,r,i):4&a?function(e,t,n,o,r,i){var a=Se(e,e.type,e.props||p,n,o,i);Le(a.$LI,t,a.$CX,o,r,i),De(e.ref,a,i)}(e,t,n,o,r,i):8&a?(!function(e,t,n,o,r,i){Le(e.children=P(function(e,t){return 32768&e.flags?e.type.render(e.props||p,e.ref,t):e.type(e.props||p,t)}(e,n)),t,n,o,r,i)}(e,t,n,o,r,i),Te(e,i)):512&a||16&a?Ae(e,t,r):8192&a?function(e,t,n,o,r,i){var a=e.children,c=e.childFlags;12&c&&0===a.length&&(c=e.childFlags=2,a=e.children=T());2===c?Le(a,n,r,o,r,i):Ee(a,n,t,o,r,i)}(e,n,t,o,r,i):1024&a&&function(e,t,n,o,r){Le(e.children,e.ref,t,!1,null,r);var i=T();Ae(i,n,o),e.dom=i.dom}(e,n,t,r,i)}function Ae(e,t,n){var o=e.dom=document.createTextNode(e.children);s(t)||f(t,o,n)}function Ie(e,t,n,o,r,a){var c=e.flags,l=e.props,d=e.className,u=e.children,p=e.childFlags,m=e.dom=function(e,t){return t?document.createElementNS("http://www.w3.org/2000/svg",e):document.createElement(e)}(e.type,o=o||(32&c)>0);if(i(d)||""===d||(o?m.setAttribute("class",d):m.className=d),16===p)w(m,u);else if(1!==p){var h=o&&"foreignObject"!==e.type;2===p?(16384&u.flags&&(e.children=u=D(u)),Le(u,m,n,h,null,a)):8!==p&&4!==p||Ee(u,m,n,h,null,a)}s(t)||f(t,m,r),s(l)||_e(e,c,l,m,o),Ne(e.ref,m,a)}function Ee(e,t,n,o,r,i){for(var a=0;a0,s!==d){var h=s||p;if((c=d||p)!==p)for(var f in(u=(448&r)>0)&&(m=Ce(c)),c){var C=h[f],g=c[f];C!==g&&we(f,C,g,l,o,m,e)}if(h!==p)for(var N in h)i(c[N])&&!i(h[N])&&we(N,h[N],null,l,o,m,e)}var b=t.children,V=t.className;e.className!==V&&(i(V)?l.removeAttribute("class"):o?l.setAttribute("class",V):l.className=V);4096&r?function(e,t){e.textContent!==t&&(e.textContent=t)}(l,b):Me(e.childFlags,t.childFlags,e.children,b,l,n,o&&"foreignObject"!==t.type,null,e,a);u&&he(r,t,l,c,!1,m);var v=t.ref,x=e.ref;x!==v&&(ge(x),Ne(v,l,a))}(e,t,o,r,m,u):4&m?function(e,t,n,o,r,i,a){var l=t.children=e.children;if(s(l))return;l.$L=a;var u=t.props||p,m=t.ref,h=e.ref,f=l.state;if(!l.$N){if(c(l.componentWillReceiveProps)){if(l.$BR=!0,l.componentWillReceiveProps(u,o),l.$UN)return;l.$BR=!1}s(l.$PS)||(f=d(f,l.$PS),l.$PS=null)}Pe(l,f,u,n,o,r,!1,i,a),h!==m&&(ge(h),Ne(m,l,a))}(e,t,n,o,r,l,u):8&m?function(e,t,n,o,r,a,l){var s=!0,d=t.props||p,u=t.ref,m=e.props,h=!i(u),f=e.children;h&&c(u.onComponentShouldUpdate)&&(s=u.onComponentShouldUpdate(m,d));if(!1!==s){h&&c(u.onComponentWillUpdate)&&u.onComponentWillUpdate(m,d);var C=t.type,g=P(32768&t.flags?C.render(d,u,o):C(d,o));Fe(f,g,n,o,r,a,l),t.children=g,h&&c(u.onComponentDidUpdate)&&u.onComponentDidUpdate(m,d)}else t.children=f}(e,t,n,o,r,l,u):16&m?function(e,t){var n=t.children,o=t.dom=e.dom;n!==e.children&&(o.nodeValue=n)}(e,t):512&m?t.dom=e.dom:8192&m?function(e,t,n,o,r,i){var a=e.children,c=t.children,l=e.childFlags,s=t.childFlags,d=null;12&s&&0===c.length&&(s=t.childFlags=2,c=t.children=T());var u=0!=(2&s);if(12&l){var p=a.length;(8&l&&8&s||u||!u&&c.length>p)&&(d=b(a[p-1],!1).nextSibling)}Me(l,s,a,c,n,o,r,d,e,i)}(e,t,n,o,r,u):function(e,t,n,o){var r=e.ref,i=t.ref,c=t.children;if(Me(e.childFlags,t.childFlags,e.children,c,r,n,!1,null,e,o),t.dom=e.dom,r!==i&&!a(c)){var l=c.dom;C(r,l),h(i,l)}}(e,t,o,u)}function Me(e,t,n,o,r,i,a,c,l,s){switch(e){case 2:switch(t){case 2:Fe(n,o,r,i,a,c,s);break;case 1:be(n,r);break;case 16:Ve(n),w(r,o);break;default:!function(e,t,n,o,r,i){Ve(e),Ee(t,n,o,r,b(e,!0),i),V(e,n)}(n,o,r,i,a,s)}break;case 1:switch(t){case 2:Le(o,r,i,a,c,s);break;case 1:break;case 16:w(r,o);break;default:Ee(o,r,i,a,c,s)}break;case 16:switch(t){case 16:!function(e,t,n){e!==t&&(""!==e?n.firstChild.nodeValue=t:w(n,t))}(n,o,r);break;case 2:xe(r),Le(o,r,i,a,c,s);break;case 1:xe(r);break;default:xe(r),Ee(o,r,i,a,c,s)}break;default:switch(t){case 16:ve(n),w(r,o);break;case 2:ye(r,l,n),Le(o,r,i,a,c,s);break;case 1:ye(r,l,n);break;default:var d=0|n.length,u=0|o.length;0===d?u>0&&Ee(o,r,i,a,c,s):0===u?ye(r,l,n):8===t&&8===e?function(e,t,n,o,r,i,a,c,l,s){var d,u,p=i-1,m=a-1,h=0,f=e[h],C=t[h];e:{for(;f.key===C.key;){if(16384&C.flags&&(t[h]=C=D(C)),Fe(f,C,n,o,r,c,s),e[h]=C,++h>p||h>m)break e;f=e[h],C=t[h]}for(f=e[p],C=t[m];f.key===C.key;){if(16384&C.flags&&(t[m]=C=D(C)),Fe(f,C,n,o,r,c,s),e[p]=C,p--,m--,h>p||h>m)break e;f=e[p],C=t[m]}}if(h>p){if(h<=m)for(u=(d=m+1)m)for(;h<=p;)be(e[h++],n);else!function(e,t,n,o,r,i,a,c,l,s,d,u,p){var m,h,f,C=0,g=c,N=c,V=i-c+1,x=a-c+1,y=new Int32Array(x+1),k=V===o,w=!1,_=0,B=0;if(r<4||(V|x)<32)for(C=g;C<=i;++C)if(m=e[C],Bc?w=!0:_=c,16384&h.flags&&(t[c]=h=D(h)),Fe(m,h,l,n,s,d,p),++B;break}!k&&c>a&&be(m,l)}else k||be(m,l);else{var S={};for(C=N;C<=a;++C)S[t[C].key]=C;for(C=g;C<=i;++C)if(m=e[C],Bg;)be(e[g++],l);y[c-N]=C+1,_>c?w=!0:_=c,16384&(h=t[c]).flags&&(t[c]=h=D(h)),Fe(m,h,l,n,s,d,p),++B}else k||be(m,l);else k||be(m,l)}if(k)ye(l,u,e),Ee(t,l,n,s,d,p);else if(w){var L=function(e){var t=0,n=0,o=0,r=0,i=0,a=0,c=0,l=e.length;l>Oe&&(Oe=l,se=new Int32Array(l),de=new Int32Array(l));for(;n>1]]0&&(de[n]=se[i-1]),se[i]=n)}i=r+1;var s=new Int32Array(i);a=se[i-1];for(;i-- >0;)s[i]=a,a=de[a],se[i]=0;return s}(y);for(c=L.length-1,C=x-1;C>=0;C--)0===y[C]?(16384&(h=t[_=C+N]).flags&&(t[_]=h=D(h)),Le(h,l,n,s,(f=_+1)=0;C--)0===y[C]&&(16384&(h=t[_=C+N]).flags&&(t[_]=h=D(h)),Le(h,l,n,s,(f=_+1)a?a:i,p=0;pa)for(p=u;p=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),s}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;v(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=o}catch(r){Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var o=n(24); +var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var i,a=n.document,c=a.createElement("link");if(t)i=t;else{var l=(a.body||a.getElementsByTagName("head")[0]).childNodes;i=l[l.length-1]}var s=a.styleSheets;if(r)for(var d in r)r.hasOwnProperty(d)&&c.setAttribute(d,r[d]);c.rel="stylesheet",c.href=e,c.media="only x",function m(e){if(a.body)return e();setTimeout((function(){m(e)}))}((function(){i.parentNode.insertBefore(c,t?i:i.nextSibling)}));var u=function h(e){for(var t=c.href,n=s.length;n--;)if(s[n].href===t)return e();setTimeout((function(){h(e)}))};function p(){c.addEventListener&&c.removeEventListener("load",p),c.media=o||"all"}return c.addEventListener&&c.addEventListener("load",p),c.onloadcssdefined=u,u(p),c}}).call(this,n(106))},function(e,t,n){"use strict";var o=function(e){var t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},r=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",a=o.toStringTag||"@@toStringTag";function c(e,t,n,o){var r=t&&t.prototype instanceof d?t:d,i=Object.create(r.prototype),a=new x(o||[]);return i._invoke=function(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return k()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var c=b(a,n);if(c){if(c===s)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var d=l(e,t,n);if("normal"===d.type){if(o=n.done?"completed":"suspendedYield",d.arg===s)continue;return{value:d.arg,done:n.done}}"throw"===d.type&&(o="completed",n.method="throw",n.arg=d.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(o){return{type:"throw",arg:o}}}e.wrap=c;var s={};function d(){}function u(){}function p(){}var m={};m[r]=function(){return this};var h=Object.getPrototypeOf,f=h&&h(h(y([])));f&&f!==t&&n.call(f,r)&&(m=f);var C=p.prototype=d.prototype=Object.create(m);function g(e){["next","throw","return"].forEach((function(t){e[t]=function(e){return this._invoke(t,e)}}))}function N(e,t){var o;this._invoke=function(r,i){function a(){return new t((function(o,a){!function c(o,r,i,a){var s=l(e[o],e,r);if("throw"!==s.type){var d=s.arg,u=d.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){c("next",e,i,a)}),(function(e){c("throw",e,i,a)})):t.resolve(u).then((function(e){d.value=e,i(d)}),(function(e){return c("throw",e,i,a)}))}a(s.arg)}(r,i,o,a)}))}return o=o?o.then(a,a):a()}}function b(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,b(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var o=l(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,s;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function V(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 v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function x(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(V,this),this.reset(!0)}function y(e){if(e){var t=e[r];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function t(){for(;++o=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(c&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),s}},"catch":function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;v(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:y(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),s}},e}(e.exports);try{regeneratorRuntime=o}catch(r){Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){"use strict";t.__esModule=!0,t.vecNormalize=t.vecLength=t.vecInverse=t.vecScale=t.vecDivide=t.vecMultiply=t.vecSubtract=t.vecAdd=t.vecCreate=void 0;var o=n(24); /** * @file * @copyright 2020 Aleksej Komarov @@ -124,7 +124,7 @@ var n;n=void 0!==e?e:void 0,t.loadCSS=function(e,t,o,r){var i,a=n.document,c=a.c * @file * @copyright 2013 Andrea Giammarchi, WebReflection * @license MIT - */!function(e){function t(){return u.createDocumentFragment()}function n(e){return u.createElement(e)}function o(e,t){if(!e)throw new Error("Failed to construct "+t+": 1 argument required, but only 0 present.")}function r(e){if(1===e.length)return i(e[0]);for(var n=t(),o=I.call(e),r=0;r3?c(a):null,b=String(a.key),V=String(a.char),v=a.location,x=a.keyCode||(a.keyCode=b)&&b.charCodeAt(0)||0,y=a.charCode||(a.charCode=V)&&V.charCodeAt(0)||0,k=a.bubbles,w=a.cancelable,_=a.repeat,B=a.locale,S=a.view||e;if(a.which||(a.which=a.keyCode),"initKeyEvent"in p)p.initKeyEvent(t,k,w,S,m,f,h,C,x,y);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,i){o=i,n=!1,e=undefined,t.dispatchEvent(r)}function i(e){this.value=e}function c(){t++,this.__ce__=new a("@DOMMap:"+t+Math.random())}return i.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new i(t),!1),this}},c}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,i,a=e.CustomEvent,c=e.dispatchEvent,l=e.addEventListener,s=e.removeEventListener,d=0,u=function(){d++},p=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},m=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{l("_",u,{once:!0}),c(new a("_")),c(new a("_")),s("_",u,{once:!0})}catch(h){}1!==d&&(i=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,a){if(a&&"boolean"!=typeof a){var c,l,s,d=i.get(this),u=m(a);d||i.set(this,d=new n),t in d||(d[t]={handler:[],wrap:[]}),l=d[t],(c=p.call(l.handler,r))<0?(c=l.handler.push(r)-1,l.wrap[c]=s=new n):s=l.wrap[c],u in s||(s[u]=o(t,r,a),e.call(this,t,s[u],s[u].capture))}else e.call(this,t,r,a)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,a,c,l,s=i.get(this);if(s&&t in s&&(c=s[t],-1<(a=p.call(c.handler,n))&&(r=m(o))in(l=c.wrap[a]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;c.handler.splice(a,1),c.wrap.splice(a,1),0===c.handler.length&&delete s[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict"; + */!function(e){function t(){return u.createDocumentFragment()}function n(e){return u.createElement(e)}function o(e,t){if(!e)throw new Error("Failed to construct "+t+": 1 argument required, but only 0 present.")}function r(e){if(1===e.length)return i(e[0]);for(var n=t(),o=E.call(e),r=0;r3?c(a):null,b=String(a.key),V=String(a.char),v=a.location,x=a.keyCode||(a.keyCode=b)&&b.charCodeAt(0)||0,y=a.charCode||(a.charCode=V)&&V.charCodeAt(0)||0,k=a.bubbles,w=a.cancelable,_=a.repeat,B=a.locale,S=a.view||e;if(a.which||(a.which=a.keyCode),"initKeyEvent"in p)p.initKeyEvent(t,k,w,S,m,f,h,C,x,y);else if(0>>0),t=Element.prototype,n=t.querySelector,o=t.querySelectorAll;function r(t,n,o){t.setAttribute(e,null);var r=n.call(t,String(o).replace(/(^|,\s*)(:scope([ >]|$))/g,(function(t,n,o,r){return n+"["+e+"]"+(r||" ")})));return t.removeAttribute(e),r}t.querySelector=function(e){return r(this,n,e)},t.querySelectorAll=function(e){return r(this,o,e)}}()}}(window),function(e){var t=e.WeakMap||function(){var e,t=0,n=!1,o=!1;function r(t,r,i){o=i,n=!1,e=undefined,t.dispatchEvent(r)}function i(e){this.value=e}function c(){t++,this.__ce__=new a("@DOMMap:"+t+Math.random())}return i.prototype.handleEvent=function(t){n=!0,o?t.currentTarget.removeEventListener(t.type,this,!1):e=this.value},c.prototype={constructor:c,"delete":function(e){return r(e,this.__ce__,!0),n},get:function(t){r(t,this.__ce__,!1);var n=e;return e=undefined,n},has:function(e){return r(e,this.__ce__,!1),n},set:function(e,t){return r(e,this.__ce__,!0),e.addEventListener(this.__ce__.type,new i(t),!1),this}},c}();function n(){}function o(e,t,n){function r(e){r.once&&(e.currentTarget.removeEventListener(e.type,t,r),r.removed=!0),r.passive&&(e.preventDefault=o.preventDefault),"function"==typeof r.callback?r.callback.call(this,e):r.callback&&r.callback.handleEvent(e),r.passive&&delete e.preventDefault}return r.type=e,r.callback=t,r.capture=!!n.capture,r.passive=!!n.passive,r.once=!!n.once,r.removed=!1,r}n.prototype=(Object.create||Object)(null),o.preventDefault=function(){};var r,i,a=e.CustomEvent,c=e.dispatchEvent,l=e.addEventListener,s=e.removeEventListener,d=0,u=function(){d++},p=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},m=function(e){return"".concat(e.capture?"1":"0",e.passive?"1":"0",e.once?"1":"0")};try{l("_",u,{once:!0}),c(new a("_")),c(new a("_")),s("_",u,{once:!0})}catch(h){}1!==d&&(i=new t,r=function(e){if(e){var t=e.prototype;t.addEventListener=function(e){return function(t,r,a){if(a&&"boolean"!=typeof a){var c,l,s,d=i.get(this),u=m(a);d||i.set(this,d=new n),t in d||(d[t]={handler:[],wrap:[]}),l=d[t],(c=p.call(l.handler,r))<0?(c=l.handler.push(r)-1,l.wrap[c]=s=new n):s=l.wrap[c],u in s||(s[u]=o(t,r,a),e.call(this,t,s[u],s[u].capture))}else e.call(this,t,r,a)}}(t.addEventListener),t.removeEventListener=function(e){return function(t,n,o){if(o&&"boolean"!=typeof o){var r,a,c,l,s=i.get(this);if(s&&t in s&&(c=s[t],-1<(a=p.call(c.handler,n))&&(r=m(o))in(l=c.wrap[a]))){for(r in e.call(this,t,l[r],l[r].capture),delete l[r],l)return;c.handler.splice(a,1),c.wrap.splice(a,1),0===c.handler.length&&delete s[t]}}else e.call(this,t,n,o)}}(t.removeEventListener)}},e.EventTarget?r(EventTarget):(r(e.Text),r(e.Element||e.HTMLElement),r(e.HTMLDocument),r(e.Window||{prototype:e}),r(e.XMLHttpRequest)))}(window)},function(e,t,n){"use strict"; /** * @file * @copyright 2014 Alexander Farkas @@ -141,7 +141,7 @@ if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),i=Object.def * @file * @copyright 2020 Aleksej Komarov * @license MIT - */window.Int32Array||(window.Int32Array=Array)},function(e,t,n){"use strict";t.__esModule=!0,t.useDispatch=t.StoreProvider=t.createStore=void 0;var o=n(43),r=n(425),i=n(0),a=n(1),c=n(133);t.createStore=function(){var e=(0,o.flow)([function(e,t){return void 0===e&&(e={}),e},a.backendReducer,c.hotKeyReducer]),t=[c.hotKeyMiddleware];return(0,r.createStore)(e,r.applyMiddleware.apply(void 0,t))};var l=function(e){var t,n; + */window.Int32Array||(window.Int32Array=Array)},function(e,t,n){"use strict";t.__esModule=!0,t.useDispatch=t.StoreProvider=t.createStore=void 0;var o=n(43),r=n(425),i=n(0),a=n(1),c=n(135);t.createStore=function(){var e=(0,o.flow)([function(e,t){return void 0===e&&(e={}),e},a.backendReducer,c.hotKeyReducer]),t=[c.hotKeyMiddleware];return(0,r.createStore)(e,r.applyMiddleware.apply(void 0,t))};var l=function(e){var t,n; /** * @file * @copyright 2020 Aleksej Komarov @@ -156,7 +156,7 @@ if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),i=Object.def * @file * @copyright 2020 Aleksej Komarov * @license MIT - */t.captureExternalLinks=function(){document.addEventListener("click",(function(e){var t=String(e.target.tagName).toLowerCase(),n=String(e.target.href);"a"===t&&("?"===n.charAt(0)||n.startsWith(location.origin)||n.startsWith("byond://")||(e.preventDefault(),(0,o.callByond)("",{src:window.__ref__,action:"tgui:link",url:n})))}))}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosWindow=void 0;var o=n(0),r=n(1),i=n(2),a=n(135),c=n(191),l=function(e,t){var n=e.resizable,l=e.theme,s=void 0===l?"ntos":l,d=e.children,u=(0,r.useBackend)(t),p=u.act,m=u.data,h=m.PC_batteryicon,f=m.PC_showbatteryicon,C=m.PC_batterypercent,g=m.PC_ntneticon,N=m.PC_apclinkicon,b=m.PC_stationtime,V=m.PC_programheaders,v=void 0===V?[]:V,x=m.PC_showexitprogram;return(0,o.createComponentVNode)(2,c.Window,{theme:s,resizable:n,children:(0,o.createVNode)(1,"div","NtosWindow",[(0,o.createVNode)(1,"div","NtosWindow__header NtosHeader",[(0,o.createVNode)(1,"div","NtosHeader__left",[(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,mr:2,children:b}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,italic:!0,mr:2,opacity:.33,children:"NtOS"})],4),(0,o.createVNode)(1,"div","NtosHeader__right",[v.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:e.icon})},e.icon)})),(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:g&&(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:g})}),!!f&&h&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:[h&&(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:h}),C&&C]}),N&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:N})}),!!x&&(0,o.createComponentVNode)(2,i.Button,{width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"window-minimize-o",tooltip:"Minimize",tooltipPosition:"bottom",onClick:function(){return p("PC_minimize")}}),!!x&&(0,o.createComponentVNode)(2,i.Button,{mr:"-3px",width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"window-close-o",tooltip:"Close",tooltipPosition:"bottom-left",onClick:function(){return p("PC_exit")}}),!x&&(0,o.createComponentVNode)(2,i.Button,{mr:"-3px",width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"power-off",tooltip:"Power off",tooltipPosition:"bottom-left",onClick:function(){return p("PC_shutdown")}})],0)],4,{onMouseDown:function(){(0,a.refocusLayout)()}}),d],0)})};t.NtosWindow=l;l.Content=function(e){return(0,o.createVNode)(1,"div","NtosWindow__content",(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Window.Content,Object.assign({},e))),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.BlockQuote=void 0;var o=n(0),r=n(7),i=n(17);t.BlockQuote=function(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} + */t.captureExternalLinks=function(){document.addEventListener("click",(function(e){var t=String(e.target.tagName).toLowerCase(),n=String(e.target.href);"a"===t&&("?"===n.charAt(0)||n.startsWith(location.origin)||n.startsWith("byond://")||(e.preventDefault(),(0,o.callByond)("",{src:window.__ref__,action:"tgui:link",url:n})))}))}},function(e,t,n){"use strict";t.__esModule=!0,t.NtosWindow=void 0;var o=n(0),r=n(1),i=n(2),a=n(137),c=n(191),l=function(e,t){var n=e.resizable,l=e.theme,s=void 0===l?"ntos":l,d=e.children,u=(0,r.useBackend)(t),p=u.act,m=u.data,h=m.PC_batteryicon,f=m.PC_showbatteryicon,C=m.PC_batterypercent,g=m.PC_ntneticon,N=m.PC_apclinkicon,b=m.PC_stationtime,V=m.PC_programheaders,v=void 0===V?[]:V,x=m.PC_showexitprogram;return(0,o.createComponentVNode)(2,c.Window,{theme:s,resizable:n,children:(0,o.createVNode)(1,"div","NtosWindow",[(0,o.createVNode)(1,"div","NtosWindow__header NtosHeader",[(0,o.createVNode)(1,"div","NtosHeader__left",[(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,mr:2,children:b}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,italic:!0,mr:2,opacity:.33,children:"NtOS"})],4),(0,o.createVNode)(1,"div","NtosHeader__right",[v.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:e.icon})},e.icon)})),(0,o.createComponentVNode)(2,i.Box,{inline:!0,children:g&&(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:g})}),!!f&&h&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:[h&&(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:h}),C&&C]}),N&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,mr:1,children:(0,o.createVNode)(1,"img","NtosHeader__icon",null,1,{src:N})}),!!x&&(0,o.createComponentVNode)(2,i.Button,{width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"window-minimize-o",tooltip:"Minimize",tooltipPosition:"bottom",onClick:function(){return p("PC_minimize")}}),!!x&&(0,o.createComponentVNode)(2,i.Button,{mr:"-3px",width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"window-close-o",tooltip:"Close",tooltipPosition:"bottom-left",onClick:function(){return p("PC_exit")}}),!x&&(0,o.createComponentVNode)(2,i.Button,{mr:"-3px",width:"26px",lineHeight:"22px",textAlign:"center",color:"transparent",icon:"power-off",tooltip:"Power off",tooltipPosition:"bottom-left",onClick:function(){return p("PC_shutdown")}})],0)],4,{onMouseDown:function(){(0,a.refocusLayout)()}}),d],0)})};t.NtosWindow=l;l.Content=function(e){return(0,o.createVNode)(1,"div","NtosWindow__content",(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Window.Content,Object.assign({},e))),2)}},function(e,t,n){"use strict";t.__esModule=!0,t.BlockQuote=void 0;var o=n(0),r=n(7),i=n(17);t.BlockQuote=function(e){var t=e.className,n=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov @@ -167,7 +167,7 @@ if(!document.createEvent){var t,n=!0,o=!1,r="__IE8__"+Math.random(),i=Object.def * @copyright 2020 Aleksej Komarov * @license MIT */ -var l=function(e){var t,n;function i(t){var n;return(n=e.call(this,t)||this).ref=(0,o.createRef)(),n.state={viewBox:[600,200]},n.handleResize=function(){var e=n.ref.current;n.setState({viewBox:[e.offsetWidth,e.offsetHeight]})},n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=i.prototype;return a.componentDidMount=function(){window.addEventListener("resize",this.handleResize),this.handleResize()},a.componentWillUnmount=function(){window.removeEventListener("resize",this.handleResize)},a.render=function(){var e=this,t=this.props,n=t.data,i=void 0===n?[]:n,a=t.rangeX,l=t.rangeY,s=t.fillColor,d=void 0===s?"none":s,u=t.strokeColor,p=void 0===u?"#ffffff":u,m=t.strokeWidth,h=void 0===m?2:m,f=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),C=this.state.viewBox,g=function(e,t,n,o){if(0===e.length)return[];var i=(0,r.zipWith)(Math.min).apply(void 0,e),a=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),o!==undefined&&(i[1]=o[0],a[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,i,a,t)}))(e)}(i,C,a,l);if(g.length>0){var N=g[0],b=g[g.length-1];g.push([C[0]+h,b[1]]),g.push([C[0]+h,-h]),g.push([-h,-h]),g.push([-h,N[1]])}var V=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(t,["data","rangeX","rangeY","fillColor","strokeColor","strokeWidth"]),C=this.state.viewBox,g=function(e,t,n,o){if(0===e.length)return[];var i=(0,r.zipWith)(Math.min).apply(void 0,e),a=(0,r.zipWith)(Math.max).apply(void 0,e);return n!==undefined&&(i[0]=n[0],a[0]=n[1]),o!==undefined&&(i[1]=o[0],a[1]=o[1]),(0,r.map)((function(e){return(0,r.zipWith)((function(e,t,n,o){return(e-t)/(n-t)*o}))(e,i,a,t)}))(e)}(i,C,a,l);if(g.length>0){var N=g[0],b=g[g.length-1];g.push([C[0]+h,b[1]]),g.push([C[0]+h,-h]),g.push([-h,-h]),g.push([-h,N[1]])}var V=function(e){for(var t="",n=0;n=0||(r[n]=e[n]);return r}(e,["content","children","className","color","backgroundColor"]);return l.color=t?null:"transparent",l.backgroundColor=a||c,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,i.computeBoxClassName)(l)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(l))))};t.ColorBox=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(7),i=n(17),a=n(138);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var a=function(e){var t=e.content,n=(e.children,e.className),a=e.color,c=e.backgroundColor,l=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["content","children","className","color","backgroundColor"]);return l.color=t?null:"transparent",l.backgroundColor=a||c,(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["ColorBox",n,(0,i.computeBoxClassName)(l)]),t||".",0,Object.assign({},(0,i.computeBoxProps)(l))))};t.ColorBox=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Dropdown=void 0;var o=n(0),r=n(7),i=n(17),a=n(140);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov @@ -191,17 +191,17 @@ var l=function(e){var t,n;function l(t){var n;return(n=e.call(this,t)||this).sta * @copyright 2020 Aleksej Komarov * @license MIT */ -var c=function(e){return(0,r.isFalsy)(e)?"":e},l=function(e){var t,n;function l(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=l.prototype;return s.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},s.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,i=this.inputRef.current;i&&!n&&o!==r&&(i.value=c(r))},s.setEditing=function(e){this.setState({editing:e})},s.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=(e.autofocus,e.disabled),l=e.multiline,s=e.cols,d=void 0===s?32:s,u=e.rows,p=void 0===u?4:u,m=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"]),h=m.className,f=m.fluid,C=a(m,["className","fluid"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Input",f&&"Input--fluid",c&&"Input--disabled",h])},C,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),l?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:d,rows:p,disabled:c},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:c},null,this.inputRef)]})))},l}(o.Component);t.Input=l},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(15),i=n(7),a=n(23),c=n(17),l=n(189),s=n(139);t.Knob=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,d=e.maxValue,u=e.minValue,p=e.onChange,m=e.onDrag,h=e.step,f=e.stepPixelSize,C=e.suppressFlicker,g=e.unit,N=e.value,b=e.className,V=e.style,v=e.fillValue,x=e.color,y=e.ranges,k=void 0===y?{}:y,w=e.size,_=e.bipolar,B=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var c=function(e){return(0,r.isFalsy)(e)?"":e},l=function(e){var t,n;function l(){var t;return(t=e.call(this)||this).inputRef=(0,o.createRef)(),t.state={editing:!1},t.handleInput=function(e){var n=t.state.editing,o=t.props.onInput;n||t.setEditing(!0),o&&o(e,e.target.value)},t.handleFocus=function(e){t.state.editing||t.setEditing(!0)},t.handleBlur=function(e){var n=t.state.editing,o=t.props.onChange;n&&(t.setEditing(!1),o&&o(e,e.target.value))},t.handleKeyDown=function(e){var n=t.props,o=n.onInput,r=n.onChange,i=n.onEnter;return 13===e.keyCode?(t.setEditing(!1),r&&r(e,e.target.value),o&&o(e,e.target.value),i&&i(e,e.target.value),void(t.props.selfClear?e.target.value="":e.target.blur())):27===e.keyCode?(t.setEditing(!1),e.target.value=c(t.props.value),void e.target.blur()):void 0},t}n=e,(t=l).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var s=l.prototype;return s.componentDidMount=function(){var e=this.props.value,t=this.inputRef.current;t&&(t.value=c(e),this.props.autofocus&&(t.focus(),t.selectionStart=0,t.selectionEnd=t.value.length))},s.componentDidUpdate=function(e,t){var n=this.state.editing,o=e.value,r=this.props.value,i=this.inputRef.current;i&&!n&&o!==r&&(i.value=c(r))},s.setEditing=function(e){this.setState({editing:e})},s.render=function(){var e=this.props,t=(e.selfClear,e.onInput,e.onChange,e.onEnter,e.value,e.maxLength),n=e.placeholder,c=(e.autofocus,e.disabled),l=e.multiline,s=e.cols,d=void 0===s?32:s,u=e.rows,p=void 0===u?4:u,m=a(e,["selfClear","onInput","onChange","onEnter","value","maxLength","placeholder","autofocus","disabled","multiline","cols","rows"]),h=m.className,f=m.fluid,C=a(m,["className","fluid"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Input",f&&"Input--fluid",c&&"Input--disabled",h])},C,{children:[(0,o.createVNode)(1,"div","Input__baseline",".",16),l?(0,o.createVNode)(128,"textarea","Input__textarea",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,maxLength:t,cols:d,rows:p,disabled:c},null,this.inputRef):(0,o.createVNode)(64,"input","Input__input",null,1,{placeholder:n,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,maxLength:t,disabled:c},null,this.inputRef)]})))},l}(o.Component);t.Input=l},function(e,t,n){"use strict";t.__esModule=!0,t.Knob=void 0;var o=n(0),r=n(15),i=n(7),a=n(23),c=n(17),l=n(189),s=n(141);t.Knob=function(e){if(a.IS_IE8)return(0,o.normalizeProps)((0,o.createComponentVNode)(2,s.NumberInput,Object.assign({},e)));var t=e.animated,n=e.format,d=e.maxValue,u=e.minValue,p=e.onChange,m=e.onDrag,h=e.step,f=e.stepPixelSize,C=e.suppressFlicker,g=e.unit,N=e.value,b=e.className,V=e.style,v=e.fillValue,x=e.color,y=e.ranges,k=void 0===y?{}:y,w=e.size,_=e.bipolar,B=(e.children,e.popUpPosition),S=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:d,minValue:u,onChange:p,onDrag:m,step:h,stepPixelSize:f,suppressFlicker:C,unit:g,value:N},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,l=e.displayElement,s=e.inputElement,p=e.handleDragStart,m=(0,r.scale)(null!=v?v:a,u,d),h=(0,r.scale)(a,u,d),f=x||(0,r.keyOfMatchingRange)(null!=v?v:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+f,_&&"Knob--bipolar",b,(0,c.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,i.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((_?2.75:2)-1.5*m)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),s],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":w+"rem"},V)},S)),{onMouseDown:p})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(50);function i(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} + */(e,["animated","format","maxValue","minValue","onChange","onDrag","step","stepPixelSize","suppressFlicker","unit","value","className","style","fillValue","color","ranges","size","bipolar","children","popUpPosition"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,l.DraggableControl,Object.assign({dragMatrix:[0,-1]},{animated:t,format:n,maxValue:d,minValue:u,onChange:p,onDrag:m,step:h,stepPixelSize:f,suppressFlicker:C,unit:g,value:N},{children:function(e){var t=e.dragging,n=(e.editing,e.value),a=e.displayValue,l=e.displayElement,s=e.inputElement,p=e.handleDragStart,m=(0,r.scale)(null!=v?v:a,u,d),h=(0,r.scale)(a,u,d),f=x||(0,r.keyOfMatchingRange)(null!=v?v:n,k)||"default",C=270*(h-.5);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,i.classes)(["Knob","Knob--color--"+f,_&&"Knob--bipolar",b,(0,c.computeBoxClassName)(S)]),[(0,o.createVNode)(1,"div","Knob__circle",(0,o.createVNode)(1,"div","Knob__cursorBox",(0,o.createVNode)(1,"div","Knob__cursor"),2,{style:{transform:"rotate("+C+"deg)"}}),2),t&&(0,o.createVNode)(1,"div",(0,i.classes)(["Knob__popupValue",B&&"Knob__popupValue--"+B]),l,0),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringTrackPivot",(0,o.createVNode)(32,"circle","Knob__ringTrack",null,1,{cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),(0,o.createVNode)(32,"svg","Knob__ring Knob__ringFillPivot",(0,o.createVNode)(32,"circle","Knob__ringFill",null,1,{style:{"stroke-dashoffset":((_?2.75:2)-1.5*m)*Math.PI*50},cx:"50",cy:"50",r:"50"}),2,{viewBox:"0 0 100 100"}),s],0,Object.assign({},(0,c.computeBoxProps)(Object.assign({style:Object.assign({"font-size":w+"rem"},V)},S)),{onMouseDown:p})))}})))}},function(e,t,n){"use strict";t.__esModule=!0,t.LabeledControls=void 0;var o=n(0),r=n(51);function i(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var a=function(e){var t=e.children,n=i(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),i=n(1),a=n(64),c=n(190),l=n(185);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var d=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},u=function(e){function t(t){var n;n=e.call(this,t)||this;var o=window.innerHeight/2-256;return n.state={offsetX:0,offsetY:o,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),d(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),d(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),d(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=n/e.zoom;if(1!==r){e.zoom=n;var i=document.getElementsByClassName("NanoMap__container");if(i.length){var a=(0,l.getBoundingBox)(i[0]),c=a.size[0]/2-e.offsetX,s=a.size[1]/2-e.offsetY;e.offsetX+=c-c*r,e.offsetY+=s-s*r}return t.onZoom&&t.onZoom(e.zoom),e}}))},n}return s(t,e),t.prototype.render=function(){var e=(0,i.useBackend)(this.context).config,t=this.state,n=t.dragging,a=t.offsetX,c=t.offsetY,l=t.zoom,s=void 0===l?1:l,d=this.props.children,u=510*s+"px",p={width:u,height:u,"margin-top":c+"px","margin-left":a+"px",overflow:"hidden",position:"relative","background-image":"url("+e.map+"_nanomap_z1.png)","background-size":"cover","background-repeat":"no-repeat",border:"1px solid rgba(0, 0, 0, .3)","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:p,textAlign:"center",onMouseDown:this.handleDragStart,children:(0,o.createComponentVNode)(2,r.Box,{children:d})}),(0,o.createComponentVNode)(2,h,{zoom:s,onZoom:this.handleZoom})]})},t}(o.Component);t.NanoMap=u;var p,m=function(e){function t(t){var n;n=e.call(this,t)||this;var o=(0,i.useBackend)(n.props.context).act;return n.state={color:n.props.color},n.handleClick=function(e){p!==undefined&&p.setState({color:"blue"}),o("switch_camera",{name:n.props.name}),p=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),n.setState({color:"green"})},n}return s(t,e),t.prototype.render=function(){var e=2*this.props.x*this.props.zoom-this.props.zoom-3,t=2*this.props.y*this.props.zoom-this.props.zoom-3;return(0,o.createComponentVNode)(2,r.Button,{onClick:this.handleClick,position:"absolute",className:"NanoMap__button",lineHeight:"0",color:this.props.status?this.state.color:"red",bottom:t+"px",left:e+"px",children:(0,o.createComponentVNode)(2,r.Tooltip,{content:this.props.tooltip})},this.props.key)},t}(o.Component);u.NanoButton=m,u.Marker=function(e){var t=e.x,n=e.y,i=e.zoom,a=void 0===i?1:i,c=e.icon,l=e.tooltip,s=e.color,d=e.onClick,u=e.size,p=void 0===u?6:u,m=2*t*a-a-3,h=2*n*a-a-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:h+"px",left:m+"px",onClick:d,children:[(0,o.createComponentVNode)(2,r.Icon,{name:c,color:s,fontSize:p+"px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:l})]}),2)};var h=function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:"1",maxValue:"8",stepPixelSize:"10",format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};u.Zoomer=h},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(7),i=n(17),a=n(186);t.Modal=function(e){var t,n=e.className,c=e.children,l=e.onEnter,s=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} + */var a=function(e){var t=e.children,n=i(e,["children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({mx:-.5,align:"stretch",justify:"space-between"},n,{children:t})))};t.LabeledControls=a;a.Item=function(e){var t=e.label,n=e.children,a=i(e,["label","children"]);return(0,o.createComponentVNode)(2,r.Flex.Item,{mx:1,children:(0,o.normalizeProps)((0,o.createComponentVNode)(2,r.Flex,Object.assign({minWidth:"52px",height:"100%",direction:"column",align:"center",textAlign:"center",justify:"space-between"},a,{children:[(0,o.createComponentVNode)(2,r.Flex.Item),(0,o.createComponentVNode)(2,r.Flex.Item,{children:n}),(0,o.createComponentVNode)(2,r.Flex.Item,{color:"label",children:t})]})))})}},function(e,t,n){"use strict";t.__esModule=!0,t.NanoMap=void 0;var o=n(0),r=n(2),i=n(1),a=n(52),c=n(190),l=n(185);function s(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var d=function(e){return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.cancelBubble=!0,e.returnValue=!1,!1},u=function(e){function t(t){var n;n=e.call(this,t)||this;var o=window.innerHeight/2-256;return n.state={offsetX:0,offsetY:o,transform:"none",dragging:!1,originX:null,originY:null,zoom:1},n.handleDragStart=function(e){n.ref=e.target,n.setState({dragging:!1,originX:e.screenX,originY:e.screenY}),document.addEventListener("mousemove",n.handleDragMove),document.addEventListener("mouseup",n.handleDragEnd),d(e)},n.handleDragMove=function(e){n.setState((function(t){var n=Object.assign({},t),o=e.screenX-n.originX,r=e.screenY-n.originY;return t.dragging?(n.offsetX+=o,n.offsetY+=r,n.originX=e.screenX,n.originY=e.screenY):n.dragging=!0,n})),d(e)},n.handleDragEnd=function(e){n.setState({dragging:!1,originX:null,originY:null}),document.removeEventListener("mousemove",n.handleDragMove),document.removeEventListener("mouseup",n.handleDragEnd),d(e)},n.handleZoom=function(e,o){n.setState((function(e){var n=Math.min(Math.max(o,1),8),r=n/e.zoom;if(1!==r){e.zoom=n;var i=document.getElementsByClassName("NanoMap__container");if(i.length){var a=(0,l.getBoundingBox)(i[0]),c=a.size[0]/2-e.offsetX,s=a.size[1]/2-e.offsetY;e.offsetX+=c-c*r,e.offsetY+=s-s*r}return t.onZoom&&t.onZoom(e.zoom),e}}))},n}return s(t,e),t.prototype.render=function(){var e=(0,i.useBackend)(this.context).config,t=this.state,n=t.dragging,a=t.offsetX,c=t.offsetY,l=t.zoom,s=void 0===l?1:l,d=this.props.children,u=510*s+"px",p={width:u,height:u,"margin-top":c+"px","margin-left":a+"px",overflow:"hidden",position:"relative","background-image":"url("+e.map+"_nanomap_z1.png)","background-size":"cover","background-repeat":"no-repeat",border:"1px solid rgba(0, 0, 0, .3)","text-align":"center",cursor:n?"move":"auto"};return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__container",children:[(0,o.createComponentVNode)(2,r.Box,{style:p,textAlign:"center",onMouseDown:this.handleDragStart,children:(0,o.createComponentVNode)(2,r.Box,{children:d})}),(0,o.createComponentVNode)(2,h,{zoom:s,onZoom:this.handleZoom})]})},t}(o.Component);t.NanoMap=u;var p,m=function(e){function t(t){var n;n=e.call(this,t)||this;var o=(0,i.useBackend)(n.props.context).act;return n.state={color:n.props.color},n.handleClick=function(e){p!==undefined&&p.setState({color:"blue"}),o("switch_camera",{name:n.props.name}),p=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(n),n.setState({color:"green"})},n}return s(t,e),t.prototype.render=function(){var e=2*this.props.x*this.props.zoom-this.props.zoom-3,t=2*this.props.y*this.props.zoom-this.props.zoom-3;return(0,o.createComponentVNode)(2,r.Button,{onClick:this.handleClick,position:"absolute",className:"NanoMap__button",lineHeight:"0",color:this.props.status?this.state.color:"red",bottom:t+"px",left:e+"px",children:(0,o.createComponentVNode)(2,r.Tooltip,{content:this.props.tooltip})},this.props.key)},t}(o.Component);u.NanoButton=m,u.Marker=function(e){var t=e.x,n=e.y,i=e.zoom,a=void 0===i?1:i,c=e.icon,l=e.tooltip,s=e.color,d=e.onClick,u=e.size,p=void 0===u?6:u,m=2*t*a-a-3,h=2*n*a-a-3;return(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,r.Box,{position:"absolute",className:"NanoMap__marker",lineHeight:"0",bottom:h+"px",left:m+"px",onClick:d,children:[(0,o.createComponentVNode)(2,r.Icon,{name:c,color:s,fontSize:p+"px"}),(0,o.createComponentVNode)(2,r.Tooltip,{content:l})]}),2)};var h=function(e){return(0,o.createComponentVNode)(2,r.Box,{className:"NanoMap__zoomer",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Zoom",children:(0,o.createComponentVNode)(2,c.Slider,{minValue:"1",maxValue:"8",stepPixelSize:"10",format:function(e){return e+"x"},value:e.zoom,onDrag:function(t,n){return e.onZoom(t,n)}})})})})};u.Zoomer=h},function(e,t,n){"use strict";t.__esModule=!0,t.Modal=void 0;var o=n(0),r=n(7),i=n(17),a=n(186);t.Modal=function(e){var t,n=e.className,c=e.children,l=e.onEnter,s=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov @@ -223,21 +223,21 @@ var a=function(e){var t=e.className,n=e.color,a=e.info,c=(e.warning,e.success),l * @copyright 2020 Aleksej Komarov * @license MIT */ -var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,l=e.buttons,s=e.content,d=e.stretchContents,u=e.noTopPadding,p=e.children,m=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","title","level","buttons","content","stretchContents","noTopPadding","children"]),h=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(l),f=!(0,r.isFalsy)(s)||!(0,r.isFalsy)(p);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+c,e.flexGrow&&"Section--flex",t])},m,{children:[h&&(0,o.createVNode)(1,"div","Section__title",[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",l,0)],4),f&&(0,o.createComponentVNode)(2,i.Box,{className:(0,r.classes)(["Section__content",!!d&&"Section__content--stretchContents",!!u&&"Section__content--noTopPadding"]),children:[s,p]})]})))};t.Section=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Stack=void 0;var o=n(0),r=n(7),i=n(50);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} +var a=function(e){var t=e.className,n=e.title,a=e.level,c=void 0===a?1:a,l=e.buttons,s=e.content,d=e.stretchContents,u=e.noTopPadding,p=e.children,m=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["className","title","level","buttons","content","stretchContents","noTopPadding","children"]),h=!(0,r.isFalsy)(n)||!(0,r.isFalsy)(l),f=!(0,r.isFalsy)(s)||!(0,r.isFalsy)(p);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Box,Object.assign({className:(0,r.classes)(["Section","Section--level--"+c,e.flexGrow&&"Section--flex",t])},m,{children:[h&&(0,o.createVNode)(1,"div","Section__title",[(0,o.createVNode)(1,"span","Section__titleText",n,0),(0,o.createVNode)(1,"div","Section__buttons",l,0)],4),f&&(0,o.createComponentVNode)(2,i.Box,{className:(0,r.classes)(["Section__content",!!d&&"Section__content--stretchContents",!!u&&"Section__content--noTopPadding"]),children:[s,p]})]})))};t.Section=a,a.defaultHooks=r.pureComponentHooks},function(e,t,n){"use strict";t.__esModule=!0,t.Stack=void 0;var o=n(0),r=n(7),i=n(51);function a(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2021 Aleksej Komarov * @license MIT - */var c=function(e){var t=e.className,n=e.vertical,c=e.fill,l=a(e,["className","vertical","fill"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Stack",c&&"Stack--fill",n?"Stack--vertical":"Stack--horizontal",t]),direction:n?"column":"row"},l)))};t.Stack=c;c.Item=function(e){var t=e.className,n=a(e,["className"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex.Item,Object.assign({className:(0,r.classes)(["Stack__item",t])},n)))};c.Divider=function(e){var t=e.className,n=e.hidden,c=a(e,["className","hidden"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex.Item,Object.assign({className:(0,r.classes)(["Stack__item","Stack__divider",n&&"Stack__divider--hidden",t])},c)))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(7),i=n(17),a=n(137);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} + */var c=function(e){var t=e.className,n=e.vertical,c=e.fill,l=a(e,["className","vertical","fill"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex,Object.assign({className:(0,r.classes)(["Stack",c&&"Stack--fill",n?"Stack--vertical":"Stack--horizontal",t]),direction:n?"column":"row"},l)))};t.Stack=c;c.Item=function(e){var t=e.className,n=a(e,["className"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex.Item,Object.assign({className:(0,r.classes)(["Stack__item",t])},n)))};c.Divider=function(e){var t=e.className,n=e.hidden,c=a(e,["className","hidden"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Flex.Item,Object.assign({className:(0,r.classes)(["Stack__item","Stack__divider",n&&"Stack__divider--hidden",t])},c)))}},function(e,t,n){"use strict";t.__esModule=!0,t.Tabs=void 0;var o=n(0),r=n(7),i=n(17),a=n(139);function c(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r} /** * @file * @copyright 2020 Aleksej Komarov * @license MIT - */var l=function(e){var t=e.className,n=e.vertical,a=e.children,l=c(e,["className","vertical","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(l))))};t.Tabs=l;l.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,l=c(e,["className","selected","altSelection"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},l)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":460,"./AIFixer.js":461,"./APC.js":462,"./ATM.js":463,"./AccountsUplinkTerminal.js":464,"./AgentCard.js":465,"./AiAirlock.js":466,"./AirAlarm.js":467,"./AirlockAccessController.js":468,"./AirlockElectronics.js":469,"./AppearanceChanger.js":470,"./AtmosAlertConsole.js":471,"./AtmosControl.js":472,"./AtmosFilter.js":473,"./AtmosMixer.js":474,"./AtmosPump.js":475,"./Autolathe.js":476,"./Biogenerator.js":477,"./BlueSpaceArtilleryControl.js":478,"./BluespaceRiftScanner.js":479,"./BluespaceRiftServer.js":480,"./BluespaceTap.js":481,"./BodyScanner.js":482,"./BorgPanel.js":483,"./BotClean.js":484,"./BotSecurity.js":485,"./BrigCells.js":486,"./BrigTimer.js":487,"./CameraConsole.js":488,"./Canister.js":489,"./CardComputer.js":490,"./CargoConsole.js":491,"./Changelog.js":492,"./ChemDispenser.js":521,"./ChemHeater.js":525,"./ChemMaster.js":526,"./CloningConsole.js":527,"./CommunicationsComputer.js":528,"./Contractor.js":529,"./ConveyorSwitch.js":530,"./CrewMonitor.js":531,"./Cryo.js":532,"./CryopodConsole.js":534,"./DNAModifier.js":535,"./DestinationTagger.js":536,"./DisposalBin.js":537,"./DnaVault.js":538,"./EFTPOS.js":539,"./ERTManager.js":540,"./Electropack.js":541,"./EvolutionMenu.js":542,"./ExosuitFabricator.js":543,"./ExternalAirlockController.js":544,"./FaxMachine.js":545,"./FloorPainter.js":546,"./GPS.js":547,"./GasAnalyzer.js":548,"./GasFreezer.js":550,"./GenericCrewManifest.js":551,"./GhostHudPanel.js":552,"./HandheldChemDispenser.js":553,"./Instrument.js":554,"./ItemPixelShift.js":555,"./KeycardAuth.js":556,"./LaborClaimConsole.js":557,"./LawManager.js":558,"./MechBayConsole.js":559,"./MechaControlConsole.js":560,"./MedicalRecords.js":561,"./MiningVendor.js":562,"./Multitool.js":563,"./Newscaster.js":564,"./NinjaBloodScan.js":565,"./NinjaMindScan.js":566,"./NuclearBomb.js":567,"./OperatingComputer.js":568,"./Orbit.js":569,"./OreRedemption.js":570,"./PAI.js":571,"./PDA.js":588,"./PDAPainter.js":604,"./Pacman.js":605,"./PersonalCrafting.js":606,"./Photocopier.js":607,"./PodTracking.js":608,"./PoolController.js":609,"./PortablePump.js":610,"./PortableScrubber.js":611,"./PortableTurret.js":612,"./PowerMonitor.js":198,"./RCD.js":613,"./RPD.js":614,"./Radio.js":615,"./RequestConsole.js":616,"./RequestManager.js":617,"./RndConsole.js":67,"./RobotSelfDiagnosis.js":632,"./RoboticsControlConsole.js":633,"./Safe.js":634,"./SatelliteControl.js":635,"./SecureStorage.js":636,"./SecurityRecords.js":637,"./SeedExtractor.js":638,"./ShuttleConsole.js":639,"./ShuttleManipulator.js":640,"./Sleeper.js":641,"./SlotMachine.js":642,"./Smartfridge.js":643,"./Smes.js":644,"./SolarControl.js":645,"./SpawnersMenu.js":646,"./SpiderOS.js":647,"./StationAlertConsole.js":648,"./SuitStorage.js":649,"./SupermatterMonitor.js":650,"./SyndicateComputerSimple.js":651,"./SyndieCargoConsole.js":652,"./TTSSeedsExplorer.js":653,"./TachyonArray.js":654,"./Tank.js":655,"./TankDispenser.js":656,"./TcommsCore.js":657,"./TcommsRelay.js":658,"./Teleporter.js":659,"./ThiefKit.js":660,"./TransferValve.js":661,"./Uplink.js":662,"./VampireSpecMenu.js":663,"./VampireTrophiesStatus.js":664,"./Vending.js":665,"./VolumeMixer.js":666,"./VotePanel.js":667,"./Wires.js":668,"./Workshop.js":669};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=459},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var s=null;return s=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,a.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:s,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,i.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,i.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,i.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return c("wireless")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return c("radio")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return c("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var s=null;s=2!==l.stat&&null!==l.stat;var d=null;d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var u=null;return u=l.integrity>=100,(0,o.createComponentVNode)(2,a.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,i.Section,{title:"Information",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:d,value:l.integrity/100})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:s?"green":"red",children:s?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,i.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,i.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return c("wireless")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return c("radio")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,i.Button,{icon:"wrench",disabled:u||l.active,content:u?"Already Repaired":"Repair",onClick:function(){return c("fix")}})})]}),(0,o.createComponentVNode)(2,i.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(192);t.APC=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,d)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},s={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data,u=d.locked&&!d.siliconUser,p=(d.normallyLocked,l[d.externalPower]||l[0]),m=l[d.chargingStatus]||l[0],h=d.powerChannels||[],f=s[d.malfStatus]||s[0],C=d.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,i.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Main Breaker",color:p.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.isOperating?"power-off":"times",content:d.isOperating?"On":"Off",selected:d.isOperating&&!u,color:d.isOperating?"":"bad",disabled:u,onClick:function(){return a("breaker")}}),children:["[ ",p.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",color:m.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.chargeMode?"sync":"times",content:d.chargeMode?"Auto":"Off",selected:d.chargeMode,disabled:u,onClick:function(){return a("charge")}}),children:["[ ",m.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Auto",selected:!u&&(1===e.status||3===e.status),disabled:u,onClick:function(){return a("channel",t.auto)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:"On",selected:!u&&2===e.status,disabled:u,onClick:function(){return a("channel",t.on)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Off",selected:!u&&0===e.status,disabled:u,onClick:function(){return a("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[d.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Misc",buttons:!!d.siliconUser&&(0,o.createFragment)([!!d.malfStatus&&(0,o.createComponentVNode)(2,i.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return a(f.action)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return a("overload")}})],0),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.coverLocked?"lock":"unlock",content:d.coverLocked?"Engaged":"Disengaged",selected:d.coverLocked,disabled:u,onClick:function(){return a("cover")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:d.nightshiftLights?"Enabled":"Disabled",selected:d.nightshiftLights,onClick:function(){return a("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.coverLocked?"lock":"unlock",content:d.emergencyLights?"Engaged":"Disengaged",selected:d.emergencyLights,disabled:u,onClick:function(){return a("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ATM=function(e,t){var n,m=(0,r.useBackend)(t),h=(m.act,m.data),f=h.view_screen,C=h.authenticated_account,g=h.ticks_left_locked_down,N=h.linked_db;if(g>0)n=(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(N)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,s);break;case 3:n=(0,o.createComponentVNode)(2,p);break;default:n=(0,o.createComponentVNode)(2,d)}else n=(0,o.createComponentVNode)(2,u);else n=(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Section,{children:n})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.machine_id,s=c.held_card_name;return(0,o.createComponentVNode)(2,i.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,i.Box,{children:"For all your monetary need!"}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:"info-circle"})," This terminal is ",(0,o.createVNode)(1,"i",null,l,0),", report this code when contacting Nanotrasen IT Support."]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,i.Button,{content:s,icon:"eject",onClick:function(){return a("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.security_level;return(0,o.createComponentVNode)(2,i.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,i.Button,{content:"Zero",icon:"unlock",selected:0===c,onClick:function(){return a("change_security_level",{new_security_level:0})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,i.Button,{content:"One",icon:"unlock",selected:1===c,onClick:function(){return a("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,i.Button,{content:"Two",selected:2===c,icon:"unlock",onClick:function(){return a("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:"In addition to account number and pin, a card is required to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,m)]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),s=l[0],d=l[1],u=(0,r.useLocalState)(t,"fundsAmount",0),p=u[0],h=u[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],g=f[1],N=c.money;return(0,o.createComponentVNode)(2,i.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Balance",children:["$",N]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target account number",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Funds to transfer",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,onInput:function(e,t){return g(t)}})})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return a("transfer",{target_acc_number:s,funds_amount:p,purpose:C})}}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,m)]})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),s=l[0],d=l[1],u=c.owner_name,p=c.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Welcome, "+u,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return a("logout")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Balance",children:["$",p]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Withdraw Fund",icon:"sign-out-alt",onClick:function(){return a("withdrawal",{funds_amount:s})}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Change account security level",icon:"lock",onClick:function(){return a("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return a("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"View transaction log",icon:"list",onClick:function(){return a("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Print balance statement",icon:"print",onClick:function(){return a("balance_statement")}})})]})],4)},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"accountID",null),s=l[0],d=l[1],u=(0,r.useLocalState)(t,"accountPin",null),p=u[0],m=u[1];c.machine_id,c.held_card_name;return(0,o.createComponentVNode)(2,i.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return m(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return a("attempt_auth",{account_num:s,account_pin:p})}})})]})})},p=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,i.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Target"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Terminal"})]}),a.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{p:"1rem",children:[e.date," ",e.time]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.target_name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:["$",e.amount]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.source_terminal})]},e)}))]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,m)]})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data;return(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return a("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(50),l=n(3),s=n(140),d=n(141);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,i.useBackend)(t),a=(r.act,r.data),c=a.loginState,p=a.currentPage;return c.logged_in?(1===p?n=(0,o.createComponentVNode)(2,u):2===p?n=(0,o.createComponentVNode)(2,h):3===p&&(n=(0,o.createComponentVNode)(2,f)),(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s.LoginInfo),n]})})):(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,d.LoginScreen)})})};var u=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.accounts,s=(0,i.useLocalState)(t,"searchText",""),d=s[0],u=(s[1],(0,i.useLocalState)(t,"sortId","owner_name")),h=u[0],f=(u[1],(0,i.useLocalState)(t,"sortOrder",!0)),C=f[0];f[1];return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,a.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",children:(0,o.createComponentVNode)(2,a.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,p,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,p,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,p,{id:"suspended",children:"Account Status"})]}),l.filter((0,r.createSearch)(d,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended}))).sort((function(e,t){var n=C?1:-1;return e[h].localeCompare(t[h])*n})).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("view_account_detail",{index:e.account_index})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.suspended})]},e.id)}))]})})})]})},p=function(e,t){var n=(0,i.useLocalState)(t,"sortId","name"),r=n[0],c=n[1],l=(0,i.useLocalState)(t,"sortOrder",!0),s=l[0],d=l[1],u=e.id,p=e.children;return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{color:r!==u&&"transparent",width:"100%",onClick:function(){r===u?d(!s):(c(u),d(!0))},children:[p,r===u&&(0,o.createComponentVNode)(2,a.Icon,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data.is_printing,s=(0,i.useLocalState)(t,"searchText",""),d=(s[0],s[1]);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Account List",disabled:l,ml:"0.25rem",onClick:function(){return r("print_records")}})]}),(0,o.createComponentVNode)(2,c.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.is_printing,s=c.account_number,d=c.owner_name,u=c.money,p=c.suspended,m=c.transactions;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"#"+s+" / "+d,mt:1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Account Details",disabled:l,onClick:function(){return r("print_account_details")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Number",children:["#",s]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Status",color:p?"red":"green",children:[p?"Suspended":"Active",(0,o.createComponentVNode)(2,a.Button,{ml:1,content:p?"Unsuspend":"Suspend",icon:p?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Target"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.date," ",e.time]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.source_terminal})]},e)}))]})})],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=(n.data,(0,i.useLocalState)(t,"accName","")),l=c[0],s=c[1],d=(0,i.useLocalState)(t,"accDeposit",""),u=d[0],p=d[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Name Here",onChange:function(e,t){return s(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"0",onChange:function(e,t){return p(t)}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:u})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCardSLSlots=t.AgentCardAppearances=t.AgentCardInfo=t.AgentCard=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AgentCard=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"syndicate",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"id-card"})," Appearance"]},"Appearance"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===d,onClick:function(){return u(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"arrow-down"})," Save/Load Card Info"]},"Save/Load Card Info")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,c);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,s);default:return(0,o.createComponentVNode)(2,c)}}(d)]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.registered_name,s=c.sex,d=c.age,u=c.assignment,p=c.associated_account_number,m=c.blood_type,h=c.dna_hash,f=c.fingerprint_hash,C=c.photo,g=c.ai_tracking;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Card Info",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,i.Button,{content:l||"[UNSET]",onClick:function(){return a("change_name")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sex",children:(0,o.createComponentVNode)(2,i.Button,{iconRight:!1,content:s||"[UNSET]",onClick:function(){return a("change_sex")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Age",children:(0,o.createComponentVNode)(2,i.Button,{content:d||"[UNSET]",onClick:function(){return a("change_age")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,i.Button,{content:u||"[UNSET]",onClick:function(){return a("change_occupation")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fingerprints",children:(0,o.createComponentVNode)(2,i.Button,{content:f||"[UNSET]",onClick:function(){return a("change_fingerprints")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Type",children:(0,o.createComponentVNode)(2,i.Button,{content:m||"[UNSET]",onClick:function(){return a("change_blood_type")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"DNA Hash",children:(0,o.createComponentVNode)(2,i.Button,{content:h||"[UNSET]",onClick:function(){return a("change_dna_hash")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Money Account",children:(0,o.createComponentVNode)(2,i.Button,{content:p||"[UNSET]",onClick:function(){return a("change_money_account")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Photo",children:(0,o.createComponentVNode)(2,i.Button,{content:C?"Update":"[UNSET]",onClick:function(){return a("change_photo")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Card Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Card Info",children:(0,o.createComponentVNode)(2,i.Button,{content:"Delete Card Info",onClick:function(){return a("delete_info")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Access",children:(0,o.createComponentVNode)(2,i.Button,{content:"Reset Access",onClick:function(){return a("clear_access")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"AI Tracking",children:(0,o.createComponentVNode)(2,i.Button,{content:g?"Untrackable":"Trackable",onClick:function(){return a("change_ai_tracking")}})})]})})],4)};t.AgentCardInfo=c;var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.appearances;return(0,o.createComponentVNode)(2,i.Section,{title:"Card Appearance",children:c.map((function(e){return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+e.image,style:{"vertical-align":"middle",width:"64px",margin:"0px","margin-left":"0px"},onclick:function(){return a("change_appearance_new",{new_appearance:e.name})}},e.name)}))})};t.AgentCardAppearances=l;var s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.saved_info;return(0,o.createComponentVNode)(2,i.Section,{title:"Save/Load Manager",style:{"line-height":"25px"},children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.registered_name?e.registered_name+", "+e.assignment:"Slot "+e.id,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Clear",onClick:function(){return a("clear_slot",{slot:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Save",onClick:function(){return a("save_slot",{slot:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Load",disabled:!e.registered_name,onClick:function(){return a("load_slot",{slot:e.id})}})],4)},e.id)}))})})};t.AgentCardSLSlots=s},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=c[s.power.main]||c[0],u=c[s.power.backup]||c[0],p=c[s.shock]||c[0];return(0,o.createComponentVNode)(2,a.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Main",color:d.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",disabled:!s.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[s.power.main?"Online":"Offline"," ",s.wires.main_power?s.power.main_timeleft>0&&"["+s.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Backup",color:u.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",disabled:!s.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[s.power.backup?"Online":"Offline"," ",s.wires.backup_power?s.power.backup_timeleft>0&&"["+s.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Electrify",color:p.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"wrench",disabled:!(s.wires.shock&&2!==s.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"bolt",disabled:!s.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"bolt",disabled:!s.wires.shock||0===s.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===s.shock?"Safe":"Electrified"," ",(s.wires.shock?s.shock_timeleft>0&&"["+s.shock_timeleft+"s]":"[Wires have been cut!]")||-1===s.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.id_scanner?"power-off":"times",content:s.id_scanner?"Enabled":"Disabled",selected:s.id_scanner,disabled:!s.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!s.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.emergency?"power-off":"times",content:s.emergency?"Enabled":"Disabled",selected:s.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.locked?"lock":"unlock",content:s.locked?"Lowered":"Raised",selected:s.locked,disabled:!s.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!s.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.lights?"power-off":"times",content:s.lights?"Enabled":"Disabled",selected:s.lights,disabled:!s.wires.lights,onClick:function(){return l("light-toggle")}}),children:!s.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.safe?"power-off":"times",content:s.safe?"Enabled":"Disabled",selected:s.safe,disabled:!s.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!s.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.speed?"power-off":"times",content:s.speed?"Enabled":"Disabled",selected:s.speed,disabled:!s.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!s.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.opened?"sign-out-alt":"sign-in-alt",content:s.opened?"Open":"Closed",selected:s.opened,disabled:s.locked||s.welded,onClick:function(){return l("open-close")}}),children:!(!s.locked&&!s.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),s.locked?"bolted":"",s.locked&&s.welded?" and ":"",s.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(192);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},s=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,s=a.data,d=s.air,u=s.mode,p=s.atmos_alarm,m=s.locked,h=s.alarmActivated,f=s.rcon,C=s.target_temp;return n=0===d.danger.overall?0===p?"Optimal":"Caution: Atmos alert in area":1===d.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,i.Section,{title:"Air Status",children:d?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,i.Box,{color:l(d.danger.pressure),children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.pressure})," kPa",!m&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,i.Button,{content:3===u?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===u,icon:"exclamation-triangle",onClick:function(){return c("mode",{mode:3===u?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.oxygen/100,fractionDigits:"1",color:l(d.danger.oxygen)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.nitrogen/100,fractionDigits:"1",color:l(d.danger.nitrogen)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.co2/100,fractionDigits:"1",color:l(d.danger.co2)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.plasma/100,fractionDigits:"1",color:l(d.danger.plasma)})}),d.contents.other>.1&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.other/100,fractionDigits:"1",color:l(d.danger.other)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.Box,{color:l(d.danger.temperature),children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.temperature})," K / ",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,i.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return c("temperature")}}),(0,o.createComponentVNode)(2,i.Button,{content:d.thermostat_state?"On":"Off",selected:d.thermostat_state,icon:"power-off",onClick:function(){return c("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,i.Box,{color:l(d.danger.overall),children:[n,!m&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,i.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return c(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Off",selected:1===f,onClick:function(){return c("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Auto",selected:2===f,onClick:function(){return c("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,i.Button,{content:"On",selected:3===f,onClick:function(){return c("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,i.Box,{children:"Unable to acquire air sample!"})})},d=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0],c=n[1];return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===a,onClick:function(){return c(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===a,onClick:function(){return c(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===a,onClick:function(){return c(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===a,onClick:function(){return c(3)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),i=n[0];n[1];switch(i){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,m);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},p=function(e,t){var n=(0,r.useBackend)(t),a=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,i.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return a("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return a("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,i.Button,{content:"External",selected:1===e.checks,onClick:function(){return a("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return a("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,i.Button,{content:"Set",icon:"cog",onClick:function(){return a("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return a("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,i.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return a("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return a("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,i.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return a("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return a("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return a("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return a("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return a("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return a("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.modes,s=c.presets,d=c.emagged,u=c.mode,p=c.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,i.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!d)&&(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:"cog",selected:e.id===u,onClick:function(){return a("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,i.Table,{mt:1,children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:"cog",selected:e.id===p,onClick:function(){return a("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.thresholds;return(0,o.createComponentVNode)(2,i.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return a("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AirlockAccessController=function(e,t){var n,c,l=(0,r.useBackend)(t),s=l.act,d=l.data,u=d.exterior_status,p=d.interior_status,m=d.processing;return n="open"===d.exterior_status.state?(0,o.createComponentVNode)(2,i.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:m,onClick:function(){return s("force_ext")}}):(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:m,onClick:function(){return s("cycle_ext_door")}}),c="open"===d.interior_status.state?(0,o.createComponentVNode)(2,i.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:m,color:"open"===p?"red":m?"yellow":null,onClick:function(){return s("force_int")}}):(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:m,onClick:function(){return s("cycle_int_door")}}),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Information",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"External Door Status",children:"closed"===u.state?"Locked":"Open"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Door Status",children:"closed"===p.state?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,i.Box,{children:n}),(0,o.createComponentVNode)(2,i.Box,{children:c})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(99);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,s)]})};var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,i.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:"north"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"North"})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:"south"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"South"})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:"east"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"East"})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:"west"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"West"})}})})]})]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data,s=l.selected_accesses,d=l.one_access,u=l.regions;return(0,o.createComponentVNode)(2,c.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:d,content:"One",onClick:function(){return a("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:!d,content:"All",onClick:function(){return a("set_one_access",{access:"all"})}})],4),accesses:u,selectedList:s,accessMod:function(e){return a("set",{access:e})},grantAll:function(){return a("grant_all")},denyAll:function(){return a("clear_all")},grantDep:function(e){return a("grant_region",{region:e})},denyDep:function(e){return a("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.change_race,u=s.species,p=s.specimen,m=s.change_gender,h=s.gender,f=s.has_gender,C=s.change_eye_color,g=s.change_skin_tone,N=s.change_skin_color,b=s.change_head_accessory_color,V=s.change_hair_color,v=s.change_secondary_hair_color,x=s.change_facial_hair_color,y=s.change_secondary_facial_hair_color,k=s.change_head_marking_color,w=s.change_body_marking_color,_=s.change_tail_marking_color,B=s.change_head_accessory,S=s.head_accessory_styles,L=s.head_accessory_style,A=s.change_hair,E=s.hair_styles,I=s.hair_style,D=s.change_hair_gradient,T=s.change_facial_hair,F=s.facial_hair_styles,M=s.facial_hair_style,P=s.change_head_markings,O=s.head_marking_styles,R=s.head_marking_style,j=s.change_body_markings,U=s.body_marking_styles,z=s.body_marking_style,W=s.change_tail_markings,H=s.tail_marking_styles,K=s.tail_marking_style,Y=s.change_body_accessory,G=s.body_accessory_styles,q=s.body_accessory_style,X=s.change_alt_head,J=s.alt_head_styles,$=s.alt_head_style,Z=!1;return(C||g||N||b||V||v||x||y||k||w||_)&&(Z=!0),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[!!d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.specimen,selected:e.specimen===p,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!m&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,i.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Z&&(0,o.createComponentVNode)(2,c),!!B&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Head accessory",children:S.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===L,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!A&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hair",children:E.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.hairstyle,selected:e.hairstyle===I,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!D&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!T&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Facial hair",children:F.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===M,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!P&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Head markings",children:O.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===R,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Body markings",children:U.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!W&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===K,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!Y&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Body accessory",children:G.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!X&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Alternate head",children:J.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.altheadstyle,selected:e.altheadstyle===$,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!c[e.key]&&(0,o.createComponentVNode)(2,i.Button,{content:e.text,onClick:function(){return a(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.priority||[],d=l.minor||[];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===s.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),s.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:e,color:"bad",onClick:function(){return c("clear",{zone:e})}}),2,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:e,color:"average",onClick:function(){return c("clear",{zone:e})}}),2,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),i=n(2),a=n(80),c=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),d=a[0],u=a[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,s);default:return"WE SHOULDN'T BE HERE!"}}(d)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,a.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,a.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,i.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,i.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,a.TableCell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"cog",content:"Access",onClick:function(){return c("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"zoom",1),s=l[0],d=l[1],u=c.alarms,p=c.stationLevel;return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return d(e)},children:u.filter((function(e){return e.z===p})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:s,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0),onClick:function(){return a("open_alarm",{aref:e.ref})}},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.on,d=l.pressure,u=l.max_pressure,p=l.filter_type,m=l.filter_type_list;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",disabled:0===d,width:2.2,onClick:function(){return c("min_pressure")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:d,onDrag:function(e,t){return c("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",disabled:d===u,width:2.2,onClick:function(){return c("max_pressure")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Filter",children:m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:e.gas_type===p,content:e.label,onClick:function(){return c("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.on,u=s.pressure,p=s.max_pressure,m=s.node1_concentration,h=s.node2_concentration;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:p,value:u,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",disabled:u===p,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,c,{node_name:"Node 1",node_ref:m}),(0,o.createComponentVNode)(2,c,{node_name:"Node 2",node_ref:h})]})})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:c,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return a("set_node",{node_name:c,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return a("set_node",{node_name:c,concentration:t/100})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return a("set_node",{node_name:c,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.on,d=l.rate,u=l.max_rate,p=l.gas_unit,m=l.step;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",disabled:0===d,width:2.2,onClick:function(){return c("min_rate")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:p,width:6.1,lineHeight:1.5,step:m,minValue:0,maxValue:u,value:d,onDrag:function(e,t){return c("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",disabled:d===u,width:2.2,onClick:function(){return c("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(43),i=n(24),a=n(1),c=n(2),l=n(3),s=n(18),d=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,a.useBackend)(t),u=n.act,p=n.data,m=p.total_amount,h=(p.max_amount,p.metal_amount),f=p.glass_amount,C=p.busyname,g=(p.busyamt,p.showhacked,p.buildQueue),N=p.buildQueueLen,b=p.recipes,V=p.categories,v=(0,a.useSharedState)(t,"category",0),x=v[0],y=v[1];0===x&&(x="Tools");var k=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),w=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),_=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),B=(0,a.useSharedState)(t,"search_text",""),S=B[0],L=B[1],A=(0,s.createSearch)(S,(function(e){return e.name})),E="";N>0&&(E=g.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:g[t][0],onClick:function(){return u("remove_from_queue",{remove_from_queue:g.indexOf(e)+1})}},e)},t)})));var I=(0,r.flow)([(0,i.filter)((function(e){return(e.category.indexOf(x)>-1||S)&&(p.showhacked||!e.hacked)})),S&&(0,i.filter)(A),(0,i.sortBy)((function(e){return e.name.toLowerCase()}))])(b),D="Build";S?D="Results for: '"+S+"':":x&&(D="Build ("+x+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,c.Section,{title:D,buttons:(0,o.createComponentVNode)(2,c.Dropdown,{width:"190px",options:V,selected:x,onSelected:function(e){return y(e)}}),children:[(0,o.createComponentVNode)(2,c.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return L(t)},mb:1}),I.map((function(e){return(0,o.createComponentVNode)(2,c.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&1===p.busyamt,disabled:!d(e,p.metal_amount,p.glass_amount,1),onClick:function(){return u("make",{make:e.uid,multiplier:1})},children:(0,s.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&10===p.busyamt,disabled:!d(e,p.metal_amount,p.glass_amount,10),onClick:function(){return u("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&25===p.busyamt,disabled:!d(e,p.metal_amount,p.glass_amount,25),onClick:function(){return u("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&p.busyamt===e.max_multiplier,disabled:!d(e,p.metal_amount,p.glass_amount,e.max_multiplier),onClick:function(){return u("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,s.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,c.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,c.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Metal",children:k}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Glass",children:w}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total",children:_}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Storage",children:[p.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Building",children:(0,o.createComponentVNode)(2,c.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,c.Section,{title:"Build Queue",children:[E,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Clear All",disabled:!p.buildQueueLen,onClick:function(){return u("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Biogenerator=function(){return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,d)]})})};var c=function(e,t){if((0,r.useBackend)(t).data.processing)return(0,o.createComponentVNode)(2,i.Dimmer,{children:(0,o.createComponentVNode)(2,i.Flex,{mb:"30px",children:(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,o.createVNode)(1,"br"),"The biogenerator is processing..."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.biomass,l=a.container,s=a.container_curr_reagents,d=a.container_max_reagents;return(0,o.createComponentVNode)(2,i.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{mr:"5px",children:c}),(0,o.createComponentVNode)(2,i.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,i.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,i.ProgressBar,{value:s,maxValue:d,children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:s+" / "+d+" units"})}):(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"None"})})]})]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.has_plants,s=c.container;return(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return a("activate")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!s,tooltip:s?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return a("detach_container")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return a("eject_plants")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.biomass,s=c.product_list,d=c.container,u=(0,r.useSharedState)(t,"vendAmount",1),p=u[0],m=u[1],h=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,i.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*p,(0,o.createComponentVNode)(2,i.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",width:"40%",children:e.needs_container&&!d?(0,o.createComponentVNode)(2,i.Button,{content:"No container",disabled:!0,icon:"flask",tooltip:"\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438",tooltipPosition:"top-left"}):(0,o.createComponentVNode)(2,i.Button,{content:"Vend",disabled:l0?Math.floor(c/u):0,f=d?"@?%%!\u2116@"+u:u,C=c>=u,g=p-p%5+(p%5>0?5:0);return(0,o.createComponentVNode)(2,i.Section,{title:"\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0420\u0430\u0437\u043b\u043e\u043c\u0430",children:[(0,o.createComponentVNode)(2,i.Box,{color:"silver",bold:!0,children:n}),(0,o.createComponentVNode)(2,i.ProgressBar,{color:0===m?"bad":m<100?"average":"good",value:a,maxValue:r,mt:1,mb:2,children:[m<=100?m:100," %"]}),(0,o.createComponentVNode)(2,i.Box,{children:["\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0437\u043e\u043d\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: ",(0,o.createComponentVNode)(2,i.Box,{color:c?C?"good":"average":"bad",as:"span",children:Math.floor(c)}),(0,o.createComponentVNode)(2,i.Button,{icon:"atom",tooltip:"\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043e\u043d\u0434\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c "+f+" \u0434\u0430\u043d\u043d\u044b\u0445.",content:p>0?"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 "+g+" \u0441\u0435\u043a\u0443\u043d\u0434":"\u0417\u043e\u043d\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c ("+h+")",disabled:!C||p>0,onClick:function(){return l("probe",{rift_id:t})},mx:2}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",content:s?"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d":"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439",disabled:s||m<100,onClick:function(){return l("reward",{rift_id:t})},mt:1.4})]})]})}(e)})),(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u043a\u0430\u043d\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:f&&f.map((function(e){return function(e){var t=e.scannerId,n=e.scannerName,r=e.scanStatus,a=e.canSwitch,s=e.switching,d=c[r],u="OFF"===d?[" ","silver"]:"NO_RIFTS"===d?["\u041d\u0435\u0442 \u0440\u0430\u0437\u043b\u043e\u043c\u043e\u0432","silver"]:"SOME_RIFTS"===d?["\u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442","good"]:"DANGER"===d?["\u041e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c! \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0441\u043a\u0430\u043d\u0435\u0440!","bad"]:void 0;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:n,py:0,children:[s?(0,o.createComponentVNode)(2,i.Icon,{name:"circle-notch",color:"silver",spin:!0,ml:1.85,mr:1.79,my:.84}):a?(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",color:"OFF"===d?"bad":"good",onClick:function(){return l("toggle_scanner",{scanner_id:t})},ml:1,mr:1}):(0,o.createComponentVNode)(2,i.Icon,{name:"power-off",color:"OFF"===d?"bad":"good",ml:1.85,mr:1.79,my:.84}),"OFF"!==d&&(0,o.createComponentVNode)(2,i.Box,{as:"span",color:u[1],children:u[0]})]})}(e)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u0435\u0440\u0432\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:h&&h.map((function(e){return function(e){var t=e.servName,n=e.servData;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:n.length?n.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:[e.riftName," \u2014 ",Math.floor(e.probePoints)," \u0434\u0430\u043d\u043d\u044b\u0445."]},t)})):(0,o.createComponentVNode)(2,i.Box,{children:"\u041d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445"})})}(e)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BluespaceTap=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(100);t.BluespaceTap=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.product||[],u=s.desiredLevel,p=s.inputLevel,m=s.points,h=s.totalPoints,f=s.powerUse,C=s.availablePower,g=s.maxLevel,N=s.emagged,b=s.safeLevels,V=s.nextLevelPower,v=u>p?"bad":"good";return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!N&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(p>b)&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,i.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,i.Section,{title:"Input",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Level",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===u,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===u,onClick:function(){return l("set",{set_level:p})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===u,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:u,fillValue:p,minValue:0,color:v,maxValue:g,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:u===g,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:u===g,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:g})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Power Use",children:(0,c.formatPower)(f)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power for next level",children:(0,c.formatPower)(V)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Surplus Power",children:(0,c.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available Points",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{disabled:e.price>=m,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["hasBorer","bad","Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."],["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],d=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radioactive","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],u={average:[.25,.5],bad:[.5,Infinity]},p=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,a.Box,{children:t},t)],0)}),null):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,i.useBackend)(t).data,r=n.occupied,a=n.occupant,l=void 0===a?{}:a,s=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,x);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:s})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,g,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,V,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=n.act,s=n.data.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",onClick:function(){return c("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:(0,r.round)(s.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:(0,r.round)(s.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants",children:s.implant_len?(0,o.createComponentVNode)(2,a.Box,{children:s.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"None"})})]})})},g=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:s.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,a.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},n)}))}):(0,o.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No abnormalities found."})})},N=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,a.Table,{children:p(d,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,b,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:u,children:[(0,o.createComponentVNode)(2,a.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:m([!!e.internalBleeding&&"Internal bleeding",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:[m([!!e.status.splinted&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",bold:!0,children:"DEAD"})]),m(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:u,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:m([h(e.germ_level)])}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:m([1===e.robotic&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},x=function(){return(0,o.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BorgPanel=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BorgPanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.borg||{},d=l.cell||{},u=d.charge/d.maxcharge,p=l.channels||[],m=l.modules||[],h=l.upgrades||[],f=l.ais||[],C=l.laws||[];return(0,o.createComponentVNode)(2,a.Window,{title:"Borg Panel",width:700,height:700,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:s.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return c("rename")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,i.Button,{icon:s.emagged?"check-square-o":"square-o",content:"Emagged",selected:s.emagged,onClick:function(){return c("toggle_emagged")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s.lockdown?"check-square-o":"square-o",content:"Locked Down",selected:s.lockdown,onClick:function(){return c("toggle_lockdown")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s.scrambledcodes?"check-square-o":"square-o",content:"Scrambled Codes",selected:s.scrambledcodes,onClick:function(){return c("toggle_scrambledcodes")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Reset Module",onClick:function(){return c("reset_module")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge",children:[d.missing?(0,o.createVNode)(1,"span","color-bad","No cell installed",16):(0,o.createComponentVNode)(2,i.ProgressBar,{value:u,children:d.charge+" / "+d.maxcharge}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Set",onClick:function(){return c("set_charge")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Change",onClick:function(){return c("change_cell")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",content:"Remove",color:"bad",onClick:function(){return c("remove_cell")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Radio Channels",children:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.installed?"check-square-o":"square-o",content:e.name,selected:e.installed,onClick:function(){return c("toggle_radio",{channel:e.name})}},e.name)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Model",children:m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:s.active_module===e.name?"check-square-o":"square-o",content:e.name+" module",selected:s.active_module===e.name,onClick:function(){return c("setmodule",{module:e.name})}},e.type)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Upgrades",children:h.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.installed?"check-square-o":"square-o",content:e.name,selected:e.installed,onClick:function(){return c("toggle_upgrade",{upgrade:e.type})}},e.type)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Master AI",children:f.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.connected?"check-square-o":"square-o",content:e.name,selected:e.connected,onClick:function(){return c("slavetoai",{slavetoai:e.ref})}},e.ref)}))})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Laws",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Law Manager",selected:s.lawmanager,onClick:function(){return c("lawmanager")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s.lawupdate?"check-square-o":"square-o",content:"Lawsync",selected:s.lawupdate,onClick:function(){return c("toggle_lawupdate")}})],4),children:C.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.locked,d=l.noaccess,u=l.maintpanel,p=l.on,m=l.autopatrol,h=l.canhack,f=l.emagged,C=l.remote_disabled,g=l.painame,N=l.cleanblood;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,i.Section,{title:"General Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,i.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:m,content:"Auto Patrol",disabled:d,onClick:function(){return c("autopatrol")}})}),!!u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Maintenance Panel",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Panel Open!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safety System",children:(0,o.createComponentVNode)(2,i.Box,{color:f?"bad":"good",children:f?"DISABLED!":"Enabled"})}),!!h&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hacking",children:(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:f?"Restore Safties":"Hack",disabled:d,color:"bad",onClick:function(){return c("hack")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Access",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:!C,content:"AI Remote Control",disabled:d,onClick:function(){return c("disableremote")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:d,onClick:function(){return c("blood")}})}),g&&(0,o.createComponentVNode)(2,i.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:g,disabled:d,onClick:function(){return c("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.locked,d=l.noaccess,u=l.maintpanel,p=l.on,m=l.autopatrol,h=l.canhack,f=l.emagged,C=l.remote_disabled,g=l.painame,N=l.check_id,b=l.check_weapons,V=l.check_warrant,v=l.arrest_mode,x=l.arrest_declare;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,i.Section,{title:"General Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,i.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:m,content:"Auto Patrol",disabled:d,onClick:function(){return c("autopatrol")}})}),!!u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Maintenance Panel",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Panel Open!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safety System",children:(0,o.createComponentVNode)(2,i.Box,{color:f?"bad":"good",children:f?"DISABLED!":"Enabled"})}),!!h&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hacking",children:(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:f?"Restore Safties":"Hack",disabled:d,color:"bad",onClick:function(){return c("hack")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Access",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:!C,content:"AI Remote Control",disabled:d,onClick:function(){return c("disableremote")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:N,content:"Unidentifiable Persons",disabled:d,onClick:function(){return c("authid")}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:b,content:"Unauthorized Weapons",disabled:d,onClick:function(){return c("authweapon")}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:V,content:"Wanted Criminals",disabled:d,onClick:function(){return c("authwarrant")}})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:v,content:"Detain Targets Indefinitely",disabled:d,onClick:function(){return c("arrtype")}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:x,content:"Announce Arrests On Radio",disabled:d,onClick:function(){return c("arrdeclare")}})]}),g&&(0,o.createComponentVNode)(2,i.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:g,disabled:d,onClick:function(){return c("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),i=n(2),a=n(1),c=function(e,t){var n=e.cell,r=(0,a.useBackend)(t).act,c=n.cell_id,l=n.occupant,s=n.crimes,d=n.brigged_by,u=n.time_left_seconds,p=n.time_set_seconds,m=n.ref,h="";u>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,i.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:c}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:s}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.TimeDisplay,{totalSeconds:p})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.TimeDisplay,{totalSeconds:u})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{type:"button",onClick:function(){r("release",{ref:m})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,i.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,c,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,a.useBackend)(t),c=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,i.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:c})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,i.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,i.Box,{color:"red",children:l.occupant}));var s="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(s="exclamation-triangle"));var d=[],u=0;for(u=0;u60||!l.isAllowed,onClick:function(){return c("start")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CameraConsoleOldContent=t.CameraConsoleMapContent=t.CameraConsole=void 0;var o=n(0),r=n(24),i=n(43),a=n(7),c=n(18),l=n(1),s=n(2),d=n(3),u=function(e,t){var n,o;if(!t)return[];var r=e.findIndex((function(e){return e.name===t.name}));return[null==(n=e[r-1])?void 0:n.name,null==(o=e[r+1])?void 0:o.name]},p=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,i.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)};t.CameraConsole=function(e,t){var n=(0,l.useLocalState)(t,"tabIndex",0),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,s.Tabs,{children:[(0,o.createComponentVNode)(2,s.Tabs.Tab,{selected:0===r,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,s.Icon,{name:"map-marked-alt"})," Map"]},"Map"),(0,o.createComponentVNode)(2,s.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,s.Icon,{name:"table"})," List"]},"List")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,h);default:return"WE SHOULDN'T BE HERE!"}}(r)]})})})};var m=function(e,t){var n=(0,l.useBackend)(t),r=n.act,i=n.data,a=n.config,c=p(i.cameras),d=(0,l.useLocalState)(t,"zoom",1),m=d[0],h=d[1],f=i.mapRef,C=i.activeCamera,g=i.stationLevel,N=u(c,C),b=N[0],V=N[1];return(0,o.createComponentVNode)(2,s.Box,{height:"100%",display:"flex",children:[(0,o.createComponentVNode)(2,s.Box,{height:"100%",flex:"0 0 500px",display:"flex",children:(0,o.createComponentVNode)(2,s.NanoMap,{onZoom:function(e){return h(e)},children:c.filter((function(e){return e.z===g})).map((function(e){return(0,o.createComponentVNode)(2,s.NanoMap.NanoButton,{activeCamera:C,x:e.x,y:e.y,context:t,zoom:m,icon:"circle",tooltip:e.name,name:e.name,color:"blue",status:e.status},e.ref)}))})}),(0,o.createComponentVNode)(2,s.Box,{height:"100%",resizable:!0,className:"CameraConsole__new__right",children:[(0,o.createVNode)(1,"div","CameraConsole__header",[(0,o.createVNode)(1,"div","CameraConsole__title",[(0,o.createVNode)(1,"b",null,"Camera: ",16),C&&C.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-left",disabled:!b,onClick:function(){return r("switch_camera",{name:b})}}),(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-right",disabled:!V,onClick:function(){return r("switch_camera",{name:V})}})],4)],4),(0,o.createComponentVNode)(2,s.ByondUi,{resizable:!0,className:"CameraConsole__map",overflow:"hidden",params:{id:f,parent:a.window,type:"map"}})]})]})};t.CameraConsoleMapContent=m;var h=function(e,t){var n=(0,l.useBackend)(t),r=n.act,i=n.data,c=n.config,m=i.mapRef,h=i.activeCamera,f=(0,l.useLocalState)(t,"searchText",""),C=f[0],g=f[1],N=p(i.cameras,C),b=u(N,h),V=b[0],v=b[1];return(0,o.createComponentVNode)(2,s.Box,{children:[(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createFragment)([(0,o.createComponentVNode)(2,s.Input,{fluid:!0,mb:1,placeholder:"Search for a camera",onInput:function(e,t){return g(t)}}),(0,o.createComponentVNode)(2,s.Section,{children:N.map((function(e){return(0,o.createVNode)(1,"div",(0,a.classes)(["Button","Button--fluid",e.status?"Button--color--transparent":"Button--color--danger","Button--ellipsis",h&&e.name===h.name&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){(0,d.refocusLayout)(),r("switch_camera",{name:e.name})}},e.name)}))})],4)}),2),(0,o.createVNode)(1,"div","CameraConsole__right",[(0,o.createVNode)(1,"div","CameraConsole__toolbar",[(0,o.createVNode)(1,"b",null,"Camera: ",16),h&&h.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-left",disabled:!V,onClick:function(){return r("switch_camera",{name:V})}}),(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-right",disabled:!v,onClick:function(){return r("switch_camera",{name:v})}})],4),(0,o.createComponentVNode)(2,s.ByondUi,{className:"CameraConsole__map",params:{id:m,parent:c.window,type:"map"}})],4)]})};t.CameraConsoleOldContent=h},function(e,t,n){"use strict";t.__esModule=!0,t.Canister=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(100),l=n(3);t.Canister=function(e,t){var n=(0,i.useBackend)(t),s=n.act,d=n.data,u=d.portConnected,p=d.tankPressure,m=d.releasePressure,h=d.defaultReleasePressure,f=d.minReleasePressure,C=d.maxReleasePressure,g=d.valveOpen,N=d.name,b=d.canLabel,V=d.colorContainer,v=d.color_index,x=d.hasHoldingTank,y=d.holdingTank,k="";v.prim&&(k=V.prim.options[v.prim].name);var w="";v.sec&&(w=V.sec.options[v.sec].name);var _="";v.ter&&(_=V.ter.options[v.ter].name);var B="";v.quart&&(B=V.quart.options[v.quart].name);var S=[],L=[],A=[],E=[],I=0;for(I=0;Ie.current_positions&&(0,o.createComponentVNode)(2,i.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"-",disabled:d.cooldown_time||!e.can_close,onClick:function(){return s("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"+",disabled:d.cooldown_time||!e.can_open,onClick:function(){return s("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:d.target_dept&&(0,o.createComponentVNode)(2,i.Box,{color:"green",children:d.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,i.Button,{content:"Priority",selected:d.priority_jobs.indexOf(e.title)>-1,disabled:d.cooldown_time||!e.can_prioritize,onClick:function(){return s("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=d.authenticated&&d.scan_name?d.modify_name?(0,o.createComponentVNode)(2,c.AccessList,{accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return s("set",{access:e})},grantAll:function(){return s("grant_all")},denyAll:function(){return s("clear_all")},grantDep:function(e){return s("grant_region",{region:e})},denyDep:function(e){return s("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,i.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=d.authenticated?d.records.length?(0,o.createComponentVNode)(2,i.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Delete All Records",disabled:!d.authenticated||0===d.records.length||d.target_dept,onClick:function(){return s("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Reason"}),!!d.iscentcom&&(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Deleted By"})]}),d.records.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.reason}),!!d.iscentcom&&(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!d.iscentcom&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!d.authenticated||0===d.records.length,onClick:function(){return s("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=d.authenticated&&d.scan_name?(0,o.createComponentVNode)(2,i.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Actions"})]}),d.people_dept.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return s("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u,p,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(43),i=n(24),a=n(1),c=n(2),l=n(3),s=(n(64),n(18));t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,m)]})})};var d=function(e,t){var n=(0,a.useLocalState)(t,"contentsModal",null),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"contentsModalTitle",null),s=l[0],d=l[1];return null!==r&&null!==s?(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,c.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[s,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,c.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,c.Box,{m:2,children:(0,o.createComponentVNode)(2,c.Button,{content:"Close",onClick:function(){i(null),d(null)}})})]}):void 0},u=function(e,t){var n,r,i=(0,a.useBackend)(t),l=i.act,s=i.data,d=s.is_public,u=s.points,p=s.timeleft,m=s.moving,h=s.at_station;return m||h?!m&&h?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==p?"Shuttle is en route (ETA: "+p+" minutes)":"Shuttle is en route (ETA: "+p+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Points Available",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Shuttle Status",children:n}),0===d&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,c.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.categories,p=d.supply_packs,m=(0,a.useSharedState)(t,"category","Emergency"),h=m[0],f=m[1],C=(0,a.useSharedState)(t,"search_text",""),g=C[0],N=C[1],b=(0,a.useLocalState)(t,"contentsModal",null),V=(b[0],b[1]),v=(0,a.useLocalState)(t,"contentsModalTitle",null),x=(v[0],v[1]),y=(0,s.createSearch)(g,(function(e){return e.name})),k=(0,r.flow)([(0,i.filter)((function(e){return e.cat===u.filter((function(e){return e.name===h}))[0].category||g})),g&&(0,i.filter)(y),(0,i.sortBy)((function(e){return e.name.toLowerCase()}))])(p),w="Crate Catalogue";return g?w="Results for '"+g+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,c.Section,{title:w,buttons:(0,o.createComponentVNode)(2,c.Dropdown,{width:"190px",options:u.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,c.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return N(t)},mb:1}),(0,o.createComponentVNode)(2,c.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:k.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Points)"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Order 1",icon:"shopping-cart",onClick:function(){return l("order",{crate:e.ref,multiple:0})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Order Multiple",icon:"cart-plus",onClick:function(){return l("order",{crate:e.ref,multiple:1})}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Contents",icon:"search",onClick:function(){V(e.contents),x(e.name)}})]})]},e.name)}))})})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.requests,s=i.canapprove,d=i.orders;return(0,o.createComponentVNode)(2,c.Section,{title:"Details",children:(0,o.createComponentVNode)(2,c.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Approve",color:"green",disabled:!s,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Deny",color:"red",onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Confirmed Orders"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Changelog=void 0;var o=n(0),r=n(7),i=n(1),a=n(2),c=n(3),l=u(n(493)),s=u(n(494)),d=u(n(520));function u(e){return e&&e.__esModule?e:{"default":e}}function p(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(o,r)}var m={add:{icon:"check-circle",color:"green"},admin:{icon:"user-shield",color:"purple"},balance:{icon:"balance-scale-right",color:"yellow"},bugfix:{icon:"bug",color:"green"},code_imp:{icon:"code",color:"green"},config:{icon:"cogs",color:"purple"},del:{icon:"minus",color:"red"},expansion:{icon:"check-circle",color:"green"},experiment:{icon:"radiation",color:"yellow"},image:{icon:"image",color:"green"},imageadd:{icon:"tg-image-plus",color:"green"},imagedel:{icon:"tg-image-minus",color:"red"},qol:{icon:"hand-holding-heart",color:"green"},refactor:{icon:"tools",color:"green"},rscadd:{icon:"check-circle",color:"green"},rscdel:{icon:"times-circle",color:"red"},server:{icon:"server",color:"purple"},sound:{icon:"volume-high",color:"green"},soundadd:{icon:"tg-sound-plus",color:"green"},sounddel:{icon:"tg-sound-minus",color:"red"},spellcheck:{icon:"spell-check",color:"green"},tgs:{icon:"toolbox",color:"purple"},tweak:{icon:"wrench",color:"green"},unknown:{icon:"info-circle",color:"label"},wip:{icon:"hammer",color:"orange"}},h=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).state={data:"Loading changelog data...",selectedDate:"",selectedIndex:0},t.dateChoices=[],t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var h=u.prototype;return h.setData=function(e){this.setState({data:e})},h.setSelectedDate=function(e){this.setState({selectedDate:e})},h.setSelectedIndex=function(e){this.setState({selectedIndex:e})},h.getData=function(e,t){void 0===t&&(t=1);var n=(0,i.useBackend)(this.context).act,o=this;if(t>6)return this.setData("Failed to load data after 6 attempts");n("get_month",{date:e}),(0,d["default"])(e+".yml").then(function(){var n,r=(n=regeneratorRuntime.mark((function i(n){var r,a;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,n.text();case 2:r=i.sent,/^Cannot find/.test(r)?(a=50+50*t,o.setData("Loading changelog data"+".".repeat(t+3)),setTimeout((function(){o.getData(e,t+1)}),a)):o.setData(s["default"].load(r,{schema:s["default"].CORE_SCHEMA}));case 5:case"end":return i.stop()}}),i)})),function(){var e=this,t=arguments;return new Promise((function(o,r){var i=n.apply(e,t);function a(e){p(i,o,r,a,c,"next",e)}function c(e){p(i,o,r,a,c,"throw",e)}a(undefined)}))});return function(e){return r.apply(this,arguments)}}())},h.componentDidMount=function(){var e=this,t=(0,i.useBackend)(this.context).data.dates,n=void 0===t?[]:t;n&&(n.forEach((function(t){return e.dateChoices.push((0,l["default"])(t,"mmmm yyyy",!0))})),this.setSelectedDate(this.dateChoices[0]),this.getData(n[0]))},h.render=function(){var e=this,t=this.state,n=t.data,s=t.selectedDate,d=t.selectedIndex,u=(0,i.useBackend)(this.context).data.dates,p=this.dateChoices,h=p.length>0&&(0,o.createComponentVNode)(2,a.Stack,{mb:1,children:[(0,o.createComponentVNode)(2,a.Stack.Item,{children:(0,o.createComponentVNode)(2,a.Button,{className:"Changelog__Button",disabled:0===d,icon:"chevron-left",onClick:function(){var t=d-1;return e.setData("Loading changelog data..."),e.setSelectedIndex(t),e.setSelectedDate(p[t]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),e.getData(u[t])}})}),(0,o.createComponentVNode)(2,a.Stack.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{displayText:s,options:p,onSelected:function(t){var n=p.indexOf(t);return e.setData("Loading changelog data..."),e.setSelectedIndex(n),e.setSelectedDate(t),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),e.getData(u[n])},selected:s,width:"150px"})}),(0,o.createComponentVNode)(2,a.Stack.Item,{children:(0,o.createComponentVNode)(2,a.Button,{className:"Changelog__Button",disabled:d===p.length-1,icon:"chevron-right",onClick:function(){var t=d+1;return e.setData("Loading changelog data..."),e.setSelectedIndex(t),e.setSelectedDate(p[t]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),e.getData(u[t])}})})]}),f=(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createVNode)(1,"h1",null,"Paradise Station",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thanks to: ",16),(0,o.createTextVNode)("Baystation 12, /tg/station, /vg/station, NTstation, CDK Station devs, FacepunchStation, GoonStation devs, the original SpaceStation developers and Radithor for the title image. Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Recent GitHub contributors can be found "),(0,o.createVNode)(1,"a",null,"here",16,{href:"https://github.com/ss220-space/Paradise/pulse/monthly"}),(0,o.createTextVNode)(".")],0),h]}),C=(0,o.createComponentVNode)(2,a.Section,{children:[h,(0,o.createVNode)(1,"h3",null,"GoonStation 13 Development Team",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Coders: ",16),(0,o.createTextVNode)("Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Spriters: ",16),(0,o.createTextVNode)("Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Traditional Games Space Station 13 is thankful to the GoonStation 13 Development Team for its work on the game up to the"),(0,o.createTextVNode)(" r4407 release. The changelog for changes up to r4407 can be seen "),(0,o.createVNode)(1,"a",null,"here",16,{href:"https://wiki.ss13.co/Changelog#April_2010"}),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,["Except where otherwise noted, Goon Station 13 is licensed under a ",(0,o.createVNode)(1,"a",null,"Creative Commons Attribution-Noncommercial-Share Alike 3.0 License",16,{href:"https://creativecommons.org/licenses/by-nc-sa/3.0/"}),". Rights are currently extended to ",(0,o.createVNode)(1,"a",null,"SomethingAwful Goons",16,{href:"http://forums.somethingawful.com/"})," only."],0),(0,o.createVNode)(1,"h3",null,"Traditional Games Space Station 13 License",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Some icons by "),(0,o.createVNode)(1,"a",null,"Yusuke Kamiyamane",16,{href:"http://p.yusukekamiyamane.com/"}),(0,o.createTextVNode)(". All rights reserved. Licensed under a "),(0,o.createVNode)(1,"a",null,"Creative Commons Attribution 3.0 License",16,{href:"http://creativecommons.org/licenses/by/3.0/"}),(0,o.createTextVNode)(".")],4)]}),g=/#\d+/,N="object"==typeof n&&Object.keys(n).length>0&&Object.entries(n).reverse().map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,a.Section,{title:(0,l["default"])(t,"d mmmm yyyy",!0),children:(0,o.createComponentVNode)(2,a.Box,{ml:3,children:Object.entries(n).map((function(e){var t=e[0],n=e[1];return(0,o.createFragment)([(0,o.createVNode)(1,"h4",null,[t,(0,o.createTextVNode)(" changed:")],0),(0,o.createComponentVNode)(2,a.Box,{ml:3,children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){var t=Object.keys(e)[0],n=e[t],i=n.match(g),c=(0,o.createComponentVNode)(2,a.Table.Cell,{className:(0,r.classes)(["Changelog__Cell","Changelog__Cell--Icon"]),children:(0,o.createComponentVNode)(2,a.Icon,{color:m[t]?m[t].color:m.unknown.color,name:m[t]?m[t].icon:m.unknown.icon})});return null!==i&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[c,(0,o.createComponentVNode)(2,a.Table.Cell,{className:"Changelog__Cell",children:(0,o.createVNode)(1,"a",null,[(0,o.createTextVNode)(" "),n,(0,o.createTextVNode)(" ")],0,{href:"https://github.com/ss220-space/Paradise/pull/"+i[0].substring(1)})})]},t+n)||(0,o.createComponentVNode)(2,a.Table.Row,{children:[c,(0,o.createComponentVNode)(2,a.Table.Cell,{className:"Changelog__Cell",children:n})]},t+n)}))})})],4,t)}))})},t)}));return(0,o.createComponentVNode)(2,c.Window,{title:"Changelog",width:675,height:650,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[f,N,"string"==typeof n&&(0,o.createVNode)(1,"p",null,n,0),C]})})},u}(o.Component);t.Changelog=h},function(e,t,n){"use strict";var o;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(i){var a,c,l,s=arguments,d=(a=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,function(e,t,n,o){if(1!==s.length||"string"!==f(e)||/\d/.test(e)||(t=e,e=undefined),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(d.masks[t]||t||d.masks["default"])).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),n=!0,"GMT:"===r&&(o=!0));var i=function(){return n?"getUTC":"get"},C=function(){return e[i()+"Date"]()},g=function(){return e[i()+"Day"]()},N=function(){return e[i()+"Month"]()},b=function(){return e[i()+"FullYear"]()},V=function(){return e[i()+"Hours"]()},v=function(){return e[i()+"Minutes"]()},x=function(){return e[i()+"Seconds"]()},y=function(){return e[i()+"Milliseconds"]()},k=function(){return n?0:e.getTimezoneOffset()},w=function(){return m(e)},_=function(){return h(e)},B={d:function(){return C()},dd:function(){return u(C())},ddd:function(){return d.i18n.dayNames[g()]},DDD:function(){return p({y:b(),m:N(),d:C(),_:i(),dayName:d.i18n.dayNames[g()],short:!0})},dddd:function(){return d.i18n.dayNames[g()+7]},DDDD:function(){return p({y:b(),m:N(),d:C(),_:i(),dayName:d.i18n.dayNames[g()+7]})},m:function(){return N()+1},mm:function(){return u(N()+1)},mmm:function(){return d.i18n.monthNames[N()]},mmmm:function(){return d.i18n.monthNames[N()+12]},yy:function(){return String(b()).slice(2)},yyyy:function(){return u(b(),4)},h:function(){return V()%12||12},hh:function(){return u(V()%12||12)},H:function(){return V()},HH:function(){return u(V())},M:function(){return v()},MM:function(){return u(v())},s:function(){return x()},ss:function(){return u(x())},l:function(){return u(y(),3)},L:function(){return u(Math.floor(y()/10))},t:function(){return V()<12?d.i18n.timeNames[0]:d.i18n.timeNames[1]},tt:function(){return V()<12?d.i18n.timeNames[2]:d.i18n.timeNames[3]},T:function(){return V()<12?d.i18n.timeNames[4]:d.i18n.timeNames[5]},TT:function(){return V()<12?d.i18n.timeNames[6]:d.i18n.timeNames[7]},Z:function(){return o?"GMT":n?"UTC":(String(e).match(c)||[""]).pop().replace(l,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(k()>0?"-":"+")+u(100*Math.floor(Math.abs(k())/60)+Math.abs(k())%60,4)},p:function(){return(k()>0?"-":"+")+u(Math.floor(Math.abs(k())/60),2)+":"+u(Math.floor(Math.abs(k())%60),2)},S:function(){return["th","st","nd","rd"][C()%10>3?0:(C()%100-C()%10!=10)*C()%10]},W:function(){return w()},WW:function(){return u(w())},N:function(){return _()}};return t.replace(a,(function(e){return e in B?B[e]():e.slice(1,e.length-1)}))});d.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},d.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var u=function(e,t){for(e=String(e),t=t||2;e.length>10),56320+(e-65536&1023))}for(var x=new Array(256),y=new Array(256),k=0;k<256;k++)x[k]=V(k)?1:0,y[k]=V(k);function w(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||c,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _(e,t){return new r(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function B(e,t){throw _(e,t)}function S(e,t){e.onWarning&&e.onWarning.call(null,_(e,t))}var L={YAML:function(e,t,n){var o,r,i;null!==e.version&&B(e,"duplication of %YAML directive"),1!==n.length&&B(e,"YAML directive accepts exactly one argument"),null===(o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&B(e,"ill-formed argument of the YAML directive"),r=parseInt(o[1],10),i=parseInt(o[2],10),1!==r&&B(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&S(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var o,r;2!==n.length&&B(e,"TAG directive accepts exactly two arguments"),o=n[0],r=n[1],p.test(o)||B(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,o)&&B(e,'there is a previously declared suffix for "'+o+'" tag handle'),m.test(r)||B(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[o]=r}};function A(e,t,n,o){var r,i,a,c;if(t1&&(e.result+=o.repeat("\n",t-1))}function P(e,t){var n,o,r=e.tag,i=e.anchor,a=[],c=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),o=e.input.charCodeAt(e.position);0!==o&&45===o&&g(e.input.charCodeAt(e.position+1));)if(c=!0,e.position++,T(e,!0,-1)&&e.lineIndent<=t)a.push(null),o=e.input.charCodeAt(e.position);else if(n=e.line,j(e,t,3,!1,!0),a.push(e.result),T(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==o)B(e,"bad indentation of a sequence entry");else if(e.lineIndentt?V=1:e.lineIndent===t?V=0:e.lineIndentt?V=1:e.lineIndent===t?V=0:e.lineIndentt)&&(j(e,t,4,!0,r)&&(f?m=e.result:h=e.result),f||(I(e,d,u,p,m,h,i,a),p=m=h=null),T(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)B(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===i?B(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?B(e,"repeat of an indentation width identifier"):(u=t+i-1,d=!0)}if(C(a)){do{a=e.input.charCodeAt(++e.position)}while(C(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!f(a)&&0!==a)}for(;0!==a;){for(D(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!d||e.lineIndentu&&(u=e.lineIndent),f(a))p++;else{if(e.lineIndent0){for(r=a,i=0;r>0;r--)(a=b(c=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:B(e,"expected hexadecimal character");e.result+=v(i),e.position++}else B(e,"unknown escape sequence");n=o=e.position}else f(c)?(A(e,n,o,!0),M(e,T(e,!1,t)),n=o=e.position):e.position===e.lineStart&&F(e)?B(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}B(e,"unexpected end of the stream within a double quoted scalar")}(e,m)?w=!0:!function(e){var t,n,o;if(42!==(o=e.input.charCodeAt(e.position)))return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!g(o)&&!N(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&B(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||B(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],T(e,!0,-1),!0}(e)?function(e,t,n){var o,r,i,a,c,l,s,d,u=e.kind,p=e.result;if(g(d=e.input.charCodeAt(e.position))||N(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(g(o=e.input.charCodeAt(e.position+1))||n&&N(o)))return!1;for(e.kind="scalar",e.result="",r=i=e.position,a=!1;0!==d;){if(58===d){if(g(o=e.input.charCodeAt(e.position+1))||n&&N(o))break}else if(35===d){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&F(e)||n&&N(d))break;if(f(d)){if(c=e.line,l=e.lineStart,s=e.lineIndent,T(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}e.position=i,e.line=c,e.lineStart=l,e.lineIndent=s;break}}a&&(A(e,r,i,!1),M(e,e.line-c),r=i=e.position,a=!1),C(d)||(i=e.position+1),d=e.input.charCodeAt(++e.position)}return A(e,r,i,!1),!!e.result||(e.kind=u,e.result=p,!1)}(e,m,1===n)&&(w=!0,null===e.tag&&(e.tag="?")):(w=!0,null===e.tag&&null===e.anchor||B(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===V&&(w=s&&P(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(d=0,u=e.implicitTypes.length;d tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):B(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):B(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||w}function U(e){var t,n,o,r,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(T(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!g(r);)r=e.input.charCodeAt(++e.position);for(o=[],(n=e.input.slice(t,e.position)).length<1&&B(e,"directive name must not be less than one character in length");0!==r;){for(;C(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!f(r));break}if(f(r))break;for(t=e.position;0!==r&&!g(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==r&&D(e),l.call(L,n)?L[n](e,n,o):S(e,'unknown document directive "'+n+'"')}T(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,T(e,!0,-1)):a&&B(e,"directives end mark is expected"),j(e,e.lineIndent-1,4,!1,!0),T(e,!0,-1),e.checkLineBreaks&&d.test(e.input.slice(i,e.position))&&S(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&F(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,T(e,!0,-1)):e.position0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(i="",a=this.position;at/2-1){i=" ... ",a-=5;break}return c=this.buffer.slice(r,a),o.repeat(" ",e)+n+c+i+"\n"+o.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=r},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var o=n(65),r=n(20);function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,o=e.length,r=0,c=!1;if(!o)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===o)return!0;if("b"===(t=e[++r])){for(r++;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var o=n(65),r=n(20),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,o,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){r.unshift(parseFloat(e,10))})),t=0,o=1,r.forEach((function(e){t+=e*o,o*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var o=n(20),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==r.exec(e)||null!==i.exec(e))},construct:function(e){var t,n,o,a,c,l,s,d,u=0,p=null;if(null===(t=r.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],o=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,o,a));if(c=+t[4],l=+t[5],s=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),d=new Date(Date.UTC(n,o,a,c,l,s,u)),p&&d.setTime(d.getTime()-p),d},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var o;try{o=n(508).Buffer}catch(a){}var r=n(20),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,o=0,r=e.length,a=i;for(n=0;n64)){if(t<0)return!1;o+=6}return o%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),a=r.length,c=i,l=0,s=[];for(t=0;t>16&255),s.push(l>>8&255),s.push(255&l)),l=l<<6|c.indexOf(r.charAt(t));return 0===(n=a%4*6)?(s.push(l>>16&255),s.push(l>>8&255),s.push(255&l)):18===n?(s.push(l>>10&255),s.push(l>>2&255)):12===n&&s.push(l>>4&255),o?o.from?o.from(s):new o(s):s},predicate:function(e){return o&&o.isBuffer(e)},represent:function(e){var t,n,o="",r=0,a=e.length,c=i;for(t=0;t>18&63],o+=c[r>>12&63],o+=c[r>>6&63],o+=c[63&r]),r=(r<<8)+e[t];return 0===(n=a%3)?(o+=c[r>>18&63],o+=c[r>>12&63],o+=c[r>>6&63],o+=c[63&r]):2===n?(o+=c[r>>10&63],o+=c[r>>4&63],o+=c[r<<2&63],o+=c[64]):1===n&&(o+=c[r>>2&63],o+=c[r<<4&63],o+=c[64],o+=c[64]),o}})},function(e,t,n){"use strict";(function(e){ + */var l=function(e){var t=e.className,n=e.vertical,a=e.children,l=c(e,["className","vertical","children"]);return(0,o.normalizeProps)((0,o.createVNode)(1,"div",(0,r.classes)(["Tabs",n?"Tabs--vertical":"Tabs--horizontal",t,(0,i.computeBoxClassName)(l)]),(0,o.createVNode)(1,"div","Tabs__tabBox",a,0),2,Object.assign({},(0,i.computeBoxProps)(l))))};t.Tabs=l;l.Tab=function(e){var t=e.className,n=e.selected,i=e.altSelection,l=c(e,["className","selected","altSelection"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({className:(0,r.classes)(["Tabs__tab",n&&"Tabs__tab--selected",i&&n&&"Tabs__tab--altSelection",t]),selected:!i&&n,color:"transparent"},l)))}},function(e,t,n){"use strict";t.__esModule=!0,t.TimeDisplay=void 0;t.TimeDisplay=function(e){var t=e.totalSeconds;return function(e){return(!e||e<0)&&(e=0),[Math.floor(e/60).toString(10),(Math.floor(e)%60).toString(10)].map((function(e){return e.length<2?"0"+e:e})).join(":")}(void 0===t?0:t)}},function(e,t,n){var o={"./AICard.js":460,"./AIFixer.js":461,"./APC.js":462,"./ATM.js":463,"./AccountsUplinkTerminal.js":464,"./AgentCard.js":465,"./AiAirlock.js":466,"./AirAlarm.js":467,"./AirlockAccessController.js":468,"./AirlockElectronics.js":469,"./AppearanceChanger.js":470,"./AtmosAlertConsole.js":471,"./AtmosControl.js":472,"./AtmosFilter.js":473,"./AtmosMixer.js":474,"./AtmosPump.js":475,"./Autolathe.js":476,"./Biogenerator.js":477,"./BlueSpaceArtilleryControl.js":478,"./BluespaceRiftScanner.js":479,"./BluespaceRiftServer.js":480,"./BluespaceTap.js":481,"./BodyScanner.js":482,"./BorgPanel.js":483,"./BotClean.js":484,"./BotSecurity.js":485,"./BrigCells.js":486,"./BrigTimer.js":487,"./CameraConsole.js":488,"./Canister.js":489,"./CardComputer.js":490,"./CargoConsole.js":491,"./Changelog.js":492,"./ChemDispenser.js":521,"./ChemHeater.js":525,"./ChemMaster.js":526,"./CloningConsole.js":527,"./CommunicationsComputer.js":528,"./Contractor.js":529,"./ConveyorSwitch.js":530,"./CrewMonitor.js":531,"./Cryo.js":532,"./CryopodConsole.js":534,"./DNAModifier.js":535,"./DNAModifyer.js":536,"./DestinationTagger.js":537,"./DisposalBin.js":538,"./DnaVault.js":539,"./EFTPOS.js":540,"./ERTManager.js":541,"./Electropack.js":542,"./EvolutionMenu.js":543,"./ExosuitFabricator.js":544,"./ExternalAirlockController.js":545,"./FaxMachine.js":546,"./FloorPainter.js":547,"./GPS.js":548,"./GasAnalyzer.js":549,"./GasFreezer.js":551,"./GenericCrewManifest.js":552,"./GhostHudPanel.js":553,"./HandheldChemDispenser.js":554,"./ImplantPad.js":555,"./Instrument.js":556,"./ItemPixelShift.js":557,"./KeycardAuth.js":558,"./LaborClaimConsole.js":559,"./LawManager.js":560,"./MechBayConsole.js":561,"./MechaControlConsole.js":562,"./MedicalRecords.js":563,"./MiningVendor.js":564,"./Multitool.js":565,"./Newscaster.js":566,"./NinjaBloodScan.js":567,"./NinjaMindScan.js":568,"./NuclearBomb.js":569,"./OperatingComputer.js":570,"./Orbit.js":571,"./OreRedemption.js":572,"./PAI.js":573,"./PDA.js":590,"./PDAPainter.js":606,"./Pacman.js":607,"./PersonalCrafting.js":608,"./Photocopier.js":609,"./PodTracking.js":610,"./PoolController.js":611,"./PortablePump.js":612,"./PortableScrubber.js":613,"./PortableTurret.js":614,"./PowerMonitor.js":198,"./PrisonerImplantManager.js":615,"./RCD.js":616,"./RPD.js":617,"./Radio.js":618,"./RequestConsole.js":619,"./RequestManager.js":620,"./RndConsole.js":67,"./RobotSelfDiagnosis.js":635,"./RoboticsControlConsole.js":636,"./Safe.js":637,"./SatelliteControl.js":638,"./SecureStorage.js":639,"./SecurityRecords.js":640,"./SeedExtractor.js":641,"./ShuttleConsole.js":642,"./ShuttleManipulator.js":643,"./Sleeper.js":644,"./SlotMachine.js":645,"./Smartfridge.js":646,"./Smes.js":647,"./SolarControl.js":648,"./SpawnersMenu.js":649,"./SpiderOS.js":650,"./StationAlertConsole.js":651,"./SuitStorage.js":652,"./SupermatterMonitor.js":653,"./SyndicateComputerSimple.js":654,"./SyndieCargoConsole.js":655,"./TTSSeedsExplorer.js":656,"./TachyonArray.js":657,"./Tank.js":658,"./TankDispenser.js":659,"./TcommsCore.js":660,"./TcommsRelay.js":661,"./Teleporter.js":662,"./ThiefKit.js":663,"./TransferValve.js":664,"./Uplink.js":665,"./VampireSpecMenu.js":666,"./VampireTrophiesStatus.js":667,"./Vending.js":668,"./VolumeMixer.js":669,"./VotePanel.js":670,"./Wires.js":671,"./Workshop.js":672};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=459},function(e,t,n){"use strict";t.__esModule=!0,t.AICard=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AICard=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;if(0===l.has_ai)return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createVNode)(1,"h3",null,"No AI detected.",16)})})})});var s=null;return s=l.integrity>=75?"green":l.integrity>=25?"yellow":"red",(0,o.createComponentVNode)(2,a.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,display:"inline-block",children:(0,o.createVNode)(1,"h3",null,l.name,0)}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:s,value:l.integrity/100})})})}),(0,o.createComponentVNode)(2,i.Box,{color:"red",children:(0,o.createVNode)(1,"h2",null,1===l.flushing?"Wipe of AI in progress...":"",0)})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,i.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,i.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.wireless?"check":"times",content:l.wireless?"Enabled":"Disabled",color:l.wireless?"green":"red",onClick:function(){return c("wireless")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.radio?"check":"times",content:l.radio?"Enabled":"Disabled",color:l.radio?"green":"red",onClick:function(){return c("radio")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Wipe",children:(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash-alt",confirmIcon:"trash-alt",disabled:l.flushing||0===l.integrity,confirmColor:"red",content:"Wipe AI",onClick:function(){return c("wipe")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AIFixer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AIFixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;if(null===l.occupant)return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createVNode)(1,"h3",null,"No artificial intelligence detected.",16)})})})});var s=null;s=2!==l.stat&&null!==l.stat;var d=null;d=l.integrity>=75?"green":l.integrity>=25?"yellow":"red";var u=null;return u=l.integrity>=100,(0,o.createComponentVNode)(2,a.Window,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored AI",children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:(0,o.createVNode)(1,"h3",null,l.occupant,0)})}),(0,o.createComponentVNode)(2,i.Section,{title:"Information",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:d,value:l.integrity/100})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:s?"green":"red",children:s?"Functional":"Non-Functional"})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Laws",children:!!l.has_laws&&(0,o.createComponentVNode)(2,i.Box,{children:l.laws.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",children:e},t)}))})||(0,o.createComponentVNode)(2,i.Box,{color:"red",children:(0,o.createVNode)(1,"h3",null,"No laws detected.",16)})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Wireless Activity",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.wireless?"times":"check",content:l.wireless?"Disabled":"Enabled",color:l.wireless?"red":"green",onClick:function(){return c("wireless")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subspace Transceiver",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.radio?"times":"check",content:l.radio?"Disabled":"Enabled",color:l.radio?"red":"green",onClick:function(){return c("radio")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Start Repairs",children:(0,o.createComponentVNode)(2,i.Button,{icon:"wrench",disabled:u||l.active,content:u?"Already Repaired":"Repair",onClick:function(){return c("fix")}})})]}),(0,o.createComponentVNode)(2,i.Box,{color:"green",lineHeight:2,children:l.active?"Reconstruction in progress.":""})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.APC=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(192);t.APC=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,d)})})};var l={2:{color:"good",externalPowerText:"External Power",chargingText:"Fully Charged"},1:{color:"average",externalPowerText:"Low External Power",chargingText:"Charging"},0:{color:"bad",externalPowerText:"No External Power",chargingText:"Not Charging"}},s={1:{icon:"terminal",content:"Override Programming",action:"hack"},2:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"},3:{icon:"caret-square-left",content:"Return to Main Core",action:"deoccupy"},4:{icon:"caret-square-down",content:"Shunt Core Process",action:"occupy"}},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data,u=d.locked&&!d.siliconUser,p=(d.normallyLocked,l[d.externalPower]||l[0]),m=l[d.chargingStatus]||l[0],h=d.powerChannels||[],f=s[d.malfStatus]||s[0],C=d.powerCellStatus/100;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),(0,o.createComponentVNode)(2,i.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Main Breaker",color:p.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.isOperating?"power-off":"times",content:d.isOperating?"On":"Off",selected:d.isOperating&&!u,color:d.isOperating?"":"bad",disabled:u,onClick:function(){return a("breaker")}}),children:["[ ",p.externalPowerText," ]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power Cell",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"good",value:C})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",color:m.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.chargeMode?"sync":"times",content:d.chargeMode?"Auto":"Off",selected:d.chargeMode,disabled:u,onClick:function(){return a("charge")}}),children:["[ ",m.chargingText," ]"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Power Channels",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[h.map((function(e){var t=e.topicParams;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{inline:!0,mx:2,color:e.status>=2?"good":"bad",children:e.status>=2?"On":"Off"}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Auto",selected:!u&&(1===e.status||3===e.status),disabled:u,onClick:function(){return a("channel",t.auto)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:"On",selected:!u&&2===e.status,disabled:u,onClick:function(){return a("channel",t.on)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Off",selected:!u&&0===e.status,disabled:u,onClick:function(){return a("channel",t.off)}})],4),children:[e.powerLoad," W"]},e.title)})),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Load",children:(0,o.createVNode)(1,"b",null,[d.totalLoad,(0,o.createTextVNode)(" W")],0)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Misc",buttons:!!d.siliconUser&&(0,o.createFragment)([!!d.malfStatus&&(0,o.createComponentVNode)(2,i.Button,{icon:f.icon,content:f.content,color:"bad",onClick:function(){return a(f.action)}}),(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:"Overload",onClick:function(){return a("overload")}})],0),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cover Lock",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.coverLocked?"lock":"unlock",content:d.coverLocked?"Engaged":"Disengaged",selected:d.coverLocked,disabled:u,onClick:function(){return a("cover")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Night Shift Lighting",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",content:d.nightshiftLights?"Enabled":"Disabled",selected:d.nightshiftLights,onClick:function(){return a("toggle_nightshift")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Light Fallback",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:d.coverLocked?"lock":"unlock",content:d.emergencyLights?"Engaged":"Disengaged",selected:d.emergencyLights,disabled:u,onClick:function(){return a("emergency_lighting")}})})]})})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ATM=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ATM=function(e,t){var n,m=(0,r.useBackend)(t),h=(m.act,m.data),f=h.view_screen,C=h.authenticated_account,g=h.ticks_left_locked_down,N=h.linked_db;if(g>0)n=(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle"}),"Maximum number of pin attempts exceeded! Access to this ATM has been temporarily disabled."]});else if(N)if(C)switch(f){case 1:n=(0,o.createComponentVNode)(2,l);break;case 2:n=(0,o.createComponentVNode)(2,s);break;case 3:n=(0,o.createComponentVNode)(2,p);break;default:n=(0,o.createComponentVNode)(2,d)}else n=(0,o.createComponentVNode)(2,u);else n=(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle"}),"Unable to connect to accounts database, please retry and if the issue persists contact Nanotrasen IT support."]});return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Section,{children:n})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.machine_id,s=c.held_card_name;return(0,o.createComponentVNode)(2,i.Section,{title:"Nanotrasen Automatic Teller Machine",children:[(0,o.createComponentVNode)(2,i.Box,{children:"For all your monetary need!"}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:"info-circle"})," This terminal is ",(0,o.createVNode)(1,"i",null,l,0),", report this code when contacting Nanotrasen IT Support."]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Card",children:(0,o.createComponentVNode)(2,i.Button,{content:s,icon:"eject",onClick:function(){return a("insert_card")}})})})]})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.security_level;return(0,o.createComponentVNode)(2,i.Section,{title:"Select a new security level for this account",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,i.Button,{content:"Zero",icon:"unlock",selected:0===c,onClick:function(){return a("change_security_level",{new_security_level:0})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:"Either the account number or card is required to access this account. EFTPOS transactions will require a card and ask for a pin, but not verify the pin is correct."}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,i.Button,{content:"One",icon:"unlock",selected:1===c,onClick:function(){return a("change_security_level",{new_security_level:1})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:"An account number and pin must be manually entered to access this account and process transactions."}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:(0,o.createComponentVNode)(2,i.Button,{content:"Two",selected:2===c,icon:"unlock",onClick:function(){return a("change_security_level",{new_security_level:2})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:"In addition to account number and pin, a card is required to access this account and process transactions."})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,m)]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"targetAccNumber",0),s=l[0],d=l[1],u=(0,r.useLocalState)(t,"fundsAmount",0),p=u[0],h=u[1],f=(0,r.useLocalState)(t,"purpose",0),C=f[0],g=f[1],N=c.money;return(0,o.createComponentVNode)(2,i.Section,{title:"Transfer Fund",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Balance",children:["$",N]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target account number",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Funds to transfer",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transaction Purpose",children:(0,o.createComponentVNode)(2,i.Input,{fluid:!0,onInput:function(e,t){return g(t)}})})]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Button,{content:"Transfer",icon:"sign-out-alt",onClick:function(){return a("transfer",{target_acc_number:s,funds_amount:p,purpose:C})}}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,m)]})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"fundsAmount",0),s=l[0],d=l[1],u=c.owner_name,p=c.money;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Welcome, "+u,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Logout",icon:"sign-out-alt",onClick:function(){return a("logout")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account Balance",children:["$",p]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Withdrawal Amount",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Withdraw Fund",icon:"sign-out-alt",onClick:function(){return a("withdrawal",{funds_amount:s})}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Menu",children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Change account security level",icon:"lock",onClick:function(){return a("view_screen",{view_screen:1})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Make transfer",icon:"exchange-alt",onClick:function(){return a("view_screen",{view_screen:2})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"View transaction log",icon:"list",onClick:function(){return a("view_screen",{view_screen:3})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Print balance statement",icon:"print",onClick:function(){return a("balance_statement")}})})]})],4)},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"accountID",null),s=l[0],d=l[1],u=(0,r.useLocalState)(t,"accountPin",null),p=u[0],m=u[1];c.machine_id,c.held_card_name;return(0,o.createComponentVNode)(2,i.Section,{title:"Insert card or enter ID and pin to login",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Account ID",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return d(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pin",children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"6 Digit Number",onInput:function(e,t){return m(t)}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Login",icon:"sign-in-alt",onClick:function(){return a("attempt_auth",{account_num:s,account_pin:p})}})})]})})},p=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.transaction_log);return(0,o.createComponentVNode)(2,i.Section,{title:"Transactions",children:[(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Target"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Terminal"})]}),a.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{p:"1rem",children:[e.date," ",e.time]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.target_name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:["$",e.amount]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.source_terminal})]},e)}))]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,m)]})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data;return(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"sign-out-alt",onClick:function(){return a("view_screen",{view_screen:0})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AccountsUplinkTerminal=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(51),l=n(3),s=n(99),d=n(100);t.AccountsUplinkTerminal=function(e,t){var n,r=(0,i.useBackend)(t),a=(r.act,r.data),c=a.loginState,p=a.currentPage;return c.logged_in?(1===p?n=(0,o.createComponentVNode)(2,u):2===p?n=(0,o.createComponentVNode)(2,h):3===p&&(n=(0,o.createComponentVNode)(2,f)),(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s.LoginInfo),n]})})):(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,d.LoginScreen)})})};var u=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.accounts,s=(0,i.useLocalState)(t,"searchText",""),d=s[0],u=(s[1],(0,i.useLocalState)(t,"sortId","owner_name")),h=u[0],f=(u[1],(0,i.useLocalState)(t,"sortOrder",!0)),C=f[0];f[1];return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,a.Flex.Item,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",children:(0,o.createComponentVNode)(2,a.Table,{className:"AccountsUplinkTerminal__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,p,{id:"owner_name",children:"Account Holder"}),(0,o.createComponentVNode)(2,p,{id:"account_number",children:"Account Number"}),(0,o.createComponentVNode)(2,p,{id:"suspended",children:"Account Status"})]}),l.filter((0,r.createSearch)(d,(function(e){return e.owner_name+"|"+e.account_number+"|"+e.suspended}))).sort((function(e,t){var n=C?1:-1;return e[h].localeCompare(t[h])*n})).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{onClick:function(){return c("view_account_detail",{index:e.account_index})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user"})," ",e.owner_name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:["#",e.account_number]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.suspended})]},e.id)}))]})})})]})},p=function(e,t){var n=(0,i.useLocalState)(t,"sortId","name"),r=n[0],c=n[1],l=(0,i.useLocalState)(t,"sortOrder",!0),s=l[0],d=l[1],u=e.id,p=e.children;return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{color:r!==u&&"transparent",width:"100%",onClick:function(){r===u?d(!s):(c(u),d(!0))},children:[p,r===u&&(0,o.createComponentVNode)(2,a.Icon,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data.is_printing,s=(0,i.useLocalState)(t,"searchText",""),d=(s[0],s[1]);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"New Account",icon:"plus",onClick:function(){return r("create_new_account")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Account List",disabled:l,ml:"0.25rem",onClick:function(){return r("print_records")}})]}),(0,o.createComponentVNode)(2,c.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by account holder, number, status",width:"100%",onInput:function(e,t){return d(t)}})})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.is_printing,s=c.account_number,d=c.owner_name,u=c.money,p=c.suspended,m=c.transactions;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"#"+s+" / "+d,mt:1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",content:"Print Account Details",disabled:l,onClick:function(){return r("print_account_details")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Number",children:["#",s]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Holder",children:d}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Balance",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Status",color:p?"red":"green",children:[p?"Suspended":"Active",(0,o.createComponentVNode)(2,a.Button,{ml:1,content:p?"Unsuspend":"Suspend",icon:p?"unlock":"lock",onClick:function(){return r("toggle_suspension")}})]})]})}),(0,o.createComponentVNode)(2,a.Section,{title:"Transactions",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Timestamp"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Target"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Reason"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Value"}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Terminal"})]}),m.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e.date," ",e.time]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.target_name}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.purpose}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:["$",e.amount]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.source_terminal})]},e)}))]})})],4)},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=(n.data,(0,i.useLocalState)(t,"accName","")),l=c[0],s=c[1],d=(0,i.useLocalState)(t,"accDeposit",""),u=d[0],p=d[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Create Account",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-left",content:"Back",onClick:function(){return r("back")}}),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Account Holder",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Name Here",onChange:function(e,t){return s(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Initial Deposit",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"0",onChange:function(e,t){return p(t)}})})]}),(0,o.createComponentVNode)(2,a.Button,{mt:1,fluid:!0,content:"Create Account",onClick:function(){return r("finalise_create_account",{holder_name:l,starting_funds:u})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AgentCardSLSlots=t.AgentCardAppearances=t.AgentCardInfo=t.AgentCard=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AgentCard=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"syndicate",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Card Info"]},"Card Info"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"id-card"})," Appearance"]},"Appearance"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===d,onClick:function(){return u(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"arrow-down"})," Save/Load Card Info"]},"Save/Load Card Info")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,c);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,s);default:return(0,o.createComponentVNode)(2,c)}}(d)]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.registered_name,s=c.sex,d=c.age,u=c.assignment,p=c.associated_account_number,m=c.blood_type,h=c.dna_hash,f=c.fingerprint_hash,C=c.photo,g=c.ai_tracking;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Card Info",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,i.Button,{content:l||"[UNSET]",onClick:function(){return a("change_name")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sex",children:(0,o.createComponentVNode)(2,i.Button,{iconRight:!1,content:s||"[UNSET]",onClick:function(){return a("change_sex")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Age",children:(0,o.createComponentVNode)(2,i.Button,{content:d||"[UNSET]",onClick:function(){return a("change_age")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rank",children:(0,o.createComponentVNode)(2,i.Button,{content:u||"[UNSET]",onClick:function(){return a("change_occupation")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fingerprints",children:(0,o.createComponentVNode)(2,i.Button,{content:f||"[UNSET]",onClick:function(){return a("change_fingerprints")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood Type",children:(0,o.createComponentVNode)(2,i.Button,{content:m||"[UNSET]",onClick:function(){return a("change_blood_type")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"DNA Hash",children:(0,o.createComponentVNode)(2,i.Button,{content:h||"[UNSET]",onClick:function(){return a("change_dna_hash")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Money Account",children:(0,o.createComponentVNode)(2,i.Button,{content:p||"[UNSET]",onClick:function(){return a("change_money_account")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Photo",children:(0,o.createComponentVNode)(2,i.Button,{content:C?"Update":"[UNSET]",onClick:function(){return a("change_photo")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Card Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Card Info",children:(0,o.createComponentVNode)(2,i.Button,{content:"Delete Card Info",onClick:function(){return a("delete_info")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Access",children:(0,o.createComponentVNode)(2,i.Button,{content:"Reset Access",onClick:function(){return a("clear_access")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"AI Tracking",children:(0,o.createComponentVNode)(2,i.Button,{content:g?"Untrackable":"Trackable",onClick:function(){return a("change_ai_tracking")}})})]})})],4)};t.AgentCardInfo=c;var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.appearances;return(0,o.createComponentVNode)(2,i.Section,{title:"Card Appearance",children:c.map((function(e){return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jped;base64,"+e.image,style:{"vertical-align":"middle",width:"64px",margin:"0px","margin-left":"0px"},onclick:function(){return a("change_appearance_new",{new_appearance:e.name})}},e.name)}))})};t.AgentCardAppearances=l;var s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.saved_info;return(0,o.createComponentVNode)(2,i.Section,{title:"Save/Load Manager",style:{"line-height":"25px"},children:(0,o.createComponentVNode)(2,i.LabeledList,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.registered_name?e.registered_name+", "+e.assignment:"Slot "+e.id,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Clear",onClick:function(){return a("clear_slot",{slot:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Save",onClick:function(){return a("save_slot",{slot:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Load",disabled:!e.registered_name,onClick:function(){return a("load_slot",{slot:e.id})}})],4)},e.id)}))})})};t.AgentCardSLSlots=s},function(e,t,n){"use strict";t.__esModule=!0,t.AiAirlock=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c={2:{color:"good",localStatusText:"Offline"},1:{color:"average",localStatusText:"Caution"},0:{color:"bad",localStatusText:"Optimal"}};t.AiAirlock=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=c[s.power.main]||c[0],u=c[s.power.backup]||c[0],p=c[s.shock]||c[0];return(0,o.createComponentVNode)(2,a.Window,{width:500,height:390,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Power Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Main",color:d.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",disabled:!s.power.main,content:"Disrupt",onClick:function(){return l("disrupt-main")}}),children:[s.power.main?"Online":"Offline"," ",s.wires.main_power?s.power.main_timeleft>0&&"["+s.power.main_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Backup",color:u.color,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"lightbulb-o",disabled:!s.power.backup,content:"Disrupt",onClick:function(){return l("disrupt-backup")}}),children:[s.power.backup?"Online":"Offline"," ",s.wires.backup_power?s.power.backup_timeleft>0&&"["+s.power.backup_timeleft+"s]":"[Wires have been cut!]"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Electrify",color:p.color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"wrench",disabled:!(s.wires.shock&&2!==s.shock),content:"Restore",onClick:function(){return l("shock-restore")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"bolt",disabled:!s.wires.shock,content:"Temporary",onClick:function(){return l("shock-temp")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"bolt",disabled:!s.wires.shock||0===s.shock,content:"Permanent",onClick:function(){return l("shock-perm")}})],4),children:[2===s.shock?"Safe":"Electrified"," ",(s.wires.shock?s.shock_timeleft>0&&"["+s.shock_timeleft+"s]":"[Wires have been cut!]")||-1===s.shock_timeleft&&"[Permanent]"]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Access and Door Control",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID Scan",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.id_scanner?"power-off":"times",content:s.id_scanner?"Enabled":"Disabled",selected:s.id_scanner,disabled:!s.wires.id_scanner,onClick:function(){return l("idscan-toggle")}}),children:!s.wires.id_scanner&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Access",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.emergency?"power-off":"times",content:s.emergency?"Enabled":"Disabled",selected:s.emergency,onClick:function(){return l("emergency-toggle")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Bolts",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.locked?"lock":"unlock",content:s.locked?"Lowered":"Raised",selected:s.locked,disabled:!s.wires.bolts,onClick:function(){return l("bolt-toggle")}}),children:!s.wires.bolts&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Bolt Lights",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.lights?"power-off":"times",content:s.lights?"Enabled":"Disabled",selected:s.lights,disabled:!s.wires.lights,onClick:function(){return l("light-toggle")}}),children:!s.wires.lights&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Force Sensors",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.safe?"power-off":"times",content:s.safe?"Enabled":"Disabled",selected:s.safe,disabled:!s.wires.safe,onClick:function(){return l("safe-toggle")}}),children:!s.wires.safe&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Timing Safety",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.speed?"power-off":"times",content:s.speed?"Enabled":"Disabled",selected:s.speed,disabled:!s.wires.timing,onClick:function(){return l("speed-toggle")}}),children:!s.wires.timing&&"[Wires have been cut!]"}),(0,o.createComponentVNode)(2,i.LabeledList.Divider),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Door Control",color:"bad",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s.opened?"sign-out-alt":"sign-in-alt",content:s.opened?"Open":"Closed",selected:s.opened,disabled:s.locked||s.welded,onClick:function(){return l("open-close")}}),children:!(!s.locked&&!s.welded)&&(0,o.createVNode)(1,"span",null,[(0,o.createTextVNode)("[Door is "),s.locked?"bolted":"",s.locked&&s.welded?" and ":"",s.welded?"welded":"",(0,o.createTextVNode)("!]")],0)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirAlarm=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(192);t.AirAlarm=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data.locked);return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,c.InterfaceLockNoticeBox),!i&&(0,o.createFragment)([(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u)],4)]})})};var l=function(e){return 0===e?"green":1===e?"orange":"red"},s=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,s=a.data,d=s.air,u=s.mode,p=s.atmos_alarm,m=s.locked,h=s.alarmActivated,f=s.rcon,C=s.target_temp;return n=0===d.danger.overall?0===p?"Optimal":"Caution: Atmos alert in area":1===d.danger.overall?"Caution":"DANGER: Internals Required",(0,o.createComponentVNode)(2,i.Section,{title:"Air Status",children:d?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,i.Box,{color:l(d.danger.pressure),children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.pressure})," kPa",!m&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,i.Button,{content:3===u?"Deactivate Panic Siphon":"Activate Panic Siphon",selected:3===u,icon:"exclamation-triangle",onClick:function(){return c("mode",{mode:3===u?1:3})}})],4)]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.oxygen/100,fractionDigits:"1",color:l(d.danger.oxygen)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.nitrogen/100,fractionDigits:"1",color:l(d.danger.nitrogen)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.co2/100,fractionDigits:"1",color:l(d.danger.co2)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Toxins",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.plasma/100,fractionDigits:"1",color:l(d.danger.plasma)})}),d.contents.other>.1&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.contents.other/100,fractionDigits:"1",color:l(d.danger.other)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.Box,{color:l(d.danger.temperature),children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.temperature})," K / ",(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.temperature_c})," C\xa0",(0,o.createComponentVNode)(2,i.Button,{icon:"thermometer-full",content:C+" C",onClick:function(){return c("temperature")}}),(0,o.createComponentVNode)(2,i.Button,{content:d.thermostat_state?"On":"Off",selected:d.thermostat_state,icon:"power-off",onClick:function(){return c("thermostat_state")}})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Local Status",children:(0,o.createComponentVNode)(2,i.Box,{color:l(d.danger.overall),children:[n,!m&&(0,o.createFragment)([(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,i.Button,{content:h?"Reset Alarm":"Activate Alarm",selected:h,onClick:function(){return c(h?"atmos_reset":"atmos_alarm")}})],4)]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Control Settings",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Off",selected:1===f,onClick:function(){return c("set_rcon",{rcon:1})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Auto",selected:2===f,onClick:function(){return c("set_rcon",{rcon:2})}}),(0,o.createComponentVNode)(2,i.Button,{content:"On",selected:3===f,onClick:function(){return c("set_rcon",{rcon:3})}})]})]}):(0,o.createComponentVNode)(2,i.Box,{children:"Unable to acquire air sample!"})})},d=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),a=n[0],c=n[1];return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===a,onClick:function(){return c(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"sign-out-alt"})," Vent Control"]},"Vents"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===a,onClick:function(){return c(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"sign-in-alt"})," Scrubber Control"]},"Scrubbers"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===a,onClick:function(){return c(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"cog"})," Mode"]},"Mode"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===a,onClick:function(){return c(3)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"tachometer-alt"})," Thresholds"]},"Thresholds")]})},u=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),i=n[0];n[1];switch(i){case 0:return(0,o.createComponentVNode)(2,p);case 1:return(0,o.createComponentVNode)(2,m);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,f);default:return"WE SHOULDN'T BE HERE!"}},p=function(e,t){var n=(0,r.useBackend)(t),a=n.act;return n.data.vents.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,i.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return a("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"release"===e.direction?"Blowing":"Siphoning",icon:"release"===e.direction?"sign-out-alt":"sign-in-alt",onClick:function(){return a("command",{cmd:"direction",val:"release"===e.direction?0:1,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure Checks",children:[(0,o.createComponentVNode)(2,i.Button,{content:"External",selected:1===e.checks,onClick:function(){return a("command",{cmd:"checks",val:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Internal",selected:2===e.checks,onClick:function(){return a("command",{cmd:"checks",val:2,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"External Pressure Target",children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:e.external})," kPa\xa0",(0,o.createComponentVNode)(2,i.Button,{content:"Set",icon:"cog",onClick:function(){return a("command",{cmd:"set_external_pressure",id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Reset",icon:"redo-alt",onClick:function(){return a("command",{cmd:"set_external_pressure",val:101.325,id_tag:e.id_tag})}})]})]})},e.name)}))},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act;return n.data.scrubbers.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,i.Button,{content:e.power?"On":"Off",selected:e.power,icon:"power-off",onClick:function(){return a("command",{cmd:"power",val:1===e.power?0:1,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:0===e.scrubbing?"Siphoning":"Scrubbing",icon:0===e.scrubbing?"sign-in-alt":"filter",onClick:function(){return a("command",{cmd:"scrubbing",val:0===e.scrubbing?1:0,id_tag:e.id_tag})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,i.Button,{content:e.widenet?"Extended":"Normal",selected:e.widenet,icon:"expand-arrows-alt",onClick:function(){return a("command",{cmd:"widenet",val:0===e.widenet?1:0,id_tag:e.id_tag})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Filtering",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Carbon Dioxide",selected:e.filter_co2,onClick:function(){return a("command",{cmd:"co2_scrub",val:0===e.filter_co2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Plasma",selected:e.filter_toxins,onClick:function(){return a("command",{cmd:"tox_scrub",val:0===e.filter_toxins?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Nitrous Oxide",selected:e.filter_n2o,onClick:function(){return a("command",{cmd:"n2o_scrub",val:0===e.filter_n2o?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Oxygen",selected:e.filter_o2,onClick:function(){return a("command",{cmd:"o2_scrub",val:0===e.filter_o2?1:0,id_tag:e.id_tag})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Nitrogen",selected:e.filter_n2,onClick:function(){return a("command",{cmd:"n2_scrub",val:0===e.filter_n2?1:0,id_tag:e.id_tag})}})]})]})},e.name)}))},h=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.modes,s=c.presets,d=c.emagged,u=c.mode,p=c.preset;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"System Mode",children:(0,o.createComponentVNode)(2,i.Table,{children:l.map((function(e){return(!e.emagonly||e.emagonly&&!!d)&&(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:"cog",selected:e.id===u,onClick:function(){return a("mode",{mode:e.id})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.desc})]},e.name)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"System Presets",children:[(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:"After making a selection, the system will automatically cycle in order to remove contaminants."}),(0,o.createComponentVNode)(2,i.Table,{mt:1,children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"right",width:1,children:(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:"cog",selected:e.id===p,onClick:function(){return a("preset",{preset:e.id})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.desc})]},e.name)}))})]})],4)},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.thresholds;return(0,o.createComponentVNode)(2,i.Section,{title:"Alarm Thresholds",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"20%",children:"Value"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"red",width:"20%",children:"Danger Min"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"orange",width:"20%",children:"Warning Min"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"orange",width:"20%",children:"Warning Max"}),(0,o.createComponentVNode)(2,i.Table.Cell,{color:"red",width:"20%",children:"Danger Max"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),e.settings.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:-1===e.selected?"Off":e.selected,onClick:function(){return a("command",{cmd:"set_threshold",env:e.env,"var":e.val})}})},e.val)}))]},e.name)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockAccessController=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AirlockAccessController=function(e,t){var n,c,l=(0,r.useBackend)(t),s=l.act,d=l.data,u=d.exterior_status,p=d.interior_status,m=d.processing;return n="open"===d.exterior_status.state?(0,o.createComponentVNode)(2,i.Button,{content:"Lock Exterior Door",icon:"exclamation-triangle",disabled:m,onClick:function(){return s("force_ext")}}):(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:m,onClick:function(){return s("cycle_ext_door")}}),c="open"===d.interior_status.state?(0,o.createComponentVNode)(2,i.Button,{content:"Lock Interior Door",icon:"exclamation-triangle",disabled:m,color:"open"===p?"red":m?"yellow":null,onClick:function(){return s("force_int")}}):(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:m,onClick:function(){return s("cycle_int_door")}}),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Information",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"External Door Status",children:"closed"===u.state?"Locked":"Open"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Door Status",children:"closed"===p.state?"Locked":"Open"})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,i.Box,{children:n}),(0,o.createComponentVNode)(2,i.Box,{children:c})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AirlockElectronics=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(101);t.AirlockElectronics=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,s)]})};var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.unrestricted_dir;return(0,o.createComponentVNode)(2,i.Section,{title:"Access Control",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,mb:1,children:"Unrestricted Access From:"}),(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-down",content:"North",selected:"north"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"North"})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-up",content:"South",selected:"south"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"South"})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-left",content:"East",selected:"east"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"East"})}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"arrow-right",content:"West",selected:"west"===c?"selected":null,onClick:function(){return a("unrestricted_access",{unres_dir:"West"})}})})]})]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data,s=l.selected_accesses,d=l.one_access,u=l.regions;return(0,o.createComponentVNode)(2,c.AccessList,{usedByRcd:1,rcdButtons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:d,content:"One",onClick:function(){return a("set_one_access",{access:"one"})}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:!d,content:"All",onClick:function(){return a("set_one_access",{access:"all"})}})],4),accesses:u,selectedList:s,accessMod:function(e){return a("set",{access:e})},grantAll:function(){return a("grant_all")},denyAll:function(){return a("clear_all")},grantDep:function(e){return a("grant_region",{region:e})},denyDep:function(e){return a("deny_region",{region:e})}})}},function(e,t,n){"use strict";t.__esModule=!0,t.AppearanceChanger=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AppearanceChanger=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.change_race,u=s.species,p=s.specimen,m=s.change_gender,h=s.gender,f=s.has_gender,C=s.change_eye_color,g=s.change_skin_tone,N=s.change_skin_color,b=s.change_head_accessory_color,V=s.change_hair_color,v=s.change_secondary_hair_color,x=s.change_facial_hair_color,y=s.change_secondary_facial_hair_color,k=s.change_head_marking_color,w=s.change_body_marking_color,_=s.change_tail_marking_color,B=s.change_head_accessory,S=s.head_accessory_styles,L=s.head_accessory_style,A=s.change_hair,I=s.hair_styles,E=s.hair_style,D=s.change_hair_gradient,T=s.change_facial_hair,F=s.facial_hair_styles,M=s.facial_hair_style,P=s.change_head_markings,O=s.head_marking_styles,R=s.head_marking_style,j=s.change_body_markings,U=s.body_marking_styles,z=s.body_marking_style,W=s.change_tail_markings,H=s.tail_marking_styles,K=s.tail_marking_style,G=s.change_body_accessory,Y=s.body_accessory_styles,q=s.body_accessory_style,X=s.change_alt_head,J=s.alt_head_styles,$=s.alt_head_style,Z=!1;return(C||g||N||b||V||v||x||y||k||w||_)&&(Z=!0),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[!!d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.specimen,selected:e.specimen===p,onClick:function(){return l("race",{race:e.specimen})}},e.specimen)}))}),!!m&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Gender",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Male",selected:"male"===h,onClick:function(){return l("gender",{gender:"male"})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Female",selected:"female"===h,onClick:function(){return l("gender",{gender:"female"})}}),!f&&(0,o.createComponentVNode)(2,i.Button,{content:"Genderless",selected:"plural"===h,onClick:function(){return l("gender",{gender:"plural"})}})]}),!!Z&&(0,o.createComponentVNode)(2,c),!!B&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Head accessory",children:S.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.headaccessorystyle,selected:e.headaccessorystyle===L,onClick:function(){return l("head_accessory",{head_accessory:e.headaccessorystyle})}},e.headaccessorystyle)}))}),!!A&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hair",children:I.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.hairstyle,selected:e.hairstyle===E,onClick:function(){return l("hair",{hair:e.hairstyle})}},e.hairstyle)}))}),!!D&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hair Gradient",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Change Style",onClick:function(){return l("hair_gradient")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Change Offset",onClick:function(){return l("hair_gradient_offset")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Change Color",onClick:function(){return l("hair_gradient_colour")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Change Alpha",onClick:function(){return l("hair_gradient_alpha")}})]}),!!T&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Facial hair",children:F.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.facialhairstyle,selected:e.facialhairstyle===M,onClick:function(){return l("facial_hair",{facial_hair:e.facialhairstyle})}},e.facialhairstyle)}))}),!!P&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Head markings",children:O.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.headmarkingstyle,selected:e.headmarkingstyle===R,onClick:function(){return l("head_marking",{head_marking:e.headmarkingstyle})}},e.headmarkingstyle)}))}),!!j&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Body markings",children:U.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.bodymarkingstyle,selected:e.bodymarkingstyle===z,onClick:function(){return l("body_marking",{body_marking:e.bodymarkingstyle})}},e.bodymarkingstyle)}))}),!!W&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tail markings",children:H.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.tailmarkingstyle,selected:e.tailmarkingstyle===K,onClick:function(){return l("tail_marking",{tail_marking:e.tailmarkingstyle})}},e.tailmarkingstyle)}))}),!!G&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Body accessory",children:Y.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.bodyaccessorystyle,selected:e.bodyaccessorystyle===q,onClick:function(){return l("body_accessory",{body_accessory:e.bodyaccessorystyle})}},e.bodyaccessorystyle)}))}),!!X&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Alternate head",children:J.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.altheadstyle,selected:e.altheadstyle===$,onClick:function(){return l("alt_head",{alt_head:e.altheadstyle})}},e.altheadstyle)}))})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Colors",children:[{key:"change_eye_color",text:"Change eye color",action:"eye_color"},{key:"change_skin_tone",text:"Change skin tone",action:"skin_tone"},{key:"change_skin_color",text:"Change skin color",action:"skin_color"},{key:"change_head_accessory_color",text:"Change head accessory color",action:"head_accessory_color"},{key:"change_hair_color",text:"Change hair color",action:"hair_color"},{key:"change_secondary_hair_color",text:"Change secondary hair color",action:"secondary_hair_color"},{key:"change_facial_hair_color",text:"Change facial hair color",action:"facial_hair_color"},{key:"change_secondary_facial_hair_color",text:"Change secondary facial hair color",action:"secondary_facial_hair_color"},{key:"change_head_marking_color",text:"Change head marking color",action:"head_marking_color"},{key:"change_body_marking_color",text:"Change body marking color",action:"body_marking_color"},{key:"change_tail_marking_color",text:"Change tail marking color",action:"tail_marking_color"}].map((function(e){return!!c[e.key]&&(0,o.createComponentVNode)(2,i.Button,{content:e.text,onClick:function(){return a(e.action)}},e.key)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosAlertConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosAlertConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.priority||[],d=l.minor||[];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Alarms",children:(0,o.createVNode)(1,"ul",null,[0===s.length&&(0,o.createVNode)(1,"li","color-good","No Priority Alerts",16),s.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:e,color:"bad",onClick:function(){return c("clear",{zone:e})}}),2,null,e)})),0===d.length&&(0,o.createVNode)(1,"li","color-good","No Minor Alerts",16),d.map((function(e){return(0,o.createVNode)(1,"li",null,(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:e,color:"average",onClick:function(){return c("clear",{zone:e})}}),2,null,e)}))],0)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosControl=void 0;var o=n(0),r=n(1),i=n(2),a=n(80),c=n(3);t.AtmosControl=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data,(0,r.useLocalState)(t,"tabIndex",0)),d=a[0],u=a[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,s);default:return"WE SHOULDN'T BE HERE!"}}(d)]})})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.alarms;return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Access"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,a.TableCell,{children:e.name}),(0,o.createComponentVNode)(2,a.TableCell,{children:(t=e.danger,0===t?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Good"}):1===t?(0,o.createComponentVNode)(2,i.Box,{color:"orange",bold:!0,children:"Warning"}):2===t?(0,o.createComponentVNode)(2,i.Box,{color:"red",bold:!0,children:"DANGER"}):void 0)}),(0,o.createComponentVNode)(2,a.TableCell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"cog",content:"Access",onClick:function(){return c("open_alarm",{aref:e.ref})}})})]},e.name);var t}))]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=(0,r.useLocalState)(t,"zoom",1),s=l[0],d=l[1],u=c.alarms,p=c.stationLevel;return(0,o.createComponentVNode)(2,i.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,i.NanoMap,{onZoom:function(e){return d(e)},children:u.filter((function(e){return e.z===p})).map((function(e){return(0,o.createComponentVNode)(2,i.NanoMap.Marker,{x:e.x,y:e.y,zoom:s,icon:"circle",tooltip:e.name,color:(t=e.danger,0===t?"green":1===t?"orange":2===t?"red":void 0),onClick:function(){return a("open_alarm",{aref:e.ref})}},e.ref);var t}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosFilter=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosFilter=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.on,d=l.pressure,u=l.max_pressure,p=l.filter_type,m=l.filter_type_list;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",disabled:0===d,width:2.2,onClick:function(){return c("min_pressure")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:u,value:d,onDrag:function(e,t){return c("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",disabled:d===u,width:2.2,onClick:function(){return c("max_pressure")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Filter",children:m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{selected:e.gas_type===p,content:e.label,onClick:function(){return c("set_filter",{filter:e.gas_type})}},e.label)}))})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosMixer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosMixer=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.on,u=s.pressure,p=s.max_pressure,m=s.node1_concentration,h=s.node2_concentration;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:d?"On":"Off",color:d?null:"red",selected:d,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",disabled:0===u,width:2.2,onClick:function(){return l("min_pressure")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"kPa",width:6.1,lineHeight:1.5,step:10,minValue:0,maxValue:p,value:u,onDrag:function(e,t){return l("custom_pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",disabled:u===p,width:2.2,onClick:function(){return l("max_pressure")}})]}),(0,o.createComponentVNode)(2,c,{node_name:"Node 1",node_ref:m}),(0,o.createComponentVNode)(2,c,{node_name:"Node 2",node_ref:h})]})})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=(n.data,e.node_name),l=e.node_ref;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:c,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",width:2.2,disabled:0===l,onClick:function(){return a("set_node",{node_name:c,concentration:(l-10)/100})}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:"%",width:6.1,lineHeight:1.5,stepPixelSize:10,minValue:0,maxValue:100,value:l,onChange:function(e,t){return a("set_node",{node_name:c,concentration:t/100})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",width:2.2,disabled:100===l,onClick:function(){return a("set_node",{node_name:c,concentration:(l+10)/100})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.AtmosPump=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.AtmosPump=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.on,d=l.rate,u=l.max_rate,p=l.gas_unit,m=l.step;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",content:s?"On":"Off",color:s?null:"red",selected:s,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Rate",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",textAlign:"center",disabled:0===d,width:2.2,onClick:function(){return c("min_rate")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,unit:p,width:6.1,lineHeight:1.5,step:m,minValue:0,maxValue:u,value:d,onDrag:function(e,t){return c("custom_rate",{rate:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",textAlign:"center",disabled:d===u,width:2.2,onClick:function(){return c("max_rate")}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Autolathe=void 0;var o=n(0),r=n(43),i=n(24),a=n(1),c=n(2),l=n(3),s=n(18),d=function(e,t,n,o){return null===e.requirements||!(e.requirements.metal*o>t)&&!(e.requirements.glass*o>n)};t.Autolathe=function(e,t){var n=(0,a.useBackend)(t),u=n.act,p=n.data,m=p.total_amount,h=(p.max_amount,p.metal_amount),f=p.glass_amount,C=p.busyname,g=(p.busyamt,p.showhacked,p.buildQueue),N=p.buildQueueLen,b=p.recipes,V=p.categories,v=(0,a.useSharedState)(t,"category",0),x=v[0],y=v[1];0===x&&(x="Tools");var k=h.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),w=f.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),_=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),B=(0,a.useSharedState)(t,"search_text",""),S=B[0],L=B[1],A=(0,s.createSearch)(S,(function(e){return e.name})),I="";N>0&&(I=g.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:g[t][0],onClick:function(){return u("remove_from_queue",{remove_from_queue:g.indexOf(e)+1})}},e)},t)})));var E=(0,r.flow)([(0,i.filter)((function(e){return(e.category.indexOf(x)>-1||S)&&(p.showhacked||!e.hacked)})),S&&(0,i.filter)(A),(0,i.sortBy)((function(e){return e.name.toLowerCase()}))])(b),D="Build";S?D="Results for: '"+S+"':":x&&(D="Build ("+x+")");return(0,o.createComponentVNode)(2,l.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,c.Section,{title:D,buttons:(0,o.createComponentVNode)(2,c.Dropdown,{width:"190px",options:V,selected:x,onSelected:function(e){return y(e)}}),children:[(0,o.createComponentVNode)(2,c.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return L(t)},mb:1}),E.map((function(e){return(0,o.createComponentVNode)(2,c.Flex,{justify:"space-between",align:"center",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&1===p.busyamt,disabled:!d(e,p.metal_amount,p.glass_amount,1),onClick:function(){return u("make",{make:e.uid,multiplier:1})},children:(0,s.toTitleCase)(e.name)}),e.max_multiplier>=10&&(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&10===p.busyamt,disabled:!d(e,p.metal_amount,p.glass_amount,10),onClick:function(){return u("make",{make:e.uid,multiplier:10})},children:"10x"}),e.max_multiplier>=25&&(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&25===p.busyamt,disabled:!d(e,p.metal_amount,p.glass_amount,25),onClick:function(){return u("make",{make:e.uid,multiplier:25})},children:"25x"}),e.max_multiplier>25&&(0,o.createComponentVNode)(2,c.Button,{icon:"hammer",selected:p.busyname===e.name&&p.busyamt===e.max_multiplier,disabled:!d(e,p.metal_amount,p.glass_amount,e.max_multiplier),onClick:function(){return u("make",{make:e.uid,multiplier:e.max_multiplier})},children:[e.max_multiplier,"x"]})]}),(0,o.createComponentVNode)(2,c.Flex.Item,{children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,s.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,c.Box,{children:"No resources required."})})]},e.ref)}))]}),2,{style:{float:"left",width:"68%"}}),(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,c.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Metal",children:k}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Glass",children:w}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Total",children:_}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Storage",children:[p.fill_percent,"% Full"]})]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Building",children:(0,o.createComponentVNode)(2,c.Box,{color:C?"green":"",children:C||"Nothing"})}),(0,o.createComponentVNode)(2,c.Section,{title:"Build Queue",children:[I,(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,c.Button,{icon:"times",content:"Clear All",disabled:!p.buildQueueLen,onClick:function(){return u("clear_queue")}}),2,{align:"right"})]})],4,{style:{float:"right",width:"30%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Biogenerator=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Biogenerator=function(){return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,d)]})})};var c=function(e,t){if((0,r.useBackend)(t).data.processing)return(0,o.createComponentVNode)(2,i.Dimmer,{children:(0,o.createComponentVNode)(2,i.Flex,{mb:"30px",children:(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,color:"silver",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",spin:!0,size:4,mb:"15px"}),(0,o.createVNode)(1,"br"),"The biogenerator is processing..."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.biomass,l=a.container,s=a.container_curr_reagents,d=a.container_max_reagents;return(0,o.createComponentVNode)(2,i.Section,{title:"Storage",children:[(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mr:"20px",color:"silver",children:"Biomass:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{mr:"5px",children:c}),(0,o.createComponentVNode)(2,i.Icon,{name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,i.Flex,{height:"21px",mt:"8px",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mr:"10px",color:"silver",children:"Container:"}),l?(0,o.createComponentVNode)(2,i.ProgressBar,{value:s,maxValue:d,children:(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",children:s+" / "+d+" units"})}):(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"None"})})]})]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.has_plants,s=c.container;return(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",mr:"3px",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"power-off",disabled:!l,tooltip:l?"":"There are no plants in the biogenerator.",tooltipPosition:"top-right",content:"Activate",onClick:function(){return a("activate")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",mr:"3px",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"flask",disabled:!s,tooltip:s?"":"The biogenerator does not have a container.",tooltipPosition:"top",content:"Detach Container",onClick:function(){return a("detach_container")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",icon:"eject",disabled:!l,tooltip:l?"":"There are no stored plants to eject.",tooltipPosition:"top-left",content:"Eject Plants",onClick:function(){return a("eject_plants")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.biomass,s=c.product_list,d=c.container,u=(0,r.useSharedState)(t,"vendAmount",1),p=u[0],m=u[1],h=Object.entries(s).map((function(e,t){var n=Object.entries(e[1]).map((function(e){return e[1]}));return(0,o.createComponentVNode)(2,i.Collapsible,{title:e[0],open:!0,children:n.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{py:"2px",className:"candystripe",align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",ml:"2px",children:e.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",width:"20%",children:[e.cost*p,(0,o.createComponentVNode)(2,i.Icon,{ml:"5px",name:"leaf",size:1.2,color:"#3d8c40"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",width:"40%",children:e.needs_container&&!d?(0,o.createComponentVNode)(2,i.Button,{content:"No container",disabled:!0,icon:"flask",tooltip:"\u0412\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u043b\u044e\u0431\u043e\u0439 \u043a\u043e\u043d\u0442\u0435\u0439\u043d\u0435\u0440 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0439 \u043e\u043f\u0446\u0438\u0438",tooltipPosition:"top-left"}):(0,o.createComponentVNode)(2,i.Button,{content:"Vend",disabled:l0?Math.floor(c/u):0,f=d?"@?%%!\u2116@"+u:u,C=c>=u,g=p-p%5+(p%5>0?5:0);return(0,o.createComponentVNode)(2,i.Section,{title:"\u0418\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0420\u0430\u0437\u043b\u043e\u043c\u0430",children:[(0,o.createComponentVNode)(2,i.Box,{color:"silver",bold:!0,children:n}),(0,o.createComponentVNode)(2,i.ProgressBar,{color:0===m?"bad":m<100?"average":"good",value:a,maxValue:r,mt:1,mb:2,children:[m<=100?m:100," %"]}),(0,o.createComponentVNode)(2,i.Box,{children:["\u0414\u0430\u043d\u043d\u044b\u0435 \u0434\u043b\u044f \u0437\u043e\u043d\u0434\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f: ",(0,o.createComponentVNode)(2,i.Box,{color:c?C?"good":"average":"bad",as:"span",children:Math.floor(c)}),(0,o.createComponentVNode)(2,i.Button,{icon:"atom",tooltip:"\u0414\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0437\u043e\u043d\u0434\u0438\u0440\u0443\u044e\u0449\u0435\u0433\u043e \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u0430 \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c "+f+" \u0434\u0430\u043d\u043d\u044b\u0445.",content:p>0?"\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 "+g+" \u0441\u0435\u043a\u0443\u043d\u0434":"\u0417\u043e\u043d\u0434\u0438\u0440\u043e\u0432\u0430\u0442\u044c ("+h+")",disabled:!C||p>0,onClick:function(){return l("probe",{rift_id:t})},mx:2}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,textAlign:"center",content:s?"\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d":"\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439",disabled:s||m<100,onClick:function(){return l("reward",{rift_id:t})},mt:1.4})]})]})}(e)})),(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u043a\u0430\u043d\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:f&&f.map((function(e){return function(e){var t=e.scannerId,n=e.scannerName,r=e.scanStatus,a=e.canSwitch,s=e.switching,d=c[r],u="OFF"===d?[" ","silver"]:"NO_RIFTS"===d?["\u041d\u0435\u0442 \u0440\u0430\u0437\u043b\u043e\u043c\u043e\u0432","silver"]:"SOME_RIFTS"===d?["\u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442","good"]:"DANGER"===d?["\u041e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u044c! \u0412\u044b\u043a\u043b\u044e\u0447\u0438\u0442\u0435 \u0441\u043a\u0430\u043d\u0435\u0440!","bad"]:void 0;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:n,py:0,children:[s?(0,o.createComponentVNode)(2,i.Icon,{name:"circle-notch",color:"silver",spin:!0,ml:1.85,mr:1.79,my:.84}):a?(0,o.createComponentVNode)(2,i.Button,{icon:"power-off",color:"OFF"===d?"bad":"good",onClick:function(){return l("toggle_scanner",{scanner_id:t})},ml:1,mr:1}):(0,o.createComponentVNode)(2,i.Icon,{name:"power-off",color:"OFF"===d?"bad":"good",ml:1.85,mr:1.79,my:.84}),"OFF"!==d&&(0,o.createComponentVNode)(2,i.Box,{as:"span",color:u[1],children:u[0]})]})}(e)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u0435\u0440\u0432\u0435\u0440\u044b \u0432 \u0441\u0435\u0442\u0438",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:h&&h.map((function(e){return function(e){var t=e.servName,n=e.servData;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:n.length?n.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{children:[e.riftName," \u2014 ",Math.floor(e.probePoints)," \u0434\u0430\u043d\u043d\u044b\u0445."]},t)})):(0,o.createComponentVNode)(2,i.Box,{children:"\u041d\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0445"})})}(e)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BluespaceTap=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(102);t.BluespaceTap=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.product||[],u=s.desiredLevel,p=s.inputLevel,m=s.points,h=s.totalPoints,f=s.powerUse,C=s.availablePower,g=s.maxLevel,N=s.emagged,b=s.safeLevels,V=s.nextLevelPower,v=u>p?"bad":"good";return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!N&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:1,children:"Safety Protocols disabled"}),!!(p>b)&&(0,o.createComponentVNode)(2,i.NoticeBox,{danger:1,children:"High Power, Instability likely"}),(0,o.createComponentVNode)(2,i.Collapsible,{title:"Input Management",children:(0,o.createComponentVNode)(2,i.Section,{title:"Input",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Level",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Desired Level",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===u,tooltip:"Set to 0",onClick:function(){return l("set",{set_level:0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"step-backward",tooltip:"Decrease to actual input level",disabled:0===u,onClick:function(){return l("set",{set_level:p})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===u,tooltip:"Decrease one step",onClick:function(){return l("decrease")}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:u,fillValue:p,minValue:0,color:v,maxValue:g,stepPixelSize:20,step:1,onChange:function(e,t){return l("set",{set_level:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:u===g,tooltip:"Increase one step",tooltipPosition:"left",onClick:function(){return l("increase")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:u===g,tooltip:"Set to max",tooltipPosition:"left",onClick:function(){return l("set",{set_level:g})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Power Use",children:(0,c.formatPower)(f)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power for next level",children:(0,c.formatPower)(V)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Surplus Power",children:(0,c.formatPower)(C)})]})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available Points",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Points",children:h})]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{align:"end",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:(0,o.createComponentVNode)(2,i.Button,{disabled:e.price>=m,onClick:function(){return l("vend",{target:e.key})},content:e.price})},e.key)}))})})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BodyScanner=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["hasBorer","bad","Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended."],["hasVirus","bad","Viral pathogen detected in blood stream."],["blind","average","Cataracts detected."],["colourblind","average","Photoreceptor abnormalities detected."],["nearsighted","average","Retinal misalignment detected."]],d=[["Respiratory","oxyLoss"],["Brain","brainLoss"],["Toxin","toxLoss"],["Radioactive","radLoss"],["Brute","bruteLoss"],["Genetic","cloneLoss"],["Burn","fireLoss"],["Paralysis","paralysis"]],u={average:[.25,.5],bad:[.5,Infinity]},p=function(e,t){for(var n=[],o=0;o0?e.filter((function(e){return!!e})).reduce((function(e,t){return(0,o.createFragment)([e,(0,o.createComponentVNode)(2,a.Box,{children:t},t)],0)}),null):null},h=function(e){if(e>100){if(e<300)return"mild infection";if(e<400)return"mild infection+";if(e<500)return"mild infection++";if(e<700)return"acute infection";if(e<800)return"acute infection+";if(e<900)return"acute infection++";if(e>=900)return"septic"}return""};t.BodyScanner=function(e,t){var n=(0,i.useBackend)(t).data,r=n.occupied,a=n.occupant,l=void 0===a?{}:a,s=r?(0,o.createComponentVNode)(2,f,{occupant:l}):(0,o.createComponentVNode)(2,x);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:s})})};var f=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,C,{occupant:t}),(0,o.createComponentVNode)(2,g,{occupant:t}),(0,o.createComponentVNode)(2,N,{occupant:t}),(0,o.createComponentVNode)(2,V,{organs:t.extOrgan}),(0,o.createComponentVNode)(2,v,{organs:t.intOrgan})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=n.act,s=n.data.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"print",onClick:function(){return c("print_p")},children:"Print Report"}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return c("ejectify")},children:"Eject"})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:s.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:s.maxHealth,value:s.health/s.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[s.stat][0],children:l[s.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:(0,r.round)(s.bodyTempC,0)}),"\xb0C,\xa0",(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:(0,r.round)(s.bodyTempF,0)}),"\xb0F"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Implants",children:s.implant_len?(0,o.createComponentVNode)(2,a.Box,{children:s.implant.map((function(e){return e.name})).join(", ")}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"None"})})]})})},g=function(e){var t=e.occupant;return t.hasBorer||t.blind||t.colourblind||t.nearsighted||t.hasVirus?(0,o.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:s.map((function(e,n){if(t[e[0]])return(0,o.createComponentVNode)(2,a.Box,{color:e[1],bold:"bad"===e[1],children:e[2]},n)}))}):(0,o.createComponentVNode)(2,a.Section,{title:"Abnormalities",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No abnormalities found."})})},N=function(e){var t=e.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Damage",children:(0,o.createComponentVNode)(2,a.Table,{children:p(d,(function(e,n,r){return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Table.Row,{color:"label",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[e[0],":"]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:!!n&&n[0]+":"})]}),(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,b,{value:t[e[1]],marginBottom:r100)&&"average":"bad")||!!e.status.robotic&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",q:!0,children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:e.maxHealth,mt:t>0&&"0.5rem",value:e.totalLoss/e.maxHealth,ranges:u,children:[(0,o.createComponentVNode)(2,a.Box,{float:"left",display:"inline",children:[!!e.bruteLoss&&(0,o.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"bone"}),(0,r.round)(e.bruteLoss,0),"\xa0",(0,o.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Brute damage"})]}),!!e.fireLoss&&(0,o.createComponentVNode)(2,a.Box,{display:"inline",position:"relative",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"fire"}),(0,r.round)(e.fireLoss,0),(0,o.createComponentVNode)(2,a.Tooltip,{position:"top",content:"Burn damage"})]})]}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:(0,r.round)(e.totalLoss,0)})]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:m([!!e.internalBleeding&&"Internal bleeding",!!e.lungRuptured&&"Ruptured lung",!!e.status.broken&&e.status.broken,h(e.germ_level),!!e.open&&"Open incision"])}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:[m([!!e.status.splinted&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Splinted"}),!!e.status.robotic&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Robotic"}),!!e.status.dead&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",bold:!0,children:"DEAD"})]),m(e.shrapnel.map((function(e){return e.known?e.name:"Unknown object"})))]})]})]},t)}))]})})},v=function(e){return 0===e.organs.length?(0,o.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"N/A"})}):(0,o.createComponentVNode)(2,a.Section,{title:"Internal Organs",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:"Damage"}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",children:"Injuries"})]}),e.organs.map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{textTransform:"capitalize",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{color:(!e.dead?e.germ_level>100&&"average":"bad")||e.robotic>0&&"label",width:"33%",children:e.name}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:e.maxHealth,value:e.damage/e.maxHealth,mt:t>0&&"0.5rem",ranges:u,children:(0,r.round)(e.damage,0)})}),(0,o.createComponentVNode)(2,a.Table.Cell,{textAlign:"right",verticalAlign:"top",width:"33%",pt:t>0&&"calc(0.5rem + 2px)",children:[(0,o.createComponentVNode)(2,a.Box,{color:"average",display:"inline",children:m([h(e.germ_level)])}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:m([1===e.robotic&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Robotic"}),2===e.robotic&&(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Assisted"}),!!e.dead&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",bold:!0,children:"DEAD"})])})]})]},t)}))]})})},x=function(){return(0,o.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BorgPanel=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BorgPanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.borg||{},d=l.cell||{},u=d.charge/d.maxcharge,p=l.channels||[],m=l.modules||[],h=l.upgrades||[],f=l.ais||[],C=l.laws||[];return(0,o.createComponentVNode)(2,a.Window,{title:"Borg Panel",width:700,height:700,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:s.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return c("rename")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[(0,o.createComponentVNode)(2,i.Button,{icon:s.emagged?"check-square-o":"square-o",content:"Emagged",selected:s.emagged,onClick:function(){return c("toggle_emagged")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s.lockdown?"check-square-o":"square-o",content:"Locked Down",selected:s.lockdown,onClick:function(){return c("toggle_lockdown")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s.scrambledcodes?"check-square-o":"square-o",content:"Scrambled Codes",selected:s.scrambledcodes,onClick:function(){return c("toggle_scrambledcodes")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Reset Module",onClick:function(){return c("reset_module")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge",children:[d.missing?(0,o.createVNode)(1,"span","color-bad","No cell installed",16):(0,o.createComponentVNode)(2,i.ProgressBar,{value:u,children:d.charge+" / "+d.maxcharge}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Set",onClick:function(){return c("set_charge")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Change",onClick:function(){return c("change_cell")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"trash",content:"Remove",color:"bad",onClick:function(){return c("remove_cell")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Radio Channels",children:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.installed?"check-square-o":"square-o",content:e.name,selected:e.installed,onClick:function(){return c("toggle_radio",{channel:e.name})}},e.name)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Model",children:m.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:s.active_module===e.name?"check-square-o":"square-o",content:e.name+" module",selected:s.active_module===e.name,onClick:function(){return c("setmodule",{module:e.name})}},e.type)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Upgrades",children:h.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.installed?"check-square-o":"square-o",content:e.name,selected:e.installed,onClick:function(){return c("toggle_upgrade",{upgrade:e.type})}},e.type)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Master AI",children:f.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.connected?"check-square-o":"square-o",content:e.name,selected:e.connected,onClick:function(){return c("slavetoai",{slavetoai:e.ref})}},e.ref)}))})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Laws",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Law Manager",selected:s.lawmanager,onClick:function(){return c("lawmanager")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s.lawupdate?"check-square-o":"square-o",content:"Lawsync",selected:s.lawupdate,onClick:function(){return c("toggle_lawupdate")}})],4),children:C.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotClean=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BotClean=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.locked,d=l.noaccess,u=l.maintpanel,p=l.on,m=l.autopatrol,h=l.canhack,f=l.emagged,C=l.remote_disabled,g=l.painame,N=l.cleanblood;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,i.Section,{title:"General Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,i.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:m,content:"Auto Patrol",disabled:d,onClick:function(){return c("autopatrol")}})}),!!u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Maintenance Panel",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Panel Open!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safety System",children:(0,o.createComponentVNode)(2,i.Box,{color:f?"bad":"good",children:f?"DISABLED!":"Enabled"})}),!!h&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hacking",children:(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:f?"Restore Safties":"Hack",disabled:d,color:"bad",onClick:function(){return c("hack")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Access",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:!C,content:"AI Remote Control",disabled:d,onClick:function(){return c("disableremote")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Cleaning Settings",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:N,content:"Clean Blood",disabled:d,onClick:function(){return c("blood")}})}),g&&(0,o.createComponentVNode)(2,i.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:g,disabled:d,onClick:function(){return c("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BotSecurity=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BotSecurity=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.locked,d=l.noaccess,u=l.maintpanel,p=l.on,m=l.autopatrol,h=l.canhack,f=l.emagged,C=l.remote_disabled,g=l.painame,N=l.check_id,b=l.check_weapons,V=l.check_warrant,v=l.arrest_mode,x=l.arrest_declare;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.NoticeBox,{children:["Swipe an ID card to ",s?"unlock":"lock"," this interface."]}),(0,o.createComponentVNode)(2,i.Section,{title:"General Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,i.Button,{icon:p?"power-off":"times",content:p?"On":"Off",selected:p,disabled:d,onClick:function(){return c("power")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Patrol",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:m,content:"Auto Patrol",disabled:d,onClick:function(){return c("autopatrol")}})}),!!u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Maintenance Panel",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Panel Open!"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safety System",children:(0,o.createComponentVNode)(2,i.Box,{color:f?"bad":"good",children:f?"DISABLED!":"Enabled"})}),!!h&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hacking",children:(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:f?"Restore Safties":"Hack",disabled:d,color:"bad",onClick:function(){return c("hack")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Remote Access",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:!C,content:"AI Remote Control",disabled:d,onClick:function(){return c("disableremote")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Who To Arrest",children:[(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:N,content:"Unidentifiable Persons",disabled:d,onClick:function(){return c("authid")}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:b,content:"Unauthorized Weapons",disabled:d,onClick:function(){return c("authweapon")}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:V,content:"Wanted Criminals",disabled:d,onClick:function(){return c("authwarrant")}})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Arrest Procedure",children:[(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:v,content:"Detain Targets Indefinitely",disabled:d,onClick:function(){return c("arrtype")}}),(0,o.createComponentVNode)(2,i.Button.Checkbox,{fluid:!0,checked:x,content:"Announce Arrests On Radio",disabled:d,onClick:function(){return c("arrdeclare")}})]}),g&&(0,o.createComponentVNode)(2,i.Section,{title:"pAI",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:g,disabled:d,onClick:function(){return c("ejectpai")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigCells=void 0;var o=n(0),r=n(3),i=n(2),a=n(1),c=function(e,t){var n=e.cell,r=(0,a.useBackend)(t).act,c=n.cell_id,l=n.occupant,s=n.crimes,d=n.brigged_by,u=n.time_left_seconds,p=n.time_set_seconds,m=n.ref,h="";u>0&&(h+=" BrigCells__listRow--active");return(0,o.createComponentVNode)(2,i.Table.Row,{className:h,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:c}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:l}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:s}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:d}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.TimeDisplay,{totalSeconds:p})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.TimeDisplay,{totalSeconds:u})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{type:"button",onClick:function(){r("release",{ref:m})},children:"Release"})})]})},l=function(e){var t=e.cells;return(0,o.createComponentVNode)(2,i.Table,{className:"BrigCells__list",children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Cell"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Occupant"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Crimes"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Brigged By"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Time Brigged For"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Time Left"}),(0,o.createComponentVNode)(2,i.Table.Cell,{header:!0,children:"Release"})]}),t.map((function(e){return(0,o.createComponentVNode)(2,c,{cell:e},e.ref)}))]})};t.BrigCells=function(e,t){var n=(0,a.useBackend)(t),c=(n.act,n.data.cells);return(0,o.createComponentVNode)(2,r.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,r.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",height:"100%",children:(0,o.createComponentVNode)(2,i.Section,{height:"100%",flexGrow:"1",children:(0,o.createComponentVNode)(2,l,{cells:c})})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.BrigTimer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.BrigTimer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;l.nameText=l.occupant,l.timing&&(l.prisoner_hasrec?l.nameText=(0,o.createComponentVNode)(2,i.Box,{color:"green",children:l.occupant}):l.nameText=(0,o.createComponentVNode)(2,i.Box,{color:"red",children:l.occupant}));var s="pencil-alt";l.prisoner_name&&(l.prisoner_hasrec||(s="exclamation-triangle"));var d=[],u=0;for(u=0;u60||!l.isAllowed,onClick:function(){return c("start")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CameraConsoleOldContent=t.CameraConsoleMapContent=t.CameraConsole=void 0;var o=n(0),r=n(24),i=n(43),a=n(7),c=n(18),l=n(1),s=n(2),d=n(3),u=function(e,t){var n,o;if(!t)return[];var r=e.findIndex((function(e){return e.name===t.name}));return[null==(n=e[r-1])?void 0:n.name,null==(o=e[r+1])?void 0:o.name]},p=function(e,t){void 0===t&&(t="");var n=(0,c.createSearch)(t,(function(e){return e.name}));return(0,i.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)};t.CameraConsole=function(e,t){var n=(0,l.useLocalState)(t,"tabIndex",0),r=n[0],i=n[1];return(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,s.Box,{fillPositionedParent:!0,overflow:"hidden",children:[(0,o.createComponentVNode)(2,s.Tabs,{children:[(0,o.createComponentVNode)(2,s.Tabs.Tab,{selected:0===r,onClick:function(){return i(0)},children:[(0,o.createComponentVNode)(2,s.Icon,{name:"map-marked-alt"})," Map"]},"Map"),(0,o.createComponentVNode)(2,s.Tabs.Tab,{selected:1===r,onClick:function(){return i(1)},children:[(0,o.createComponentVNode)(2,s.Icon,{name:"table"})," List"]},"List")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,m);case 1:return(0,o.createComponentVNode)(2,h);default:return"WE SHOULDN'T BE HERE!"}}(r)]})})})};var m=function(e,t){var n=(0,l.useBackend)(t),r=n.act,i=n.data,a=n.config,c=p(i.cameras),d=(0,l.useLocalState)(t,"zoom",1),m=d[0],h=d[1],f=i.mapRef,C=i.activeCamera,g=i.stationLevel,N=u(c,C),b=N[0],V=N[1];return(0,o.createComponentVNode)(2,s.Box,{height:"100%",display:"flex",children:[(0,o.createComponentVNode)(2,s.Box,{height:"100%",flex:"0 0 500px",display:"flex",children:(0,o.createComponentVNode)(2,s.NanoMap,{onZoom:function(e){return h(e)},children:c.filter((function(e){return e.z===g})).map((function(e){return(0,o.createComponentVNode)(2,s.NanoMap.NanoButton,{activeCamera:C,x:e.x,y:e.y,context:t,zoom:m,icon:"circle",tooltip:e.name,name:e.name,color:"blue",status:e.status},e.ref)}))})}),(0,o.createComponentVNode)(2,s.Box,{height:"100%",resizable:!0,className:"CameraConsole__new__right",children:[(0,o.createVNode)(1,"div","CameraConsole__header",[(0,o.createVNode)(1,"div","CameraConsole__title",[(0,o.createVNode)(1,"b",null,"Camera: ",16),C&&C.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-left",disabled:!b,onClick:function(){return r("switch_camera",{name:b})}}),(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-right",disabled:!V,onClick:function(){return r("switch_camera",{name:V})}})],4)],4),(0,o.createComponentVNode)(2,s.ByondUi,{resizable:!0,className:"CameraConsole__map",overflow:"hidden",params:{id:f,parent:a.window,type:"map"}})]})]})};t.CameraConsoleMapContent=m;var h=function(e,t){var n=(0,l.useBackend)(t),r=n.act,i=n.data,c=n.config,m=i.mapRef,h=i.activeCamera,f=(0,l.useLocalState)(t,"searchText",""),C=f[0],g=f[1],N=p(i.cameras,C),b=u(N,h),V=b[0],v=b[1];return(0,o.createComponentVNode)(2,s.Box,{children:[(0,o.createVNode)(1,"div","CameraConsole__left",(0,o.createComponentVNode)(2,d.Window.Content,{scrollable:!0,children:(0,o.createFragment)([(0,o.createComponentVNode)(2,s.Input,{fluid:!0,mb:1,placeholder:"Search for a camera",onInput:function(e,t){return g(t)}}),(0,o.createComponentVNode)(2,s.Section,{children:N.map((function(e){return(0,o.createVNode)(1,"div",(0,a.classes)(["Button","Button--fluid",e.status?"Button--color--transparent":"Button--color--danger","Button--ellipsis",h&&e.name===h.name&&"Button--selected"]),e.name,0,{title:e.name,onClick:function(){(0,d.refocusLayout)(),r("switch_camera",{name:e.name})}},e.name)}))})],4)}),2),(0,o.createVNode)(1,"div","CameraConsole__right",[(0,o.createVNode)(1,"div","CameraConsole__toolbar",[(0,o.createVNode)(1,"b",null,"Camera: ",16),h&&h.name||"\u2014"],0),(0,o.createVNode)(1,"div","CameraConsole__toolbarRight",[(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-left",disabled:!V,onClick:function(){return r("switch_camera",{name:V})}}),(0,o.createComponentVNode)(2,s.Button,{icon:"chevron-right",disabled:!v,onClick:function(){return r("switch_camera",{name:v})}})],4),(0,o.createComponentVNode)(2,s.ByondUi,{className:"CameraConsole__map",params:{id:m,parent:c.window,type:"map"}})],4)]})};t.CameraConsoleOldContent=h},function(e,t,n){"use strict";t.__esModule=!0,t.Canister=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(102),l=n(3);t.Canister=function(e,t){var n=(0,i.useBackend)(t),s=n.act,d=n.data,u=d.portConnected,p=d.tankPressure,m=d.releasePressure,h=d.defaultReleasePressure,f=d.minReleasePressure,C=d.maxReleasePressure,g=d.valveOpen,N=d.name,b=d.canLabel,V=d.colorContainer,v=d.color_index,x=d.hasHoldingTank,y=d.holdingTank,k="";v.prim&&(k=V.prim.options[v.prim].name);var w="";v.sec&&(w=V.sec.options[v.sec].name);var _="";v.ter&&(_=V.ter.options[v.ter].name);var B="";v.quart&&(B=V.quart.options[v.quart].name);var S=[],L=[],A=[],I=[],E=0;for(E=0;Ee.current_positions&&(0,o.createComponentVNode)(2,i.Box,{color:"green",children:e.total_positions-e.current_positions})||(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"0"})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"-",disabled:d.cooldown_time||!e.can_close,onClick:function(){return s("make_job_unavailable",{job:e.title})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{content:"+",disabled:d.cooldown_time||!e.can_open,onClick:function(){return s("make_job_available",{job:e.title})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{textAlign:"center",children:d.target_dept&&(0,o.createComponentVNode)(2,i.Box,{color:"green",children:d.priority_jobs.indexOf(e.title)>-1?"Yes":""})||(0,o.createComponentVNode)(2,i.Button,{content:"Priority",selected:d.priority_jobs.indexOf(e.title)>-1,disabled:d.cooldown_time||!e.can_prioritize,onClick:function(){return s("prioritize_job",{job:e.title})}})})]},e.title)}))]})})],4):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 2:n=d.authenticated&&d.scan_name?d.modify_name?(0,o.createComponentVNode)(2,c.AccessList,{accesses:d.regions,selectedList:d.selectedAccess,accessMod:function(e){return s("set",{access:e})},grantAll:function(){return s("grant_all")},denyAll:function(){return s("clear_all")},grantDep:function(e){return s("grant_region",{region:e})},denyDep:function(e){return s("deny_region",{region:e})}}):(0,o.createComponentVNode)(2,i.Section,{title:"Card Missing",color:"red",children:"No card to modify."}):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 3:n=d.authenticated?d.records.length?(0,o.createComponentVNode)(2,i.Section,{title:"Records",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Delete All Records",disabled:!d.authenticated||0===d.records.length||d.target_dept,onClick:function(){return s("wipe_all_logs")}}),children:[(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Crewman"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Old Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"New Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Authorized By"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Time"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Reason"}),!!d.iscentcom&&(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Deleted By"})]}),d.records.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.transferee}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.oldvalue}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.newvalue}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.whodidit}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.timestamp}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.reason}),!!d.iscentcom&&(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.deletedby})]},e.timestamp)}))]}),!!d.iscentcom&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Delete MY Records",color:"purple",disabled:!d.authenticated||0===d.records.length,onClick:function(){return s("wipe_my_logs")}})})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Records",children:"No records."}):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;case 4:n=d.authenticated&&d.scan_name?(0,o.createComponentVNode)(2,i.Section,{title:"Your Team",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Name"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Rank"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Sec Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Actions"})]}),d.people_dept.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.title}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.crimstat}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:e.buttontext,disabled:!e.demotable,onClick:function(){return s("remote_demote",{remote_demote:e.name})}})})]},e.title)}))]})}):(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"Not logged in."});break;default:n=(0,o.createComponentVNode)(2,i.Section,{title:"Warning",color:"red",children:"ERROR: Unknown Mode."})}return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u,p,n]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CargoConsole=void 0;var o=n(0),r=n(43),i=n(24),a=n(1),c=n(2),l=n(3),s=(n(52),n(18));t.CargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,m)]})})};var d=function(e,t){var n=(0,a.useLocalState)(t,"contentsModal",null),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"contentsModalTitle",null),s=l[0],d=l[1];return null!==r&&null!==s?(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,c.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[s,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,c.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,c.Box,{m:2,children:(0,o.createComponentVNode)(2,c.Button,{content:"Close",onClick:function(){i(null),d(null)}})})]}):void 0},u=function(e,t){var n,r,i=(0,a.useBackend)(t),l=i.act,s=i.data,d=s.is_public,u=s.points,p=s.timeleft,m=s.moving,h=s.at_station;return m||h?!m&&h?(n="Docked at the station",r="Return Shuttle"):m&&(r="In Transit...",n=1!==p?"Shuttle is en route (ETA: "+p+" minutes)":"Shuttle is en route (ETA: "+p+" minute)"):(n="Docked off-station",r="Call Shuttle"),(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Points Available",children:u}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Shuttle Status",children:n}),0===d&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,c.Button,{content:r,disabled:m,onClick:function(){return l("moveShuttle")}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Central Command Messages",onClick:function(){return l("showMessages")}})]})]})})},p=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.categories,p=d.supply_packs,m=(0,a.useSharedState)(t,"category","Emergency"),h=m[0],f=m[1],C=(0,a.useSharedState)(t,"search_text",""),g=C[0],N=C[1],b=(0,a.useLocalState)(t,"contentsModal",null),V=(b[0],b[1]),v=(0,a.useLocalState)(t,"contentsModalTitle",null),x=(v[0],v[1]),y=(0,s.createSearch)(g,(function(e){return e.name})),k=(0,r.flow)([(0,i.filter)((function(e){return e.cat===u.filter((function(e){return e.name===h}))[0].category||g})),g&&(0,i.filter)(y),(0,i.sortBy)((function(e){return e.name.toLowerCase()}))])(p),w="Crate Catalogue";return g?w="Results for '"+g+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,c.Section,{title:w,buttons:(0,o.createComponentVNode)(2,c.Dropdown,{width:"190px",options:u.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,c.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return N(t)},mb:1}),(0,o.createComponentVNode)(2,c.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:k.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Points)"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Order 1",icon:"shopping-cart",onClick:function(){return l("order",{crate:e.ref,multiple:0})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Order Multiple",icon:"cart-plus",onClick:function(){return l("order",{crate:e.ref,multiple:1})}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Contents",icon:"search",onClick:function(){V(e.contents),x(e.name)}})]})]},e.name)}))})})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.requests,s=i.canapprove,d=i.orders;return(0,o.createComponentVNode)(2,c.Section,{title:"Details",children:(0,o.createComponentVNode)(2,c.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Approve",color:"green",disabled:!s,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Deny",color:"red",onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Confirmed Orders"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Changelog=void 0;var o=n(0),r=n(7),i=n(1),a=n(2),c=n(3),l=u(n(493)),s=u(n(494)),d=u(n(520));function u(e){return e&&e.__esModule?e:{"default":e}}function p(e,t,n,o,r,i,a){try{var c=e[i](a),l=c.value}catch(s){return void n(s)}c.done?t(l):Promise.resolve(l).then(o,r)}var m={add:{icon:"check-circle",color:"green"},admin:{icon:"user-shield",color:"purple"},balance:{icon:"balance-scale-right",color:"yellow"},bugfix:{icon:"bug",color:"green"},code_imp:{icon:"code",color:"green"},config:{icon:"cogs",color:"purple"},del:{icon:"minus",color:"red"},expansion:{icon:"check-circle",color:"green"},experiment:{icon:"radiation",color:"yellow"},image:{icon:"image",color:"green"},imageadd:{icon:"tg-image-plus",color:"green"},imagedel:{icon:"tg-image-minus",color:"red"},qol:{icon:"hand-holding-heart",color:"green"},refactor:{icon:"tools",color:"green"},rscadd:{icon:"check-circle",color:"green"},rscdel:{icon:"times-circle",color:"red"},server:{icon:"server",color:"purple"},sound:{icon:"volume-high",color:"green"},soundadd:{icon:"tg-sound-plus",color:"green"},sounddel:{icon:"tg-sound-minus",color:"red"},spellcheck:{icon:"spell-check",color:"green"},tgs:{icon:"toolbox",color:"purple"},tweak:{icon:"wrench",color:"green"},unknown:{icon:"info-circle",color:"label"},wip:{icon:"hammer",color:"orange"}},h=function(e){var t,n;function u(){var t;return(t=e.call(this)||this).state={data:"Loading changelog data...",selectedDate:"",selectedIndex:0},t.dateChoices=[],t}n=e,(t=u).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var h=u.prototype;return h.setData=function(e){this.setState({data:e})},h.setSelectedDate=function(e){this.setState({selectedDate:e})},h.setSelectedIndex=function(e){this.setState({selectedIndex:e})},h.getData=function(e,t){void 0===t&&(t=1);var n=(0,i.useBackend)(this.context).act,o=this;if(t>6)return this.setData("Failed to load data after 6 attempts");n("get_month",{date:e}),(0,d["default"])(e+".yml").then(function(){var n,r=(n=regeneratorRuntime.mark((function i(n){var r,a;return regeneratorRuntime.wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,n.text();case 2:r=i.sent,/^Cannot find/.test(r)?(a=50+50*t,o.setData("Loading changelog data"+".".repeat(t+3)),setTimeout((function(){o.getData(e,t+1)}),a)):o.setData(s["default"].load(r,{schema:s["default"].CORE_SCHEMA}));case 5:case"end":return i.stop()}}),i)})),function(){var e=this,t=arguments;return new Promise((function(o,r){var i=n.apply(e,t);function a(e){p(i,o,r,a,c,"next",e)}function c(e){p(i,o,r,a,c,"throw",e)}a(undefined)}))});return function(e){return r.apply(this,arguments)}}())},h.componentDidMount=function(){var e=this,t=(0,i.useBackend)(this.context).data.dates,n=void 0===t?[]:t;n&&(n.forEach((function(t){return e.dateChoices.push((0,l["default"])(t,"mmmm yyyy",!0))})),this.setSelectedDate(this.dateChoices[0]),this.getData(n[0]))},h.render=function(){var e=this,t=this.state,n=t.data,s=t.selectedDate,d=t.selectedIndex,u=(0,i.useBackend)(this.context).data.dates,p=this.dateChoices,h=p.length>0&&(0,o.createComponentVNode)(2,a.Stack,{mb:1,children:[(0,o.createComponentVNode)(2,a.Stack.Item,{children:(0,o.createComponentVNode)(2,a.Button,{className:"Changelog__Button",disabled:0===d,icon:"chevron-left",onClick:function(){var t=d-1;return e.setData("Loading changelog data..."),e.setSelectedIndex(t),e.setSelectedDate(p[t]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),e.getData(u[t])}})}),(0,o.createComponentVNode)(2,a.Stack.Item,{children:(0,o.createComponentVNode)(2,a.Dropdown,{displayText:s,options:p,onSelected:function(t){var n=p.indexOf(t);return e.setData("Loading changelog data..."),e.setSelectedIndex(n),e.setSelectedDate(t),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),e.getData(u[n])},selected:s,width:"150px"})}),(0,o.createComponentVNode)(2,a.Stack.Item,{children:(0,o.createComponentVNode)(2,a.Button,{className:"Changelog__Button",disabled:d===p.length-1,icon:"chevron-right",onClick:function(){var t=d+1;return e.setData("Loading changelog data..."),e.setSelectedIndex(t),e.setSelectedDate(p[t]),window.scrollTo(0,document.body.scrollHeight||document.documentElement.scrollHeight),e.getData(u[t])}})})]}),f=(0,o.createComponentVNode)(2,a.Section,{children:[(0,o.createVNode)(1,"h1",null,"Paradise Station",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thanks to: ",16),(0,o.createTextVNode)("Baystation 12, /tg/station, /vg/station, NTstation, CDK Station devs, FacepunchStation, GoonStation devs, the original SpaceStation developers and Radithor for the title image. Also a thanks to anybody who has contributed who is not listed here :( Ask to be added here on irc.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Recent GitHub contributors can be found "),(0,o.createVNode)(1,"a",null,"here",16,{href:"https://github.com/ss220-space/Paradise/pulse/monthly"}),(0,o.createTextVNode)(".")],0),h]}),C=(0,o.createComponentVNode)(2,a.Section,{children:[h,(0,o.createVNode)(1,"h3",null,"GoonStation 13 Development Team",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Coders: ",16),(0,o.createTextVNode)("Stuntwaffle, Showtime, Pantaloons, Nannek, Keelin, Exadv1, hobnob, Justicefries, 0staf, sniperchance, AngriestIBM, BrianOBlivion")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Spriters: ",16),(0,o.createTextVNode)("Supernorn, Haruhi, Stuntwaffle, Pantaloons, Rho, SynthOrange, I Said No")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Traditional Games Space Station 13 is thankful to the GoonStation 13 Development Team for its work on the game up to the"),(0,o.createTextVNode)(" r4407 release. The changelog for changes up to r4407 can be seen "),(0,o.createVNode)(1,"a",null,"here",16,{href:"https://wiki.ss13.co/Changelog#April_2010"}),(0,o.createTextVNode)(".")],0),(0,o.createVNode)(1,"p",null,["Except where otherwise noted, Goon Station 13 is licensed under a ",(0,o.createVNode)(1,"a",null,"Creative Commons Attribution-Noncommercial-Share Alike 3.0 License",16,{href:"https://creativecommons.org/licenses/by-nc-sa/3.0/"}),". Rights are currently extended to ",(0,o.createVNode)(1,"a",null,"SomethingAwful Goons",16,{href:"http://forums.somethingawful.com/"})," only."],0),(0,o.createVNode)(1,"h3",null,"Traditional Games Space Station 13 License",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Some icons by "),(0,o.createVNode)(1,"a",null,"Yusuke Kamiyamane",16,{href:"http://p.yusukekamiyamane.com/"}),(0,o.createTextVNode)(". All rights reserved. Licensed under a "),(0,o.createVNode)(1,"a",null,"Creative Commons Attribution 3.0 License",16,{href:"http://creativecommons.org/licenses/by/3.0/"}),(0,o.createTextVNode)(".")],4)]}),g=/#\d+/,N="object"==typeof n&&Object.keys(n).length>0&&Object.entries(n).reverse().map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,a.Section,{title:(0,l["default"])(t,"d mmmm yyyy",!0),children:(0,o.createComponentVNode)(2,a.Box,{ml:3,children:Object.entries(n).map((function(e){var t=e[0],n=e[1];return(0,o.createFragment)([(0,o.createVNode)(1,"h4",null,[t,(0,o.createTextVNode)(" changed:")],0),(0,o.createComponentVNode)(2,a.Box,{ml:3,children:(0,o.createComponentVNode)(2,a.Table,{children:n.map((function(e){var t=Object.keys(e)[0],n=e[t],i=n.match(g),c=(0,o.createComponentVNode)(2,a.Table.Cell,{className:(0,r.classes)(["Changelog__Cell","Changelog__Cell--Icon"]),children:(0,o.createComponentVNode)(2,a.Icon,{color:m[t]?m[t].color:m.unknown.color,name:m[t]?m[t].icon:m.unknown.icon})});return null!==i&&(0,o.createComponentVNode)(2,a.Table.Row,{children:[c,(0,o.createComponentVNode)(2,a.Table.Cell,{className:"Changelog__Cell",children:(0,o.createVNode)(1,"a",null,[(0,o.createTextVNode)(" "),n,(0,o.createTextVNode)(" ")],0,{href:"https://github.com/ss220-space/Paradise/pull/"+i[0].substring(1)})})]},t+n)||(0,o.createComponentVNode)(2,a.Table.Row,{children:[c,(0,o.createComponentVNode)(2,a.Table.Cell,{className:"Changelog__Cell",children:n})]},t+n)}))})})],4,t)}))})},t)}));return(0,o.createComponentVNode)(2,c.Window,{title:"Changelog",width:675,height:650,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[f,N,"string"==typeof n&&(0,o.createVNode)(1,"p",null,n,0),C]})})},u}(o.Component);t.Changelog=h},function(e,t,n){"use strict";var o;function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}!function(i){var a,c,l,s=arguments,d=(a=/d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g,c=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,l=/[^-+\dA-Z]/g,function(e,t,n,o){if(1!==s.length||"string"!==f(e)||/\d/.test(e)||(t=e,e=undefined),(e=e||0===e?e:new Date)instanceof Date||(e=new Date(e)),isNaN(e))throw TypeError("Invalid date");var r=(t=String(d.masks[t]||t||d.masks["default"])).slice(0,4);"UTC:"!==r&&"GMT:"!==r||(t=t.slice(4),n=!0,"GMT:"===r&&(o=!0));var i=function(){return n?"getUTC":"get"},C=function(){return e[i()+"Date"]()},g=function(){return e[i()+"Day"]()},N=function(){return e[i()+"Month"]()},b=function(){return e[i()+"FullYear"]()},V=function(){return e[i()+"Hours"]()},v=function(){return e[i()+"Minutes"]()},x=function(){return e[i()+"Seconds"]()},y=function(){return e[i()+"Milliseconds"]()},k=function(){return n?0:e.getTimezoneOffset()},w=function(){return m(e)},_=function(){return h(e)},B={d:function(){return C()},dd:function(){return u(C())},ddd:function(){return d.i18n.dayNames[g()]},DDD:function(){return p({y:b(),m:N(),d:C(),_:i(),dayName:d.i18n.dayNames[g()],short:!0})},dddd:function(){return d.i18n.dayNames[g()+7]},DDDD:function(){return p({y:b(),m:N(),d:C(),_:i(),dayName:d.i18n.dayNames[g()+7]})},m:function(){return N()+1},mm:function(){return u(N()+1)},mmm:function(){return d.i18n.monthNames[N()]},mmmm:function(){return d.i18n.monthNames[N()+12]},yy:function(){return String(b()).slice(2)},yyyy:function(){return u(b(),4)},h:function(){return V()%12||12},hh:function(){return u(V()%12||12)},H:function(){return V()},HH:function(){return u(V())},M:function(){return v()},MM:function(){return u(v())},s:function(){return x()},ss:function(){return u(x())},l:function(){return u(y(),3)},L:function(){return u(Math.floor(y()/10))},t:function(){return V()<12?d.i18n.timeNames[0]:d.i18n.timeNames[1]},tt:function(){return V()<12?d.i18n.timeNames[2]:d.i18n.timeNames[3]},T:function(){return V()<12?d.i18n.timeNames[4]:d.i18n.timeNames[5]},TT:function(){return V()<12?d.i18n.timeNames[6]:d.i18n.timeNames[7]},Z:function(){return o?"GMT":n?"UTC":(String(e).match(c)||[""]).pop().replace(l,"").replace(/GMT\+0000/g,"UTC")},o:function(){return(k()>0?"-":"+")+u(100*Math.floor(Math.abs(k())/60)+Math.abs(k())%60,4)},p:function(){return(k()>0?"-":"+")+u(Math.floor(Math.abs(k())/60),2)+":"+u(Math.floor(Math.abs(k())%60),2)},S:function(){return["th","st","nd","rd"][C()%10>3?0:(C()%100-C()%10!=10)*C()%10]},W:function(){return w()},WW:function(){return u(w())},N:function(){return _()}};return t.replace(a,(function(e){return e in B?B[e]():e.slice(1,e.length-1)}))});d.masks={"default":"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",paddedShortDate:"mm/dd/yyyy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},d.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"],timeNames:["a","p","am","pm","A","P","AM","PM"]};var u=function(e,t){for(e=String(e),t=t||2;e.length>10),56320+(e-65536&1023))}for(var x=new Array(256),y=new Array(256),k=0;k<256;k++)x[k]=V(k)?1:0,y[k]=V(k);function w(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||c,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function _(e,t){return new r(t,new i(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function B(e,t){throw _(e,t)}function S(e,t){e.onWarning&&e.onWarning.call(null,_(e,t))}var L={YAML:function(e,t,n){var o,r,i;null!==e.version&&B(e,"duplication of %YAML directive"),1!==n.length&&B(e,"YAML directive accepts exactly one argument"),null===(o=/^([0-9]+)\.([0-9]+)$/.exec(n[0]))&&B(e,"ill-formed argument of the YAML directive"),r=parseInt(o[1],10),i=parseInt(o[2],10),1!==r&&B(e,"unacceptable YAML version of the document"),e.version=n[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&S(e,"unsupported YAML version of the document")},TAG:function(e,t,n){var o,r;2!==n.length&&B(e,"TAG directive accepts exactly two arguments"),o=n[0],r=n[1],p.test(o)||B(e,"ill-formed tag handle (first argument) of the TAG directive"),l.call(e.tagMap,o)&&B(e,'there is a previously declared suffix for "'+o+'" tag handle'),m.test(r)||B(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[o]=r}};function A(e,t,n,o){var r,i,a,c;if(t1&&(e.result+=o.repeat("\n",t-1))}function P(e,t){var n,o,r=e.tag,i=e.anchor,a=[],c=!1;for(null!==e.anchor&&(e.anchorMap[e.anchor]=a),o=e.input.charCodeAt(e.position);0!==o&&45===o&&g(e.input.charCodeAt(e.position+1));)if(c=!0,e.position++,T(e,!0,-1)&&e.lineIndent<=t)a.push(null),o=e.input.charCodeAt(e.position);else if(n=e.line,j(e,t,3,!1,!0),a.push(e.result),T(e,!0,-1),o=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&0!==o)B(e,"bad indentation of a sequence entry");else if(e.lineIndentt?V=1:e.lineIndent===t?V=0:e.lineIndentt?V=1:e.lineIndent===t?V=0:e.lineIndentt)&&(j(e,t,4,!0,r)&&(f?m=e.result:h=e.result),f||(E(e,d,u,p,m,h,i,a),p=m=h=null),T(e,!0,-1),c=e.input.charCodeAt(e.position)),e.lineIndent>t&&0!==c)B(e,"bad indentation of a mapping entry");else if(e.lineIndent=0))break;0===i?B(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):d?B(e,"repeat of an indentation width identifier"):(u=t+i-1,d=!0)}if(C(a)){do{a=e.input.charCodeAt(++e.position)}while(C(a));if(35===a)do{a=e.input.charCodeAt(++e.position)}while(!f(a)&&0!==a)}for(;0!==a;){for(D(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!d||e.lineIndentu&&(u=e.lineIndent),f(a))p++;else{if(e.lineIndent0){for(r=a,i=0;r>0;r--)(a=b(c=e.input.charCodeAt(++e.position)))>=0?i=(i<<4)+a:B(e,"expected hexadecimal character");e.result+=v(i),e.position++}else B(e,"unknown escape sequence");n=o=e.position}else f(c)?(A(e,n,o,!0),M(e,T(e,!1,t)),n=o=e.position):e.position===e.lineStart&&F(e)?B(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}B(e,"unexpected end of the stream within a double quoted scalar")}(e,m)?w=!0:!function(e){var t,n,o;if(42!==(o=e.input.charCodeAt(e.position)))return!1;for(o=e.input.charCodeAt(++e.position),t=e.position;0!==o&&!g(o)&&!N(o);)o=e.input.charCodeAt(++e.position);return e.position===t&&B(e,"name of an alias node must contain at least one character"),n=e.input.slice(t,e.position),e.anchorMap.hasOwnProperty(n)||B(e,'unidentified alias "'+n+'"'),e.result=e.anchorMap[n],T(e,!0,-1),!0}(e)?function(e,t,n){var o,r,i,a,c,l,s,d,u=e.kind,p=e.result;if(g(d=e.input.charCodeAt(e.position))||N(d)||35===d||38===d||42===d||33===d||124===d||62===d||39===d||34===d||37===d||64===d||96===d)return!1;if((63===d||45===d)&&(g(o=e.input.charCodeAt(e.position+1))||n&&N(o)))return!1;for(e.kind="scalar",e.result="",r=i=e.position,a=!1;0!==d;){if(58===d){if(g(o=e.input.charCodeAt(e.position+1))||n&&N(o))break}else if(35===d){if(g(e.input.charCodeAt(e.position-1)))break}else{if(e.position===e.lineStart&&F(e)||n&&N(d))break;if(f(d)){if(c=e.line,l=e.lineStart,s=e.lineIndent,T(e,!1,-1),e.lineIndent>=t){a=!0,d=e.input.charCodeAt(e.position);continue}e.position=i,e.line=c,e.lineStart=l,e.lineIndent=s;break}}a&&(A(e,r,i,!1),M(e,e.line-c),r=i=e.position,a=!1),C(d)||(i=e.position+1),d=e.input.charCodeAt(++e.position)}return A(e,r,i,!1),!!e.result||(e.kind=u,e.result=p,!1)}(e,m,1===n)&&(w=!0,null===e.tag&&(e.tag="?")):(w=!0,null===e.tag&&null===e.anchor||B(e,"alias node should not have any properties")),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):0===V&&(w=s&&P(e,h))),null!==e.tag&&"!"!==e.tag)if("?"===e.tag){for(d=0,u=e.implicitTypes.length;d tag; it should be "'+p.kind+'", not "'+e.kind+'"'),p.resolve(e.result)?(e.result=p.construct(e.result),null!==e.anchor&&(e.anchorMap[e.anchor]=e.result)):B(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):B(e,"unknown tag !<"+e.tag+">");return null!==e.listener&&e.listener("close",e),null!==e.tag||null!==e.anchor||w}function U(e){var t,n,o,r,i=e.position,a=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};0!==(r=e.input.charCodeAt(e.position))&&(T(e,!0,-1),r=e.input.charCodeAt(e.position),!(e.lineIndent>0||37!==r));){for(a=!0,r=e.input.charCodeAt(++e.position),t=e.position;0!==r&&!g(r);)r=e.input.charCodeAt(++e.position);for(o=[],(n=e.input.slice(t,e.position)).length<1&&B(e,"directive name must not be less than one character in length");0!==r;){for(;C(r);)r=e.input.charCodeAt(++e.position);if(35===r){do{r=e.input.charCodeAt(++e.position)}while(0!==r&&!f(r));break}if(f(r))break;for(t=e.position;0!==r&&!g(r);)r=e.input.charCodeAt(++e.position);o.push(e.input.slice(t,e.position))}0!==r&&D(e),l.call(L,n)?L[n](e,n,o):S(e,'unknown document directive "'+n+'"')}T(e,!0,-1),0===e.lineIndent&&45===e.input.charCodeAt(e.position)&&45===e.input.charCodeAt(e.position+1)&&45===e.input.charCodeAt(e.position+2)?(e.position+=3,T(e,!0,-1)):a&&B(e,"directives end mark is expected"),j(e,e.lineIndent-1,4,!1,!0),T(e,!0,-1),e.checkLineBreaks&&d.test(e.input.slice(i,e.position))&&S(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&F(e)?46===e.input.charCodeAt(e.position)&&(e.position+=3,T(e,!0,-1)):e.position0&&-1==="\0\r\n\x85\u2028\u2029".indexOf(this.buffer.charAt(r-1));)if(r-=1,this.position-r>t/2-1){n=" ... ",r+=5;break}for(i="",a=this.position;at/2-1){i=" ... ",a-=5;break}return c=this.buffer.slice(r,a),o.repeat(" ",e)+n+c+i+"\n"+o.repeat(" ",e+this.position-r+n.length)+"^"},r.prototype.toString=function(e){var t,n="";return this.name&&(n+='in "'+this.name+'" '),n+="at line "+(this.line+1)+", column "+(this.column+1),e||(t=this.getSnippet())&&(n+=":\n"+t),n},e.exports=r},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return null!==e?e:""}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return null!==e?e:[]}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return null!==e?e:{}}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:null",{kind:"scalar",resolve:function(e){if(null===e)return!0;var t=e.length;return 1===t&&"~"===e||4===t&&("null"===e||"Null"===e||"NULL"===e)},construct:function(){return null},predicate:function(e){return null===e},represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:bool",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t=e.length;return 4===t&&("true"===e||"True"===e||"TRUE"===e)||5===t&&("false"===e||"False"===e||"FALSE"===e)},construct:function(e){return"true"===e||"True"===e||"TRUE"===e},predicate:function(e){return"[object Boolean]"===Object.prototype.toString.call(e)},represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var o=n(65),r=n(20);function i(e){return 48<=e&&e<=55}function a(e){return 48<=e&&e<=57}e.exports=new r("tag:yaml.org,2002:int",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,o=e.length,r=0,c=!1;if(!o)return!1;if("-"!==(t=e[r])&&"+"!==t||(t=e[++r]),"0"===t){if(r+1===o)return!0;if("b"===(t=e[++r])){for(r++;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})},function(e,t,n){"use strict";var o=n(65),r=n(20),i=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");var a=/^[-+]?[0-9]+e/;e.exports=new r("tag:yaml.org,2002:float",{kind:"scalar",resolve:function(e){return null!==e&&!(!i.test(e)||"_"===e[e.length-1])},construct:function(e){var t,n,o,r;return n="-"===(t=e.replace(/_/g,"").toLowerCase())[0]?-1:1,r=[],"+-".indexOf(t[0])>=0&&(t=t.slice(1)),".inf"===t?1===n?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===t?NaN:t.indexOf(":")>=0?(t.split(":").forEach((function(e){r.unshift(parseFloat(e,10))})),t=0,o=1,r.forEach((function(e){t+=e*o,o*=60})),n*t):n*parseFloat(t,10)},predicate:function(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||o.isNegativeZero(e))},represent:function(e,t){var n;if(isNaN(e))switch(t){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(t){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(t){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(o.isNegativeZero(e))return"-0.0";return n=e.toString(10),a.test(n)?n.replace("e",".e"):n},defaultStyle:"lowercase"})},function(e,t,n){"use strict";var o=n(20),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),i=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");e.exports=new o("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:function(e){return null!==e&&(null!==r.exec(e)||null!==i.exec(e))},construct:function(e){var t,n,o,a,c,l,s,d,u=0,p=null;if(null===(t=r.exec(e))&&(t=i.exec(e)),null===t)throw new Error("Date resolve error");if(n=+t[1],o=+t[2]-1,a=+t[3],!t[4])return new Date(Date.UTC(n,o,a));if(c=+t[4],l=+t[5],s=+t[6],t[7]){for(u=t[7].slice(0,3);u.length<3;)u+="0";u=+u}return t[9]&&(p=6e4*(60*+t[10]+ +(t[11]||0)),"-"===t[9]&&(p=-p)),d=new Date(Date.UTC(n,o,a,c,l,s,u)),p&&d.setTime(d.getTime()-p),d},instanceOf:Date,represent:function(e){return e.toISOString()}})},function(e,t,n){"use strict";var o=n(20);e.exports=new o("tag:yaml.org,2002:merge",{kind:"scalar",resolve:function(e){return"<<"===e||null===e}})},function(e,t,n){"use strict";var o;try{o=n(508).Buffer}catch(a){}var r=n(20),i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";e.exports=new r("tag:yaml.org,2002:binary",{kind:"scalar",resolve:function(e){if(null===e)return!1;var t,n,o=0,r=e.length,a=i;for(n=0;n64)){if(t<0)return!1;o+=6}return o%8==0},construct:function(e){var t,n,r=e.replace(/[\r\n=]/g,""),a=r.length,c=i,l=0,s=[];for(t=0;t>16&255),s.push(l>>8&255),s.push(255&l)),l=l<<6|c.indexOf(r.charAt(t));return 0===(n=a%4*6)?(s.push(l>>16&255),s.push(l>>8&255),s.push(255&l)):18===n?(s.push(l>>10&255),s.push(l>>2&255)):12===n&&s.push(l>>4&255),o?o.from?o.from(s):new o(s):s},predicate:function(e){return o&&o.isBuffer(e)},represent:function(e){var t,n,o="",r=0,a=e.length,c=i;for(t=0;t>18&63],o+=c[r>>12&63],o+=c[r>>6&63],o+=c[63&r]),r=(r<<8)+e[t];return 0===(n=a%3)?(o+=c[r>>18&63],o+=c[r>>12&63],o+=c[r>>6&63],o+=c[63&r]):2===n?(o+=c[r>>10&63],o+=c[r>>4&63],o+=c[r<<2&63],o+=c[64]):1===n&&(o+=c[r>>2&63],o+=c[r<<4&63],o+=c[64],o+=c[64]),o}})},function(e,t,n){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ -var o=n(509),r=n(510),i=n(511);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case undefined:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(o)return j(e).length;t=(""+t).toLowerCase(),o=!0}}function f(e,t,n){var o=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((n===undefined||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function C(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function g(e,t,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=l.from(t,o)),l.isBuffer(t))return 0===t.length?-1:N(e,t,n,o,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):N(e,[t],n,o,r);throw new TypeError("val must be string, number or Buffer")}function N(e,t,n,o,r){var i,a=1,c=e.length,l=t.length;if(o!==undefined&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;a=2,c/=2,l/=2,n/=2}function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var d=-1;for(i=n;ic&&(n=c-l),i=n;i>=0;i--){for(var u=!0,p=0;pr&&(o=r):o=r;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");o>i/2&&(o=i/2);for(var a=0;a>8,r=n%256,i.push(r),i.push(o);return i}(t,e.length-n),e,n,o)}function w(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var o=[],r=t;r239?4:s>223?3:s>191?2:1;if(r+u<=n)switch(u){case 1:s<128&&(d=s);break;case 2:128==(192&(i=e[r+1]))&&(l=(31&s)<<6|63&i)>127&&(d=l);break;case 3:i=e[r+1],a=e[r+2],128==(192&i)&&128==(192&a)&&(l=(15&s)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:i=e[r+1],a=e[r+2],c=e[r+3],128==(192&i)&&128==(192&a)&&128==(192&c)&&(l=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&l<1114112&&(d=l)}null===d?(d=65533,u=1):d>65535&&(d-=65536,o.push(d>>>10&1023|55296),d=56320|1023&d),o.push(d),r+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",o=0;for(;o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,o,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(t===undefined&&(t=0),n===undefined&&(n=e?e.length:0),o===undefined&&(o=0),r===undefined&&(r=this.length),t<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&t>=n)return 0;if(o>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(r>>>=0)-(o>>>=0),a=(n>>>=0)-(t>>>=0),c=Math.min(i,a),s=this.slice(o,r),d=e.slice(t,n),u=0;ur)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var i=!1;;)switch(o){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return V(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return y(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(e,t,n){var o="";n=Math.min(e.length,n);for(var r=t;ro)&&(n=o);for(var r="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function I(e,t,n,o,r,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function D(e,t,n,o){t<0&&(t=65535+t+1);for(var r=0,i=Math.min(e.length-n,2);r>>8*(o?r:1-r)}function T(e,t,n,o){t<0&&(t=4294967295+t+1);for(var r=0,i=Math.min(e.length-n,4);r>>8*(o?r:3-r)&255}function F(e,t,n,o,r,i){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,o,i){return i||F(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function P(e,t,n,o,i){return i||F(e,0,n,8),r.write(e,t,n,o,52,8),n+8}l.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=t===undefined?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t0&&(r*=256);)o+=this[e+--t]*r;return o},l.prototype.readUInt8=function(e,t){return t||E(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||E(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||E(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||E(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||E(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||E(e,t,this.length);for(var o=this[e],r=1,i=0;++i=(r*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||E(e,t,this.length);for(var o=t,r=1,i=this[e+--o];o>0&&(r*=256);)i+=this[e+--o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||E(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||E(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||E(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||E(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||E(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||E(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||E(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||E(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||E(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||I(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+r]=e/i&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):T(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}var i=0,a=1,c=0;for(this[t]=255&e;++i>0)-c&255;return t+n},l.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);I(this,e,t,n,r-1,-r)}var i=n-1,a=1,c=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===c&&0!==this[t+i+1]&&(c=1),this[t+i]=(e/a>>0)-c&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):T(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||I(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=n===undefined?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===o){(t-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,o){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(104))},function(e,t,n){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],o=t[1];return 3*(n+o)/4-o},t.toByteArray=function(e){var t,n,o=s(e),a=o[0],c=o[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,c)),d=0,u=c>0?a-4:a;for(n=0;n>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],a=0,c=n-r;ac?c:a+16383));1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"="));return i.join("")};for(var o=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,l=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function d(e,t,n){for(var r,i,a=[],c=t;c>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t,n){"use strict";t.read=function(e,t,n,o,r){var i,a,c=8*r-o-1,l=(1<>1,d=-7,u=n?r-1:0,p=n?-1:1,m=e[t+u];for(u+=p,i=m&(1<<-d)-1,m>>=-d,d+=c;d>0;i=256*i+e[t+u],u+=p,d-=8);for(a=i&(1<<-d)-1,i>>=-d,d+=o;d>0;a=256*a+e[t+u],u+=p,d-=8);if(0===i)i=1-s;else{if(i===l)return a?NaN:(m?-1:1)*Infinity;a+=Math.pow(2,o),i-=s}return(m?-1:1)*a*Math.pow(2,i-o)},t.write=function(e,t,n,o,r,i){var a,c,l,s=8*i-r-1,d=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:i-1,h=o?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(c=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(c=0,a=d):a+u>=1?(c=(t*l-1)*Math.pow(2,r),a+=u):(c=t*Math.pow(2,u-1)*Math.pow(2,r),a=0));r>=8;e[n+m]=255&c,m+=h,c/=256,r-=8);for(a=a<0;e[n+m]=255&a,m+=h,a/=256,s-=8);e[n+m-h]|=128*f}},function(e,t,n){"use strict";var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,n){"use strict";var o=n(20),r=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,o,a,c,l=[],s=e;for(t=0,n=s.length;t3)return!1;if("/"!==t[t.length-o.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),o="";return"/"===t[0]&&(n&&(o=n[1]),t=t.slice(1,t.length-o.length-1)),new RegExp(t,o)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var o;try{o=n(518)}catch(i){"undefined"!=typeof window&&(o=window.esprima)}var r=n(20);e.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=o.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(r){return!1}},construct:function(e){var t,n="("+e+")",r=o.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"ArrowFunctionExpression"!==r.body[0].expression.type&&"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=r.body[0].expression.body.range,"BlockStatement"===r.body[0].expression.body.type?new Function(i,n.slice(t[0]+1,t[1]-1)):new Function(i,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){"use strict";var o;o=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=n(3),i=n(8),a=n(15);function c(e,t,n){var a=null,c=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?c:null,s=!1;if(t){s="boolean"==typeof t.comment&&t.comment;var d="boolean"==typeof t.attachComment&&t.attachComment;(s||d)&&((a=new o.CommentHandler).attach=d,t.comment=!0,l=c)}var u,p=!1;t&&"string"==typeof t.sourceType&&(p="module"===t.sourceType),u=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,l):new i.Parser(e,t,l);var m=p?u.parseModule():u.parseScript();return s&&a&&(m.comments=a.comments),u.config.tokens&&(m.tokens=u.tokens),u.config.tolerant&&(m.errors=u.errorHandler.errors),m}t.parse=c,t.parseModule=function(e,t,n){var o=t||{};return o.sourceType="module",c(e,o,n)},t.parseScript=function(e,t,n){var o=t||{};return o.sourceType="script",c(e,o,n)},t.tokenize=function(e,t,n){var o,r=new a.Tokenizer(e,t);o=[];try{for(;;){var i=r.getNextToken();if(!i)break;n&&(i=n(i)),o.push(i)}}catch(c){r.errorHandler.tolerate(c)}return r.errorHandler.tolerant&&(o.errors=r.errors()),o};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===o.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var i=this.leading[r];t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var o=this.trailing[n];o.start>=e.end.offset&&t.unshift(o.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var i=r.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&((i=this.stack[this.stack.length-1])&&i.start>=e.start.offset);)t=i.node,this.stack.pop();if(t){for(var o=(t.leadingComments?t.leadingComments.length:0)-1;o>=0;--o){var r=t.leadingComments[o];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(o,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(o=this.leading.length-1;o>=0;--o){var i;(i=this.leading[o]).start<=e.start.offset&&(n.unshift(i.comment),this.leading.splice(o,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===o.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",o={type:n,value:e.value};if(e.range&&(o.range=e.range),e.loc&&(o.loc=e.loc),this.comments.push(o),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),a=n(5),c=n(6),l=n(7),s=n(8),d=n(13),u=n(14);function p(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var n=e;t=p(n.namespace)+":"+p(n.name);break;case c.JSXSyntax.JSXMemberExpression:var o=e;t=p(o.object)+"."+p(o.property)}return t}d.TokenName[100]="JSXIdentifier",d.TokenName[101]="JSXText";var m=function(e){function t(t,n,o){return e.call(this,t,n,o)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,o=!1,r=!1,a=!1;!this.scanner.eof()&&n&&!o;){var c=this.scanner.source[this.scanner.index];if(c===e)break;if(o=";"===c,t+=c,++this.scanner.index,!o)switch(t.length){case 2:r="#"===c;break;case 3:r&&(n=(a="x"===c)||i.Character.isDecimalDigit(c.charCodeAt(0)),r=r&&!a);break;default:n=(n=n&&!(r&&!i.Character.isDecimalDigit(c.charCodeAt(0))))&&!(a&&!i.Character.isHexDigit(c.charCodeAt(0)))}}if(n&&o&&t.length>2){var l=t.substr(1,t.length-2);r&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):r||a||!u.XHTMLEntities[l]||(t=u.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:c=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],o="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)o+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),c=46===r&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=c.length,{type:7,value:c,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(i.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(i.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,i.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var o={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(o)),o},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,o))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(r,i))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var o=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(o,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),o=this.matchJSX("/");return o&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,o,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),o=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,r,o))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;i=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(i),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],o=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:o,children:n});n=r.children,o=r.closing}return this.finalize(e,new a.JSXElement(t,n,o))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(s.Parser);t.JSXParser=m},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=function(e){this.type=o.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var i=function(e,t,n){this.type=o.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=i;var a=function(){this.type=o.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var c=function(e){this.type=o.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=c;var l=function(e){this.type=o.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var s=function(e,t){this.type=o.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=s;var d=function(e,t){this.type=o.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=d;var u=function(e,t){this.type=o.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=u;var p=function(e,t,n){this.type=o.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=p;var m=function(e){this.type=o.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=m;var h=function(e,t){this.type=o.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=function(e){this.type=o.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var i=function(e){this.type=o.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=i;var a=function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var c=function(e,t,n){this.type=o.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=c;var l=function(e,t){this.type=o.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var s=function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=s;var d=function(e,t,n){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=d;var u=function(e,t,n){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=u;var p=function(e){this.type=o.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=p;var m=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?o.Syntax.LogicalExpression:o.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=m;var h=function(e){this.type=o.Syntax.BlockStatement,this.body=e};t.BlockStatement=h;var f=function(e){this.type=o.Syntax.BreakStatement,this.label=e};t.BreakStatement=f;var C=function(e,t){this.type=o.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=C;var g=function(e,t){this.type=o.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=g;var N=function(e){this.type=o.Syntax.ClassBody,this.body=e};t.ClassBody=N;var b=function(e,t,n){this.type=o.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var V=function(e,t,n){this.type=o.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=V;var v=function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=v;var x=function(e,t,n){this.type=o.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=x;var y=function(e){this.type=o.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=y;var k=function(){this.type=o.Syntax.DebuggerStatement};t.DebuggerStatement=k;var w=function(e,t){this.type=o.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=w;var _=function(e,t){this.type=o.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=_;var B=function(){this.type=o.Syntax.EmptyStatement};t.EmptyStatement=B;var S=function(e){this.type=o.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=S;var L=function(e){this.type=o.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=L;var A=function(e,t,n){this.type=o.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=A;var E=function(e,t){this.type=o.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=E;var I=function(e){this.type=o.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=I;var D=function(e,t,n){this.type=o.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=D;var T=function(e,t,n){this.type=o.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=T;var F=function(e,t,n,r){this.type=o.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=F;var M=function(e,t,n,r){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=M;var P=function(e,t,n,r){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=P;var O=function(e){this.type=o.Syntax.Identifier,this.name=e};t.Identifier=O;var R=function(e,t,n){this.type=o.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=R;var j=function(e,t){this.type=o.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=j;var U=function(e){this.type=o.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=U;var z=function(e){this.type=o.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=z;var W=function(e,t){this.type=o.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=W;var H=function(e,t){this.type=o.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=H;var K=function(e,t){this.type=o.Syntax.Literal,this.value=e,this.raw=t};t.Literal=K;var Y=function(e,t){this.type=o.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=Y;var G=function(e,t,n,r,i){this.type=o.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this["static"]=i};t.MethodDefinition=G;var q=function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=q;var X=function(e,t){this.type=o.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=X;var J=function(e){this.type=o.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=J;var $=function(e){this.type=o.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=$;var Z=function(e,t,n,r,i,a){this.type=o.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=a};t.Property=Z;var Q=function(e,t,n,r){this.type=o.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RegexLiteral=Q;var ee=function(e){this.type=o.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=o.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var oe=function(e){this.type=o.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=oe;var re=function(e){this.type=o.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var ie=function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=ie;var ae=function(){this.type=o.Syntax.Super};t.Super=ae;var ce=function(e,t){this.type=o.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=ce;var le=function(e,t){this.type=o.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var se=function(e,t){this.type=o.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=se;var de=function(e,t){this.type=o.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=de;var ue=function(e,t){this.type=o.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=ue;var pe=function(){this.type=o.Syntax.ThisExpression};t.ThisExpression=pe;var me=function(e){this.type=o.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=me;var he=function(e,t,n){this.type=o.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=he;var fe=function(e,t){this.type=o.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=fe;var Ce=function(e,t,n){this.type=o.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=Ce;var ge=function(e,t){this.type=o.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ge;var Ne=function(e,t){this.type=o.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=Ne;var be=function(e,t){this.type=o.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Ve=function(e,t){this.type=o.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Ve;var ve=function(e,t){this.type=o.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=ve},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),r=n(10),i=n(11),a=n(7),c=n(12),l=n(2),s=n(13),d=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new c.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=o,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=o||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,o=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(o,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(o,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(o,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var o=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,o},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var o=this.parseFormalParameters(),r=this.parsePropertyMethod(o);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,o.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,i.Messages.StrictOctalLiteral);var o=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,o));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),o=this.lookahead,r=null,c=null,l=!1,s=!1,d=!1,u=!1;if(3===o.type){var p=o.value;this.nextToken(),l=this.match("["),r=(u=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(p))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());var m=this.qualifiedPropertyName(this.lookahead);if(3===o.type&&!u&&"get"===o.value&&m)t="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,c=this.parseGetterMethod();else if(3===o.type&&!u&&"set"===o.value&&m)t="set",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseSetterMethod();else if(7===o.type&&"*"===o.value&&m)t="init",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseGeneratorMethod(),s=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!u)!l&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),c=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))c=u?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0;else if(3===o.type)if(p=this.finalize(n,new a.Identifier(o.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),d=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);c=this.finalize(n,new a.AssignmentPattern(p,h))}else d=!0,c=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,r,l,c,s,d))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){o.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,o=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:o},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],o=this.parseTemplateHead();for(n.push(o);!o.tail;)t.push(this.parseExpression()),o=this.parseTemplateElement(),n.push(o);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var o=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var i=0;i")||this.expect("=>"),this.context.isBindingElement=!1,i=0;i")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(o=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!o)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(i=0;i")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],i=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[i,n.value,c],s=[o];!((o=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&o<=s[s.length-1];){c=l.pop();var d=l.pop();s.pop(),i=l.pop(),r.pop();var u=this.startNode(r[r.length-1]);l.push(this.finalize(u,new a.BinaryExpression(d,i,c)))}l.push(this.nextToken().value),s.push(o),r.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=l.length-1;t=l[p];for(var m=r.pop();p>1;){var h=r.pop(),f=m&&m.lineStart;u=this.startNode(h,f),d=l[p-1],t=this.finalize(u,new a.BinaryExpression(d,l[p-2],t)),p-=2,m=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,o,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,c=this.reinterpretAsCoverFormalsList(e);if(c){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var u=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var m=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var f=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=f}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var C=h.type!==l.Syntax.BlockStatement;this.context.strict&&c.firstRestricted&&this.throwUnexpectedToken(c.firstRestricted,c.message),this.context.strict&&c.stricted&&this.tolerateUnexpectedToken(c.stricted,c.message),e=r?this.finalize(m,new a.AsyncArrowFunctionExpression(c.params,h,C)):this.finalize(m,new a.ArrowFunctionExpression(c.params,h,C)),this.context.strict=s,this.context.allowStrictDirective=d,this.context.allowYield=u,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var g=e;this.scanner.isRestrictedWord(g.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(g.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var N=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(N,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),o=this.parsePattern([],e);this.context.strict&&o.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(o.name)&&this.tolerateError(i.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(i.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&o.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(o,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;o.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var o=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(o))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var o=[];!this.match("]");)if(this.match(","))this.nextToken(),o.push(null);else{if(this.match("...")){o.push(this.parseBindingRestElement(e,t));break}o.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(o))},e.prototype.parsePropertyPattern=function(e,t){var n,o,r=this.createNode(),i=!1,c=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var s=this.finalize(r,new a.Identifier(l.value));if(this.match("=")){e.push(l),c=!0,this.nextToken();var d=this.parseAssignmentExpression();o=this.finalize(this.startNode(l),new a.AssignmentPattern(s,d))}else this.match(":")?(this.expect(":"),o=this.parsePatternWithDefault(e,t)):(e.push(l),c=!0,o=s)}else i=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),o=this.parsePatternWithDefault(e,t);return this.finalize(r,new a.Property("init",n,i,o,!1,c))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),o=[];for(this.expect("{");!this.match("}");)o.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(o))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,i.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,o=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,o=this.finalize(this.startNode(n),new a.AssignmentPattern(o,i))}return o},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(i.Messages.StrictVarName);var o=null;return this.match("=")?(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,o))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(i.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(o,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,o))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var o=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=o}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,o=null,r=null,c=null,s=!0,d=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){o=this.createNode(),this.nextToken();var u=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=u,1===p.length&&this.matchKeyword("in")){var m=p[0];m.init&&(m.id.type===l.Syntax.ArrayPattern||m.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(i.Messages.ForInOfLoopInitializer,"for-in"),o=this.finalize(o,new a.VariableDeclaration(p,"var")),this.nextToken(),e=o,t=this.parseExpression(),o=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(o=this.finalize(o,new a.VariableDeclaration(p,"var")),this.nextToken(),e=o,t=this.parseAssignmentExpression(),o=null,s=!1):(o=this.finalize(o,new a.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){o=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(u=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=u,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(o=this.finalize(o,new a.VariableDeclaration(p,h)),this.nextToken(),e=o,t=this.parseExpression(),o=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(o=this.finalize(o,new a.VariableDeclaration(p,h)),this.nextToken(),e=o,t=this.parseAssignmentExpression(),o=null,s=!1):(this.consumeSemicolon(),o=this.finalize(o,new a.VariableDeclaration(p,h)))):(o=this.finalize(o,new a.Identifier(h)),this.nextToken(),e=o,t=this.parseExpression(),o=null)}else{var f=this.lookahead;if(u=this.context.allowIn,this.context.allowIn=!1,o=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=u,this.matchKeyword("in"))this.context.isAssignmentTarget&&o.type!==l.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(o),e=o,t=this.parseExpression(),o=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&o.type!==l.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(o),e=o,t=this.parseAssignmentExpression(),o=null,s=!1;else{if(this.match(",")){for(var C=[o];this.match(",");)this.nextToken(),C.push(this.isolateCoverGrammar(this.parseAssignmentExpression));o=this.finalize(this.startNode(f),new a.SequenceExpression(C))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(c=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===e?this.finalize(d,new a.ForStatement(o,r,c,n)):s?this.finalize(d,new a.ForInStatement(e,t,n)):this.finalize(d,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(i.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(i.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(i.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(i.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(i.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(i.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var o=[],r=!1;for(this.expect("{");!this.match("}");){var c=this.parseSwitchCase();null===c.test&&(r&&this.throwError(i.Messages.MultipleDefaultsInSwitch),r=!0),o.push(c)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,o))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var o=n,r="$"+o.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(i.Messages.Redeclaration,"Label",o.name),this.context.labelSet[r]=!0;var c=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),c=this.parseClassDeclaration();else if(this.matchKeyword("function")){var s=this.lookahead,d=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(s,i.Messages.StrictFunction):d.generator&&this.tolerateUnexpectedToken(s,i.Messages.GeneratorInLegacyContext),c=d}else c=this.parseStatement();delete this.context.labelSet[r],e=new a.LabeledStatement(o,c)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(i.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),o={},r=0;r0&&this.tolerateError(i.Messages.BadGetterArity);var o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(i.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(i.Messages.BadSetterRestParameter);var o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var o=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=o}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),o="",r=null,c=null,l=!1,s=!1,d=!1,u=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,d=!0,l=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(u=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,i.Messages.ConstructorIsAsync))}var m=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&m?(o="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,c=this.parseGetterMethod()):"set"===t.value&&m&&(o="set",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseSetterMethod()):7===t.type&&"*"===t.value&&m&&(o="init",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseGeneratorMethod(),s=!0),!o&&r&&this.match("(")&&(o="init",c=u?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0),o||this.throwUnexpectedToken(this.lookahead),"init"===o&&(o="method"),l||(d&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,i.Messages.StaticPrototype),!d&&this.isPropertyKey(r,"constructor")&&(("method"!==o||!s||c&&c.generator)&&this.throwUnexpectedToken(t,i.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,i.Messages.DuplicateConstructor):e.value=!0,o="constructor")),this.finalize(n,new a.MethodDefinition(r,l,c,o,d))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var o=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(o,r,i))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,o=null;this.matchKeyword("extends")&&(this.nextToken(),o=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,o,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(i.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(i.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var o=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(o,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(i.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var o=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(o,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var c=[],l=null,s=!1;for(this.expect("{");!this.match("}");)s=s||this.matchKeyword("default"),c.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):s?(o=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause,this.throwError(o,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,c,l))}return e},e}();t.Parser=d},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(o){Object.create&&Object.defineProperty&&(n=Object.create(o),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,o){var r="Line "+t+": "+o,i=this.constructError(r,n);return i.index=e,i.lineNumber=t,i.description=o,i},e.prototype.throwError=function(e,t,n,o){throw this.createError(e,t,n,o)},e.prototype.tolerateError=function(e,t,n,o){var r=this.createError(e,t,n,o);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),r=n(4),i=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function c(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=i.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=i.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,o=[];for(this.trackComment&&(o=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};o.push(a)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,o}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},o.push(a)),o},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(o))13===o&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===o){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(i)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(i)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var o=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(o)),t=!0}else{if(42!==n)break;this.index+=2,o=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(o))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,o=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(o))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,o=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(o))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,o=0;o1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=c(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+c(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+c(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var o=this.index;this.index=t,this.tolerateUnexpectedToken(i.Messages.InvalidEscapedReservedWord),this.index=o}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",o=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(o=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return o||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&o.throwUnexpectedToken(i.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"\uffff"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(n)}catch(r){this.throwUnexpectedToken(i.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(a){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];o.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(i.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(i.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(i.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,o=this.scanHexEscape("u");if(null!==o)for(e+=o;n=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=n(12),i=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(o=this.values[this.curly-4])&&!this.beforeFunctionExpression(o);else if("function"===this.values[this.curly-4]){var o;t=!(o=this.values[this.curly-5])||!this.beforeFunctionExpression(o)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),c=function(){function e(e,t){this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;to&&" "!==e[u+1],u=i);else if(!C(a))return 5;p=p&&g(a)}s=s||d&&i-u-1>o&&" "!==e[u+1]}return l||s?n>9&&N(e)?5:s?4:3:p&&!r(e)?1:2}function V(e,t,n,o){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==d.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),c=o||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,c,e.indent,a,(function(t){return function(e,t){var n,o;for(n=0,o=e.implicitTypes.length;n"+v(t,e.indent)+x(m(function(e,t){var n,o,r=/(\n+)([^\n]*)/g,i=(c=e.indexOf("\n"),c=-1!==c?c:e.length,r.lastIndex=c,y(e.slice(0,c),t)),a="\n"===e[0]||" "===e[0];var c;for(;o=r.exec(e);){var l=o[1],s=o[2];n=" "===s[0],i+=l+(a||n||""===s?"":"\n")+y(s,t),a=n}return i}(t,a),i));case 5:return'"'+function(e){for(var t,n,o,r="",i=0;i=55296&&t<=56319&&(n=e.charCodeAt(i+1))>=56320&&n<=57343?(r+=u(1024*(t-55296)+n-56320+65536),i++):(o=s[t],r+=!o&&C(t)?e[i]:o||u(t));return r}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function v(e,t){var n=N(e)?String(t):"",o="\n"===e[e.length-1];return n+(o&&("\n"===e[e.length-2]||"\n"===e)?"+":o?"":"-")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){if(""===e||" "===e[0])return e;for(var n,o,r=/ [^ ]/g,i=0,a=0,c=0,l="";n=r.exec(e);)(c=n.index)-i>t&&(o=a>i?a:c,l+="\n"+e.slice(i,o),i=o+1),a=c;return l+="\n",e.length-i>t&&a>i?l+=e.slice(i,a)+"\n"+e.slice(a+1):l+=e.slice(i),l.slice(1)}function k(e,t,n){var o,i,a,s,d,u;for(a=0,s=(i=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+u+'" style');o=d.represent[u](t,u)}e.dump=o}return!0}return!1}function w(e,t,n,o,i,a){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var l=c.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>t);var s,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(i=!1),d&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&d&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===l)o&&0!==Object.keys(e.dump).length?(!function(e,t,n,o){var i,a,c,l,s,d,u="",p=e.tag,m=Object.keys(n);if(!0===e.sortKeys)m.sort();else if("function"==typeof e.sortKeys)m.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");for(i=0,a=m.length;i1024)&&(e.dump&&10===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,s&&(d+=h(e,t)),w(e,t+1,l,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?d+=":":d+=": ",u+=d+=e.dump));e.tag=p,e.dump=u||"{}"}(e,t,e.dump,i),d&&(e.dump="&ref_"+s+e.dump)):(!function(e,t,n){var o,r,i,a,c,l="",s=e.tag,d=Object.keys(n);for(o=0,r=d.length;o1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),w(e,t,a,!1,!1)&&(l+=c+=e.dump));e.tag=s,e.dump="{"+l+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===l){var p=e.noArrayIndent&&t>0?t-1:t;o&&0!==e.dump.length?(!function(e,t,n,o){var r,i,a="",c=e.tag;for(r=0,i=n.length;r "+e.dump)}return!0}function _(e,t){var n,o,r=[],i=[];for(function a(e,t,n){var o,r,i;if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,i=e.length;r0}),(0,o.createComponentVNode)(2,p,{mode:g,bufferReagents:f}),(0,o.createComponentVNode)(2,m,{isCondiment:i,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,C)]})]})};var u=function(e,t){var n=(0,r.useBackend)(t).act,a=e.beaker,d=e.beakerReagents,u=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",flexGrow:"0",flexBasis:"300px",buttons:u?(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:a?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:d,buttons:function(e,r){return(0,o.createComponentVNode)(2,i.Box,{mb:r0?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,i.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!c.condi&&(0,o.createComponentVNode)(2,i.Button,{icon:c.printing?"spinner":"print",disabled:c.printing,iconSpin:!!c.printing,ml:"0.5rem",content:"Print",onClick:function(){return a("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})})),(0,l.modalRegisterBodyOverride)("change_patch_style",(function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.Flex,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:n.modal.choices.map((function(r,a){return(0,o.createComponentVNode)(2,i.Flex.Item,{flex:"1 1 auto",children:(0,o.createComponentVNode)(2,i.Button,{selected:a+1===parseInt(n.modal.value,10),onClick:function(){return(0,l.modalAnswer)(t,e.id,a+1)},children:(0,o.createVNode)(1,"div",null,null,1,{style:"display: inline-block;width: 32px;height: 32px;background: url(bandaid"+(a+1)+".png);background-size: 160%;background-position: left -9px bottom -14px;"})})},a)}))})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(49),l=n(51),s=n(3),d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,s=e.args,d=s.activerecord,u=s.realname,p=s.health,m=s.unidentity,h=s.strucenzymes,f=p.split(" - ");return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+u,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){return r("disk",{option:"load"})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){return r("disk",{option:"save",savetype:"ui"})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){return r("disk",{option:"save",savetype:"ue"})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){return r("disk",{option:"save",savetype:"se"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:d})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",d),(0,o.createComponentVNode)(2,s.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,s.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,p)})]})]})};var u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.menu;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},p=function(e,t){var n,r=(0,i.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,m):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},m=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.loading,d=l.scantemp,u=l.occupant,p=l.locked,m=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,g=l.selected_pod,N=p&&!!u;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:N,icon:N?"toggle-on":"toggle-off",content:N?"Engaged":"Disengaged",onClick:function(){return c("lock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:N||!u,icon:"user-slash",content:"Eject Occupant",onClick:function(){return c("eject")}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:s?(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,a.Box,{color:d.color,children:d.text})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return c("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||s,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return c("scan")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,a.Button,{selected:g===e.pod,icon:g===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,a.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,a.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.records;return c.length?(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,i.useBackend)(t),c=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var s=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.NoticeBox,Object.assign({},s,{children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.scanner,s=c.numberofpods,d=c.autoallowed,u=c.autoprocess,p=c.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,a.Button,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:u?0:1})}})],4),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"eject",content:"Eject Disk",onClick:function(){return r("disk",{option:"eject"})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pods",children:s?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[s," connected"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.CommunicationsComputer=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,s=c.data;n=s.authenticated?s.is_ai?"AI":1===s.authenticated?"Command":2===s.authenticated?"Captain":"ERROR: Report This Bug!":"Not Logged In";var d="View ("+s.messages.length+")",u=(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:s.is_ai&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Access Level",children:"AI"})||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.authenticated?"sign-out-alt":"id-card",selected:s.authenticated,content:s.authenticated?"Log Out ("+n+")":"Log In",onClick:function(){return l("auth")}})})})}),!!s.esc_section&&(0,o.createComponentVNode)(2,i.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[!!s.esc_status&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:s.esc_status}),!!s.esc_callable&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,i.Button,{icon:"rocket",content:"Call Shuttle",disabled:!s.authenticated,onClick:function(){return l("callshuttle")}})}),!!s.esc_recallable&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Recall Shuttle",disabled:!s.authenticated||s.is_ai,onClick:function(){return l("cancelshuttle")}})}),!!s.lastCallLoc&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Last Call/Recall From",children:s.lastCallLoc})]})})],0),p="Make Priority Announcement";s.msg_cooldown>0&&(p+=" ("+s.msg_cooldown+"s)");var m=s.emagged?"Message [UNKNOWN]":"Message CentComm",h="Request Authentication Codes";s.cc_cooldown>0&&(m+=" ("+s.cc_cooldown+"s)",h+=" ("+s.cc_cooldown+"s)");var f,C=s.str_security_level,g=s.levels.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.icon,content:e.name,disabled:!s.authmax||e.id===s.security_level,onClick:function(){return l("newalertlevel",{level:e.id})}},e.name)})),N=s.stat_display.presets.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.label,selected:e.name===s.stat_display.type,disabled:!s.authenticated,onClick:function(){return l("setstat",{statdisp:e.name})}},e.name)})),b=s.stat_display.alerts.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.label,selected:e.alert===s.stat_display.icon,disabled:!s.authenticated,onClick:function(){return l("setstat",{statdisp:"alert",alert:e.alert})}},e.alert)}));if(s.current_message_title)f=(0,o.createComponentVNode)(2,i.Section,{title:s.current_message_title,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Return To Message List",disabled:!s.authenticated,onClick:function(){return l("messagelist")}}),children:(0,o.createComponentVNode)(2,i.Box,{children:s.current_message})});else{var V=s.messages.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:"View",disabled:!s.authenticated||s.current_message_title===e.title,onClick:function(){return l("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Delete",disabled:!s.authenticated,onClick:function(){return l("delmessage",{msgid:e.id})}})]},e.id)}));f=(0,o.createComponentVNode)(2,i.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return l("main")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:V})})}switch(s.menu_state){case 1:return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u,(0,o.createComponentVNode)(2,i.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Alert",color:s.security_level_color,children:C}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Change Alert",children:g}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,i.Button,{icon:"bullhorn",content:p,disabled:!s.authmax||s.msg_cooldown>0,onClick:function(){return l("announce")}})}),!!s.emagged&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"broadcast-tower",color:"red",content:m,disabled:!s.authmax||s.cc_cooldown>0,onClick:function(){return l("MessageSyndicate")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!s.authmax,onClick:function(){return l("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,i.Button,{icon:"broadcast-tower",content:m,disabled:!s.authmax||s.cc_cooldown>0,onClick:function(){return l("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,i.Button,{icon:"bomb",content:h,disabled:!s.authmax||s.cc_cooldown>0,onClick:function(){return l("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,i.Button,{icon:"tv",content:"Change Status Displays",disabled:!s.authenticated,onClick:function(){return l("status")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,i.Button,{icon:"folder-open",content:d,disabled:!s.authenticated,onClick:function(){return l("messagelist")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!s.authenticated,onClick:function(){return l("RestartNanoMob")}})})]})})]})});case 2:return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[u,(0,o.createComponentVNode)(2,i.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return l("main")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Presets",children:N}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Alerts",children:b}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:s.stat_display.line_1,disabled:!s.authenticated,onClick:function(){return l("setmsg1")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:s.stat_display.line_2,disabled:!s.authenticated,onClick:function(){return l("setmsg2")}})})]})})]})});case 3:return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[u,f]})});default:return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[u,"ERRROR. Unknown menu_state: ",s.menu_state,"Please report this to NT Technical Support."]})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(102),l=n(3);var s={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},d=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,i.useBackend)(t),c=r.act,s=r.data;n=s.unauthorized?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,C,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):s.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:1===s.page?(0,o.createComponentVNode)(2,m,{height:"100%"}):(0,o.createComponentVNode)(2,f,{height:"100%"})})],4):(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,C,{height:"100%",allMessages:d,finishedTimeout:3e3,onFinished:function(){return c("complete_load_animation")}})});var h=(0,i.useLocalState)(t,"viewingPhoto",""),N=h[0];h[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[N&&(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:n})})]})};var u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.tc_available,s=c.tc_paid_out,d=c.completed_contracts,u=c.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,a.Box,{verticalAlign:"middle",mt:"0.25rem",children:[u," Rep"]})},e,{children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,a.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Earned",children:[s," TC"]})]})}),(0,o.createComponentVNode)(2,a.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:d})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"shopping-cart"}),"Hub"]})]})))},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.contracts,u=l.contract_active,p=l.can_extract,m=!!u&&d.filter((function(e){return 1===e.status}))[0],f=m&&m.time_left>0,C=(0,i.useLocalState)(t,"viewingPhoto",""),g=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!p||f,icon:"parachute-box",content:["Call Extraction",f&&(0,o.createComponentVNode)(2,c.Countdown,{timeLeft:m.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,a.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return g("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,a.Box,{width:"100%",children:[!!s[e.status]&&(0,o.createComponentVNode)(2,a.Box,{color:s[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:s[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,a.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",h(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!!u,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,a.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},h=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,i=e.objective.locs.target_area_id,c=e.objective.locs.target_coords,l=t===i;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(c[1]-n[1],c[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.rep,s=c.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:e.refundable&&(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Refund ("+e.cost+" Rep)",onClick:function(){return r("refund",{uid:e.uid})}}),children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,a.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},C=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},i.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},i.componentWillUnmount=function(){clearTimeout(this.timer)},i.render=function(){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),g=function(e,t){var n=(0,i.useLocalState)(t,"viewingPhoto",""),r=n[0],c=n[1];return(0,o.createComponentVNode)(2,a.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return c("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.slowFactor,d=l.oneWay,u=l.position;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:!d,onClick:function(){return c("toggleOneWay")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-double-left",onClick:function(){return c("slowFactor",{value:s-5})}})," "]}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-left",onClick:function(){return c("slowFactor",{value:s-1})}})," "]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Slider,{width:"100px",mx:"1px",value:s,fillValue:s,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return c("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-right",onClick:function(){return c("slowFactor",{value:s+1})}})," "]}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-double-right",onClick:function(){return c("slowFactor",{value:s+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(24),i=n(18),a=n(1),c=n(2),l=n(80),s=n(49),d=n(3),u=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=(0,a.useLocalState)(t,"tabIndex",r.IndexToggler),l=i[0],s=i[1];return(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,c.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[r.isBS?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===l,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"table"})," Command Data View"]},"ComDataView"):null,r.isBP?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"table"})," Security Data View"]},"SecDataView"):null,(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){return s(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,onClick:function(){return s(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,f);case 1:return(0,o.createComponentVNode)(2,C);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,g);default:return"WE SHOULDN'T BE HERE!"}}(l)]})})})};var m=function(e){var t=e.crewData,n=e.context,d=(0,a.useBackend)(n),m=d.act,h=d.data,f=(0,r.sortBy)((function(e){return e.name}))(t||[]),C=(0,a.useLocalState)(n,"search",""),g=C[0],N=C[1],b=(0,i.createSearch)(g,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),f.filter(b).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:p(e,h.critThreshold),children:u(e,h.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?h.isAI?(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return m("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})]})},h=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.crewmembers||[]);return(0,o.createComponentVNode)(2,m,{crewData:r,context:t})},f=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.crewmembers.filter((function(e){return e.is_command}))||[]);return(0,o.createComponentVNode)(2,m,{crewData:r,context:t})},C=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.crewmembers.filter((function(e){return e.is_security}))||[]);return(0,o.createComponentVNode)(2,m,{crewData:r,context:t})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=(0,a.useLocalState)(t,"zoom",1),s=l[0],d=l[1],u=function(e){return e.is_command&&i.isBS||e.is_security&&i.isBP?"square":"circle"},m=function(e){return e.is_command&&i.isBS||e.is_security&&i.isBP?10:6},h=function(e,t){return e.is_command&&i.isBS||e.is_security&&i.isBP?e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"violet":p(e,t)};return(0,o.createComponentVNode)(2,c.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,c.NanoMap,{onZoom:function(e){return d(e)},children:i.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,zoom:s,icon:u(e),size:m(e),tooltip:e.name+" ("+e.assignment+")",color:h(e,i.critThreshold),onClick:function(){i.isAI&&r("track",{track:e.ref})}},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(533),i=n(1),a=n(2),c=n(3),l=[{label:"\u0410\u0441\u0444\u0438\u043a\u0441\u0438\u044f",type:"oxyLoss"},{label:"\u0418\u043d\u0442\u043e\u043a\u0441\u0438\u043a\u0430\u0446\u0438\u044f",type:"toxLoss"},{label:"\u0420\u0430\u043d\u044b",type:"bruteLoss"},{label:"\u041e\u0436\u043e\u0433\u0438",type:"fireLoss"}],s=[["good","\u0412 \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u044f"],["bad","\u0422\u0420\u0423\u041f"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,d=c.isOperating,p=c.hasOccupant,m=c.occupant,h=void 0===m?[]:m,f=c.cellTemperature,C=c.cellTemperatureStatus,g=c.isBeakerLoaded,N=c.auto_eject_healthy,b=c.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"\u041f\u0430\u0446\u0438\u0435\u043d\u0442",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return r("ejectOccupant")},disabled:!p,children:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c"}),children:p?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0430\u0446\u0438\u0435\u043d\u0442",children:h.name||"\u0418\u043c\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0417\u0434\u043e\u0440\u043e\u0432\u044c\u0435",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",color:s[h.stat][0],children:s[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"\u041f\u0430\u0446\u0438\u0435\u043d\u0442 \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"\u041a\u0440\u0438\u043e\u043a\u0430\u043f\u0441\u0443\u043b\u0430",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return r("ejectBeaker")},disabled:!g,children:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c \u0451\u043c\u043a\u043e\u0441\u0442\u044c"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0438\u0442\u0430\u043d\u0438\u0435",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return r(d?"switchOff":"switchOn")},selected:d,children:d?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0401\u043c\u043a\u043e\u0441\u0442\u044c",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0410\u0432\u0442\u043e\u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u044b\u0445 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"toggle-on":"toggle-off",selected:N,onClick:function(){return r(N?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:N?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0410\u0432\u0442\u043e\u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043c\u0451\u0440\u0442\u0432\u044b\u0445 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432",children:(0,o.createComponentVNode)(2,a.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return r(b?"auto_eject_dead_off":"auto_eject_dead_on")},children:b?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b"})})]})})],4)},u=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),l=c.isBeakerLoaded,s=c.beakerLabel,d=c.beakerVolume;return l?(0,o.createFragment)([s?"\xab"+s+"\xbb":(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"\u0401\u043c\u043a\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0430"}),(0,o.createComponentVNode)(2,a.Box,{color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){var t=Math.round(e);return(0,r.declensionRu)(t,"\u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c","\u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c","\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c")+" "+t+" "+(0,r.declensionRu)(t,"\u0435\u0434\u0438\u043d\u0438\u0446\u0430","\u0435\u0434\u0438\u043d\u0438\u0446\u044b","\u0435\u0434\u0438\u043d\u0438\u0446")}}):"\u0401\u043c\u043a\u043e\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u0430"})],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"\u0401\u043c\u043a\u043e\u0441\u0442\u044c \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430"})}},function(e,t,n){"use strict";t.__esModule=!0,t.declensionRu=void 0;t.declensionRu=function(e,t,n,o){var r=e%100;if(r>=10&&r<=20)return o;var i=r%10;return 1===i?t:i>=2&&i<=4?n:o}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(18);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,c=n.account_name,d=n.allow_items;return(0,o.createComponentVNode)(2,a.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Hello, "+(c||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!d&&(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,i.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,i.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No stored crew!"})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data.frozen_items,s=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,c.toTitleCase)(t)};return(0,o.createComponentVNode)(2,i.Collapsible,{title:"Stored Items",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:!l.length,content:"Drop All Items",color:"red",onClick:function(){return a("all_items")}}),children:l.length?(0,o.createComponentVNode)(2,i.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:s(e.name),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return a("one_item",{item:e.uid})}})},e)}))})}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(51),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],d=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,i=(0,r.useBackend)(t),l=(i.act,i.data),s=l.irradiating,d=l.dnaBlockSize,m=l.occupant;return t.dnaBlockSize=d,t.isDNAInvalid=!m.isViableSubject||!m.uniqueIdentity||!m.structuralEnzymes,s&&(n=(0,o.createComponentVNode)(2,V,{duration:s})),(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,c.ComplexModal),n,(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p)]})]})};var u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.locked,d=c.hasOccupant,u=c.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d,selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Engaged":"Disengaged",onClick:function(){return a("toggleLock")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d||s,icon:"user-slash",content:"Eject",onClick:function(){return a("ejectOccupant")}})],4),children:d?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:u.minHealth,max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:u.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unique Enzymes",children:c.occupant.uniqueEnzymes?c.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"Cell unoccupied."})})},p=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data,d=l.selectedMenuKey,u=l.hasOccupant;l.occupant;return u?t.isDNAInvalid?(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===d?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,f)],4):"se"===d?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===d?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===d&&(n=(0,o.createComponentVNode)(2,b)),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:d===e[0],onClick:function(){return c("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.selectedUIBlock,s=c.selectedUISubBlock,d=c.selectedUITarget,u=c.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.uniqueIdentity,selectedBlock:l,selectedSubblock:s,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:d,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return a("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return a("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.selectedSEBlock,s=c.selectedSESubBlock,d=c.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:d.structuralEnzymes,selectedBlock:l,selectedSubblock:s,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return a("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.radiationIntensity,s=c.radiationDuration;return(0,o.createComponentVNode)(2,i.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return a("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:s,popUpPosition:"right",ml:"0",onChange:function(e,t){return a("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return a("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,g,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Buffers",level:"2",children:a}),(0,o.createComponentVNode)(2,N)],4)},g=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=e.id,s=e.name,d=e.buffer,u=c.isInjectorReady,p=s+(d.data?" - "+d.label:"");return(0,o.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Section,{title:p,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Confirm,{disabled:!d.data,icon:"trash",content:"Clear",onClick:function(){return a("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d.data,icon:"pen",content:"Rename",onClick:function(){return a("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d.data||!c.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return a("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!c.hasDisk||!c.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return a("bufferOption",{option:"loadDisk",id:l})}})]}),!!d.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:d.owner||(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Block Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return a("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!d.data&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},N=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.hasDisk,s=c.disk;return(0,o.createComponentVNode)(2,i.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Confirm,{disabled:!l||!s.data,icon:"trash",content:"Wipe",onClick:function(){return a("wipeDisk")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return a("ejectDisk")}})],4),children:l?s.data?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:s.label?s.label:"No label"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:s.owner?s.owner:(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},b=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.isBeakerLoaded,s=c.beakerVolume,u=c.beakerLabel;return(0,o.createComponentVNode)(2,i.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return a("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Inject",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{disabled:e>s,icon:"syringe",content:e,onClick:function(){return a("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,i.Button,{disabled:s<=0,icon:"syringe",content:"All",onClick:function(){return a("injectRejuvenators",{amount:s})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:u||"No label"}),s?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[s," unit",1===s?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},V=function(e,t){return(0,o.createComponentVNode)(2,i.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,i.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,i.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),a=n.act,c=(n.data,e.dnaString),l=e.selectedBlock,s=e.selectedSubblock,d=e.blockSize,u=e.action,p=c.split(""),m=[],h=function(e){for(var t=e/d+1,n=[],r=function(r){var c=r+1;n.push((0,o.createComponentVNode)(2,i.Button,{selected:l===t&&s===c,content:p[e+r],mb:"0",onClick:function(){return a(u,{block:t,subblock:c})}}))},c=0;c0?"Yes":"No",selected:l.com>0,onClick:function(){return c("toggle_com")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Security",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.sec===e,content:e,onClick:function(){return c("set_sec",{set_sec:e})}},"sec"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Medical",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.med===e,content:e,onClick:function(){return c("set_med",{set_med:e})}},"med"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Engineering",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.eng===e,content:e,onClick:function(){return c("set_eng",{set_eng:e})}},"eng"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Paranormal",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.par===e,content:e,onClick:function(){return c("set_par",{set_par:e})}},"par"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Janitor",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.jan===e,content:e,onClick:function(){return c("set_jan",{set_jan:e})}},"jan"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cyborg",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.cyb===e,content:e,onClick:function(){return c("set_cyb",{set_cyb:e})}},"cyb"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Slots",children:(0,o.createComponentVNode)(2,i.Box,{color:l.total>l.spawnpoints?"red":"green",children:[l.total," total, versus ",l.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,i.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3);t.Electropack=function(e,t){var n=(0,i.useBackend)(t),l=n.act,s=n.data,d=s.power,u=s.code,p=s.frequency,m=s.minFrequency,h=s.maxFrequency;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:h/10,value:p/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.evo_points,s=c.can_respec;return(0,o.createComponentVNode)(2,i.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{ml:2.5,disabled:!s,content:"Readapt",icon:"sync",onClick:function(){return a("readapt")}}),(0,o.createComponentVNode)(2,i.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.evo_points,s=c.ability_list,d=c.purchased_abilities,u=c.view_mode;return(0,o.createComponentVNode)(2,i.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:u?"square-o":"check-square-o",selected:!u,content:"Compact",onClick:function(){return a("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:u?"check-square-o":"square-o",selected:u,content:"Expanded",onClick:function(){return a("set_view_mode",{mode:1})}})],4),children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),d.includes(e.power_path)&&(0,o.createComponentVNode)(2,i.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,i.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,i.Box,{as:"span",color:"label",children:["Cost: "," "]}),(0,o.createComponentVNode)(2,i.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,i.Button,{mr:.5,disabled:e.cost>l||d.includes(e.power_path),content:"Evolve",onClick:function(){return a("purchase",{power_path:e.power_path})}})})]}),!!u&&(0,o.createComponentVNode)(2,i.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(7),i=n(18),a=n(1),c=n(2),l=n(102),s=n(3);var d={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.building;return(0,o.createComponentVNode)(2,s.Window,{theme:r.ui_theme,children:(0,o.createComponentVNode)(2,s.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),i&&(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,m)})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})})]})})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.materials,s=i.capacity,d=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,c.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,c.Box,{color:"label",mt:"0.25rem",children:[(d/s*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,f,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,s=l.curCategory,d=l.categories,u=l.designs,p=l.syncing,m=(0,a.useLocalState)(t,"searchText",""),h=m[0],f=m[1],g=(0,i.createSearch)(h,(function(e){return e.name})),N=u.filter(g);return(0,o.createComponentVNode)(2,c.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,c.Dropdown,{selected:s,options:d,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:p,iconSpin:p,icon:"sync-alt",content:p?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),N.map((function(e){return(0,o.createComponentVNode)(2,C,{design:e},e.id)})),0===N.length&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No designs found."})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.building,s=r.buildStart,d=r.buildEnd,u=r.worldTime;return(0,o.createComponentVNode)(2,c.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar.Countdown,{start:s,current:u,end:d,bold:!0,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.Icon,{name:"cog",spin:!0})}),"Building ",i,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:u,timeLeft:d-u,format:function(e,t){return t.substr(3)}}),")"]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.queue,s=i.processingQueue,d=Object.entries(i.queueDeficit).filter((function(e){return e[1]<0})),u=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,c.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,c.Divider),"Processing time:",(0,o.createComponentVNode)(2,c.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",bold:!0,children:new Date(u/10*1e3).toISOString().substr(14,5)})]}),Object.keys(d).length>0&&(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,c.Divider),"Lacking materials to complete:",d.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,f,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},f=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=e.id,s=e.amount,u=e.lineDisplay,p=e.onClick,m=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["id","amount","lineDisplay","onClick"]),h=l.replace("$",""),f=i.materials[l]||0,C=s||f;if(!(C<=0&&"metal"!==h&&"glass"!==h)){var g=s&&s>f;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",u&&"Exofab__material--line"])},m,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,c.Button,{onClick:p,children:(0,o.createComponentVNode)(2,c.Box,{as:"img",src:"sheet-"+(d[h]||h)+".png"})})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:u?(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__material--amount",color:g&&"bad",children:C.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__material--name",children:h}),(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__material--amount",children:[C.toLocaleString("en-US")," cm\xb3 (",Math.round(C/2e3*10)/10," sheets)"]})],4)})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=e.design;return(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:l.notEnough||i.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,f,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ExternalAirlockController=function(e,t){var n,c,l=(0,r.useBackend)(t),s=l.act,d=l.data,u=d.chamber_pressure,p=(d.exterior_status,d.interior_status),m=d.processing;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Information",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:(n=u,c="good",n<80?c="bad":n<95||n>110?c="average":n>120&&(c="bad"),c),value:u,minValue:0,maxValue:1013,children:[u," kPa"]})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:m,onClick:function(){return s("cycle_ext")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:m,onClick:function(){return s("cycle_int")}})]}),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===p?"red":m?"yellow":null,onClick:function(){return s("force_ext")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===p?"red":m?"yellow":null,onClick:function(){return s("force_int")}})]}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Abort",icon:"ban",color:"red",disabled:!m,onClick:function(){return s("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return c("scan")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:!l.scan_name&&!l.authenticated,content:l.authenticated?"Log Out":"Log In",onClick:function(){return c("auth")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,i.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return c("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return c("rename")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return c("dept")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,i.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return c("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data,e.image),a=e.isSelected,c=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+i,style:{"border-style":a?"solid":"none","border-width":"2px","border-color":"orange",padding:a?"2px":"4px"},onClick:c})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.availableStyles,u=s.selectedStyle,p=s.selectedDir,m=s.directionsPreview,h=s.allStylesPreview;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:d,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,i.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,i.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,c,{image:h[e],isSelected:u===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,i.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,i.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,i.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,c,{image:m[e],isSelected:e===p,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,i.useBackend)(t).data,r=n.emped,l=n.active,m=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,s,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,d)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,u,{area:m,position:h})}),f&&(0,o.createComponentVNode)(2,a.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,u,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,p,{height:"100%"})})],0):(0,o.createComponentVNode)(2,s)],0)})})})};var s=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,a.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.active,s=c.tag,d=c.same_z,u=(0,i.useLocalState)(t,"newTag",s),p=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,a.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,a.Input,{width:"5rem",value:s,onEnter:function(){return r("tag",{newtag:p})},onInput:function(e,t){return m(t)}}),(0,o.createComponentVNode)(2,a.Button,{disabled:s===p,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:p})},children:(0,o.createComponentVNode)(2,a.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{selected:!d,icon:d?"compress":"expand",content:d?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},u=function(e,t){var n=e.title,r=e.area,i=e.position;return(0,o.createComponentVNode)(2,a.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(i)]})})},p=function(e,t){var n=(0,i.useBackend)(t).data,c=n.position,s=n.signals,d=n.upgraded;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,a.Table,{children:s.map((function(e){return Object.assign({},e,{},function(e,t,n){if(e&&t){if(e[2]!==t[2]||1!==n)return null;var o=Math.atan2(t[1]-e[1],t[0]-e[0]),i=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(o),distance:i}}}(c,e.position,d))})).map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,a.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,a.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GasAnalyzer=t.GasAnalyzerHistory=t.GasAnalyzerContent=void 0;var o=n(0),r=n(1),i=n(549),a=n(2),c=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.gasmixes,d=l.autoUpdating;return(0,o.createComponentVNode)(2,a.Section,{title:s[0].name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"unlock":"lock",onClick:function(){return c("autoscantoggle")},tooltip:d?"Auto-Update Enabled":"Auto-Update Disabled",fluid:!0,textAlign:"center",selected:d}),children:(0,o.createComponentVNode)(2,i.GasmixParser)},s[0])};t.GasAnalyzerContent=l;var s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.historyGasmixes,s=c.historyViewMode,d=c.historyIndex;return(0,o.createComponentVNode)(2,a.Section,{fill:!0,title:"Scan History",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"trash",tooltip:"Clear History",onClick:function(){return i("clearhistory")},textAlign:"center",disabled:0===l.length}),children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"50%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"kPa",onClick:function(){return i("modekpa")},textAlign:"center",selected:"kpa"===s})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"mol",onClick:function(){return i("modemol")},textAlign:"center",selected:"mol"===s})})]})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:t+1+". "+("mol"===s?e[0].total_moles.toFixed(2):e[0].pressure.toFixed(2)),onClick:function(){return i("input",{target:t+1})},textAlign:"left",selected:t+1===d,fluid:!0})},e[0])}))})]})};t.GasAnalyzerHistory=s;t.GasAnalyzer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,a.Section,{grow:!0,children:(0,o.createComponentVNode)(2,l)}),2,{style:{float:"left",width:"67%"}}),(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,a.Section,{width:"160px",children:(0,o.createComponentVNode)(2,s)}),2,{style:{float:"right",width:"33%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GasmixParser=void 0;var o=n(0),r=n(1),i=n(2);t.GasmixParser=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.gasmixes);return a[0].total_moles?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Moles",children:(a[0].total_moles?a[0].total_moles:"-")+" mol"}),a[0].oxygen?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:a[0].oxygen.toFixed(2)+" mol ("+100*(a[0].oxygen/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].nitrogen?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:a[0].nitrogen.toFixed(2)+" mol ("+100*(a[0].nitrogen/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].carbon_dioxide?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:a[0].carbon_dioxide.toFixed(2)+" mol ("+100*(a[0].carbon_dioxide/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].toxins?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Plasma",children:a[0].toxins.toFixed(2)+" mol ("+100*(a[0].toxins/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].sleeping_agent?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrous Oxide",children:a[0].sleeping_agent.toFixed(2)+" mol ("+100*(a[0].sleeping_agent/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].agent_b?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Agent B",children:a[0].agent_b.toFixed(2)+" mol ("+100*(a[0].agent_b/a[0].total_moles).toFixed(2)+" %)"}):"",(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(a[0].total_moles?(a[0].temperature-273.15).toFixed(2):"-")+" \xb0C ("+(a[0].total_moles?a[0].temperature.toFixed(2):"-")+" K)"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Volume",children:(a[0].total_moles?a[0].volume:"-")+" L"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(a[0].total_moles?a[0].pressure.toFixed(2):"-")+" kPa"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Heat Capacity",children:a[0].heat_capacity+" / K"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Thermal Energy",children:a[0].thermal_energy})]}):(0,o.createComponentVNode)(2,i.Box,{nowrap:!0,italic:!0,mb:"10px",children:"No Gas Detected!"})}},function(e,t,n){"use strict";t.__esModule=!0,t.GasFreezer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.GasFreezer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.on,d=l.pressure,u=l.temperature,p=l.temperatureCelsius,m=l.min,h=l.max,f=l.target,C=l.targetCelsius,g=(u-m)/(h-m);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"power-off":"times",content:s?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b",selected:s,onClick:function(){return c("power")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0414\u0430\u0432\u043b\u0435\u043d\u0438\u0435",children:[d," \u043a\u041f\u0430"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"65%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:g,ranges:{blue:[-Infinity,.5],red:[.5,Infinity]},children:"\xa0"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"35%",children:[g<.5&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"blue",ml:1,children:[u," \xb0K (",p," \xb0C)"]}),g>=.5&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"red",ml:1,children:[u," \xb0K (",p," \xb0C)"]})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"65%",justify:"end",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:(f-m)/(h-m),children:"\xa0"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"35%",children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:[f," \xb0K (",C," \xb0C)"]})})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0430\u0434\u0430\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",title:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){return c("temp",{temp:m})}}),(0,o.createComponentVNode)(2,i.NumberInput,{value:Math.round(f),unit:"\xb0K",minValue:Math.round(m),maxValue:Math.round(h),step:5,stepPixelSize:3,onDrag:function(e,t){return c("temp",{temp:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",title:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){return c("temp",{temp:h})}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),i=n(3),a=n(144);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,a.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,s=n.medical,d=n.diagnostic,u=n.ahud;return(0,o.createComponentVNode)(2,a.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,c,{label:"Medical",type:"medical",is_active:s}),(0,o.createComponentVNode)(2,c,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,c,{label:"Diagnostic",type:"diagnostic",is_active:d}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,c,{label:"Antag HUD",is_active:u,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t).act,a=e.label,c=e.type,l=void 0===c?null:c,s=e.is_active,d=e.act_on,u=void 0===d?"hud_on":d,p=e.act_off,m=void 0===p?"hud_off":p;return(0,o.createComponentVNode)(2,i.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{pl:.5,align:"center",width:"80%",children:a}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{mr:.6,content:s?"On":"Off",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return n(s?m:u,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data,s=l.amount,d=l.energy,u=l.maxEnergy,p=l.mode;return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d,minValue:0,maxValue:u,ranges:{good:[.5*u,Infinity],average:[.25*u,.5*u],bad:[-Infinity,.25*u]},children:[d," / ",u," Units"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:"1",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:s===e,content:e,m:"0",width:"100%",onClick:function(){return a("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:"dispense"===p,content:"Dispense",m:"0",width:"32%",onClick:function(){return a("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:"remove"===p,content:"Remove",m:"0",width:"32%",onClick:function(){return a("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:"isolate"===p,content:"Isolate",m:"0",width:"32%",onClick:function(){return a("mode",{mode:"isolate"})}})]})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.chemicals,s=void 0===l?[]:l,d=c.current_reagent,u=[],p=0;p<(s.length+1)%3;p++)u.push(!0);return(0,o.createComponentVNode)(2,i.Section,{title:c.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:d===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return a("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3);t.Instrument=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,c.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,u)]})]})};var l=function(e,t){var n=(0,i.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,a.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" as defined above.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" and in\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" scale.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" or\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" as defined above.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" and in\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" scale.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" or\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,a.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},s=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.lines,u=l.playing,p=l.repeat,m=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,g=l.tickLag,N=l.volume,b=l.minVolume,V=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,a.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"info",content:"Help",onClick:function(){return c("help")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"file",content:"New",onClick:function(){return c("newsong")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Import",onClick:function(){return c("import")}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,a.Button,{selected:u,disabled:0===s.length||p<0,icon:"play",content:"Play",onClick:function(){return c("play")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"stop",content:"Stop",onClick:function(){return c("stop")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0",maxValue:m,value:p,stepPixelSize:"59",onChange:function(e,t){return c("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return c("tempo",{"new":h+g})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,a.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return c("tempo",{"new":h-g})}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,minValue:b,maxValue:V,value:N,stepPixelSize:"6",onDrag:function(e,t){return c("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,d)]})},d=function(e,t){var n,c,l=(0,i.useBackend)(t),s=l.act,d=l.data,u=d.allowedInstrumentNames,p=d.instrumentLoaded,m=d.instrument,h=d.canNoteShift,f=d.noteShift,C=d.noteShiftMin,g=d.noteShiftMax,N=d.sustainMode,b=d.sustainLinearDuration,V=d.sustainExponentialDropoff,v=d.legacy,x=d.sustainDropoffVolume,y=d.sustainHeldNote;return 1===N?(n="Linear",c=(0,o.createComponentVNode)(2,a.Slider,{minValue:"0.1",maxValue:"5",value:b,step:"0.5",stepPixelSize:"85",format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return s("setlinearfalloff",{"new":t/10})}})):2===N&&(n="Exponential",c=(0,o.createComponentVNode)(2,a.Slider,{minValue:"1.025",maxValue:"10",value:V,step:"0.01",format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return s("setexpfalloff",{"new":t})}})),u.sort(),(0,o.createComponentVNode)(2,a.Box,{my:-1,children:(0,o.createComponentVNode)(2,a.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,a.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current",children:p?(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:m,width:"40%",onSelected:function(e){return s("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:C,maxValue:g,value:f,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return s("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,a.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return s("setsustainmode",{"new":e})}}),c]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:x,stepPixelSize:"6",onChange:function(e,t){return s("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,a.Button,{selected:y,icon:y?"toggle-on":"toggle-off",content:y?"Yes":"No",onClick:function(){return s("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,a.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return s("reset")}})]})})})},u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.playing,s=c.lines,d=c.editing;return(0,o.createComponentVNode)(2,a.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:!d||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:s.length+1})}}),(0,o.createComponentVNode)(2,a.Button,{selected:!d,icon:d?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!d&&(s.length>0?(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.ItemPixelShift=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ItemPixelShift=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.pixel_x,d=l.pixel_y,u=l.max_shift_x,p=l.max_shift_y,m=l.random_drop_on;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"X-coordinates",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",title:"Shifts item leftwards.",disabled:s===-u,onClick:function(){return c("shift_left")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:s,minValue:-u,maxValue:u,onChange:function(e,t){return c("custom_x",{pixel_x:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",title:"Shifts item rightwards.",disabled:s===u,onClick:function(){return c("shift_right")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Y-coordinates",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",title:"Shifts item upwards.",disabled:d===p,onClick:function(){return c("shift_up")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:d,minValue:-p,maxValue:p,onChange:function(e,t){return c("custom_y",{pixel_y:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",title:"Shifts item downwards.",disabled:d===-p,onClick:function(){return c("shift_down")}})]})]})}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"brown",icon:"arrow-up",content:"Move to Top",title:"Tries to place an item on top of the others.",onClick:function(){return c("move_to_top")}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:m?"good":"bad",icon:"power-off",content:m?"Shift Enabled":"Shift Disabled",title:"Enables/Disables item pixel randomization on any drops.",onClick:function(){return c("toggle")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=(0,o.createComponentVNode)(2,i.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,i.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var d=(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?d=(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?d=(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(d=(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"Waiting for second person to confirm..."})):d=(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[s,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,i.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return c("ert")}})})}),(0,o.createComponentVNode)(2,i.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return c("reset")}}),children:d})]})})}return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[s,(0,o.createComponentVNode)(2,i.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return c("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,i.Button,{icon:"broadcast-tower",onClick:function(){return c("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"door-open",onClick:function(){return c("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,i.Button,{icon:"door-closed",onClick:function(){return c("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"door-open",onClick:function(){return c("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,i.Button,{icon:"door-closed",onClick:function(){return c("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaborClaimConsole=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);t.LaborClaimConsole=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.can_go_home,s=c.emagged,d=c.id_inserted,u=c.id_name,p=c.id_points,m=c.id_goal,h=c.unclaimed_points,f=s?0:1,C=s?"ERR0R":l?"Completed!":"Insufficient";return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:!!d&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/m,ranges:{good:[f,Infinity],bad:[-Infinity,f]},children:p+" / "+m+" "+C})||!!s&&"ERR0R COMPLETED?!@"||"No ID inserted"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle controls",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Move shuttle",disabled:!l,onClick:function(){return r("move_shuttle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed points",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Claim points ("+h+")",disabled:!d||!h,onClick:function(){return r("claim_points")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted ID",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:d?u:"-------------",onClick:function(){return r("handle_id")}})})]})})},s=function(e,t){var n=(0,i.useBackend)(t).data.ores;return(0,o.createComponentVNode)(2,a.Section,{title:"Material values",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Material"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),n.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,r.toTitleCase)(e.ore)}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",inline:!0,children:e.value})})]},e.ore)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.isAdmin,p=d.isSlaved,m=d.isMalf,h=d.isAIMalf,f=d.view;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!(!u||!p)&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:["This unit is slaved to ",p,"."]}),!(!m&&!h)&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Law Management",selected:0===f,onClick:function(){return s("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Lawsets",selected:1===f,onClick:function(){return s("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,c),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.has_zeroth_laws,d=c.zeroth_laws,u=c.has_ion_laws,p=c.ion_laws,m=c.ion_law_nr,h=c.has_inherent_laws,f=c.inherent_laws,C=c.has_supplied_laws,g=c.supplied_laws,N=c.channels,b=c.channel,V=c.isMalf,v=c.isAdmin,x=c.zeroth_law,y=c.ion_law,k=c.inherent_law,w=c.supplied_law,_=c.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,s,{title:"ERR_NULL_VALUE",laws:d,ctx:t}),!!u&&(0,o.createComponentVNode)(2,s,{title:m,laws:p,ctx:t}),!!h&&(0,o.createComponentVNode)(2,s,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,s,{title:"Supplied",laws:g,ctx:t}),(0,o.createComponentVNode)(2,i.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Statement Channel",children:N.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.channel,selected:e.channel===b,onClick:function(){return a("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,i.Button,{content:"State Laws",onClick:function(){return a("state_laws")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,i.Button,{content:"Notify",onClick:function(){return a("notify_laws")}})})]})}),!!V&&(0,o.createComponentVNode)(2,i.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_zeroth_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_ion_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_inherent_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:w}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:_,onClick:function(){return a("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_supplied_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.law_sets;return(0,o.createComponentVNode)(2,i.Box,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Load Laws",icon:"download",onClick:function(){return a("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},s=function(e,t){var n=(0,r.useBackend)(e.ctx),a=n.act,c=n.data.isMalf;return(0,o.createComponentVNode)(2,i.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return a("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!c&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return a("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.recharge_port,s=l&&l.mech,d=s&&s.cell,u=s&&s.name;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Sync",onClick:function(){return c("reconnect")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No power port detected. Please re-sync."})||!s&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,i.ProgressBar,{value:s.health/s.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No power port detected. Please re-sync."})||!s&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No mech detected."})||!d&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.charge/d.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.charge})," / "+d.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(15),n(1)),i=n(2),a=n(3),c=n(18);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.beacons,u=s.stored_data;return u.length?(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,i.Box,{children:(0,c.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:(0,c.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(1),i=n(2),a=n(51),c=n(3),l=n(140),s=n(141),d=n(145),u={Minor:"good",Medium:"average","Dangerous!":"bad",Harmful:"bad","BIOHAZARD THREAT!":"bad"},p=function(e,t){(0,a.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,u=(0,r.useBackend)(t).data,p=u.loginState,C=u.screen;return p.logged_in?(2===C?n=(0,o.createComponentVNode)(2,m):3===C?n=(0,o.createComponentVNode)(2,h):4===C?n=(0,o.createComponentVNode)(2,f):5===C?n=(0,o.createComponentVNode)(2,N):6===C&&(n=(0,o.createComponentVNode)(2,b)),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,a.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l.LoginInfo),(0,o.createComponentVNode)(2,d.TemporaryNotice),(0,o.createComponentVNode)(2,V),(0,o.createComponentVNode)(2,i.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.records;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search by Name, DNA, or ID",onChange:function(e,t){return a("search",{t1:t})}}),(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"user",mb:"0.5rem",content:e.id+": "+e.name,onClick:function(){return a("d_rec",{d_rec:e.ref})}}),(0,o.createVNode)(1,"br")],4,t)}))})],4)},h=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all")}})],4)},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.medical,s=c.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"General Data",level:2,mt:"-6px",children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,i.Section,{title:"Medical Data",level:2,children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",level:2,children:[(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",color:"bad",onClick:function(){return a("del_r")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s?"spinner":"print",disabled:s,iconSpin:!!s,content:"Print Entry",ml:"0.5rem",onClick:function(){return a("print_p")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",mt:"0.5rem",onClick:function(){return a("screen",{screen:2})}})]})],4)},C=function(e,t){var n=(0,r.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,i.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,i.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return p(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,i.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,i.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return p(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Comments/Log",level:2,children:[0===l.comments.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,i.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("del_c",{del_c:t+1})}})]},t)})),(0,o.createComponentVNode)(2,i.Button,{icon:"comment-medical",content:"Add Entry",color:"good",mt:"0.5rem",mb:"0",onClick:function(){return(0,a.modalOpen)(t,"add_c")}})]})],4):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return c("new")}})]})},N=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.virus;return c.sort((function(e,t){return e.name>t.name?1:-1})),c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"flask",content:e.name,mb:"0.5rem",onClick:function(){return a("vir",{vir:e.D})}}),(0,o.createVNode)(1,"br")],4,t)}))},b=function(e,t){var n=(0,r.useBackend)(t).data.medbots;return 0===n.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"There are no Medbots."}):n.map((function(e,t){return(0,o.createComponentVNode)(2,i.Collapsible,{open:!0,title:e.name,children:(0,o.createComponentVNode)(2,i.Box,{px:"0.5rem",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:e.on?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Online"}),(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer."})],4):(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Offline"})})]})})},t)}))},V=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.screen;return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,onClick:function(){return a("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:5===c,onClick:function(){return a("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:6===c,onClick:function(){return a("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"plus-square"}),"Medbot Tracking"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===c,onClick:function(){return a("screen",{screen:3})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"wrench"}),"Record Maintenance"]})]})};(0,a.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,i.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Severity",color:u[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);var l={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})})};var s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.has_id,s=c.id;return(0,o.createComponentVNode)(2,a.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",s.name,".",(0,o.createVNode)(1,"br"),"You have ",s.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,a.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},d=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),s=c.has_id,d=c.id,u=c.items,m=(0,i.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,i.useLocalState)(t,"sort","Alphabetical")),C=f[0],g=(f[1],(0,i.useLocalState)(t,"descending",!1)),N=g[0],b=(g[1],(0,r.createSearch)(h,(function(e){return e[0]}))),V=!1,v=Object.entries(u).map((function(e,t){var n=Object.entries(e[1]).filter(b).map((function(e){return e[1].affordable=s&&d.points>=e[1].price,e[1]})).sort(l[C]);if(0!==n.length)return N&&(n=n.reverse()),V=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Section,{children:V?v:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No items matching your criteria was found!"})})})},u=function(e,t){var n=(0,i.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,i.useLocalState)(t,"sort",""),s=(c[0],c[1]),d=(0,i.useLocalState)(t,"descending",!1),u=d[0],p=d[1];return(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:"Alphabetical",options:Object.keys(l),width:"100%",lineHeight:"19px",onSelected:function(e){return s(e)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"arrow-down":"arrow-up",height:"19px",tooltip:u?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return p(!u)}})})]})})},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=e.title,s=e.items,d=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Collapsible,Object.assign({open:!0,title:l},d,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,a.Button,{disabled:!c.has_id||c.id.points=0||(r[n]=e[n]);return r}t.Multitool=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,p=l.multitoolMenuId,v=l.buffer,x=l.bufferName,y=l.bufferTag,k=l.canBufferHaveTag,w=l.isAttachedAlreadyInBuffer,_=l.attachedName,B=!("default_no_machine"===p);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{style:{"overflow-x":"hidden","overflow-y":"auto"},grow:1,shrink:1,basis:0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Configuration menu",py:.3,children:[(0,o.createComponentVNode)(2,s,{iconName:"tools",machineName:_,noMachine:"default_no_machine"===p,noMachineText:"No machine attached"}),function(e){switch(e){case"default_no_machine":case"no_options":return(0,o.createComponentVNode)(2,h);case"access_denied":return(0,o.createComponentVNode)(2,f);case"tag_only":return(0,o.createComponentVNode)(2,C);case"frequency_and_tag":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,C)],4);case"air_sensor":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,N)],4);case"general_air_control":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,b)],4);case"large_tank_control":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,V),(0,o.createComponentVNode)(2,b)],4);default:return"WE SHOULDN'T BE HERE!"}}(p)]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,a.Divider)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Multitool buffer",mb:.9,py:.3,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:w?"Added":"Add machine",icon:"save",disabled:!B||w,onClick:function(){return r("buffer_add")}}),(0,o.createComponentVNode)(2,a.Button,{mr:1,content:"Flush",icon:"times-circle",color:"red",disabled:!v,onClick:function(){return r("buffer_flush")}})],4),children:[(0,o.createComponentVNode)(2,s,{iconName:"tools",machineName:x,noMachine:!v,noMachineElem:(0,o.createComponentVNode)(2,d,{text:""})}),!!v&&(0,o.createComponentVNode)(2,m,{mt:1.1,label:"ID tag",compactLabel:!0,wrapContent:k?(0,o.createComponentVNode)(2,u,{text:y,defaultText:"",color:"silver"}):(0,o.createComponentVNode)(2,a.Box,{as:"span",fontSize:"0.9rem",color:"red",italic:!0,nowrap:!0,children:"Not supported"})})]})})]})})})};var s=function(e,t){var n=e.iconName,r=e.machineName,i=e.noMachine,c=e.noMachineText,l=e.noMachineElem,s=i?c:r||"Unknown machine",d=s===c,u=s===c||"Unknown machine"===s;return i&&l?l:(0,o.createComponentVNode)(2,a.Flex,{mt:.1,mb:1.9,children:[!i&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,align:"center",children:(0,o.createComponentVNode)(2,a.Icon,{mr:1,size:1.1,name:n})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,wordWrap:"break-word",children:(0,o.createComponentVNode)(2,a.Box,{as:"span",wordWrap:"break-word",color:d?"label":"silver",fontSize:"1.1rem",bold:!0,italic:u,children:s})})]})},d=function(e,t){var n=e.text;return(0,o.createComponentVNode)(2,a.Box,{as:"span",fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:n})},u=function(e,t){var n=e.text,r=e.defaultText,i=l(e,["text","defaultText"]);return n?(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"span",wordWrap:"break-word"},i,{children:n}))):(0,o.createComponentVNode)(2,d,{text:r})},p=function(e,t){var n=e.noConfirm,r=void 0!==n&&n,i=l(e,["noConfirm"]);return r?(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({},i))):(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button.Confirm,Object.assign({},i)))},m=function(e,t){var n=e.label,r=e.wrapContent,i=e.noWrapContent,c=e.compactLabel,s=void 0!==c&&c,d=l(e,["label","wrapContent","noWrapContent","compactLabel"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Flex,Object.assign({my:.5,mr:"0.5%",spacing:1,align:"center"},d,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:s?0:1,shrink:0,textOverflow:"ellipsis",overflow:"hidden",basis:s?"auto":0,maxWidth:s?"none":20,color:"label",nowrap:!0,children:n}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,textAlign:"center",wordWrap:"break-word",children:r}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:.1}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,nowrap:!0,children:i})]})))},h=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Box,{mt:1.5,fontSize:"0.9rem",color:"silver",italic:!0,children:"No options"})},f=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.1rem",color:"red",bold:!0,italic:!0,children:"ACCESS DENIED"})},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.attachedTag;return(0,o.createComponentVNode)(2,m,{label:"ID tag",wrapContent:(0,o.createComponentVNode)(2,u,{text:c,defaultText:"",color:"silver"}),noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"wrench",onClick:function(){return r("set_tag")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear",icon:"times-circle",color:"red",disabled:!c,onClick:function(){return r("clear_tag")}})],4)})},g=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.frequency,d=l.minFrequency,u=l.maxFrequency,p=l.canReset;return(0,o.createComponentVNode)(2,m,{label:"Frequency",noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,unit:"kHz",step:.1,stepPixelSize:10,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},onChange:function(e,t){return c("set_frequency",{frequency:10*t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:!p,tooltip:"Reset",onClick:function(){return c("reset_frequency")}})],4)})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.bolts,s=[{bitflag:1,checked:c.pressureCheck,label:"Monitor pressure"},{bitflag:2,checked:c.temperatureCheck,label:"Monitor temperature"},{bitflag:4,checked:c.oxygenCheck,label:"Monitor oxygen concentration"},{bitflag:8,checked:c.toxinsCheck,label:"Monitor plasma concentration"},{bitflag:16,checked:c.nitrogenCheck,label:"Monitor nitrogen concentration"},{bitflag:32,checked:c.carbonDioxideCheck,label:"Monitor carbon dioxide concentration"}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,m,{label:"Floor bolts",noWrapContent:(0,o.createComponentVNode)(2,a.Button,{icon:l?"check":"times",selected:l,content:l?"YES":"NO",onClick:function(){return r("toggle_bolts")}})}),s.map((function(e){return(0,o.createComponentVNode)(2,m,{label:e.label,noWrapContent:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.checked,onClick:function(){return r("toggle_flag",{bitflag:e.bitflag})}})},e.bitflag)}))],0)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.sensors;return(0,o.createComponentVNode)(2,a.Section,{mt:1.7,ml:.5,mr:1,px:.5,title:"Sensors",buttons:(0,o.createComponentVNode)(2,a.Button,{mr:1,pl:2.1,content:"Add sensor",icon:"plus",iconRight:!0,onClick:function(){return r("add_sensor")}}),children:[(0,o.createComponentVNode)(2,m,{mr:0,compactLabel:!0,wrapContent:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:1}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"ID tag"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"Label"}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:11.3})]})}),Object.keys(c).map((function(e){return(0,o.createComponentVNode)(2,m,{mr:0,label:(0,o.createComponentVNode)(2,a.Icon,{name:"wave-square"}),compactLabel:!0,wrapContent:(0,o.createComponentVNode)(2,a.Flex,{align:"center",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:e}),c[e]?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:c[e]}):(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:""})]}),noWrapContent:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Label",icon:"edit",onClick:function(){return r("change_label",{sensor_tag:e})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Label",icon:"times-circle",color:"orange",disabled:!c[e],onClick:function(){return r("clear_label",{sensor_tag:e})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:.5}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,a.Button,{px:1.2,icon:"minus",color:"red",onClick:function(){return r("del_sensor",{sensor_tag:e})}})})]})},e)}))]})},V=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.inputTag,s=c.outputTag,d=c.bufferTag,h=c.bufferFitsInput,f=c.bufferFitsOutput,C=c.doNotLinkAndNotify;return(0,o.createFragment)([(0,o.createComponentVNode)(2,m,{label:"Input",labelWidth:6,wrapContent:(0,o.createComponentVNode)(2,u,{text:l,defaultText:"",color:"silver"}),noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,p,{noConfirm:C||!l,confirmContent:"This will change the intput device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:l&&d===l,disabled:!h,onClick:function(){return r("link_input")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{confirmContent:"This will unlink the intput device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!l,onClick:function(){return r("unlink_input")}})],4)}),(0,o.createComponentVNode)(2,m,{label:"Output",labelWidth:6,wrapContent:(0,o.createComponentVNode)(2,u,{text:s,defaultText:"",color:"silver"}),noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,p,{noConfirm:C||!s,confirmContent:"This will change the output device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:s&&d===s,disabled:!f,onClick:function(){return r("link_output")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{confirmContent:"This will unlink the output device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!s,onClick:function(){return r("unlink_output")}})],4)})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(7),i=n(1),a=n(2),c=n(49),l=n(3),s=n(51),d=n(145);function u(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var p=["security","engineering","medical","science","service","supply"],m={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,c=(0,i.useBackend)(t),u=c.act,p=c.data,m=p.is_security,g=p.is_admin,N=p.is_silent,V=p.is_printing,v=p.screen,x=p.channels,y=p.channel_idx,k=void 0===y?-1:y,w=(0,i.useLocalState)(t,"menuOpen",!1),_=w[0],B=w[1],S=(0,i.useLocalState)(t,"viewingPhoto",""),L=S[0],A=(S[1],(0,i.useLocalState)(t,"censorMode",!1)),E=A[0],I=A[1];0===v||2===v?n=(0,o.createComponentVNode)(2,f):1===v&&(n=(0,o.createComponentVNode)(2,C));var D=x.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:m&&"security",children:[L?(0,o.createComponentVNode)(2,b):(0,o.createComponentVNode)(2,s.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",_&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,a.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,h,{icon:"bars",title:"Toggle Menu",onClick:function(){return B(!_)}}),(0,o.createComponentVNode)(2,h,{icon:"newspaper",title:"Headlines",selected:0===v,onClick:function(){return u("headlines")},children:D>0&&(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--unread",children:D>=10?"9+":D})}),(0,o.createComponentVNode)(2,h,{icon:"briefcase",title:"Job Openings",selected:1===v,onClick:function(){return u("jobs")}}),(0,o.createComponentVNode)(2,a.Divider)]}),(0,o.createComponentVNode)(2,a.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:x.map((function(e){return(0,o.createComponentVNode)(2,h,{icon:e.icon,title:e.name,selected:2===v&&x[k-1]===e,onClick:function(){return u("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,a.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,a.Divider),(!!m||!!g)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,h,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,s.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,h,{security:!0,icon:E?"minus-square":"minus-square-o",title:"Censor Mode: "+(E?"On":"Off"),mb:"0.5rem",onClick:function(){return I(!E)}}),(0,o.createComponentVNode)(2,a.Divider)],4),(0,o.createComponentVNode)(2,h,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,s.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,h,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,s.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,h,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return u("print_newspaper")}}),(0,o.createComponentVNode)(2,h,{icon:N?"volume-mute":"volume-up",title:"Mute: "+(N?"On":"Off"),onClick:function(){return u("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,d.TemporaryNotice),n]})]})})]})};var h=function(e,t){(0,i.useBackend)(t).act;var n=e.icon,c=void 0===n?"":n,l=e.iconSpin,s=e.selected,d=void 0!==s&&s,p=e.security,m=void 0!==p&&p,h=e.onClick,f=e.title,C=e.children,g=u(e,["icon","iconSpin","selected","security","onClick","title","children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",d&&"Newscaster__menuButton--selected",m&&"Newscaster__menuButton--security"]),onClick:h},g,{children:[d&&(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,a.Icon,{name:c,spin:l,size:"2"}),(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--title",children:f}),C]})))},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.screen,d=c.is_admin,u=c.channel_idx,p=c.channel_can_manage,m=c.channels,h=c.stories,f=c.wanted,C=(0,i.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,i.useLocalState)(t,"censorMode",!1)),V=b[0],v=(b[1],2===l&&u>-1?m[u-1]:null);return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,g,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,g,{story:e},e)})):(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([V&&(0,o.createComponentVNode)(2,a.Button,{disabled:!!v.admin&&!d,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"cog",content:"Manage",onClick:function(){return(0,s.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),l=c.jobs,s=c.wanted,d=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:[!!s&&(0,o.createComponentVNode)(2,g,{story:s,wanted:!0}),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,a.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:d>0?p.map((function(e){return Object.assign({},m[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,a.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,a.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},g=function(e,t){var n=(0,i.useBackend)(t),l=n.act,s=n.data,d=e.story,u=e.wanted,p=void 0!==u&&u,m=(0,i.useLocalState)(t,"fullStories",[]),h=m[0],f=m[1],C=(0,i.useLocalState)(t,"censorMode",!1),g=C[0];C[1];return(0,o.createComponentVNode)(2,a.Section,{className:(0,r.classes)(["Newscaster__story",p&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([p&&(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&d.censor_flags?"[REDACTED]":d.title)||"News from "+d.author],0),buttons:(0,o.createComponentVNode)(2,a.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:[!p&&g&&(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:(0,o.createComponentVNode)(2,a.Button,{enabled:2&d.censor_flags,icon:2&d.censor_flags?"comment-slash":"comment",content:2&d.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:d.uid})}})}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user"})," ",d.author," |\xa0",!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),d.view_count.toLocaleString(),(0,o.createTextVNode)(" |\xa0")],0),(0,o.createComponentVNode)(2,a.Icon,{name:"clock"})," ",(0,c.timeAgo)(d.publish_time,s.world_time)]})]})}),children:(0,o.createComponentVNode)(2,a.Box,{children:2&d.censor_flags?"[REDACTED]":(0,o.createFragment)([!!d.has_photo&&(0,o.createComponentVNode)(2,N,{name:"story_photo_"+d.uid+".png",float:"right",ml:"0.5rem"}),(d.body_short||d.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),d.body_short&&(0,o.createComponentVNode)(2,a.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return f([].concat(h,[d.uid]))}}),(0,o.createComponentVNode)(2,a.Box,{clear:"right"})],0)})})},N=function(e,t){var n=e.name,r=u(e,["name"]),c=(0,i.useLocalState)(t,"viewingPhoto",""),l=(c[0],c[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},b=function(e,t){var n=(0,i.useLocalState)(t,"viewingPhoto",""),r=n[0],c=n[1];return(0,o.createComponentVNode)(2,a.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return c("")}})]})},V=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data),c=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||c){var l="manage_channel"===e.id,d=!!e.args.is_admin,u=e.args.scanned_user,p=(0,i.useLocalState)(t,"author",(null==c?void 0:c.author)||u||"Unknown"),m=p[0],h=p[1],f=(0,i.useLocalState)(t,"name",(null==c?void 0:c.name)||""),C=f[0],g=f[1],N=(0,i.useLocalState)(t,"description",(null==c?void 0:c.description)||""),b=N[0],V=N[1],v=(0,i.useLocalState)(t,"icon",(null==c?void 0:c.icon)||"newspaper"),x=v[0],y=v[1],k=(0,i.useLocalState)(t,"isPublic",!!l&&!!(null==c?void 0:c["public"])),w=k[0],_=k[1],B=(0,i.useLocalState)(t,"adminLocked",1===(null==c?void 0:c.admin)||!1),S=B[0],L=B[1];return(0,o.createComponentVNode)(2,a.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+c.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,a.Input,{disabled:!d,width:"100%",value:m,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:b,onInput:function(e,t){return V(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,a.Input,{disabled:!d,value:x,width:"35%",mr:"0.5rem",onInput:function(e,t){return y(t)}}),(0,o.createComponentVNode)(2,a.Icon,{name:x,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,a.Button,{selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Yes":"No",onClick:function(){return _(!w)}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{selected:S,icon:S?"lock":"lock-open",content:S?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return L(!S)}})})]})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:0===m.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,s.modalAnswer)(t,e.id,"",{author:m,name:C.substr(0,49),description:b.substr(0,128),icon:x,"public":w?1:0,admin_locked:S?1:0}),(0,i.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,s.modalClose)(t)};(0,s.modalRegisterBodyOverride)("create_channel",V),(0,s.modalRegisterBodyOverride)("manage_channel",V),(0,s.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.photo,d=c.channels,u=c.channel_idx,p=void 0===u?-1:u,m=!!e.args.is_admin,h=e.args.scanned_user,f=d.slice().sort((function(e,t){if(p<0)return 0;var n=d[p-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return m||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,i.useLocalState)(t,"author",h||"Unknown"),g=C[0],b=C[1],V=(0,i.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],x=V[1],y=(0,i.useLocalState)(t,"title",""),k=y[0],w=y[1],_=(0,i.useLocalState)(t,"body",""),B=_[0],S=_[1],L=(0,i.useLocalState)(t,"adminLocked",!1),A=L[0],E=L[1];return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Input,{disabled:!m,width:"100%",value:g,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return x(e)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:k,onInput:function(e,t){return w(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:B,onInput:function(e,t){return S(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:k,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,N,{name:"inserted_photo_"+l.uid+".png",float:"right"}),B.split("\n").map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,a.Box,{clear:"right"})]})})}),m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{selected:A,icon:A?"lock":"lock-open",content:A?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return E(!A)}})})]})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:0===g.trim().length||0===v.trim().length||0===k.trim().length||0===B.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,s.modalAnswer)(t,"create_story","",{author:g,channel:v,title:k.substr(0,127),body:B.substr(0,1023),admin_locked:A?1:0}),(0,i.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,s.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.photo,d=c.wanted,u=!!e.args.is_admin,p=e.args.scanned_user,m=(0,i.useLocalState)(t,"author",(null==d?void 0:d.author)||p||"Unknown"),h=m[0],f=m[1],C=(0,i.useLocalState)(t,"name",(null==d?void 0:d.title.substr(8))||""),g=C[0],b=C[1],V=(0,i.useLocalState)(t,"description",(null==d?void 0:d.body)||""),v=V[0],x=V[1],y=(0,i.useLocalState)(t,"adminLocked",1===(null==d?void 0:d.admin_locked)||!1),k=y[0],w=y[1];return(0,o.createComponentVNode)(2,a.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,a.Input,{disabled:!u,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Input,{width:"100%",value:g,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return x(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,N,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{selected:k,icon:k?"lock":"lock-open",content:k?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return w(!k)}})})]})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!d,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,s.modalClose)(t),(0,i.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:0===h.trim().length||0===g.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,s.modalAnswer)(t,e.id,"",{author:h,name:g.substr(0,127),description:v.substr(0,511),admin_locked:k?1:0}),(0,i.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NinjaBloodScan=void 0;var o=n(0),r=n(1),i=n(2),a=n(50),c=n(3);t.NinjaBloodScan=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"spider_clan",children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.vialIcons,d=l.noVialIcon,u=l.bloodOwnerNames,p=l.bloodOwnerSpecies,m=l.bloodOwnerTypes,h=l.blockButtons,f=l.scanStates,C="Button_blue",g="Button_disabled",N=["NoticeBox_red","NoticeBox","NoticeBox_blue"];return(0,o.createComponentVNode)(2,i.Flex,{direction:"column",shrink:1,alignContent:"center",children:(0,o.createComponentVNode)(2,i.Section,{title:"\u041e\u0431\u0440\u0430\u0437\u0446\u044b",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0440\u0438 \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u043a\u0440\u043e\u0432\u0438. \u041c\u0430\u0448\u0438\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u0440\u043e\u0432\u044c\u044e \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432\u0430\u043c \u043a\u043b\u0430\u043d. \u0420\u0435\u0430\u0433\u0435\u043d\u0442\u044b \u0438\u043c \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0435 \u043f\u0440\u0438\u043c\u0443\u0442\u0441\u044f \u0438\u043b\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c",tooltipPosition:"bottom-left"}),children:[(0,o.createComponentVNode)(2,i.Flex,{direction:"row",shrink:1,alignContent:"center",children:[1,2,3].map((function(e,t){return(0,o.createComponentVNode)(2,a.FlexItem,{direction:"column",width:"33.3%",ml:t?2:0,children:[(0,o.createComponentVNode)(2,i.Section,{title:u[t]?"\u041a\u0440\u043e\u0432\u044c":"\u041d\u0435\u0442 \u0440\u0435\u0430\u0433\u0435\u043d\u0442\u0430",style:{"text-align":"left",background:"rgba(53, 94, 163, 0.5)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:N[f[t]],success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.Button,{className:h?g:C,height:"100%",width:"100%",disabled:h,onClick:function(){return c("vial_out",{button_num:t+1})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+(s[t]||d),style:{"margin-left":"3px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:u[t]||" - ",content:"\u0420\u0430\u0441\u0430: "+(p[t]||" - ")+"\n\u0422\u0438\u043f \u043a\u0440\u043e\u0432\u0438: "+(m[t]||" - "),position:"bottom"})]})})]},t)}))}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_red",success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.Button,{className:0===h?"":"Button_disabled",content:"\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",width:"250px",textAlign:"center",disabled:h,tooltip:"\u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u043a\u0440\u043e\u0432\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u043d\u0443.",tooltipPosition:"bottom",onClick:function(){return c("scan_blood")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t).data.progressBar;return(0,o.createComponentVNode)(2,i.Section,{stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"green",value:n,minValue:0,maxValue:100,children:(0,o.createVNode)(1,"center",null,(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_green",mt:1,children:n?"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 "+n+"%":"\u0420\u0435\u0436\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f"}),2)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NinjaMindScan=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.NinjaMindScan=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"spider_clan",children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.occupantIcon,s=c.occupant_name,d=c.occupant_health,u=c.scanned_occupants,p="none"===s?1:0;return(0,o.createComponentVNode)(2,i.Flex,{direction:"column",shrink:1,alignContent:"left",children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0430\u0446\u0438\u0435\u043d\u0442",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.",tooltipPosition:"bottom-left"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",shrink:1,alignContent:"left",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{shrink:1,alignContent:"left",children:(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,width:"90px",align:"left",children:(0,o.createComponentVNode)(2,i.Section,{style:{background:"rgba(4, 74, 27, 0.75)"},align:"left",children:(0,o.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+l,style:{"margin-left":"-28px","-ms-interpolation-mode":"nearest-neighbor"}})})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,alignContent:"right",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_green",success:0,danger:0,align:"left",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0418\u043c\u044f",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0434\u043e\u0440\u043e\u0432\u044c\u0435",children:d})]})}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_red",mt:2.5,success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:0===p?"":"Button_disabled",content:"\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",width:"250px",textAlign:"center",disabled:p,tooltip:"\u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u044b\u0442\u044c \u0438\u0437 \u0435\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u043b\u0430\u043d\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.",tooltipPosition:"bottom-left",onClick:function(){return a("scan_occupant")}}),(0,o.createComponentVNode)(2,i.Button,{className:0===p?"":"Button_disabled",content:"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",width:"250px",textAlign:"center",disabled:p,tooltip:"\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u0438\u0437 \u043a\u0430\u043f\u0441\u0443\u043b\u044b",tooltipPosition:"bottom-left",onClick:function(){return a("go_out")}}),(0,o.createComponentVNode)(2,i.Button,{className:0===p?"":"Button_disabled",content:"\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430",width:"250px",textAlign:"center",disabled:p,tooltip:"\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u0431\u044b\u043b \u043f\u043e\u0445\u0438\u0449\u0435\u043d. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0440\u0430\u0437\u0431\u043e\u043b\u0442\u0430\u043b \u043e \u0432\u0430\u0441.",tooltipPosition:"bottom-left",onClick:function(){return a("teleport_out")}})]})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u043f\u0438\u0441\u043e\u043a \u0443\u0436\u0435 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u043c\u0438 \u043b\u044e\u0434\u0435\u0439",align:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Box,{children:e.scanned_occupant})})},e.scanned_occupant)}))})})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return c("auth")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,i.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return c("code")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authfull,content:l.anchored?"YES":"NO",onClick:function(){return c("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,i.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return c("set_time")}})})||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return c("toggle_safety")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,i.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return c("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return c("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(15),i=n(1),a=n(3),c=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],d={average:[.25,.5],bad:[.5,Infinity]},u=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,i.useBackend)(t),l=r.act,s=r.data,d=s.hasOccupant,u=s.choice;return n=u?(0,o.createComponentVNode)(2,h):d?(0,o.createComponentVNode)(2,p):(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:!u,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:!!u,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",children:n})]})})};var p=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),s.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:d,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:u[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Current Procedures",level:"2",children:n.inSurgery?n.surgeries.map((function(e){var t=e.bodypartName,n=e.surgeryName,r=e.stepName;return(0,o.createComponentVNode)(2,c.Section,{title:t,level:"4",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Procedure",children:n}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Next Step",children:r})]})},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No procedures ongoing."})})],4)},m=function(){return(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.verbose,s=a.health,d=a.healthAlarm,u=a.oxy,p=a.oxyAlarm,m=a.crit;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:d,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,c.Button,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return r(u?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:p,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,c.Button,{selected:m,icon:m?"toggle-on":"toggle-off",content:m?"On":"Off",onClick:function(){return r(m?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);function l(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return s(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},m=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(d),i=o.match(d);return r&&i&&n.replace(d,"")===o.replace(d,"")?parseInt(r[1],10)-parseInt(i[1],10):p(n,o)},h=function(e,t){var n=(0,i.useBackend)(t).act,r=e.searchText,c=e.source,l=e.title,s=c.filter(u(r));return s.sort(m),c.length>0&&(0,o.createComponentVNode)(2,a.Section,{title:l+" - ("+c.length+")",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,onClick:function(){return n("orbit",{ref:e.ref})}},e.name)}))})},f=function(e,t){var n=(0,i.useBackend)(t).act,r=e.color,c=e.thing;return(0,o.createComponentVNode)(2,a.Button,{color:r,onClick:function(){return n("orbit",{ref:c.ref})},children:c.name})};t.Orbit=function(e,t){for(var n,r=(0,i.useBackend)(t),s=r.act,d=r.data,C=d.alive,g=d.antagonists,N=(d.auto_observe,d.dead),b=d.ghosts,V=d.misc,v=d.npcs,x=(0,i.useLocalState)(t,"searchText",""),y=x[0],k=x[1],w={},_=l(g);!(n=_()).done;){var B=n.value;w[B.antag]===undefined&&(w[B.antag]=[]),w[B.antag].push(B)}var S=Object.entries(w);S.sort((function(e,t){return p(e[0],t[0])}));return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:y,onInput:function(e,t){return k(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[S.map((function(e){return e[0],e[1]})),C,b,N,v,V];t0&&(0,o.createComponentVNode)(2,a.Section,{title:"Antagonists",children:S.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,a.Section,{title:t,level:2,children:n.filter(u(y)).sort(m).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Alive - ("+C.length+")",children:C.filter(u(y)).sort(m).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"good",thing:e},e.name)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Ghosts - ("+b.length+")",children:b.filter(u(y)).sort(m).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"grey",thing:e},e.name)}))}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:N,searchText:y}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:v,searchText:y}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:V,searchText:y})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),i=n(2),a=n(50),c=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"},s={bananium:"clown",tranquillite:"mime"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"62%"}),(0,o.createComponentVNode)(2,p,{height:"38%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.id,d=c.points,u=c.disk,p=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Section,Object.assign({},p,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID card",children:s?(0,o.createComponentVNode)(2,i.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:s.name,tooltip:"Ejects the ID card.",onClick:function(){return a("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return a("insert_id")}})}),s&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:l(s.points)})}),s&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:l(s.total_points)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unclaimed Points",color:d>0?"good":"grey",bold:d>0&&"good",children:l(d)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{disabled:!s,icon:"hand-holding-usd",content:"Claim",onClick:function(){return a("claim")}})})]}),(0,o.createComponentVNode)(2,i.Divider),u?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,i.Button,{selected:!0,bold:!0,icon:"eject",content:u.name,tooltip:"Ejects the design disk.",onClick:function(){return a("eject_disk")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,i.Box,{color:u.design&&(u.compatible?"good":"bad"),children:u.design||"N/A"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{disabled:!u.design||!u.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return a("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.sheets),c=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},c,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),a.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},p=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.alloys),c=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},c,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),a.map((function(e){return(0,o.createComponentVNode)(2,f,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,i.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e[1])}))]})})},h=function(e,t){var n=(0,r.useBackend)(t).act,a=e.ore;if(!(a.value&&a.amount<=0)||["$metal","$glass"].indexOf(a.id)>-1){var c=a.id.replace("$","");return(0,o.createComponentVNode)(2,i.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[c]||c)+".png",verticalAlign:"middle",ml:"0rem"}),a.name]}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",color:a.amount>0?"good":"gray",bold:a.amount>0,align:"center",children:a.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:a.value}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:0,minValue:0,maxValue:Math.min(a.amount,50),stepPixelSize:6,onChange:function(e,t){return n(a.value?"sheet":"alloy",{id:a.id,amount:t})}})})]})})}},f=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore,l=c.id.replace("$","");return(0,o.createComponentVNode)(2,i.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,a.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:c.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"35%",textAlign:"middle",color:c.amount>0?"good":"gray",align:"center",children:c.description}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"10%",textAlign:"center",color:c.amount>0?"good":"gray",bold:c.amount>0,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(134),l=n(572);t.PAI=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.app_template,p=d.app_icon,m=d.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,c.routingError)("notFound",e);throw o}var n=t[e];return n||(0,c.routingError)("missingExport",e)}(u);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:p,mr:1}),m,"pai_main_menu"!==u&&(0,o.createComponentVNode)(2,i.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return s("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_advsecrecords.js":573,"./pai_atmosphere.js":574,"./pai_bioscan.js":575,"./pai_camera_bug.js":576,"./pai_directives.js":577,"./pai_doorjack.js":578,"./pai_encoder.js":579,"./pai_main_menu.js":580,"./pai_manifest.js":581,"./pai_medrecords.js":582,"./pai_messenger.js":583,"./pai_radio.js":584,"./pai_sec_chem.js":585,"./pai_secrecords.js":586,"./pai_signaler.js":587};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=572},function(e,t,n){"use strict";t.__esModule=!0,t.pai_advsecrecords=void 0;var o=n(0),r=n(1),i=n(2);t.pai_advsecrecords=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data;return(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Special Syndicate options:",children:(0,o.createComponentVNode)(2,i.Button,{content:"Select Records",onClick:function(){return a("ui_interact")}})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),i=n(195);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.AtmosScan,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),i=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.app_data),c=a.holder,l=a.dead,s=a.health,d=a.brute,u=a.oxy,p=a.tox,m=a.burn,h=a.reagents,f=a.addictions,C=a.fractures,g=a.internal_bleeding;return c?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:0,max:1,value:s/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"blue",children:u})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"green",children:p})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:m})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:d})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Reagents",children:h?h.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,children:(0,o.createComponentVNode)(2,i.Box,{color:e.overdosed?"bad":"good",children:[" ",e.volume," ",e.overdosed?"OVERDOSED":""," "]})},e.id)})):"Reagents not found."}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Addictions",children:f?f.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.addiction_name,children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[" Stage: ",e.stage," "]})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Addictions not found."})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fractures",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"bad":"good",children:["Fractures ",C?"":"not"," detected."]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Bleedings",children:(0,o.createComponentVNode)(2,i.Box,{color:g?"bad":"good",children:["Internal Bleedings ",g?"":"not"," detected."]})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_camera_bug=void 0;var o=n(0),r=n(1),i=n(2);t.pai_camera_bug=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data;return(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Special Syndicate options:",children:(0,o.createComponentVNode)(2,i.Button,{content:"Select Monitor",onClick:function(){return a("ui_interact")}})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),i=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.master,s=c.dna,d=c.prime,u=c.supplemental;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Master",children:l?l+" ("+s+")":"None"}),l&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,i.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return a("getdna")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Prime Directive",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Supplemental Directives",children:u||"None"})]}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),i=n(2);t.pai_doorjack=function(e,t){var n,a,c=(0,r.useBackend)(t),l=c.act,s=c.data.app_data,d=s.cable,u=s.machine,p=s.inprogress;s.progress,s.aborted;return n=u?(0,o.createComponentVNode)(2,i.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,i.Button,{content:d?"Extended":"Retracted",color:d?"orange":null,onClick:function(){return l("cable")}}),u&&(a=(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,i.Box,{color:p?"green":"red",children:[" In progress: ",p?"Yes":"No"," "]}),p?(0,o.createComponentVNode)(2,i.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,i.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cable",children:n}),a]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_encoder=void 0;var o=n(0),r=n(1),i=n(2);t.pai_encoder=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.radio_name,s=c.radio_rank;return(0,o.createComponentVNode)(2,i.Section,{title:"Your name and rank in radio channels",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Your current name and rank",children:[l,", ",s]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Set new name",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return a("set_newname",{newname:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Set new rank",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return a("set_newrank",{newrank:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),i=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.available_software,s=c.installed_software,d=c.installed_toggles,u=c.available_ram,p=c.emotions,m=c.current_emotion,h=[];return s.map((function(e){return h[e.key]=e.name})),d.map((function(e){return h[e.key]=e.name})),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available RAM",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!h[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{color:e.syndi?"red":"default",content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>u,onClick:function(){return a("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!h[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Installed Software",children:[s.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:e.icon,onClick:function(){return a("startSoftware",{software_key:e.key})}},e.key)})),0===s.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Installed Toggles",children:[d.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return a("setToggle",{toggle_key:e.key})}},e.key)})),0===d.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Select Emotion",children:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{color:e.syndi?"red":"default",content:e.name,selected:e.id===m,onClick:function(){return a("setEmotion",{emotion:e.id})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),i=n(144);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.CrewManifest,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),i=n(103);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),i=n(196);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return a.app_data.active_convo?(0,o.createComponentVNode)(2,i.ActiveConversation,{data:a.app_data}):(0,o.createComponentVNode)(2,i.MessengerList,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),i=n(15),a=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.app_data,s=l.minFrequency,d=l.maxFrequency,u=l.frequency,p=l.broadcasting;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:s/10,maxValue:d/10,value:u/10,format:function(e){return(0,i.toFixed)(e,1)},onChange:function(e,t){return c("freq",{freq:t})}}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return c("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("toggleBroadcast")},selected:p,content:p?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_sec_chem=void 0;var o=n(0),r=n(1),i=n(2);t.pai_sec_chem=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.holder,s=c.dead,d=c.health,u=c.current_chemicals,p=c.available_chemicals;return l?(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:s?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Chemicals",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available Chemicals",children:[p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name+" ("+e.cost+")",tooltip:e.desc,disabled:e.cost>u,onClick:function(){return a("secreteChemicals",{key:e.key})}},e.key)})),0===p.length&&"No chemicals available!"]})]})}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),i=n(103);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),i=n(197);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.Signaler,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(134),l=n(589);t.PDA=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),p=u.app;if(!u.owner)return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var m=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,c.routingError)("notFound",e);throw o}var n=t[e];return n||(0,c.routingError)("missingExport",e)}(p.template);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:p.icon,mr:1}),p.name]}),p:1,children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Box,{mb:8}),(0,o.createComponentVNode)(2,d)]})})};var s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.idInserted,s=c.idLink,d=c.stationTime,u=c.cartridge_name;return(0,o.createComponentVNode)(2,i.Box,{mb:1,children:(0,o.createComponentVNode)(2,i.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"id-card",color:"transparent",onClick:function(){return a("Authenticate")},content:s})}):(0,o.createComponentVNode)(2,i.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),u?(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"sd-card",color:"transparent",onClick:function(){return a("Eject")},content:"Eject "+u})}):(0,o.createComponentVNode)(2,i.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:d})]})})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app;return(0,o.createComponentVNode)(2,i.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return a("Back")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.is_home?"disabled":"white",icon:"home",onClick:function(){a("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":590,"./pda_janitor.js":591,"./pda_main_menu.js":592,"./pda_manifest.js":593,"./pda_medical.js":594,"./pda_messenger.js":196,"./pda_mob_hunt.js":595,"./pda_mule.js":596,"./pda_notes.js":597,"./pda_power.js":598,"./pda_secbot.js":599,"./pda_security.js":600,"./pda_signaler.js":601,"./pda_status_display.js":602,"./pda_supplyrecords.js":603};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=589},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),i=n(195);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),i=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.janitor),c=a.user_loc,l=a.mops,s=a.buckets,d=a.cleanbots,u=a.carts;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),l&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mop Bucket Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cleanbot Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Janitorial Cart Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(15),n(1)),i=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.owner,s=c.ownjob,d=c.idInserted,u=c.categories,p=c.pai,m=c.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",s]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Update PDA Info",disabled:!d,onClick:function(){return a("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){var t=c.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.uid in m?e.notify_icon:e.icon,iconSpin:e.uid in m,color:e.uid in m?"red":"transparent",content:e.name,onClick:function(){return a("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!p&&(0,o.createComponentVNode)(2,i.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return a("pai",{option:1})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return a("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),i=n(144);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),i=n(103);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),i=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.connected,s=c.wild_captures,d=c.no_collection,u=c.entry;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,i.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return a("Disconnect")}})]}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,i.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return a("Reconnect")}})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Wild Captures",children:s})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,i.Box,{children:!d&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return a("Prev")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Next",icon:"arrow-right",onClick:function(){return a("Next")}})]})}),children:d?"Your collection is empty! Go capture some Nano-Mobs!":u?(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:u.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[u.nickname&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nickname",children:u.nickname}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:u.real_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:u.level}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Primary Type",children:u.type1}),u.type2&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Secondary Type",children:u.type2}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return a("Transfer")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Release",icon:"arrow-up",onClick:function(){return a("Release")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return a("Rename")}}),!!u.is_hacked&&(0,o.createComponentVNode)(2,i.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return a("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),i=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,i.Box,{children:l?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,a)})};var a=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.mulebot.bots;return(0,o.createComponentVNode)(2,i.Box,{children:[c.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:e.Name,icon:"cog",onClick:function(){return a("AccessBot",{uid:e.uid})}})},e.Name)})),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"rss",content:"Re-scan for bots",onClick:function(){return a("Rescan")}})})]})},c=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data.mulebot,s=l.botstatus,d=l.active,u=s.mode,p=s.loca,m=s.load,h=s.powr,f=s.dest,C=s.home,g=s.retn,N=s.pick;switch(u){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=u}return(0,o.createComponentVNode)(2,i.Section,{title:d,children:[-1===u&&(0,o.createComponentVNode)(2,i.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,i.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return c("SetDest")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,i.Button,{content:m?m+" (Unload)":"None",disabled:!m,onClick:function(){return c("Unload")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,i.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return c("SetAutoPickup",{autoPickupType:N?"pickoff":"pickon"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,i.Button,{content:g?"Yes":"No",selected:g,onClick:function(){return c("SetAutoReturn",{autoReturnType:g?"retoff":"reton"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Stop",icon:"stop",onClick:function(){return c("Stop")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Proceed",icon:"play",onClick:function(){return c("Start")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Return Home",icon:"home",onClick:function(){return c("ReturnHome")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_notes=void 0;var o=n(0),r=n(1),i=n(2);t.pda_notes=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.note;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Section,{children:c}),(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return a("Edit")},content:"Edit"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_power=void 0;var o=n(0),r=n(1),i=n(198);t.pda_power=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.PowerMonitorMainContent)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_secbot=void 0;var o=n(0),r=n(1),i=n(2);t.pda_secbot=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.beepsky.active);return(0,o.createComponentVNode)(2,i.Box,{children:l?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,a)})};var a=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.beepsky.bots;return(0,o.createComponentVNode)(2,i.Box,{children:[c.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:e.Name,icon:"cog",onClick:function(){return a("AccessBot",{uid:e.uid})}})},e.Name)})),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"rss",content:"Re-scan for bots",onClick:function(){return a("Rescan")}})})]})},c=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data.beepsky,s=l.botstatus,d=l.active,u=s.mode,p=s.loca;switch(u){case 0:n="Ready";break;case 1:n="Apprehending target";break;case 2:case 3:n="Arresting target";break;case 4:n="Starting patrol";break;case 5:n="On patrol";break;case 6:n="Responding to summons"}return(0,o.createComponentVNode)(2,i.Section,{title:d,children:[-1===u&&(0,o.createComponentVNode)(2,i.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Go",icon:"play",onClick:function(){return c("Go")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Stop",icon:"stop",onClick:function(){return c("Stop")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Summon",icon:"arrow-down",onClick:function(){return c("Summon")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_security=void 0;var o=n(0),r=n(1),i=n(103);t.pda_security=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_signaler=void 0;var o=n(0),r=n(1),i=n(197);t.pda_signaler=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.Signaler,{data:a})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_status_display=void 0;var o=n(0),r=n(1),i=n(2);t.pda_status_display=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.records;return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Code",children:[(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return a("Status",{statdisp:"blank"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"clock",content:"Evac ETA",onClick:function(){return a("Status",{statdisp:"shuttle"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"edit",content:"Message",onClick:function(){return a("Status",{statdisp:"message"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"exclamation-triangle",content:"Red Alert",onClick:function(){return a("Status",{statdisp:"alert",alert:"redalert"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"boxes",content:"NT Logo",onClick:function(){return a("Status",{statdisp:"alert",alert:"default"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"lock",content:"Lockdown",onClick:function(){return a("Status",{statdisp:"alert",alert:"lockdown"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"biohazard",content:"Biohazard",onClick:function(){return a("Status",{statdisp:"alert",alert:"biohazard"})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message line 1",children:(0,o.createComponentVNode)(2,i.Button,{content:c.message1+" (set)",icon:"pen",onClick:function(){return a("Status",{statdisp:"setmsg1"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message line 2",children:(0,o.createComponentVNode)(2,i.Button,{content:c.message2+" (set)",icon:"pen",onClick:function(){return a("Status",{statdisp:"setmsg2"})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_supplyrecords=void 0;var o=n(0),r=n(1),i=n(2);t.pda_supplyrecords=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.supply),c=a.shuttle_loc,l=a.shuttle_time,s=a.shuttle_moving,d=a.approved,u=a.approved_count,p=a.requests,m=a.requests_count;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:s?(0,o.createComponentVNode)(2,i.Box,{children:["In transit ",l]}):(0,o.createComponentVNode)(2,i.Box,{children:c})})}),(0,o.createComponentVNode)(2,i.Section,{mt:1,title:"Requested Orders",children:m>0&&p.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Approved Orders",children:u>0&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDAColorRow=t.PDAPainter=void 0;var o=n(0),r=n(1),i=n(3),a=n(2);t.PDAPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.statusLabel,u=s.pdaTypes,p=s.hasPDA,m=s.pdaIcon,h=s.pdaOwnerName,f=s.pdaJobName;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,direction:"row",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:24,shrink:0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"\u041e\u0431\u0449\u0435\u0435",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:p?"eject":"exclamation-triangle",selected:p,content:p?"\u0418\u0437\u0432\u043b\u0435\u0447\u044c":"-----",tooltip:p?"\u0418\u0437\u0432\u043b\u0435\u0447\u044c PDA":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c PDA",tooltipPosition:"left",onClick:function(){return l(p?"eject_pda":"insert_pda")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0418\u043c\u044f",children:h||"\u041d/\u0414"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c",children:f||"\u041d/\u0414"})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",direction:"column",flex:"1",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",height:"160px",src:p?"data:image/png;base64,"+m:"",style:{"-ms-interpolation-mode":"nearest-neighbor"},align:"middle"})}),(0,o.createComponentVNode)(2,a.LabeledList,{m:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:d})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{m:"5px",fluid:!0,disabled:!p,content:"\u0421\u0442\u0435\u0440\u0435\u0442\u044c PDA",confirmContent:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c?",textAlign:"left",color:"red",tooltip:"C\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0437\u0430\u0432\u043e\u0434\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",tooltipPosition:"top",onClick:function(){return l("erase_pda")}})]})})})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:27,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{title:"\u0426\u0432\u0435\u0442 PDA",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{children:Object.keys(u).map((function(e){return(0,o.createComponentVNode)(2,c,{selectedPda:e,selectedPdaImage:u[e][0]},e)}))})})})})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.hasPDA,l=e.selectedPda,s=e.selectedPdaImage;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,disabled:!c,icon:s,content:l,confirmContent:"\u041f\u043e\u043a\u0440\u0430\u0441\u0438\u0442\u044c?",textAlign:"left",onClick:function(){return i("choose_pda",{selectedPda:l,selectedPdaImage:s})}})})]})};t.PDAColorRow=c},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(100);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.broken,u=s.anchored,p=s.active,m=s.fuel_type,h=s.fuel_usage,f=s.fuel_stored,C=s.fuel_cap,g=s.is_ai,N=s.tmp_current,b=s.tmp_max,V=s.tmp_overheat,v=s.output_max,x=s.power_gen,y=s.output_set,k=s.has_fuel,w=f/C,_=N/b,B=y*x,S=Math.round(f/h),L=Math.round(S/60),A=S>120?L+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(d||!u)&&(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:[!!d&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"The generator is malfunctioning!"}),!d&&!u&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!d&&!!u&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:p?"power-off":"times",content:p?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:p,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,i.NumberInput,{value:y,minValue:1,maxValue:v,step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,c.formatPower)(B),")"]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:_,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[N," \u2103"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[V>50&&(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),V>20&&V<=50&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"WARNING: Overheating!"}),V>1&&V<=20&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"Temperature High"}),0===V&&(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:p||g||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Type",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:w,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(f/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fuel usage",children:[h/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(h?A:"N/A"),!k&&(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.busy,p=d.category,m=d.display_craftable_only,h=d.display_compact,f=d.prev_cat,C=d.next_cat,g=d.subcategory,N=d.prev_subcat,b=d.next_subcat;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!u&&(0,o.createComponentVNode)(2,i.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,i.Section,{title:p,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Show Craftable Only",icon:m?"check-square-o":"square-o",selected:m,onClick:function(){return s("toggle_recipes")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return s("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:f,icon:"arrow-left",onClick:function(){return s("backwardCat")}}),(0,o.createComponentVNode)(2,i.Button,{content:C,icon:"arrow-right",onClick:function(){return s("forwardCat")}})]}),g&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:N,icon:"arrow-left",onClick:function(){return s("backwardSubCat")}}),(0,o.createComponentVNode)(2,i.Button,{content:b,icon:"arrow-right",onClick:function(){return s("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,l)]})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.display_craftable_only,s=c.can_craft,d=c.cant_craft;return(0,o.createComponentVNode)(2,i.Box,{mt:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[s.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",onClick:function(){return a("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.display_craftable_only,s=c.can_craft,d=c.cant_craft;return(0,o.createComponentVNode)(2,i.Box,{mt:1,children:[s.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",onClick:function(){return a("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(24);function l(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return s(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne?this.substring(0,e)+"...":this};t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data;"mode_aipic"!==d.mode||d.isAI||s("mode_copy");for(var u,p,m=(0,c.sortBy)((function(e){return e.category}))(d.forms||[]),h=[],f=l(m);!(u=f()).done;){var C=u.value;h.includes(C.category)||h.push(C.category)}return p=""===d.category?m:m.filter((function(e){return e.category===d.category})),(0,o.createComponentVNode)(2,a.Window,{theme:d.ui_theme,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:24,shrink:0,children:[(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"\u0421\u0442\u0430\u0442\u0443\u0441"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0430\u0440\u044f\u0434 \u0442\u043e\u043d\u0435\u0440\u0430",color:d.toner>0?"good":"bad",children:d.toner}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0421\u043b\u043e\u0442 \u0441\u043a\u0430\u043d\u0435\u0440\u0430",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:d.isAI||null===d.copyitem,content:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c",onClick:function(){return s("remove")}})})]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e",children:[d.copies,(0,o.createComponentVNode)(2,i.Button,{icon:"minus",ml:2,disabled:!(d.copies>1),onClick:function(){return s("min")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",disabled:!(d.copies<=d.toner),onClick:function(){return s("add")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043c",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"clone",disabled:0===d.toner,content:"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",selected:"mode_copy"===d.mode?"selected":null,onClick:function(){return s("mode_copy")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"file",disabled:0===d.toner,content:"\u041f\u0435\u0447\u0430\u0442\u044c",selected:"mode_print"===d.mode?"selected":null,onClick:function(){return s("mode_print")}}),!!d.isAI&&(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",disabled:0===d.toner,content:"\u0424\u043e\u0442\u043e \u0438\u0437 \u0414\u0411",selected:"mode_aipic"===d.mode?"selected":null,onClick:function(){return s("mode_aipic")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c",children:["mode_copy"===d.mode&&(0,o.createComponentVNode)(2,i.Button,{icon:"print",disabled:0===d.toner||null===d.copyitem&&!d.ass,content:"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",onClick:function(){return s("copy")}}),"mode_print"===d.mode&&(0,o.createComponentVNode)(2,i.Button,{icon:"print",disabled:0===d.toner||null===d.form,content:"\u041f\u0435\u0447\u0430\u0442\u044c",onClick:function(){return s("print_form")}}),"mode_aipic"===d.mode&&(0,o.createComponentVNode)(2,i.Button,{icon:"print",disabled:0===d.toner,content:"\u041f\u0435\u0447\u0430\u0442\u044c \u0444\u043e\u0442\u043e",onClick:function(){return s("aipic")}})]})]})]}),(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"\u0411\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u044f"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0424\u043e\u0440\u043c\u0430",children:""===d.form_id?"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430":d.form_id})}),(0,o.createComponentVNode)(2,i.Flex,{direction:"column",mt:2,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"chevron-right",content:"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",selected:""===d.category?"selected":null,onClick:function(){return s("choose_category",{category:null})},mb:1})}),h.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"chevron-right",content:e,selected:d.category===e?"selected":null,onClick:function(){return s("choose_category",{category:e})},mb:1},e)},e)}))]})]}),(0,o.createComponentVNode)(2,i.NoticeBox,{color:d.info_box_color,children:d.info_box})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:27,children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:""===d.category?"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b":d.category}),(0,o.createComponentVNode)(2,i.Flex,{direction:"column",mt:2,children:p.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:e.id+": "+e.altername.trimLongStr(30),tooltip:e.id+": "+e.altername,selected:d.form===e.path?"selected":null,onClick:function(){return s("choose_form",{path:e.path,id:e.id})},mb:1},e.path)},e.path)}))})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PodTracking=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.PodTracking=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.pods);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Position",children:[e.podx,", ",e.pody,", ",e.podz]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pilot",children:e.pilot}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Passengers",children:e.passengers})]})},e.name)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);var c={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},l=function(e,t){var n=e.tempKey,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["tempKey"]),l=c[n];if(!l)return null;var s=(0,r.useBackend)(t),d=s.data,u=s.act,p=d.currentTemp,m=l.label,h=l.icon,f=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Button,Object.assign({selected:f,onClick:function(){u("setTemp",{temp:n})}},a,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:h}),m]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,s=n.emagged,d=n.currentTemp,u=c[d]||c.normal,p=u.label,m=u.color,h=[],f=0,C=Object.entries(c);f0?"envelope-open-text":"envelope",onClick:function(){return c("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return c("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Request Supplies",icon:"box",onClick:function(){return c("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return c("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return c("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return c("setScreen",{setScreen:10})}})})]}),!!d&&(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return c("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{content:u?"Speaker Off":"Speaker On",selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return c("toggleSilent")}})})]})},l=function(e,t){var n,a,c=(0,r.useBackend)(t),l=c.act,s=c.data,d=s.department;switch(e.purpose){case"ASSISTANCE":n=s.assist_dept,a="Request assistance from another department";break;case"SUPPLIES":n=s.supply_dept,a="Request supplies from another department";break;case"INFO":n=s.info_dept,a="Relay information to another department"}return(0,o.createComponentVNode)(2,i.Section,{title:a,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:n.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Message",icon:"envelope",onClick:function(){return l("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,i.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return l("writeInput",{write:e,priority:2})}})]},e)}))})})},s=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act;a.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,i.Section,{title:n,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}})})},d=function(e,t){var n,a,c=(0,r.useBackend)(t),l=c.act,s=c.data;switch(e.type){case"MESSAGES":n=s.message_log,a="Message Log";break;case"SHIPPING":n=s.shipping_log,a="Shipping label print log"}return(0,o.createComponentVNode)(2,i.Section,{title:a,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{className:"RequestConsole__message",children:e},e)}))})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.recipient,s=c.message,d=c.msgVerified,u=c.msgStamped;return(0,o.createComponentVNode)(2,i.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return a("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Validated by",color:"green",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stamped by",color:"blue",children:u})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return a("department",{department:l})}})]})},p=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.message,s=c.announceAuth;return(0,o.createComponentVNode)(2,i.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return a("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,i.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return a("writeAnnouncement")}}),s?(0,o.createComponentVNode)(2,i.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,i.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(s&&l),onClick:function(){return a("sendAnnouncement")}})]})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.shipDest,s=c.msgVerified,d=c.ship_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return a("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Validated by",children:s})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&s),onClick:function(){return a("printLabel")}}),(0,o.createComponentVNode)(2,i.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,i.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return a("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RequestManager=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);t.RequestManager=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.requests),p=(0,i.useLocalState)(t,"filteredTypes",Object.fromEntries(Object.entries(l).map((function(e){var t=e[0];e[1];return[t,!0]})))),m=p[0],h=(p[1],(0,i.useLocalState)(t,"searchText")),f=h[0],C=h[1],g=u.filter((function(e){return m[e.req_type]}));if(f){var N=f.toLowerCase();g=g.filter((function(e){return(0,r.decodeHtmlEntities)(e.message).toLowerCase().includes(N)||e.owner_name.toLowerCase().includes(N)}))}return(0,o.createComponentVNode)(2,c.Window,{title:"Request Manager",width:575,height:600,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Requests",buttons:(0,o.createComponentVNode)(2,a.Input,{value:f,onInput:function(e,t){return C(t)},placeholder:"Search...",mr:1}),children:g.map((function(e){return(0,o.createVNode)(1,"div","RequestManager__row",[(0,o.createVNode)(1,"div","RequestManager__rowContents",[(0,o.createVNode)(1,"h2","RequestManager__header",[(0,o.createVNode)(1,"span","RequestManager__headerText",[e.owner_name,null===e.owner&&" [DC]"],0),(0,o.createVNode)(1,"span","RequestManager__timestamp",e.timestamp_str,0)],4),(0,o.createVNode)(1,"div","RequestManager__message",[(0,o.createComponentVNode)(2,s,{requestType:e.req_type}),(0,r.decodeHtmlEntities)(e.message)],0)],4),null!==e.owner&&(0,o.createComponentVNode)(2,d,{request:e})],0,null,e.id)}))})})})};var l={request_prayer:"PRAYER",request_centcom:"CENTCOM",request_syndicate:"SYNDICATE",request_honk:"HONK",request_ert:"ERT",request_nuke:"NUKE CODE"},s=function(e){var t=e.requestType;return(0,o.createVNode)(1,"b","RequestManager__"+t,[l[t],(0,o.createTextVNode)(":")],0)},d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=(n._,e.request);return(0,o.createVNode)(1,"div","RequestManager__controlsContainer",[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("pp",{id:c.id})},children:"PP"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("vv",{id:c.id})},children:"VV"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("sm",{id:c.id})},children:"SM"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("tp",{id:c.id})},children:"TP"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("logs",{id:c.id})},children:"LOGS"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("bless",{id:c.id})},children:"BLESS"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("smite",{id:c.id})},children:"SMITE"}),"request_prayer"!==c.req_type&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("rply",{id:c.id})},children:"RPLY"}),"request_ert"===c.req_type&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("ertreply",{id:c.id})},children:"ERTREPLY"}),"request_nuke"===c.req_type&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("getcode",{id:c.id})},children:"GETCODE"})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),i=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,a=e.desc;return(0,o.createComponentVNode)(2,i.Box,{children:[t>0?(0,o.createComponentVNode)(2,i.Divider):null,(0,o.createComponentVNode)(2,i.Box,{children:n}),(0,o.createComponentVNode)(2,i.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,i.Box,{children:["* Summary: ",a]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(52),c=n(67),l=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_data;return l?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return c("updt_tech")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return c("clear_tech")}}),(0,o.createComponentVNode)(2,u)]})]}):null},s=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_data;if(!l)return null;var s=l.name,d=l.lathe_types,p=l.materials,m=d.join(", ");return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:s}),m?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lathe Types",children:m}):null,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Required Materials"})]}),p.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return c("updt_design")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return c("clear_design")}}),(0,o.createComponentVNode)(2,u)]})]})},d=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.RndNavButton,{submenu:c.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,u)]})]})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_type;return l?(0,o.createComponentVNode)(2,i.Button,{content:"Eject Disk",icon:"eject",onClick:function(){c("tech"===l?"eject_tech":"eject_design")}}):null},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.disk_data,c=n.disk_type;return(0,o.createComponentVNode)(2,i.Section,{title:"Data Disk Contents",children:function(){if(!a)return(0,o.createComponentVNode)(2,d);switch(c){case"design":return(0,o.createComponentVNode)(2,s);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_type,s=a.to_copy;return(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:s.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){c("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,p)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,m)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),i=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.loaded_item;return a.linked_destroy?l?(0,o.createComponentVNode)(2,i.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,i.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,i.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){c("deconstruct")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Eject Item",icon:"eject",onClick:function(){c("eject_item")}})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,i.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),i=n(2),a=n(52);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),c=n.data,l=n.act,s=c.category,d=c.matching_designs,u=4===c.menu?"build":"imprint";return(0,o.createComponentVNode)(2,i.Section,{title:s,children:[(0,o.createComponentVNode)(2,a.LatheMaterials),(0,o.createComponentVNode)(2,i.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:d.map((function(e){var t=e.id,n=e.name,r=e.can_build,a=e.materials;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(u,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,i.Button,{content:"x5",onClick:function(){return l(u,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,i.Button,{content:"x10",onClick:function(){return l(u,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:a.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),i=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.loaded_chemicals,s=4===a.menu;return(0,o.createComponentVNode)(2,i.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Purge All",icon:"trash",onClick:function(){c(s?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,i.Button,{content:"Purge",icon:"trash",onClick:function(){c(s?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(52);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,l=n.act,s=c.menu,d=c.categories,u=4===s?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,i.Section,{title:u+" Menu",children:[(0,o.createComponentVNode)(2,a.LatheMaterials),(0,o.createComponentVNode)(2,a.LatheSearch),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),i=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,a=n.total_materials,c=n.max_materials,l=n.max_chemicals,s=n.total_chemicals;return(0,o.createComponentVNode)(2,i.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,i.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:a}),c?(0,o.createComponentVNode)(2,i.Table.Cell,{children:" / "+c}):null]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:s}),l?(0,o.createComponentVNode)(2,i.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),i=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.loaded_materials;return(0,o.createComponentVNode)(2,i.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,i.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===a.menu?"lathe_ejectsheet":"imprinter_ejectsheet";c(n,{id:t,amount:e})},s=Math.floor(n/2e3),d=n<1,u=1===s?"":"s";return(0,o.createComponentVNode)(2,i.Table.Row,{className:d?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,i.Table.Cell,{minWidth:"110px",children:["(",s," sheet",u,")"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,i.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,i.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,i.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),i=n(199),a=n(52),c=n(2),l=n(67);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,s=n.menu,d=n.linked_lathe,u=n.linked_imprinter;return 4!==s||d?5!==s||u?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.LatheMainMenu)}}),(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,a.LatheCategory)}}),(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,a.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,a.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,c.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,c.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),i=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search...",onChange:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(52),c=n(67);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,s=n.linked_destroy,d=n.linked_lathe,u=n.linked_imprinter,p=n.tech_levels;return(0,o.createComponentVNode)(2,i.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,i.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!l,menu:c.MENU.DISK,submenu:c.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!s,menu:c.MENU.DESTROY,submenu:c.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!d,menu:c.MENU.LATHE,submenu:c.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!u,menu:c.MENU.IMPRINTER,submenu:c.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,a.RndNavButton,{menu:c.MENU.SETTINGS,submenu:c.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,i.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,i.LabeledList,{children:p.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(52),i=n(2),a=n(67);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,i.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==a.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:a.MENU.MAIN,submenu:a.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==a.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===a.MENU.LATHE||e===a.MENU.IMPRINTER},submenu:a.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),i=n(2);t.RndNavButton=function(e,t){var n=e.icon,a=e.children,c=e.disabled,l=e.content,s=(0,r.useBackend)(t),d=s.data,u=s.act,p=d.menu,m=d.submenu,h=p,f=m;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,i.Button,{content:l,icon:n,disabled:c,onClick:function(){u("nav",{menu:h,submenu:f})},children:a})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(52),c=n(67);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,s=n.act,d=l.sync,u=l.admin,p=l.linked_destroy,m=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Sync Database with Network",icon:"sync",disabled:!d,onClick:function(){s("sync")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Connect to Research Network",icon:"plug",disabled:d,onClick:function(){s("togglesync")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){s("togglesync")}}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!d,content:"Device Linkage Menu",icon:"link",menu:c.MENU.SETTINGS,submenu:c.SUBMENU.SETTINGS_DEVICES}),1===u?(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return s("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,i.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return s("find_device")}}),(0,o.createComponentVNode)(2,i.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[p?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",content:"Unlink",onClick:function(){return s("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),m?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",content:"Unlink",onClick:function(){s("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",content:"Unlink",onClick:function(){return s("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(18),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,i.Section,{title:(0,c.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,i.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.can_hack,u=s.safety,p=s.show_detonate_all,m=s.cyborgs,h=void 0===m?[]:m;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!p&&(0,o.createComponentVNode)(2,i.Section,{title:"Emergency Self Destruct",children:[(0,o.createComponentVNode)(2,i.Button,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"bomb",disabled:u,content:"Destroy ALL Cyborgs",color:"bad",onClick:function(){return l("nuke",{})}})]}),(0,o.createComponentVNode)(2,c,{cyborgs:h,can_hack:d})]})})};var c=function(e,t){var n=e.cyborgs,a=(e.can_hack,(0,r.useBackend)(t)),c=a.act,l=a.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return c("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return c("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"bomb",content:"Detonate",disabled:!l.auth,color:"bad",onClick:function(){return c("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,i.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,i.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,i.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,i.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=d.dial,p=d.open;d.locked,d.contents;return(0,o.createComponentVNode)(2,a.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,i.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,i.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),p?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*u+"deg)","z-index":0}})]}),!p&&(0,o.createComponentVNode)(2,s)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.dial,s=c.open,d=c.locked,u=function(e,t){return(0,o.createComponentVNode)(2,i.Button,{disabled:s||t&&!d,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return a(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,i.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:d,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){return a("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Box,{position:"absolute",children:[u(50),u(10),u(1)]}),(0,o.createComponentVNode)(2,i.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[u(1,!0),u(10,!0),u(50,!0)]}),(0,o.createComponentVNode)(2,i.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.contents;return(0,o.createComponentVNode)(2,i.Box,{className:"Safe--contents",overflow:"auto",children:c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{mb:"0.5rem",onClick:function(){return a("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,i.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},s=function(e,t){return(0,o.createComponentVNode)(2,i.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,i.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.satellites,d=l.notice,u=l.meteor_shield,p=l.meteor_shield_coverage,m=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u&&(0,o.createComponentVNode)(2,i.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:h>=100?"good":"average",value:p,maxValue:m,children:[h," %"]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),s.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,i.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return c("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SecureStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.emagged,d=l.locked,u=l.l_set,p=l.l_setshort,m=l.current_code,h=function(e){var t=e.buttonValue,n=e.color;return n||(n="default"),(0,o.createComponentVNode)(2,i.Button,{disabled:s||p,type:"button",color:n,onClick:function(){return c("setnumber",{buttonValue:t})},children:t})};return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,i.Flex,{spacing:"1",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:16,shrink:0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Section,{title:"Code Panel",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"1"}),(0,o.createComponentVNode)(2,h,{buttonValue:"2"}),(0,o.createComponentVNode)(2,h,{buttonValue:"3"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"4"}),(0,o.createComponentVNode)(2,h,{buttonValue:"5"}),(0,o.createComponentVNode)(2,h,{buttonValue:"6"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"7"}),(0,o.createComponentVNode)(2,h,{buttonValue:"8"}),(0,o.createComponentVNode)(2,h,{buttonValue:"9"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"R",color:"red"}),(0,o.createComponentVNode)(2,h,{buttonValue:"0"}),(0,o.createComponentVNode)(2,h,{buttonValue:"E",color:"green"})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Status",children:s||p?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lock Status",children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:s?"LOCKING SYSTEM ERROR - 1701":"ALERT: MEMORY SYSTEM ERROR - 6040 201"})}),s?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Code",children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"NEW INPUT, ASSHOLE"})}):""]}):(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Secure Code",children:(0,o.createComponentVNode)(2,i.Box,{color:u?"red":"green",children:u?"*****":"NOT SET. ENTER NEW."})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lock Status",children:(0,o.createComponentVNode)(2,i.Box,{color:d?"red":"green",children:d?"Locked":"Unlocked"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Code",children:(0,o.createComponentVNode)(2,i.Box,{children:m||"Waiting for input"})}),(0,o.createComponentVNode)(2,i.Button,{top:".35em",left:".5em",disabled:d,color:"red",content:"Lock",icon:"lock",onClick:function(){return c("close")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(50),l=n(3),s=n(51),d=n(140),u=n(141),p=n(145),m={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,s.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,i.useBackend)(t),c=(r.act,r.data),m=c.loginState,h=c.currentPage;return m.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h?n=(0,o.createComponentVNode)(2,b):3===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d.LoginInfo),(0,o.createComponentVNode)(2,p.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,u.LoginScreen)})})};var f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.currentPage,s=c.general;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===l,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Record Maintenance"]}),3===l&&s&&!s.empty&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"file"}),"Record: ",s.fields[0].value]})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.records,s=(0,i.useLocalState)(t,"searchText",""),d=s[0],u=(s[1],(0,i.useLocalState)(t,"sortId","name")),p=u[0],h=(u[1],(0,i.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,g,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,g,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,g,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,g,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,g,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(d,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[p].localeCompare(t[p])*n})).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"SecurityRecords__listRow--"+m[e.status],onClick:function(){return c("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.status})]},e.id)}))]})})]})},g=function(e,t){var n=(0,i.useLocalState)(t,"sortId","name"),r=n[0],c=n[1],l=(0,i.useLocalState)(t,"sortOrder",!0),s=l[0],d=l[1],u=e.id,p=e.children;return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{color:r!==u&&"transparent",width:"100%",onClick:function(){r===u?d(!s):(c(u),d(!0))},children:[p,r===u&&(0,o.createComponentVNode)(2,a.Icon,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data.isPrinting,d=(0,i.useLocalState)(t,"searchText",""),u=(d[0],d[1]);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,s.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,c.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return u(t)}})})]})},b=function(e,t){var n=(0,i.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!0,icon:"download",content:"Backup to Disk",tooltip:"This feature is not available.",tooltipPosition:"right"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!0,icon:"upload",content:"Upload from Disk",tooltip:"This feature is not available.",tooltipPosition:"right",my:"0.5rem"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Security Records",onClick:function(){return n("delete_security_all")},mb:"0.5rem"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Cell Logs",onClick:function(){return n("delete_cell_logs")}})]})},V=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.isPrinting,s=c.general,d=c.security;return s&&s.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,v)}),(0,o.createComponentVNode)(2,a.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:d.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,x)})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,i.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{float:"left",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},x=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,s.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,a.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return c("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3),l={title:"Seeds",plantName:"Plant",lifespan:"Lifespan",endurance:"Endurance",maturation:"Maturation",production:"Production",yield:"Yield",potency:"Potency",searchTooltip:"Search..",sortByTooltip:"Sort by",dispOneTooltip:"Dispense one",dispAllTooltip:"Dispense all",inStock:"in stock",noContents:"No seeds loaded.",emptySearchResult:"No items matching your criteria was found!"},s={plantName:function(e,t){return e.display_name!==t.display_name?e.display_name>t.display_name?1:-1:0},lifespan:function(e,t){return e.life-t.life},endurance:function(e,t){return e.endr-t.endr},maturation:function(e,t){return e.matr-t.matr},production:function(e,t){return e.prod-t.prod},yield:function(e,t){return e.yld-t.yld},potency:function(e,t){return e.potn-t.potn}};t.SeedExtractor=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data),s=r.total,d=r.capacity,h=r.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:l.title,buttons:(0,o.createComponentVNode)(2,u),m:0,p:0,children:(0,o.createComponentVNode)(2,p,{seedsTotal:s,seedsCapacity:d})}),h?(0,o.createVNode)(1,"div","Divider Divider__noMargin"):(0,o.createComponentVNode)(2,a.NoticeBox,{m:0,children:[" ",l.noContents," "]}),(0,o.createComponentVNode)(2,a.Section,{flexGrow:1,stretchContents:!0,mt:0,children:!!h&&(0,o.createComponentVNode)(2,m)})]})})};var d=function(e,t){var n=e.name,r=e.alpha,c=(0,i.useLocalState)(t,"sort",{field:"plantName",desc:!1}),s=c[0],d=c[1];return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,iconRight:!0,icon:s.field!==n?"":s.desc?r?"sort-alpha-down":"sort-amount-down":r?"sort-alpha-up":"sort-amount-up",color:"transparent",textColor:"white",content:l[n],tooltip:l.sortByTooltip+" "+n.toLowerCase(),tooltipPosition:"bottom",onClick:function(){s.field!==e.name?d({field:n,desc:!1}):d({field:n,desc:!s.desc})}})},u=function(e,t){var n=(0,i.useLocalState)(t,"search",""),r=(n[0],n[1]);return(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",width:"50vw",style:{display:"block"},children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:1,align:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:"filter"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:l.searchTooltip,width:"100%",onInput:function(e,t){return r(t)}})})]})})},p=function(e,t){var n=e.seedsTotal,r=e.seedsCapacity;return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",textAlign:"center",bold:!0,align:"baseline",mt:0,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"15vw",children:(0,o.createComponentVNode)(2,d,{name:"plantName",alpha:!0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"65vw",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"lifespan"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"endurance"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"maturation"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"production"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"yield"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"potency"})})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,color:"average",children:[n,"/",r]})]})},m=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data.contents),d=(0,i.useLocalState)(t,"search",""),u=d[0],p=(d[1],(0,i.useLocalState)(t,"sort",{field:"plantName",desc:!1})),m=p[0],f=(p[1],(0,r.createSearch)(u,(function(e){return e.display_name+e.strain_text}))),C=c.filter(f).sort(s[m.field]);m.desc&&(C=C.reverse());var g=0===C.length;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:[!!g&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" ",l.emptySearchResult," "]}),!g&&(0,o.createComponentVNode)(2,a.Box,{className:"SeedExtractor__Contents",children:C.map((function(e){return(0,o.createComponentVNode)(2,h,{displayName:e.display_name,descriptionText:e.strain_text,lifespanVal:e.life,enduranceVal:e.endr,maturationVal:e.life,productionVal:e.prod,yieldVal:e.yld,potencyVal:e.potn,vendIdx:e.vend,pileStock:e.quantity},e.vend)}))})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=(n.data,e.key,e.displayName),s=e.descriptionText,d=e.lifespanVal,u=e.enduranceVal,p=e.maturationVal,m=e.productionVal,h=e.yieldVal,f=e.potencyVal,C=e.vendIdx,g=e.pileStock;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{direction:"row",textAlign:"center",className:"SeedExtractor__contents--row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"15vw",textAlign:"left",bold:!0,children:(0,o.createComponentVNode)(2,a.Box,{m:1,children:c})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"65vw",py:1,children:(0,o.createVNode)(1,"table",null,[(0,o.createVNode)(1,"tr",null,(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Flex,{direction:"row",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:d}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:u}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:p}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:m}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:h}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:f})]}),2),2),(0,o.createVNode)(1,"tr",null,(0,o.createVNode)(1,"td",null,s,0,{style:{"font-size":"90%","padding-top":"0.5em"}}),2)],4,{style:{width:"100%",border:"0"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,py:1,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{color:"good",children:[g," ",l.inStock]}),(0,o.createComponentVNode)(2,a.Flex.Item,{minHeight:"25px",pt:1,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"1",tooltip:"Dispense one",tooltipPosition:"bottom-left",onClick:function(){return r("vend",{index:C,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:g,step:1,stepPixelSize:3,onChange:function(e,t){return r("vend",{index:C,amount:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all",tooltipPosition:"bottom-left",onClick:function(){return r("vend",{index:C,amount:g})}})]})]})})]}),(0,o.createComponentVNode)(2,a.Divider)],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsoleContent=t.ShuttleConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=e.type,u=void 0===s?"shuttle":s,p=e.blind_drop,m=l.authorization_required;return(0,o.createComponentVNode)(2,a.Window,{width:350,height:240,children:[!!m&&(0,o.createComponentVNode)(2,i.Modal,{ml:1,mt:1,width:26,height:12,fontSize:"28px",fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mt:2,children:(0,o.createComponentVNode)(2,i.Icon,{name:"minus-circle"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mt:2,ml:2,color:"bad",children:"shuttle"===u?"SHUTTLE LOCKED":"BASE LOCKED"})]}),(0,o.createComponentVNode)(2,i.Box,{fontSize:"18px",mt:4,children:(0,o.createComponentVNode)(2,i.Button,{lineHeight:"40px",icon:"arrow-circle-right",content:"Request Authorization",color:"bad",onClick:function(){return c("request")}})})]}),(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,d,{type:u,blind_drop:p})})]})};var c=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.id===t})))?void 0:n.name},l=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.name===t})))?void 0:n.id},s={"In Transit":"good",Idle:"average",Igniting:"average",Recharging:"average",Missing:"bad","Unauthorized Access":"bad",Locked:"bad"},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data,u=e.type,p=e.blind_drop,m=d.status,h=d.locked,f=d.authorization_required,C=d.destination,g=d.docked_location,N=d.timer_str,b=d.locations,V=void 0===b?[]:b;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,fontSize:"26px",textAlign:"center",fontFamily:"monospace",children:N||"00:00"}),(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",fontSize:"14px",mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,children:"STATUS:"}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:s[m]||"bad",ml:1,children:m||"Not Available"})]}),(0,o.createComponentVNode)(2,i.Section,{title:"shuttle"===u?"Shuttle Controls":"Base Launch Controls",level:2,children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:g||"Not Available"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destination",buttons:"shuttle"!==u&&0===V.length&&!!p&&(0,o.createComponentVNode)(2,i.Button,{color:"bad",icon:"exclamation-triangle",disabled:f||!p,content:"Blind Drop",onClick:function(){return a("random")}}),children:0===V.length&&(0,o.createComponentVNode)(2,i.Box,{mb:1.7,color:"bad",children:"Not Available"})||1===V.length&&(0,o.createComponentVNode)(2,i.Box,{mb:1.7,color:"average",children:c(V,C)})||(0,o.createComponentVNode)(2,i.Dropdown,{mb:1.7,over:!0,width:"240px",options:V.map((function(e){return e.name})),disabled:h||f,selected:c(V,C)||"Select a Destination",onSelected:function(e){return a("set_destination",{destination:l(V,e)})}})})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Depart",disabled:!c(V,C)||h||f||"Idle"!==m,icon:"arrow-up",textAlign:"center",onClick:function(){return a("move",{shuttle_id:C})}})]})]})};t.ShuttleConsoleContent=d},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===d,onClick:function(){return u(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,c);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,s);default:return"WE SHOULDN'T BE HERE!"}}(d)]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.shuttles;return(0,o.createComponentVNode)(2,i.Box,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return a("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return a("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.templates_tabs,s=c.existing_shuttle,d=c.templates;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:e===s.id,icon:"file",content:e,onClick:function(){return a("select_template_category",{cat:e})}},e)}))}),!!s&&d[s.id].templates.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{content:"Load Template",icon:"download",onClick:function(){return a("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.existing_shuttle,s=c.selected;return(0,o.createComponentVNode)(2,i.Box,{children:[l?(0,o.createComponentVNode)(2,i.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return a("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,i.Section,{title:"Selected Shuttle: None"}),s?(0,o.createComponentVNode)(2,i.Section,{title:"Selected Template: "+s.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[s.description&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:s.description}),s.admin_notes&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Admin Notes",children:s.admin_notes}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Preview",icon:"eye",onClick:function(){return a("preview",{shuttle_id:s.shuttle_id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Load",icon:"download",onClick:function(){return a("load",{shuttle_id:s.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,i.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],d={average:[.25,.5],bad:[.5,Infinity]},u=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,p):(0,o.createComponentVNode)(2,g));return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var p=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},m=function(e,t){var n=(0,i.useBackend)(t),c=n.act,s=n.data,d=s.occupant,p=s.auto_eject_dead;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,a.Button,{icon:p?"toggle-on":"toggle-off",selected:p,content:p?"On":"Off",onClick:function(){return c("auto_eject_dead_"+(p?"off":"on"))}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",content:"Eject",onClick:function(){return c("ejectify")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(d.health,0)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d.maxTemp,value:d.bodyTemperature/d.maxTemp,color:u[d.temperatureSuitability+3],children:[(0,r.round)(d.btCelsius,0),"\xb0C,",(0,r.round)(d.btFaren,0),"\xb0F"]})}),!!d.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d.bloodMax,value:d.bloodLevel/d.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[d.bloodPercent,"%, ",d.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[d.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:d,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.hasOccupant,s=c.isBeakerLoaded,d=c.beakerMaxSpace,u=c.beakerFreeSpace,p=c.dialysis&&u>0;return(0,o.createComponentVNode)(2,a.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:!s||u<=0||!l,selected:p,icon:p?"toggle-on":"toggle-off",content:p?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:s?(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d,value:u/d,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[u,"u"]})})}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.occupant,s=c.chemicals,d=c.maxchem,u=c.amounts;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Chemicals",flexGrow:"1",children:s.map((function(e,t){var n,i="";return e.overdosing?(i="bad",n=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(i="average",n=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,a.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d,value:e.occ_amount/d,color:i,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",d,"u"]}),u.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{disabled:!e.injectable||e.occ_amount+t>d||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SlotMachine=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,s=c.data;return null===s.money?(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,i.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===s.plays?s.plays+" player has tried their luck today!":s.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:s.money})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"50 credits to spin",children:(0,o.createComponentVNode)(2,i.Button,{icon:"coins",disabled:s.working,content:s.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,lineHeight:2,color:s.resultlvl,children:s.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.secure,d=l.can_dry,u=l.drying,p=l.contents;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[!!s&&(0,o.createComponentVNode)(2,i.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!d&&(0,o.createComponentVNode)(2,i.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,i.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return c("drying")}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Contents",children:[!p&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:" No products loaded. "}),!!p&&p.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return c("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,i.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return c("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return c("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),i=n(2),a=n(100),c=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.capacityPercent,u=(s.capacity,s.charge),p=s.inputAttempt,m=s.inputting,h=s.inputLevel,f=s.inputLevelMax,C=s.inputAvailable,g=s.outputAttempt,N=s.outputting,b=s.outputLevel,V=s.outputLevelMax,v=s.outputUsed,x=(d>=100?"good":m&&"average")||"bad",y=(N?"good":u>0&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:.01*d,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Input",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:p?"sync-alt":"times",selected:p,onClick:function(){return l("tryinput")},children:p?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:x,children:(d>=100?"Fully Charged":m&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available",children:(0,a.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:g?"power-off":"times",selected:g,onClick:function(){return l("tryoutput")},children:g?"On":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:y,children:N?"Sending":u>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===b,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===b,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:b/1e3,minValue:0,maxValue:V/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:b===V,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:b===V,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outputting",children:(0,a.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.generated,d=l.generated_ratio,u=l.tracking_state,p=l.tracking_rate,m=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,g=l.rotating_direction;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return c("refresh")}}),children:(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Solar panels",color:m>0?"good":"bad",children:m})]})}),(0,o.createComponentVNode)(2,i.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:d,children:s+" W"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tracker rotation",children:[2===u&&(0,o.createComponentVNode)(2,i.Box,{children:" Automated "}),1===u&&(0,o.createComponentVNode)(2,i.Box,{children:[" ",p,"\xb0/h (",g,") "]}),0===u&&(0,o.createComponentVNode)(2,i.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Panel orientation",children:[2!==u&&(0,o.createComponentVNode)(2,i.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return c("cdir",{cdir:t})}}),2===u&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Off",selected:0===u,onClick:function(){return c("track",{track:0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"clock-o",content:"Timed",selected:1===u,onClick:function(){return c("track",{track:1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Auto",selected:2===u,disabled:!h,onClick:function(){return c("track",{track:2})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tracker rotation",children:[1===u&&(0,o.createComponentVNode)(2,i.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:p,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return c("tdir",{tdir:t})}}),0===u&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"19px",children:" Tracker offline "}),2===u&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return c("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return c("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,i.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,i.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,i.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=t.SpiderOS=void 0;var o=n(0),r=n(1),i=n(2),a=n(64),c=n(3);t.SpiderOS=function(e,t){var n,a=(0,r.useBackend)(t),f=a.act,C=a.data;return 0===C.suit_tgui_state?n=(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex,{direction:"column",width:"60%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{backgroundColor:"rgba(0, 0, 0, 0)",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,i.Flex.Item,{mt:2.2,backgroundColor:"rgba(0, 0, 0, 0)",children:(0,o.createComponentVNode)(2,p)})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",height:"190px",grow:1,backgroundColor:"rgba(0, 0, 0, 0)",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})]}):1===C.suit_tgui_state&&(n=(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",direction:"column",shrink:1,spacing:1,children:(0,o.createComponentVNode)(2,i.Flex.Item,{backgroundColor:"rgba(0, 0, 0, 0.8)",height:"100%",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,h,{allMessages:C.current_load_text,finishedTimeout:3e3,current_initialisation_phase:C.current_initialisation_phase,end_terminal:C.end_terminal,onFinished:function(){return f("set_UI_state",{suit_tgui_state:0})}})]})})),(0,o.createComponentVNode)(2,c.Window,{theme:"spider_clan",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:1,children:n})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,a=n.allStylesPreview,c=n.style_preview_icon_state;return(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0441\u0442\u044e\u043c\u0430",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u0442\u044e\u043c\u0430! \u041d\u0430\u0448\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0442\u0435\u0440\u044f\u044f \u043e\u0431\u043e\u0440\u043e\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u0447\u0435\u0441\u0442\u0432. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043a\u043e\u0441\u0442\u044e\u043c\u0430, \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0443\u0431\u0438\u0439\u0446\u044b.",tooltipPosition:"bottom-left"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",grow:1,alignContent:"center",children:(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.Section,{style:{background:"rgba(4, 74, 27, 0.75)"},mr:10,ml:10,children:(0,o.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+a[c],style:{"margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})})})})},s=function(e,t){var n,a,c,l,s=(0,r.useBackend)(t),d=s.act,u=s.data,p=u.designs,m=u.design_choice,h=u.scarf_design_choice,f=u.colors,C=u.color_choice,g=u.genders,N=u.preferred_clothes_gender,b=u.suit_state,V=u.preferred_scarf_over_hood,v=u.show_charge_UI,x=u.has_martial_art,y=u.show_concentration_UI;return n=0===b?"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c":"\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c",a=0===V?"\u041a\u0430\u043f\u044e\u0448\u043e\u043d":"\u0428\u0430\u0440\u0444",c=1===V?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0421\u0442\u0438\u043b\u044c \u0448\u0430\u0440\u0444\u0430",content:(0,o.createComponentVNode)(2,i.Dropdown,{options:p,selected:h,onSelected:function(e){return d("set_scarf_design",{scarf_design_choice:e})}})}):null,l=x?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0446\u0438\u044f",content:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:y,width:"78px",textAlign:"left",content:y?"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c":"\u0421\u043a\u0440\u044b\u0442\u044c",onClick:function(){return d("toggle_ui_concentration")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",content:"?",tooltip:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043b\u0438 \u0432\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u0438\u0441\u0441\u043a\u0443\u0441\u0442\u0432\u0430.",tooltipPosition:"top-left"})]})}):null,(0,o.createComponentVNode)(2,i.Flex,{direction:"row",grow:1,alignContent:"center",ml:.5,children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,width:"100%",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0421\u0442\u0438\u043b\u044c",children:(0,o.createComponentVNode)(2,i.Dropdown,{options:p,selected:m,onSelected:function(e){return d("set_design",{design_choice:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0426\u0432\u0435\u0442",children:(0,o.createComponentVNode)(2,i.Dropdown,{options:f,selected:C,onSelected:function(e){return d("set_color",{color_choice:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0416\u0435\u043d\u0441\u043a\u0438\u0439/\u041c\u0443\u0436\u0441\u043a\u043e\u0439",children:(0,o.createComponentVNode)(2,i.Dropdown,{options:g,selected:N,onSelected:function(e){return d("set_gender",{preferred_clothes_gender:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0428\u0430\u0440\u0444/\u041a\u0430\u043f\u044e\u0448\u043e\u043d",children:[(0,o.createComponentVNode)(2,i.Button,{className:0===b?"":"Button_disabled",width:"78px",selected:V,disabled:b,textAlign:"left",content:a,onClick:function(){return d("toggle_scarf")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",content:"?",tooltip:'\u0421 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 "\u0428\u0430\u0440\u0444" \u0432\u0430\u0448 \u043a\u0430\u043f\u044e\u0448\u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u043b\u043e\u0441\u044b. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0433\u043e\u043b\u043e\u0432\u0430 \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u0430! \u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0435 \u043d\u0430\u043d\u043e-\u0432\u043e\u043b\u043e\u043a\u043d\u0430 \u043a\u043e\u0441\u0442\u044e\u043c\u0430 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044e\u0442 \u043d\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0433\u0440\u043e\u0437\u044b \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u044f \u0432\u0430\u0448\u0443 \u0433\u043e\u043b\u043e\u0432\u0443! \u0423\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435: \u043d\u0430\u043d\u043e\u0432\u043e\u043b\u043e\u043a\u043d\u0430 \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0433\u043e\u043b\u043e\u0432\u043d\u044b\u0445 \u0443\u0431\u043e\u0440\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u0435\u0445 \u0432 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0435.',tooltipPosition:"top-left"})]}),c,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0430\u0440\u044f\u0434 \u043a\u043e\u0441\u0442\u044e\u043c\u0430",children:[(0,o.createComponentVNode)(2,i.Button,{selected:v,width:"78px",textAlign:"left",content:v?"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c":"\u0421\u043a\u0440\u044b\u0442\u044c",onClick:function(){return d("toggle_ui_charge")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",content:"?",tooltip:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0437\u0430\u0440\u044f\u0434 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u0442\u044e\u043c\u0430.",tooltipPosition:"top-left"})]}),l]})}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_"+C,success:0,danger:0,mt:-1.2,align:"center",children:(0,o.createComponentVNode)(2,i.Button,{width:"80%",icon:"power-off",mt:.5,textAlign:"center",content:n,tooltip:"\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043d\u0451\u043c \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445. \n\u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043b\u044e\u0431\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0441\u0442\u044e\u043c \u0431\u0443\u0434\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d. \n\u0422\u0430\u043a \u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u0441\u0442\u044e\u043c \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0437\u0430\u0440\u044f\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \n\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0441\u0442\u044e\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043d\u044f\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d. \n\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u043e\u0432\u043d\u043e \u043a\u0430\u043a \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0441\u0442\u044e\u043c\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0432\u0440\u0430\u0433\u0430!",tooltipPosition:"top-left",onClick:function(){return d("initialise_suit")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t).data.allActionsPreview;return(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u043e\u0432\u0435\u0442\u044b \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041c\u043e\u043b\u043e\u0434\u044b\u043c \u0443\u0431\u0438\u0439\u0446\u0430\u043c \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0445 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a. \n\u042d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043c\u0438\u0441\u0441\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u0432\u044b\u0434\u0430\u0434\u0443\u0442 \u0438\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043c\u0430\u043b\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0441\u0432\u043e\u044e \u043f\u043e\u043b\u044c\u0437\u0443.",tooltipPosition:"bottom-left"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",grow:1,alignContent:"center",children:(0,o.createComponentVNode)(2,i.Flex.Item,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ninja_teleport,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u044f \u0438 \u0448\u0430\u0442\u0442\u043b",content:"\u0412 \u0432\u0430\u0448\u0435\u043c \u0414\u043e\u0434\u0437\u0451 \u0435\u0441\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0422\u043e\u0447\u043a\u0430 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f, \u043d\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438\u0434\u0451\u0442 \u043d\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u043e\u043d\u043d\u0435\u043b\u0438 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438\u043b\u0438 \u043c\u0430\u043b\u043e\u043f\u043e\u0441\u0435\u0449\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \n\u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u043d\u0438\u044f. \n\u041f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0448\u0430\u0442\u0442\u043b\u0430, \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0435\u0431\u0435 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0430\u0434. \n\u0422\u0430\u043a \u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u0442\u0435 \u043f\u043e\u043b\u0435\u0442\u0435\u0442\u044c \u043d\u0430 \u0448\u0430\u0442\u0442\u043b\u0435, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0432\u0430\u043c, \u0447\u0442\u043e \u0432\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u0440\u0430\u0436\u0438 \u0448\u0430\u0442\u0442\u043b\u0430 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043b\u0438\u0446, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.headset_green,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0430\u0448 \u043d\u0430\u0443\u0448\u043d\u0438\u043a",content:"\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043d\u0430\u0443\u0448\u043d\u0438\u043a\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0439, \u043d\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043c\u043e\u0449\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438. \u0412 \u043d\u0435\u0433\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0432\u0430\u0448\u0438\u043c \u0431\u043e\u0440\u0433\u043e\u043c \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0447\u043b\u0435\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u043d\u0430. \n\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u043d \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u0443\u0448\u043d\u0438\u043a\u0438 \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u043a\u0438 \u0438/\u0438\u043b\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u043a\u0430\u043d\u0430\u043b\u044b \u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0430\u043c \u043c\u0435\u0441\u0442\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u0441\u0432\u044f\u0437\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \n\u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u0448 \u043d\u0430\u0443\u0448\u043d\u0438\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438- \u0447\u0435\u0441\u043a\u0438 \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0432\u0430\u043c \u0441\u0430\u043c\u0438\u043c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c\u0438.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ninja_sleeper,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041f\u043e\u0445\u0438\u0449\u0435\u043d\u0438\u0435 \u044d\u043a\u0438\u043f\u0430\u0436\u0430",content:"\u041f\u043e\u0440\u043e\u0439 \u043a\u043b\u0430\u043d\u0443 \u043d\u0443\u0436\u043d\u044b \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u043b\u044e\u0434\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0435 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0412 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0430\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043e\u0441\u043e\u0431\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0443\u0436\u043e\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0430. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u0441\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u0440\u0443\u043f\u0438\u0446\u0430\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u043f\u043e\u0445\u0438\u0449\u0430\u0442\u044c \u043b\u044e\u0434\u0435\u0439. \n\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0445\u0438- \u0442\u0438\u0442\u044c \u043b\u044e\u0434\u0435\u0439. \u0423 \u0432\u0430\u0441 \u043d\u0430 \u0448\u0430\u0442\u0442\u043b\u0435 \u0435\u0441\u0442\u044c \u0441\u043a\u0430\u0444\u0430\u043d\u0434\u0440\u044b, \u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0437\u0430\u043f\u0430\u0441 \u043d\u0430- \u0440\u0443\u0447\u043d\u0438\u043a\u043e\u0432, \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434\u0430 \u0438 \u0431\u0430\u043b\u043b\u043e- \u043d\u043e\u0432. \n\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043b\u044e\u0434\u0435\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043c\u043f\u0443\u043b\u044c\u0441, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u0442\u0430\u043d\u044f \u0438\u0445 \u043d\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. ",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ai_face,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0430\u0431\u043e\u0442\u0430\u0436 \u0418\u0418",content:"\u0418\u043d\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0437\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u0430\u0431\u043e- \u0442\u0430\u0436 \u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u0440\u043e- \u0446\u0435\u0441\u0441 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u043e\u0442 \u043d\u0430\u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \n\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043b\u0430\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0439 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0418\u0418 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0418\u0418 \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u044b\u043c\u0438 \u0437\u0430\u043a\u043e\u043d\u0430\u043c\u0438, \u043d\u043e \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441 \u0432 \u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u0437\u043b\u043e\u043c\u0430 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439. \u0422\u0430\u043a \u0436\u0435 \u0432\u0437\u043b\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435\u043b\u0451\u0433\u043a\u0430\u044f - \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u0435\u0441\u0442\u044c \u0432\u0435\u0437\u0434\u0435. \u0410 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f. \u041d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c \u0435\u0441\u043b\u0438 \u0418\u0418 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0434\u0435\u0439\u0441\u0442- \u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u043c \u0435\u0433\u043e \u0441\u043b\u043e\u043c\u0430\u0442\u044c.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ninja_borg,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0430\u0431\u043e\u0442\u0430\u0436 \u0440\u043e\u0431\u043e\u0442\u043e\u0432",content:'\u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044f \u0432\u0430\u0448\u0438 \u0448\u0430\u043d\u0441\u044b \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0441\u0441\u0438\u0438 \u0434\u043b\u044f \u0438\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0430\u0445, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u043e\u0431\u043e\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u0435\u0439, \u043c\u044b \u0434\u0430\u0451\u043c \u0432\u0430\u043c \u043e\u0441\u043e\u0431\u044b\u0439 "\u0423\u043b\u0443\u0447\u0448\u0430\u044e\u0449\u0438\u0439" \u0438\u0445 \u043f\u0440\u0438\u0431\u043e\u0440, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0438. \n\u041f\u0440\u0438 \u0432\u0437\u043b\u043e\u043c\u0435 \u043a\u0438\u0431\u043e\u0440\u0433\u0430 \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u0438\u0431\u043e\u0440\u043e\u043c(\u0412\u0437\u043b\u043e\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f) \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043b\u043e\u044f\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u043d\u0443 \u0438 \u0432\u0430\u043c \u043b\u0438\u0447\u043d\u043e \u0441\u043b\u0443\u0433\u0443 \u0441\u043f\u043e\u0441\u043e\u0431- \u043d\u043e\u0433\u043e \u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u0430\u043a \u0432 \u0441\u0430\u0431\u043e\u0442\u0430\u0436\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0442\u0430\u043a \u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u0438. \n\u0422\u0430\u043a \u0436\u0435 \u0440\u043e\u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043d\u0430\u0449\u0451\u043d \u043b\u0438\u0447\u043d\u043e\u0439 \u043a\u0430\u0442\u0430\u043d\u043e\u0439, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u0438\u043d\u043f\u043e\u0438\u043d\u0442\u0435\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0435\u043c\u0443 \u043d\u0430 \u0432\u0430\u0441 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u044e\u0440\u0438\u043a\u0435\u043d\u043e\u0432. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u0442\u0430\u043d\u0430 \u0440\u043e\u0431\u043e\u0442\u0430 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0431\u043b\u044e\u0441\u043f\u0435\u0439\u0441 \u0442\u0440\u0430\u043d\u0441\u043b\u043e\u043a\u0430\u0446\u0438\u044e!',position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.server,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0430\u0431\u043e\u0442\u0430\u0436 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439",content:"\u041d\u0430 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043e\u0431\u044c\u0435\u043a\u0442\u0430\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u0447\u0451\u043d\u044b\u0445 \u0438 \u043c\u043d\u043e- \u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e- \u0434\u0438\u0442\u0441\u044f \u0433\u0434\u0435 \u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0441\u0442\u0443- \u043f\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0410 \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0447\u043d\u043e \u0433\u0440\u044b\u0437\u0443\u0442\u0441\u044f \u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u044f. \u0427\u0442\u043e \u043d\u0430\u043c \u043d\u0430 \u0440\u0443\u043a\u0443. \n\u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0440\u0443\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u043c\u0438\u0441\u0441\u0438\u0435\u0439 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430. \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430 \u0438\u0445 \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0432\u0441\u0435 \u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0443\u0442\u0435\u0440\u044f\u043d\u044b. \n\u041d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0438\u0440\u0443\u0441\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0431\u044c\u0435\u043a\u0442\u043e\u0432 \u043d\u0435 \u0434\u0440\u0435\u043c\u043b\u044e\u0442. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e \u0432\u0430\u0448\u0435\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u0437\u043b\u043e\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0451\u043d \u043c\u0435\u0441\u0442\u043d\u044b\u0439 \u0418\u0418. \u0411\u0443\u0434\u044c\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u044d\u0442\u043e\u043c\u0443.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.buckler,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0417\u0430\u0449\u0438\u0442\u0430 \u0446\u0435\u043b\u0438",content:'\u0418\u043d\u043e\u0433\u0434\u0430 \u0431\u043e\u0433\u0430\u0442\u044b\u0435 \u0448\u0438\u0448\u043a\u0438 \u043f\u043b\u0430\u0442\u044f\u0442 \u0437\u0430 \u0443\u0441\u043b\u0443\u0433\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u0446\u0435\u043b\u044c \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \n * \u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044f\u0437\u0430\u043d \u0434\u043e\u0436\u0438\u0442\u044c \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u043c\u0435\u043d\u044b! \n * \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u044b\u0439 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435. \u0418 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u0437\u043d\u0430\u043b! \n * \u041d\u0435 \u0432\u0430\u0436\u043d\u043e \u043a\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043e\u0445\u043e\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e, \u043d\u043e \u0434\u043b\u044f \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u0433\u0434\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043c\u0438\u0441\u0441\u0438\u044f \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u0436\u0435\u043b\u0430\u043d\u043d\u043e\u0435 \u043b\u0438\u0446\u043e. \u041d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0439\u0442\u0435 \u0441\u0435\u0431\u044f \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043d\u0430 \u0432\u0430\u0441 \u0441\u0430\u043c\u0438\u0445 \u043d\u0435 \u0432\u0435\u043b\u0438 \u043e\u0445\u043e\u0442\u0443! \n\u0422\u0430\u043a \u0436\u0435 \u043c\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u043d \u043d\u0435 \u043e\u0434\u043e\u0431\u0440\u044f\u0435\u0442 \u0432\u0430\u0440\u0432\u0430\u0440\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b "\u0417\u0430\u0449\u0438\u0442\u044b" \u0446\u0435\u043b\u0438. \u041d\u0435\u0442 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0430\u0434\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043a\u043b\u0435\u0442\u043a\u0443 \u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u0438\u043c \u0442\u0430\u043c! \u041d\u0435 \u043f\u043e\u0440\u0442\u0438\u0442\u0435 \u043d\u0430\u0448\u0443 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u044e \u0432 \u0433\u043b\u0430\u0437\u0430\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432!',position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.cash,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041a\u0440\u0430\u0436\u0430 \u0434\u0435\u043d\u0435\u0433",content:"\u041a\u0430\u043a \u0431\u044b \u044d\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e. \u0418\u043d\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u043d \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0435\u043d\u044c- \u0433\u0430\u0445. \u0418\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0437\u0430\u0434\u043e\u043b\u0436\u0430\u043b\u0438 \u043d\u0430\u043c. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0430\u0434\u0438\u043c \u0432\u0430\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0441 \u044d\u0442\u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \n\u0414\u043b\u044f \u0432\u0430\u0441 \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0442\u0440\u0443\u0434\u043d\u0430\u044f, \u043d\u043e \u0432\u0440\u0435\u043c\u044f\u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430\u044f. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0445 \u043a\u0430\u0440\u043c\u0430\u043d\u043d\u044b\u0445 \u043a\u0440\u0430\u0436. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0440\u0430\u0436\u0438 \u0447\u0443\u0436\u0438\u0445 \u043a\u0430\u0440\u0442 \u0438 \u043e\u0431\u043d\u0430\u043b\u0438\u0447\u0438- \u0432\u0430\u043d\u0438\u044f \u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432. \u041b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u0448\u0435 \u0438 \u043e\u0433\u0440\u0430\u0431\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435. \u0414\u043e\u0441\u0442\u0430\u043d\u044c\u0442\u0435 \u044d\u0442\u0438 \u0434\u0435\u043d\u044c\u0433\u0438!",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.handcuff,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430",content:"\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0447\u0443\u0436\u043e\u0439 \u043f\u043e\u0437\u043e\u0440 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0447\u0435\u043c \u0441\u043c\u0435\u0440\u0442\u044c. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u0430\u043c \u043f\u0440\u0438\u0439\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u0442\u044c \u043a\u0440\u0435\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0443 \u0436\u0435\u0440\u0442\u0432\u0443 \u043f\u043e \u0437\u0430\u043a\u043e\u043d\u043d\u044b\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0443\u043f\u0435\u043a\u043b\u0438 \u0437\u0430 \u0440\u0435\u0448\u0451\u0442\u043a\u0443 \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0446\u0435\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434. \u041d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u0438 \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0435\u043b\u0438 \u0441\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 - \u043d\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043c\u0435\u0442\u043e\u0434. \u0426\u0435\u043b\u044c \u043b\u0435\u0433\u043a\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u044e\u0442 \u0432 \u0441\u0443\u0434\u0435, \u0447\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \n \u0423 \u0432\u0430\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043f\u0440\u0435\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u0446\u0435\u043b\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0441\u043b\u0438\u0448- \u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0439. \u041b\u0438\u0448\u043d\u044f\u044f \u0434\u044b\u0440\u0430 \u0432 \u043e\u0431\u0448\u0438\u0432\u043a\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438\u043b\u0438 \u0442\u0440\u0443\u043f\u044b - \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0448\u0430\u043d\u0441\u044b \u043f\u0440\u043e\u0432\u0430\u043b\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u043d\u0430.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.spider_charge,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041f\u043e\u0434\u0440\u044b\u0432 \u043e\u0442\u0434\u0435\u043b\u0430",content:"\u0421\u0442\u0430\u0440\u044b\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u0431\u043e\u043c\u0431\u044b. \u042d\u0444\u0444\u0435\u043a- \u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u0440\u0443\u0434\u0438\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0436\u0438\u0432\u043e\u0433\u043e \u0438 \u043d\u0435\u0436\u0438\u0432\u043e\u0433\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0430\u0434\u0438\u0443\u0441\u0435. \u041a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0441\u044f\u0442 \u043f\u043e\u0434\u043e\u0440\u0432\u0430\u0442\u044c \u043e\u0431\u044c\u0435\u043a\u0442, \u043e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f. \u041d\u043e \u0440\u0435\u0434\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u0441\u0434\u0430\u0442\u044c\u0441\u044f. \u041a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b \u043d\u0430 \u043f\u043e\u0434\u0440\u044b\u0432 \u043e\u0434\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u0430. \n\u0411\u0443\u0434\u044c\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u0437\u0440\u044b\u0432\u0430 \u043d\u0430 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438\u0441\u044c \u043e\u0445\u043e\u0442\u0430. \n \u041d\u0430\u0448\u0438 \u0431\u043e\u043c\u0431\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u044f\u043c\u0438. \u041d\u0438\u043a\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u0432\u0430\u0441 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0445 \u043f\u043e\u0434\u043e\u0440\u0432\u0430\u0442\u044c \u0438 \u0434\u0430\u0436\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043b\u0438\u0448\u044c \u0432 \u0437\u043e\u043d\u0435 \u0437\u0430\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c. \u0421\u043e\u0432\u0435\u0442\u0443\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u0425\u043e\u0442\u044f \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.BSM,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0410\u043d\u0430\u043b\u0438\u0437 \u043a\u0440\u043e\u0432\u0438",content:'"\u0417\u043d\u0430\u0439 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0430\u0433\u0430" - \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0441\u0442\u0438\u043d\u0430. \n\u0417\u0430 \u0433\u043e\u0434\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u043d\u0430 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0442\u0432\u0430\u0440\u0435\u0439. \u0418 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e- \u0442\u043e\u0440\u044b\u0445. \u0410 \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e, \u0447\u0442\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b. \u041a\u0440\u043e\u0432\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043d\u0430\u0448\u0438\u043c \u0443\u0447\u0451\u043d\u044b\u043c. \n\u0418\u043c\u0435\u044e\u0449\u0430\u044f\u0441\u044f \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0446\u0435\u043d\u0442\u0440\u0438\u0444\u0443\u0433\u0430 \u0434\u043b\u044f \u043a\u0440\u043e\u0432\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0432 \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430\u043c. \n\u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0440\u043e\u0432\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c 3 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u0430. \u0418 \u043f\u043e\u043c\u0435- \u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u0432 \u043f\u0440\u043e\u0431\u0438\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \n\u041f\u0440\u0438\u043c\u0435\u0441\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442!',position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.changeling,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0413\u0435\u043d\u043e\u043a\u0440\u0430\u0434\u044b",content:"\u0427\u0435\u0440\u0432\u0438 \u0432\u043e\u0437\u043e\u043c\u043d\u0438\u0432\u0448\u0438\u0435 \u0441\u0435\u0431\u044f \u0432\u044b\u0448\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0443\u043c\u0435\u044e\u0442 \u043a\u0440\u0430\u0441\u0442\u044c \u0433\u0435\u043d\u044b \u0438 \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445. \n\u0421\u0432\u043e\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0431- \u043b\u0435\u043c, \u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u044b. \n\u042d\u0442\u0438 \u0442\u0432\u0430\u0440\u0438 \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u0445\u0438\u0442\u0440\u044b \u0441\u043a\u043e\u043b\u044c \u0438 \u0441\u043a\u0440\u044b\u0442\u043d\u044b. \u041d\u0435 \u0434\u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0441 \u043d\u0438\u043c\u0438 \u043d\u0438 \u043e \u0447\u0451\u043c! \n\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u0436\u0435 \u043d\u0430\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u0433\u0435\u043d\u043e\u043a\u0440\u0430\u0434\u0430 \u043d\u0435 \u0437\u0430\u043f\u0438\u0445- \u043d\u0443\u0432 \u0435\u0433\u043e \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u044e \u0438 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432. \u041d\u043e \u043e\u043d\u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u044b\u0434\u0430\u044e\u0442 \u0441\u0435\u0431\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438. \u0418 \u0442\u0430\u043a \u0436\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043b\u043e\u0436\u0430\u0442\u0441\u044f \u043d\u0430 \u0434\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u0447\u0435 \u0438\u0445 \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0434\u0430\u0439\u0442\u0435 \u0438\u043c \u043f\u043e\u043f\u043b\u044f\u0441\u0430\u0442\u044c, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0446\u0435\u043d\u0443. \u0418 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0443\u0448\u0430\u0439\u0442\u0435 \u0440\u0430\u0434\u0438\u043e \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0445\u0440\u0430\u043d\u0430 \u0443\u0436\u0435 \u043e\u0445\u043e\u0442\u0438\u0442\u0441\u044f \u0437\u0430 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0438\u0445. \n\u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c \u0441 \u044d\u0442\u0438\u043c...",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.vampire,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0430\u043c\u043f\u0438\u0440\u044b",content:"\u0414\u0435\u0448\u0451\u0432\u044b\u0435 \u0440\u043e\u043c\u0430\u043d\u044b, \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0438 \u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0432\u0430\u043c\u043f\u0438\u0440\u043e\u0432 \u043a\u0430\u043a \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u044c\u044e\u0449\u0438\u0445 \u043a\u0440\u043e\u0432\u044c \u043b\u044e\u0434\u0435\u0439 \u0432 \u043d\u043e\u0447\u0438 \u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e- \u0449\u0438\u0445 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e- \u0441\u0442\u044f\u043c\u0438. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0435\u043d\u0435\u0435 \u0440\u043e\u043c\u0430\u043d\u0442\u0438\u0447\u043d\u044b... \n\u041c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043d\u043e \u043d\u0430\u0448\u0438 \u043f\u043e\u0434\u043e\u0437\u0440\u0435- \u043d\u0438\u044f \u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0439 \u0431\u043b\u044e\u0441\u043f\u0435\u0439\u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0432\u0430\u043c\u043f\u0438\u0440 \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438 \u0438\u043b\u0438 \u0443\u0433\u0440\u043e\u0436\u0430\u0435\u0442 \u0432\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438. \u0412\u044b \u0432\u043e\u043b\u044c\u043d\u044b \u0435\u0433\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \n\u0412\u0430\u043c\u043f\u0438\u0440\u044b \u043e\u0447\u0435\u043d\u044c \u043e\u043f\u0430\u0441\u043d\u044b \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438, \u043e\u043d\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043e\u0433\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u0438 \u043f\u043e\u0440\u0430\u0431\u043e\u0449\u0430\u0442\u044c \u0440\u0430\u0437\u0443\u043c \u0441\u0432\u043e\u0438\u0445 \u0436\u0435\u0440\u0442\u0432. \u041d\u0435 \u0434\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0438\u043c, \u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u0435 - \u043e\u043d\u0438 \u043b\u0438\u0448\u044c \u0436\u0435\u0440\u0442\u0432\u044b \u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432. \u0418 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u044e \u043f\u043e\u043b\u044c\u0437\u0443...",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.syndicate,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0438\u043d\u0434\u0438\u043a\u0430\u0442",content:"\u041d\u0430\u0448\u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435. \u0421\u0431\u043e\u0440\u0438\u0449\u0435 \u043c\u043e\u0433\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0444\u0438\u0433\u0443\u0440 \u0432 \u043f\u043e\u0434\u043f\u043e\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043c\u0430\u043b\u043e... \n\u0421\u0438\u043d\u0434\u0438\u043a\u0430\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432. \u041d\u043e \u0441\u0430\u043c\u043e\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439, \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u0442\u043e \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0445 \u0438\u0437\u0443\u0447\u0438\u0442, \u0447\u0435\u0440\u0442\u043e\u0439 \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b - \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u043d\u0435\u043d\u0430\u0432\u0438\u0441\u0442\u044c \u043a \u041d\u0422. \n\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0441 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0421\u0438\u043d\u0434\u0438\u043a\u0430\u0442\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u0430. \n\u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u043d\u0438\u044f. \u041c\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u043c \u0438\u043c.",position:"bottom-left"})]})]})})})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.allActionsPreview,s=c.blocked_TGUI_rows,d=[{blue:"Button_blue",green:"Button_green",red:"Button_red",disabled:"Button_disabled"}];return(0,o.createComponentVNode)(2,i.Section,{title:"\u041c\u043e\u0434\u0443\u043b\u0438 \u043a\u043e\u0441\u0442\u044e\u043c\u0430",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u0442\u044e\u043c\u0430! \u0414\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 3 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0418\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0441\u0442\u044e\u043c\u0430, \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0438\u0437 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432",tooltipPosition:"bottom"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",alignContent:"center",ml:1.5,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"33%",shrink:1,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0440\u0438\u0437\u0440\u0430\u043a",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0421\u043a\u0440\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u0440\u0435\u0434\u0438 \u0432\u0440\u0430\u0433\u043e\u0432, \u043d\u0430\u043f\u0430\u0434\u0430\u0439\u0442\u0435 \u0438\u0437 \u0442\u0435\u043d\u0438 \u0438 \u0431\u0443\u0434\u044c\u0442\u0435 \u043d\u0435\u0437\u0440\u0438\u043c\u043e\u0439 \u0443\u0433\u0440\u043e\u0437\u043e\u0439, \u0432\u0441\u0451 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e \u0432\u0430\u0441 \u0438 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0443\u0437\u043d\u0430\u043b! \u0411\u0443\u0434\u044c\u0442\u0435 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b \u043a\u0430\u043a \u043f\u0440\u0438\u0437\u0440\u0430\u043a!",tooltipPosition:"bottom"}),style:{"text-align":"center",background:"rgba(53, 94, 163, 0.8)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:s[0]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[0],onClick:function(){return a("give_ability",{style:"smoke",row:"1"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.smoke,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0414\u042b\u041c\u041e\u0412\u0410\u042f \u0417\u0410\u0412\u0415\u0421\u0410",content:"\u0412\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0431\u043b\u0430\u043a\u043e \u0434\u044b\u043c\u0430 \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u0432\u0440\u0430\u0433\u043e\u0432. \n\u042d\u0442\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u0430\u0448\u0438\u043c \u0432\u0438\u0437\u043e\u0440\u043e\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0442\u0435\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0435\u0440\u0430. \n\u0410 \u0442\u0430\u043a \u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u0433\u043e \u043f\u043e\u0436\u0435\u043b\u0430\u0435\u0442\u0435. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 1000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 250 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[1]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[1],onClick:function(){return a("give_ability",{style:"ninja_cloak",row:"2"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.ninja_cloak,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041d\u0415\u0412\u0418\u0414\u0418\u041c\u041e\u0421\u0422\u042c",content:"\u0412\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0435\u0431\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441\u043a\u0440\u044b\u0432\u0430- \u044e\u0449\u0435\u0435 \u0432\u0430\u0441 \u0438\u0437 \u0432\u0438\u0434\u0443 \u0438 \u043f\u0440\u0438\u0433\u043b\u0443\u0448\u0430- \u044e\u0449\u0435\u0435 \u0432\u0430\u0448\u0438 \u0448\u0430\u0433\u0438. \n\u041f\u043e\u043b\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u0440\u0443\u043f\u043a\u043e\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0435\u0442\u0435\u0442\u044c\u0441\u044f \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0437\u043a\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u043b\u0438 \u0443\u0434\u0430\u0440\u0430. \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0425\u043e\u0442\u044c \u043f\u043e\u043b\u0435 \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0443\u0431\u0438\u0439\u0446\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0445\u043b\u0430\u0434\u043d\u043e\u043a\u0440\u043e\u0432\u0435\u043d. \n\u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439. \n\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0431\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0441\u0445\u043e\u0434 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 15 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[2]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[2],onClick:function(){return a("give_ability",{style:"ninja_clones",row:"3"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.ninja_clones,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041d\u0415\u0420\u0413\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0415 \u041a\u041b\u041e\u041d\u042b",content:"\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0432\u0443\u0445 \u043a\u043b\u043e\u043d\u043e\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u0431\u0438\u0442\u0432\u0435 \u0438 \u0434\u0435\u0437\u043e\u0440\u0438\u0435\u043d\u0442\u0438- \u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430 \n\u0422\u0430\u043a \u0436\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u043c\u0435\u0449\u0430\u0435\u0442 \u0432\u0430\u0441 \u0438 \u0432\u0430\u0448\u0438\u0445 \u043a\u043b\u043e\u043d\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u0440\u0430\u0434\u0438\u0443\u0441\u0435 \u043f\u0430\u0440\u044b \u043c\u0435\u0442\u0440\u043e\u0432. \n\u041f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0435\u0440\u0435\u0442\u044c \u0432\u0430\u0441 \u0437\u0430 4-\u043c\u044f \u0441\u0442\u0435\u043d\u0430\u043c\u0438. \u0411\u0443\u0434\u044c\u0442\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0442\u043e\u0432\u044b. \n\u041a\u043b\u043e\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 20 \u0441\u0435\u043a\u0443\u043d\u0434. \u041a\u043b\u043e\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u0448\u0430\u043d\u0441 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0438\u0442\u0441\u044f \u0430\u0442\u0430\u043a\u0443\u044f \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u043e\u0432. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 4000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 8 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[3]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[3],onClick:function(){return a("give_ability",{style:"chameleon",row:"4"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.chameleon,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0425\u0410\u041c\u0415\u041b\u0415\u041e\u041d",content:"\u0412\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0435\u0431\u044f \u0433\u043e\u043b\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0449\u0435\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0441\u043b\u0443\u0445\u043e\u0432\u043e\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432. \n\u0412\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0441\u043b\u044b\u0448\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \n\u042d\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u0430\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0438 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0447\u043b\u0435\u043d\u0430 \u044d\u043a\u0438\u043f\u0430\u0436\u0430. \n\u041f\u043e\u043b\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u0440\u0443\u043f\u043a\u043e\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0435\u0442\u0435\u0442\u044c\u0441\u044f \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0437\u043a\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u043b\u0438 \u0443\u0434\u0430\u0440\u0430. \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \n\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0445\u0430\u043c\u0435\u043b\u0435\u043e\u043d \u0441\u043b\u0430\u0431\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0441\u0445\u043e\u0434 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[4]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[4],onClick:function(){return a("give_ability",{style:"ninja_spirit_form",row:"5"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.ninja_spirit_form,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0424\u041e\u0420\u041c\u0410 \u0414\u0423\u0425\u0410",content:"\u0412\u044b \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442\u0435 \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u044d\u0442\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \n\u0414\u0435\u043b\u0430\u044f \u0432\u0430\u0448\u0435 \u0442\u0435\u043b\u043e \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u044d\u0442\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0440\u0443\u0435\u0442 \u0432\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043a\u0432\u043e\u0437\u044c \u0441\u0442\u0435\u043d\u044b. \n\u042d\u0442\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0441 \u043d\u0435\u0443\u044f\u0437\u0432\u0438\u043c\u044b\u043c \u0434\u043b\u044f \u043f\u0443\u043b\u044c \u0438 \u043b\u0435\u0437\u0432\u0438\u0439! \n\u041d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0441\u043d\u044f\u0442\u044c \u0441 \u0441\u0435\u0431\u044f \u043d\u0430\u0440\u0443\u0447\u043d\u0438\u043a\u0438, \u0431\u043e\u043b\u044b \u0438 \u0434\u0430\u0436\u0435 \u0432\u044b\u043b\u0435\u0437\u0442\u0438 \u0438\u0437 \u0433\u0440\u043e\u0431\u0430 \u0438\u043b\u0438 \u044f\u0449\u0438\u043a\u0430, \u043e\u043a\u0430\u0436\u0438\u0441\u044c \u0432\u044b \u0442\u0430\u043c \u0437\u0430\u043f\u0435\u0440\u0442\u044b... \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430. \n\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0434\u0443\u0445\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0441\u0445\u043e\u0434 \u044d\u043d\u0435\u0440\u0433\u0438\u0438! \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0431\u044a\u0451\u043c\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 25 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"right"})]})]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"33%",shrink:1,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u0417\u043c\u0435\u0439",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0423\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435! \u0422\u0440\u044e\u043a\u0438, \u043b\u043e\u0432\u0443\u0448\u043a\u0438, \u0449\u0438\u0442\u044b. \u041f\u043e\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u0439 \u0441 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0443\u0431\u0438\u0439\u0446\u0435\u0439. \u0418\u0437\u0432\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0438 \u0438\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430\u0445\u043e\u0434\u044f \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u0412\u0440\u0430\u0433\u0438 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0433\u0440\u044b\u0437\u0443\u043d\u044b, \u0447\u044c\u0451 \u043b\u043e\u0433\u043e\u0432\u043e \u043d\u0430\u0432\u0435\u0441\u0442\u0438\u043b \u0437\u043c\u0435\u0439!",tooltipPosition:"bottom"}),style:{"text-align":"center",background:"rgba(0, 174, 208, 0.15)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:s[0]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[0],onClick:function(){return a("give_ability",{style:"kunai",row:"1"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.kunai,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0421\u0422\u0420\u041e\u0415\u041d\u041d\u041e\u0415 \u0414\u0416\u041e\u0425\u042c\u0401",content:"\u0422\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u0430\u043a \u0428\u044d\u043d\u0431\u044f\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u041a\u0438\u043d\u0436\u0430\u043b \u043d\u0430 \u0446\u0435\u043f\u0438. \n\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0438 \u043f\u0440\u0438\u0442\u044f\u043d\u0443\u0442\u044c \u043a \u0441\u0435\u0431\u0435 \u0436\u0435\u0440\u0442\u0432\u0443 \u0437\u0430 \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \n\u041e\u0440\u0443\u0436\u0438\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u043b\u0433\u0438\u0445 \u0431\u043e\u0451\u0432, \u043d\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0436\u0435\u0440\u0442\u0432\u044b - \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u0434\u0430\u0440\u0430! \n\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0435 \u043f\u0440\u043e\u043c\u0430\u0445\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0435. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430: 500 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 5 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[1]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[1],onClick:function(){return a("give_ability",{style:"chem_injector",row:"2"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.chem_injector,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0418\u0421\u0426\u0415\u041b\u042f\u042e\u0429\u0418\u0419 \u041a\u041e\u041a\u0422\u0415\u0419\u041b\u042c",content:"\u0412\u0432\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0441 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043b\u0435\u0447\u0435\u0431\u043d\u0443\u044e \u0441\u043c\u0435\u0441\u044c. \u0421\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u043b\u0435\u0447\u0438\u0442\u044c \u0434\u0430\u0436\u0435 \u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043e\u0440\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. \n\u041f\u0440\u0435\u043f\u0430\u0440\u0430\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442- \n\u0432\u0435\u043d\u043d\u043e-\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u0434\u043e\u043a\u0441\u044b \u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0430! \n\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u043e\u0437\u0438\u0440\u043e\u0432\u043a\u0435 \u043e\u043d\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u043f\u0430\u0441\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 30 \u0435\u0434. \u043f\u0440\u0435\u043f\u0430\u0440\u0430\u0442\u0430 \u0432 \u0432\u0430\u0448 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c! \n\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0430\u0442\u044b \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0438\u043c\u0435\u0435\u0442 3 \u0437\u0430\u0440\u044f\u0434\u0430. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u0431\u043b\u044e\u0441\u043f\u0435\u0439\u0441 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u043e\u0432 \u043f\u043e\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[2]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[2],onClick:function(){return a("give_ability",{style:"emergency_blink",row:"3"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.emergency_blink,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041a\u0421\u0422\u0420\u0415\u041d\u041d\u0410\u042f \u0422\u0415\u041b\u0415\u041f\u041e\u0420\u0422\u0410\u0426\u0418\u042f",content:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0437\u043e\u043d\u0443 \u0432 \u0440\u0430\u0434\u0438\u0443\u0441\u0435 \u043e\u043a\u043e\u043b\u043e \u0434\u0432\u0443\u0445 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0435\u0442\u0440\u043e\u0432. \n\u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0437\u0433\u043e\u0432\u044b\u0435 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u0432\u043e\u0438\u043d\u044b \u043a\u043b\u0430\u043d\u0430, \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0434\u0430\u0436\u0435 \u0432\u043e \u0441\u043d\u0435. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 1500 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[3]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[3],onClick:function(){return a("give_ability",{style:"caltrop",row:"4"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.caltrop,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041b\u0415\u041a\u0422\u0420\u041e-\u0427\u0415\u0421\u041d\u041e\u041a",content:"\u0427\u0430\u0449\u0435 \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043b\u0442\u0440\u043e\u043f\u044b, \u0438\u0437-\u0437\u0430 \u0437\u0430\u043f\u0443\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0439 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u044a\u0435\u0441\u0442\u043d\u044b\u043c \u0447\u0435\u0441\u043d\u043e\u043a\u043e\u043c. \n\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0437\u0430\u0434\u0438 \u0432\u0430\u0441 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043f\u0440\u0435\u0441\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043b\u043e\u0432\u0443\u0448\u043a\u0438. \n\u041b\u043e\u0432\u0443\u0448\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10 \u0441\u0435\u043a\u0443\u043d\u0434. \u0422\u0430\u043a \u0436\u0435 \u043e\u043d\u0438 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442 - \u0435\u0441\u043b\u0438 \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442\u044c. \n\u0411\u043e\u043b\u044c \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0434\u0430\u0436\u0435 \u0440\u043e\u0431\u043e\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d- \u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. \n\u0412\u044b \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u043e\u0442 \u043d\u0438\u0445. \u041d\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0439\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0436\u0435 \u043b\u043e\u0432\u0443\u0448\u043a\u0438! \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 1500 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0430.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[4]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[4],onClick:function(){return a("give_ability",{style:"cloning",row:"5"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.cloning,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0422\u041e\u0420\u041e\u0419 \u0428\u0410\u041d\u0421",content:"\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043c\u043d\u043e\u0433\u0438\u0435 \u0443\u0431\u0438\u0439\u0446\u044b \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u044f \u0441\u0432\u043e\u0438 \u043c\u0438\u0441\u0441\u0438\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u043b\u0438 \u0441\u0430\u043c\u043e\u0443\u0431\u0438\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043b\u0430\u043f\u0430\u0445 \u0432\u0440\u0430\u0433\u0430. \n\u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430. \u041c\u043e\u0449\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0432\u0430\u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0442\u043e\u0433\u043e \u0441\u0432\u0435\u0442\u0430. \n\u042d\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u043d\u0441, \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0430\u0441 \u043a \u0441\u0435\u0431\u0435 \u0438 \u0438\u0437\u043b\u0435\u0447\u0438\u0432 \u043b\u044e\u0431\u044b\u0435 \u0442\u0440\u0430\u0432\u043c\u044b. \n\u041c\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0438\u0434\u0435\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u043d\u0430. \u041d\u043e \u0443\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0430\u0441, \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \n\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430 \u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u044e. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043f\u0430\u0441\u0451\u0442 \u0432\u0430\u0441 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \n\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u0438 \u0441\u043c\u0435\u0440\u0442\u0438.",position:"right"})]})]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"33%",shrink:1,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u0442\u0430\u043b\u044c",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u042f\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043b\u044e\u0434\u044f\u043c. \u0421\u0438\u043b\u0430, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043e\u0440\u0443\u0434\u0438\u044f \u0432\u044b\u0448\u0435 \u0438\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0420\u0430\u0437\u0438\u0442\u0435 \u0438\u0445 \u043a\u0430\u043a \u0445\u0438\u0449\u043d\u0438\u043a \u0447\u0442\u043e \u0440\u0430\u0437\u0438\u0442 \u0441\u0432\u043e\u044e \u0434\u043e\u0431\u044b\u0447\u0443. \u041f\u043e\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0432\u043a\u0443\u0441 \u0441\u0442\u0430\u043b\u0438!",tooltipPosition:"bottom"}),style:{"text-align":"center",background:"rgba(80, 20, 20, 1)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_red",success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:s[0]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[0],onClick:function(){return a("give_ability",{style:"shuriken",row:"1"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.shuriken,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041d\u0415\u0420\u0413\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0415 \u0421\u042e\u0420\u0418\u041a\u0415\u041d\u042b",content:"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0441\u043a\u043e\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043a\u0440\u044b\u0442\u043e\u0435 \u0432 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0430\u0445 \u043a\u043e\u0441\u0442\u044e\u043c\u0430. \n\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e \u0442\u0440\u0438 \u0441\u044e\u0440\u0438\u043a\u0435\u043d\u0430, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0436\u0430\u0442\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043e\u0447\u0435\u0440\u0435\u0434\u044c\u044e. \n\u0421\u044e\u0440\u0438\u043a\u0435\u043d\u044b \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0438\u0437\u043d\u0443\u0440\u044f\u044e\u0442 \u0432\u0440\u0430\u0433\u043e\u0432 \u0438 \u043d\u0430\u043d\u043e\u0441\u044f\u0442 \u0441\u043b\u0430\u0431\u044b\u0439 \u043e\u0436\u043e\u0433\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u043d. \n\u0422\u0430\u043a \u0436\u0435 \u043e\u043d\u0438 \u043f\u0440\u043e\u043b\u0435\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0435\u043a\u043b\u043e, \u043a\u0430\u043a \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0435 \u0441\u043d\u0430\u0440\u044f\u0434\u044b. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430: 300 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[1]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[1],onClick:function(){return a("give_ability",{style:"adrenal",row:"2"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.adrenal,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0421\u041f\u041b\u0415\u0421\u041a \u0410\u0414\u0420\u0415\u041d\u0410\u041b\u0418\u041d\u0410",content:"\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0441 \u043c\u043e\u0449\u043d\u0443\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0443 \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0449\u0443\u044e \u0432\u0430\u0441 \u0432 \u0431\u043e\u044e \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0443\u044e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043e\u043a\u043b\u0435\u043c\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0433\u043b\u0443\u0448\u0430\u044e\u0449\u0438\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \n\u041a\u043e\u0441\u0442\u044e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0440\u0430\u043d\u0430. \u0427\u0442\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u0451\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438\u044f \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \n\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0430\u0442\u044b \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0436\u0435\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u0443\u0440\u0430\u043d\u0430 \u043f\u043e\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[2]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[2],onClick:function(){return a("give_ability",{style:"emp",row:"3"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.emp,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041b\u0415\u041a\u0422\u0420\u041e\u041c\u0410\u0413\u041d\u0418\u0422\u041d\u042b\u0419 \u0412\u0417\u0420\u042b\u0412",content:"\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043c\u0430\u0433\u043d\u0438\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u044e\u0442, \u043f\u043e\u0434\u0440\u044b\u0432\u0430\u044e\u0442 \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0430\u044e\u0442 - \u043a\u0438\u0431\u043e\u0440\u0433\u043e\u0432, \u0434\u0440\u043e\u043d\u043e\u0432, \u041a\u041f\u0411, \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0440\u0443\u0436\u0438\u0435, \u043f\u043e\u0440\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0421\u0432\u0435\u0442\u043e\u0448\u0443\u043c\u043e\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0432\u044f\u0437\u0438 \u0438 \u0442.\u0434. \n\u042d\u0442\u043e\u0442 \u0432\u0437\u0440\u044b\u0432 \u043c\u043e\u0436\u0435\u0442 \u043a\u0430\u043a \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u0432 \u0431\u043e\u044e, \u0442\u0430\u043a \u0438 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043d\u0430\u0432\u0440\u0435\u0434\u0438\u0442\u044c. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0439\u0442\u0435 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c. \n\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043e \u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0449\u0435\u043c \u043e\u0442 \u0441\u0432\u0435\u0442\u0430 \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0437\u043e\u0440\u0430. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0435 \u043e\u0441\u043b\u0435\u043f\u043d\u0443\u0442\u044c, \u043f\u0440\u0438 \u043f\u043e\u0434\u0440\u044b\u0432\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \n\u0412\u0437\u0440\u044b\u0432 - \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u0430\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 5000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 4 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[3]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[3],onClick:function(){return a("give_ability",{style:"energynet",row:"4"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.energynet,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041d\u0415\u0420\u0413\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0410\u042f \u0421\u0415\u0422\u042c",content:"\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0432\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0432\u0430\u043c\u0438 \u0446\u0435\u043b\u044c \u0432 \u043e\u0431\u0435\u0437\u0434\u0432\u0438\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u043b\u043e\u0432\u0443\u0448\u043a\u0443. \n\u0418\u0437 \u043b\u043e\u0432\u0443\u0448\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u0432 \u0435\u0451 \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u043c. \n\u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0440\u0430\u0433\u0430. \n\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0432 \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u044b\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445 \u0438\u043b\u0438 \u043d\u0430\u0434\u043e\u0435\u0434\u043b\u0438\u0432\u044b\u0445 \u043e\u0445\u0440\u0430\u043d\u043d\u044b\u0445 \u0431\u043e\u0442\u043e\u0432. \n\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0441\u0435\u0442\u044c \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u0435 \u043e\u0442\u0441\u0442\u0440\u0435\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0430\u0441. \n\u0422\u0430\u043a \u0436\u0435 \u0441\u0435\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u0435\u0439. \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u0435\u0442\u0438 - \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u0430\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 4000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[4]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[4],onClick:function(){return a("give_ability",{style:"spider_red",row:"5"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.spider_red,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0411\u041e\u0415\u0412\u041e\u0415 \u0418\u0421\u041a\u0423\u0421\u0421\u0422\u0412\u041e \n\u041f\u041e\u041b\u0417\u0423\u0427\u0415\u0419 \u0412\u0414\u041e\u0412\u042b",content:"\u0411\u043e\u0435\u0432\u043e\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u043d\u0438\u043d\u0434\u0437\u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0451\u043c\u043e\u0432. \n\u0412 \u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u044f\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0451\u043c\u044b: \n\u0412\u044b\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0443\u043a\u0438 - \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u0443 \u0432\u044b\u0440\u043e\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u043e\u0440\u0443\u0436\u0438\u0435. \n\u0423\u0434\u0430\u0440 \u043b\u0430\u0434\u043e\u043d\u044c\u044e - \u043e\u0442\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442 \u0432\u0430\u0441, \u043b\u0438\u0448\u0430\u044f \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f. \n\u041f\u0435\u0440\u0435\u0440\u0435\u0437\u0430\u043d\u0438\u0435 \u0448\u0435\u0438 - \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0435\u0437\u0433\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043b\u0435\u0436\u0430\u0447\u0443\u044e \u0436\u0435\u0440\u0442\u0432\u0443 \u043a\u0430\u0442\u0430\u043d\u043e\u0439 \u0432\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0443\u043a\u0435. \n\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0442\u043e\u0440\u043d\u0430\u0434\u043e - \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u0432\u0440\u0430\u0433\u043e\u0432 \u0432\u043e\u043a\u0440\u0443\u0433 \u0432\u0430\u0441 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u043b\u0430\u043a\u043e \u0434\u044b\u043c\u0430 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u044b\u043c\u043e\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u0422\u0430\u043a \u0436\u0435 \u0432\u044b \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0435\u0441\u044c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0448\u0430\u043d\u0441\u043e\u043c \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u043d\u044f\u0440\u044f\u0434\u044b \u0432\u0440\u0430\u0433\u043e\u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.",position:"right"})]})]})]})]})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0442\u0442\u043b\u043e\u043c",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041f\u0430\u043d\u0435\u043b\u044c \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u043c \u043b\u0438\u0447\u043d\u044b\u043c \u0448\u0430\u0442\u0442\u043b\u043e\u043c. \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0443 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u0448\u0430\u0442\u0442\u043b\u0430!",tooltipPosition:"right"}),children:(0,o.createComponentVNode)(2,i.Flex,{ml:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f",children:l.status?l.status:(0,o.createComponentVNode)(2,i.NoticeBox,{color:"red",children:"Shuttle Missing"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0412\u0430\u0448\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f",children:l.player_pos}),!!l.shuttle&&(!!l.docking_ports_len&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0442\u0442\u043b",children:l.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-right",content:e.name,onClick:function(){return c("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,i.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!l.admin_controlled&&(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f",children:(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-circle",content:"\u0417\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e",disabled:!l.status,onClick:function(){return c("request")}})})],0))]})})})};t.ShuttleConsole=p;var m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.randomPercent,c=n.allActionsPreview,l=n.color_choice;return(0,o.createComponentVNode)(2,i.Section,{stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:l,value:a,minValue:0,maxValue:100,children:(0,o.createVNode)(1,"center",null,(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_"+l,mt:1,children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+c["spider_"+l],style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Loading ",a+"%"]}),2)})})},h=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={lastText:"text do be there",currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;e.allMessages===t.lastText||e.end_terminal?e.end_terminal&&(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout)):(t.currentDisplay.push(e.allMessages),t.lastText=e.allMessages)},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,i.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],a=n.Fire||[],c=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===a.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),a.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,i.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,i.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,i.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,i.Flex,{children:(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,s)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.helmet,d=c.suit,u=c.magboots,p=c.mask,m=c.storage,h=c.open,f=c.locked;return(0,o.createComponentVNode)(2,i.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return a("toggle_lock")}}),(0,o.createComponentVNode)(2,i.Button,{content:h?"Close unit":"Open unit",icon:h?"times-circle":"expand",color:h?"red":"green",disabled:f,onClick:function(){return a("toggle_open")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:s,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:d,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Magboots",missingText:"magboots",eject:"dispense_magboots"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=(n.data,e.object),l=e.label,s=e.missingText,d=e.eject;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,i.Box,{my:.5,children:c?(0,o.createComponentVNode)(2,i.Button,{my:-1,icon:"eject",content:c,onClick:function(){return a(d)}}):(0,o.createComponentVNode)(2,i.Box,{color:"silver",bold:!0,children:["No ",s," found."]})})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"cog",textAlign:"center",content:"Start Disinfection Cycle",disabled:c.locked,onClick:function(){return a("cook")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(80);t.SupermatterMonitor=function(e,t){var n=(0,r.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,s)};var l=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Detected Supermatter Shards",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Refresh",onClick:function(){return l("refresh")}}),children:(0,o.createComponentVNode)(2,i.Box,{m:1,children:0===s.supermatters.length?(0,o.createVNode)(1,"h3",null,"No shards detected",16):(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.TableCell,{children:"Area"}),(0,o.createComponentVNode)(2,c.TableCell,{children:"Integrity"}),(0,o.createComponentVNode)(2,c.TableCell,{children:"Details"})]}),s.supermatters.map((function(e){return(0,o.createComponentVNode)(2,c.TableRow,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.area_name}),(0,o.createComponentVNode)(2,c.TableCell,{children:[e.integrity,"%"]}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"View",onClick:function(){return l("view",{view:e.uid})}})})]},e)}))]})})})})})},s=function(e,t){var n,c,l,s=(0,r.useBackend)(t),d=s.act,u=s.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Crystal Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"caret-square-left",content:"Back",onClick:function(){return d("back")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Core Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[95,Infinity],average:[80,94],bad:[-Infinity,79]},minValue:"0",maxValue:"100",value:u.SM_integrity,children:[u.SM_integrity,"%"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,i.Box,{color:(l=u.SM_power,l>300?"bad":l>150?"average":"good"),children:[u.SM_power," MeV/cm3"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.Box,{color:(c=u.SM_ambienttemp,c>5e3?"bad":c>4e3?"average":"good"),children:[u.SM_ambienttemp," K"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,i.Box,{color:(n=u.SM_ambientpressure,n>1e4?"bad":n>5e3?"average":"good"),children:[u.SM_ambientpressure," kPa"]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Gas Composition",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:[u.SM_gas_O2,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:[u.SM_gas_CO2,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:[u.SM_gas_N2,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Plasma",children:[u.SM_gas_PL,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other",children:[u.SM_gas_OTHER,"%"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),i=n(2),a=(n(64),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,a.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,i.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return c(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,i.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndieCargoConsole=void 0;var o=n(0),r=n(43),i=n(24),a=n(1),c=n(2),l=n(3),s=(n(64),n(18));t.SyndieCargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,m)]})})};var d=function(e,t){var n=(0,a.useLocalState)(t,"contentsModal",null),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"contentsModalTitle",null),s=l[0],d=l[1];return null!==r&&null!==s?(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,c.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[s,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,c.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,c.Box,{m:2,children:(0,o.createComponentVNode)(2,c.Button,{content:"Close",onClick:function(){i(null),d(null)}})})]}):void 0},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.is_public,s=void 0===l?0:l,d=i.cash,u=i.wait_time,p=i.is_cooldown,m=i.telepads_status,h=i.adminAddCash,f=m,C="",g=0,N="";return"Pads not linked!"===m?(g=0,C="Attempts to link telepads to the console.",N="Link pads"):p?p&&(N="Cooldown...",C="Pads are cooling off...",g=1,f=1!==u?m+" (ETA: "+u+" seconds)":m+" (ETA: "+u+" second)"):(g=0,C="Teleports your crates to the market. A reminder, some of the crates are directly stolen from NT trading routes. That means they can be locked. We are NOT sorry for the inconvenience",N="Teleport"),(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[0===s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Money Available",children:[d,(0,o.createComponentVNode)(2,c.Button,{tooltip:"Withdraw money from the console",content:"Withdraw",onClick:function(){return r("withdraw",d)}}),(0,o.createComponentVNode)(2,c.Button,{content:h,tooltip:"Bless the players with da money!",onClick:function(){return r("add_money",d)}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Telepads Status",children:f}),0===s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,c.Button,{content:N,tooltip:C,disabled:g,onClick:function(){return r("teleport")}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Syndicate Black Market Log",onClick:function(){return r("showMessages")}})]})]})})},p=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.categories,p=d.supply_packs,m=(0,a.useSharedState)(t,"category","Emergency"),h=m[0],f=m[1],C=(0,a.useSharedState)(t,"search_text",""),g=C[0],N=C[1],b=(0,a.useLocalState)(t,"contentsModal",null),V=(b[0],b[1]),v=(0,a.useLocalState)(t,"contentsModalTitle",null),x=(v[0],v[1]),y=(0,s.createSearch)(g,(function(e){return e.name})),k=(0,r.flow)([(0,i.filter)((function(e){return e.cat===u.filter((function(e){return e.name===h}))[0].category||g})),g&&(0,i.filter)(y),(0,i.sortBy)((function(e){return e.name.toLowerCase()}))])(p),w="Crate Catalogue";return g?w="Results for '"+g+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,c.Section,{title:w,buttons:(0,o.createComponentVNode)(2,c.Dropdown,{width:"190px",options:u.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,c.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return N(t)},mb:1}),(0,o.createComponentVNode)(2,c.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:k.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Order 1",icon:"shopping-cart",onClick:function(){return l("order",{crate:e.ref,multiple:0})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Order Multiple",icon:"cart-plus",onClick:function(){return l("order",{crate:e.ref,multiple:1})}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Contents",icon:"search",onClick:function(){V(e.contents),x(e.name)}})]})]},e.name)}))})})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.requests,s=i.canapprove,d=i.orders;return(0,o.createComponentVNode)(2,c.Section,{title:"Details",children:(0,o.createComponentVNode)(2,c.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Approve",color:"green",disabled:!s,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Deny",color:"red",onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Confirmed Orders"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TTSSeedsExplorerContent=t.TTSSeedsExplorer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c={0:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},l={"\u041c\u0443\u0436\u0441\u043a\u043e\u0439":{icon:"mars",color:"blue"},"\u0416\u0435\u043d\u0441\u043a\u0438\u0439":{icon:"venus",color:"purple"},"\u041b\u044e\u0431\u043e\u0439":{icon:"venus-mars",color:"white"}},s=function(e,t,n,r){return void 0===r&&(r=null),e.map((function(e){var a,c=null!=(a=e[r])?a:e;return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:t.includes(e),content:c,onClick:function(){t.includes(e)?n(t.filter((function(t){var n;return(null!=(n=t[r])?n:t)!==e}))):n([e].concat(t))}},c)}))};t.TTSSeedsExplorer=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data,u=d.providers,p=d.seeds,m=d.selected_seed,h=d.phrases,f=d.donator_level,C=p.map((function(e){return e.category})).filter((function(e,t,n){return n.indexOf(e)===t})),g=p.map((function(e){return e.gender})).filter((function(e,t,n){return n.indexOf(e)===t})),N=p.map((function(e){return e.donator_level})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return c[e]})),b=(0,r.useLocalState)(t,"selectedProviders",u),V=b[0],v=b[1],x=(0,r.useLocalState)(t,"selectedGenders",g),y=x[0],k=x[1],w=(0,r.useLocalState)(t,"selectedCategories",C),_=w[0],B=w[1],S=(0,r.useLocalState)(t,"selectedDonatorLevels",N),L=S[0],A=S[1],E=(0,r.useLocalState)(t,"selectedPhrase",h[0]),I=E[0],D=E[1],T=(0,r.useLocalState)(t,"searchtext",""),F=T[0],M=T[1],P=s(u,V,v,"name"),O=s(g,y,k),R=s(C,_,B),j=s(N,L,A),U=(0,o.createComponentVNode)(2,i.Dropdown,{options:h,selected:I.replace(/(.{25})..+/,"$1..."),width:"220px",onSelected:function(e){return D(e)}}),z=(0,o.createComponentVNode)(2,i.Input,{placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435...",fluid:!0,onInput:function(e,t){return M(t)}}),W=p.sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return n>o?1:n0&&m!==e.name?"orange":"white",children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,opacity:m===e.name?.5:.25,textAlign:"left",children:e.category}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,opacity:.5,textColor:m===e.name?"white":l[e.gender].color,textAlign:"left",children:(0,o.createComponentVNode)(2,i.Icon,{mx:1,size:1.2,name:l[e.gender].icon})}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:e.donator_level>0&&(0,o.createFragment)([c[e.donator_level],(0,o.createComponentVNode)(2,i.Icon,{ml:1,mr:2,name:"coins"})],0)})]},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b",children:P}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u043e\u043b",children:O}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",children:R}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438",children:j}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:U}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u043e\u0438\u0441\u043a",children:z})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0413\u043e\u043b\u043e\u0441\u0430 ("+W.length+"/"+p.length+")",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Table,{children:H})}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.BlockQuote,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,o.createComponentVNode)(2,i.Box,{mt:2,italic:!0,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c Discord-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})],4)};t.TTSSeedsExplorerContent=d},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.records,u=void 0===d?[]:d,p=s.explosion_target,m=s.toxins_tech,h=s.printing;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shift's Target",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Toxins Level",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print All Logs",disabled:!u.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),u.length?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Records"})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.records,l=void 0===c?[]:c;return(0,o.createComponentVNode)(2,i.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,i.Flex,{children:(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return a("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Tank=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,s=c.data;return n=s.has_mask?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.connected?"check":"times",content:s.connected?"Internals On":"Internals Off",selected:s.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:s.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:s.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:s.ReleasePressure===s.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,value:parseFloat(s.releasePressure),width:"65px",unit:"kPa",minValue:s.minReleasePressure,maxValue:s.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:s.ReleasePressure===s.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"",disabled:s.ReleasePressure===s.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.o_tanks,d=l.p_tanks;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Dispense Oxygen Tank ("+s+")",disabled:0===s,icon:"arrow-circle-down",onClick:function(){return c("oxygen")}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Dispense Plasma Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return c("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data.ion),p=(0,r.useLocalState)(t,"tabIndex",0),m=p[0],h=p[1];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[1===u&&(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===m,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===m,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===m,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,s);case 2:return(0,o.createComponentVNode)(2,d);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(m)]})})};var c=function(){return(0,o.createComponentVNode)(2,i.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.active,s=c.sectors_available,d=c.nttc_toggle_jobs,u=c.nttc_toggle_job_color,p=c.nttc_toggle_name_color,m=c.nttc_toggle_command_bold,h=c.nttc_job_indicator_type,f=c.nttc_setting_language,C=c.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,i.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return a("toggle_active")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sector Coverage",children:s})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,i.Button,{content:d?"On":"Off",selected:d,icon:"user-tag",onClick:function(){return a("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,i.Button,{content:u?"On":"Off",selected:u,icon:"clipboard-list",onClick:function(){return a("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,i.Button,{content:p?"On":"Off",selected:p,icon:"user-tag",onClick:function(){return a("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,i.Button,{content:m?"On":"Off",selected:m,icon:"volume-up",onClick:function(){return a("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,i.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return a("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,i.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return a("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,i.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return a("network_id")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return a("import")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return a("export")}})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.link_password,s=c.relay_entries;return(0,o.createComponentVNode)(2,i.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,i.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return a("change_password")}})})}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Unlink"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Unlink",icon:"unlink",onClick:function(){return a("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.filtered_users;return(0,o.createComponentVNode)(2,i.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Add User",icon:"user-plus",onClick:function(){return a("add_filter")}}),children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,i.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Remove",icon:"user-times",onClick:function(){return a("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.linked,p=d.active,m=d.network_id;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,i.Button,{content:p?"On":"Off",selected:p,icon:"power-off",onClick:function(){return s("toggle_active")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,i.Button,{content:m||"Unset",selected:m,icon:"server",onClick:function(){return s("network_id")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Link Status",children:1===u?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Unlinked"})})]})}),1===u?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.linked_core_id,s=c.linked_core_addr,d=c.hidden_link;return(0,o.createComponentVNode)(2,i.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Linked Core Address",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,i.Button,{content:d?"Yes":"No",icon:d?"eye-slash":"eye",selected:d,onClick:function(){return a("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,i.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return a("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.cores;return(0,o.createComponentVNode)(2,i.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Link"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Link",icon:"link",onClick:function(){return a("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(188);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.targetsTeleport?s.targetsTeleport:{},u=s.calibrated,p=s.calibrating,m=s.powerstation,h=s.regime,f=s.teleporterhub,C=s.target,g=s.locked,N=s.accuracy;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(!m||!f)&&(0,o.createComponentVNode)(2,i.Section,{title:"Error",children:[f,!m&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:" Powerstation not linked "}),m&&!f&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:" Teleporter hub not linked "})]}),m&&f&&(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,i.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!g,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,i.Dropdown,{width:"220px",selected:C,options:Object.keys(d),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:d[e].x,y:d[e].y,z:d[e].z})}}),1===h&&(0,o.createComponentVNode)(2,i.Dropdown,{width:"220px",selected:C,options:Object.keys(d),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:d[e].x,y:d[e].y,z:d[e].z})}}),2===h&&(0,o.createComponentVNode)(2,i.Box,{children:C})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,c.GridColumn,{size:"2",children:p&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"In Progress"})||(u||N>=3)&&(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,c.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,i.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!u&&!p),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(g&&m&&f&&2===h)&&(0,o.createComponentVNode)(2,i.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ThiefKit=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ThiefKit=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.uses,d=l.possible_uses,u=l.multi_uses,p=l.kits,m=l.choosen_kits;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041d\u0430\u0431\u043e\u0440 \u0413\u0438\u043b\u044c\u0434\u0438\u0438 \u0412\u043e\u0440\u043e\u0432:",children:(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:[(0,o.createVNode)(1,"i",null,"\u0423\u0432\u0435\u0441\u0438\u0441\u0442\u0430\u044f \u043a\u043e\u0440\u043e\u0431\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0438\u0442 \u0441\u043d\u0430\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0433\u0438\u043b\u044c\u0434\u0438\u0438 \u0432\u043e\u0440\u043e\u0432.",16),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"i",null,"\u041d\u0430\u0431\u043e\u0440 \u0432\u043e\u0440\u0430-\u0448\u0440\u0435\u0434\u0438\u043d\u0433\u0435\u0440\u0430. \u041d\u0435\u043b\u044c\u0437\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0442\u043e \u0432 \u043d\u0451\u043c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u0448\u044c \u0432\u043d\u0443\u0442\u0440\u044c.",16),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"p",null,(0,o.createVNode)(1,"b",null,"\u041a\u0430\u043a\u043e\u0435 \u0441\u043d\u0430\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u043d\u0451\u043c \u043b\u0435\u0436\u0438\u0442?:",16),2),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u0432:"),(0,o.createComponentVNode)(2,i.Box,{as:"span",color:s<=0?"good":s=d,onClick:function(){return c("randomKit")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:p&&p.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"upload",content:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c",disabled:e.was_taken||s>=d,onClick:function(){return c("takeKit",{item:e.type})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",disabled:!e.was_taken,onClick:function(){return c("undoKit",{item:e.type})}})]}),children:(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:e.desc})},e.type)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b:",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:m&&m.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440",onClick:function(){return c("undoKit",{item:e.type})}}),children:(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:" "})},e.type)}))})}),(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440",color:sp}),children:(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,a.decodeHtmlEntities)(e.desc)})},(0,a.decodeHtmlEntities)(e.name))}))})]})]})},f=function(e,t){var n=(0,c.useBackend)(t),s=(n.act,n.data.exploitable),u=(0,c.useLocalState)(t,"selectedRecord",s[0]),p=u[0],m=u[1],h=(0,c.useLocalState)(t,"searchText",""),f=h[0],C=h[1],g=function(e,t){void 0===t&&(t="");var n=(0,a.createSearch)(t,(function(e){return e.name}));return(0,i.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(s,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:g.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===p,onClick:function(){return m(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+p.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",p.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",p.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",p.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",p.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",p.species]})]})})]})})};(0,p.modalRegisterBodyOverride)("become_contractor",(function(e,t){var n,r,i,a=(0,c.useBackend)(t).data,d=(a.contractor||{}).time_left,u=!!(null==a||null==(n=a.contractor)?void 0:n.available),m=!!(null==a||null==(r=a.contractor)?void 0:r.affordable),h=!!(null==a||null==(i=a.contractor)?void 0:i.accepted);return(0,o.createComponentVNode)(2,l.Section,{level:"2",m:"-1rem",pb:"1rem",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Icon,{name:"suitcase"}),(0,o.createTextVNode)("\xa0 Contracting Opportunity")],4),children:[(0,o.createComponentVNode)(2,l.Box,{mx:"0.5rem",mb:"0.5rem",children:[(0,o.createVNode)(1,"b",null,"Your achievements for the Syndicate have not gone unnoticed, agent. We have decided to give you the rare opportunity of becoming a Contractor.",16),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"br"),"For the small price of 20 telecrystals, we will upgrade your rank to that of a Contractor, allowing you to undertake kidnapping contracts for TC and credits.",(0,o.createVNode)(1,"br"),"In addition, you will be supplied with a Contractor Kit which contains a Contractor Uplink, standard issue contractor gear and three random low cost items.",(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"br"),"More detailed instructions can be found within your kit, should you accept this offer."]}),(0,o.createComponentVNode)(2,l.Button.Confirm,{disabled:!u||h,italic:!u,bold:u,icon:u&&!h&&"check",color:"good",content:h?"Accepted":u?["Accept Offer",(0,o.createComponentVNode)(2,s.Countdown,{timeLeft:d,format:function(e,t){return" ("+t+")"}},"countdown")]:m?"Offer expired":"Insufficient TC",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){return(0,p.modalAnswer)(t,e.id,1)}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.VampireSpecMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.VampireSpecMenu=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Hemomancer",onClick:function(){return a("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you are forced back to the anchor. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. It will also cause nearby creatures to freeze.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permament X-ray vision.",16),(0,o.createComponentVNode)(2,i.Button,{content:"Umbrae",onClick:function(){return a("umbrae")}})]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you dont have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": You gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Gargantua",onClick:function(){return a("gargantua")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that, blinds then make everyone nearby perceive others to looks like random animals.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Dantalion",onClick:function(){return a("dantalion")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Bestia",children:[(0,o.createVNode)(1,"h3",null,"Focuses on transformations and trophies harvesting.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Check Trophies",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to check current trophies amount and all the passive effects they provide.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dissect",16),(0,o.createTextVNode)(": Unlocked at 150 blood, main source of gaining power, besides blood, allows you to harvest human organs, as a trophies, to passively increase your might.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dissect Cap",16),(0,o.createTextVNode)(": You can only harvest one organ trophie at a time. This can be increased at 600 blood and at full power to a max of 3 trophies per victim.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Infected Trophy",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to stun enemies from the safe distance and infect them with the deadly Grave Fever.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Lunge",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to rapidly close distance to a victim or escape a dangerous situation.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Mark the Prey",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to mark a victim which drastically reduces their movement speed and forces them to take spontaneous actions.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Metamorphosis - Bats",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to shapeshift into the deadly and vicious space bats swarm.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Anabiosis",16),(0,o.createTextVNode)(": Unlocked at 600 blood, ancient technique which allows you to cure almost any wounds while sleeping in a coffin.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Summon Bats",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to call extraplanar space bats to aid you in combat.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Metamorphosis - Hound",16),(0,o.createTextVNode)(": Allows you to shapeshift into the ultimate form of bluespace entity which took over your soul.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Bestia",onClick:function(){return a("bestia")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VampireTrophiesStatus=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=function(e){return(Math.round(10*e)/10).toFixed(1)};t.VampireTrophiesStatus=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,N)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.hearts,l=a.lungs,s=a.livers,d=a.kidneys,u=a.eyes,p=a.ears,m=a.trophies_max_gen,h=a.trophies_max_crit,f=a.icon_hearts,C=a.icon_lungs,g=a.icon_livers,N=a.icon_kidneys,b=a.icon_eyes,V=a.icon_ears;return(0,o.createComponentVNode)(2,i.Section,{title:"Trophies",color:"red",textAlign:"center",verticalAlign:"middle",children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",width:"16.6%",children:[(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"data:image/jpeg;base64,"+f,verticalAlign:"middle",style:{"margin-left":"-32px","margin-right":"-48px","margin-top":"-32px","margin-bottom":"-48px",height:"128px",width:"128px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,textColor:cp;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Box,{color:(s<=0?"bad":s<=l.max_amount/2&&"average")||"good",children:[s," in stock"]})}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,disabled:N,icon:g,content:C,textAlign:"left",onClick:function(){return a("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),s=l.act,d=l.data,u=d.user,p=d.guestNotice,m=d.userMoney,h=d.chargesMoney,f=d.product_records,C=void 0===f?[]:f,g=d.coin_records,N=void 0===g?[]:g,b=d.hidden_records,V=void 0===b?[]:b,v=d.stock,x=(d.vend_ready,d.coin_name),y=d.inserted_item_name,k=d.panel_open,w=d.speaker,_=d.imagelist;return n=[].concat(C,N),d.extended_inventory&&(n=[].concat(n,V)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,a.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,i.Section,{title:"User",children:u&&(0,o.createComponentVNode)(2,i.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,u.name,0),","," ",(0,o.createVNode)(1,"b",null,u.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),"."]})||(0,o.createComponentVNode)(2,i.Box,{color:"light-grey",children:p})}),!!x&&(0,o.createComponentVNode)(2,i.Section,{title:"Coin",buttons:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:"Remove Coin",onClick:function(){return s("remove_coin",{})}}),children:(0,o.createComponentVNode)(2,i.Box,{children:x})}),!!y&&(0,o.createComponentVNode)(2,i.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return s("eject_item",{})}}),children:(0,o.createComponentVNode)(2,i.Box,{children:y})}),!!k&&(0,o.createComponentVNode)(2,i.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,i.Button,{icon:w?"check":"volume-mute",selected:w,content:"Speaker",textAlign:"left",onClick:function(){return s("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Products",children:(0,o.createComponentVNode)(2,i.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,c,{product:e,productStock:v[e.name],productImage:_[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,i.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return c("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return c("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,i.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return c("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.remaining,d=l.question,u=l.choices,p=l.user_vote,m=l.counts,h=l.show_counts,f=l.show_cancel;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:d,children:[(0,o.createComponentVNode)(2,i.Box,{mb:1,children:["Time remaining: ",Math.round(s/10),"s"]}),u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:e+(h?" ("+(m[e]||0)+")":""),onClick:function(){return c("vote",{target:e})},selected:e===p})},e)})),!!f&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Cancel",onClick:function(){return c("cancel")}})},"Cancel")]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.wires||[],d=l.status||[];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:s.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!d.length&&(0,o.createComponentVNode)(2,i.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Workshop=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(102),l=n(3);var s=function(e,t,n){return null===e.requirements||!(e.requirements.brass>t)&&!(e.requirements.power>n)};t.Workshop=function(e,t){var n=(0,i.useBackend)(t),r=n.act,s=n.data,p=s.brass_amount,m=s.power_amount,h=s.building,f=s.buildStart,C=s.buildEnd,g=s.worldTime,N=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),b=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,");return(0,o.createComponentVNode)(2,l.Window,{theme:"clockwork",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brass",children:[N,(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",height:"19px",tooltip:"Dispense Brass",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return r("dispense")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:b})]})})]}),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.Flex,{mb:"0.5rem",children:h&&(0,o.createComponentVNode)(2,a.ProgressBar.Countdown,{start:f,current:g,end:C,bold:!0,children:["Building ",h,"\xa0(",(0,o.createComponentVNode)(2,c.Countdown,{current:g,timeLeft:C-g,format:function(e,t){return t.substr(3)}}),")"]})})]})})};var d=function(e,t){var n=(0,i.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,i.useLocalState)(t,"sort",""),l=(c[0],c[1],(0,i.useLocalState)(t,"descending",!1)),s=l[0],d=l[1];return(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return d(!s)}})})]})})},u=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),l=c.items,d=(0,i.useLocalState)(t,"search",""),u=d[0],m=(d[1],(0,i.useLocalState)(t,"sort","Alphabetical")),h=(m[0],m[1],(0,i.useLocalState)(t,"descending",!1)),f=h[0],C=(h[1],(0,r.createSearch)(u,(function(e){return e[0]}))),g=!1,N=Object.entries(l).map((function(e,t){var n=Object.entries(e[1]).filter(C).map((function(e){return e[1].affordable=s(e[1],c.brass_amount,c.power_amount),e[1]}));if(0!==n.length)return f&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Section,{children:g?N:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No items matching your criteria was found!"})})})},p=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,d=e.title,u=e.items,p=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Collapsible,Object.assign({open:!0,title:d},p,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",disabled:!s(e,l.brass_amount,l.power_amount),onClick:function(){return c("make",{cat:d,name:e.name})},children:(0,r.toTitleCase)((0,r.toTitleCase)(e.name))}),(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"right"},children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,r.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,a.Box,{children:"No resources required."})}),(0,o.createComponentVNode)(2,a.Box,{style:{clear:"both"}})]},e.name)}))})))}}]); \ No newline at end of file +var o=n(509),r=n(510),i=n(511);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function c(e,t){if(a()=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function h(e,t){if(l.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var o=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case undefined:return j(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return U(e).length;default:if(o)return j(e).length;t=(""+t).toLowerCase(),o=!0}}function f(e,t,n){var o=!1;if((t===undefined||t<0)&&(t=0),t>this.length)return"";if((n===undefined||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return L(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return B(this,t,n);case"latin1":case"binary":return S(this,t,n);case"base64":return w(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function C(e,t,n){var o=e[t];e[t]=e[n],e[n]=o}function g(e,t,n,o,r){if(0===e.length)return-1;if("string"==typeof n?(o=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=r?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(r)return-1;n=e.length-1}else if(n<0){if(!r)return-1;n=0}if("string"==typeof t&&(t=l.from(t,o)),l.isBuffer(t))return 0===t.length?-1:N(e,t,n,o,r);if("number"==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):N(e,[t],n,o,r);throw new TypeError("val must be string, number or Buffer")}function N(e,t,n,o,r){var i,a=1,c=e.length,l=t.length;if(o!==undefined&&("ucs2"===(o=String(o).toLowerCase())||"ucs-2"===o||"utf16le"===o||"utf-16le"===o)){if(e.length<2||t.length<2)return-1;a=2,c/=2,l/=2,n/=2}function s(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(r){var d=-1;for(i=n;ic&&(n=c-l),i=n;i>=0;i--){for(var u=!0,p=0;pr&&(o=r):o=r;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");o>i/2&&(o=i/2);for(var a=0;a>8,r=n%256,i.push(r),i.push(o);return i}(t,e.length-n),e,n,o)}function w(e,t,n){return 0===t&&n===e.length?o.fromByteArray(e):o.fromByteArray(e.slice(t,n))}function _(e,t,n){n=Math.min(e.length,n);for(var o=[],r=t;r239?4:s>223?3:s>191?2:1;if(r+u<=n)switch(u){case 1:s<128&&(d=s);break;case 2:128==(192&(i=e[r+1]))&&(l=(31&s)<<6|63&i)>127&&(d=l);break;case 3:i=e[r+1],a=e[r+2],128==(192&i)&&128==(192&a)&&(l=(15&s)<<12|(63&i)<<6|63&a)>2047&&(l<55296||l>57343)&&(d=l);break;case 4:i=e[r+1],a=e[r+2],c=e[r+3],128==(192&i)&&128==(192&a)&&128==(192&c)&&(l=(15&s)<<18|(63&i)<<12|(63&a)<<6|63&c)>65535&&l<1114112&&(d=l)}null===d?(d=65533,u=1):d>65535&&(d-=65536,o.push(d>>>10&1023|55296),d=56320|1023&d),o.push(d),r+=u}return function(e){var t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);var n="",o=0;for(;o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},l.prototype.compare=function(e,t,n,o,r){if(!l.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(t===undefined&&(t=0),n===undefined&&(n=e?e.length:0),o===undefined&&(o=0),r===undefined&&(r=this.length),t<0||n>e.length||o<0||r>this.length)throw new RangeError("out of range index");if(o>=r&&t>=n)return 0;if(o>=r)return-1;if(t>=n)return 1;if(this===e)return 0;for(var i=(r>>>=0)-(o>>>=0),a=(n>>>=0)-(t>>>=0),c=Math.min(i,a),s=this.slice(o,r),d=e.slice(t,n),u=0;ur)&&(n=r),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");o||(o="utf8");for(var i=!1;;)switch(o){case"hex":return b(this,e,t,n);case"utf8":case"utf-8":return V(this,e,t,n);case"ascii":return v(this,e,t,n);case"latin1":case"binary":return x(this,e,t,n);case"base64":return y(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+o);o=(""+o).toLowerCase(),i=!0}},l.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function B(e,t,n){var o="";n=Math.min(e.length,n);for(var r=t;ro)&&(n=o);for(var r="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function E(e,t,n,o,r,i){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>r||te.length)throw new RangeError("Index out of range")}function D(e,t,n,o){t<0&&(t=65535+t+1);for(var r=0,i=Math.min(e.length-n,2);r>>8*(o?r:1-r)}function T(e,t,n,o){t<0&&(t=4294967295+t+1);for(var r=0,i=Math.min(e.length-n,4);r>>8*(o?r:3-r)&255}function F(e,t,n,o,r,i){if(n+o>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function M(e,t,n,o,i){return i||F(e,0,n,4),r.write(e,t,n,o,23,4),n+4}function P(e,t,n,o,i){return i||F(e,0,n,8),r.write(e,t,n,o,52,8),n+8}l.prototype.slice=function(e,t){var n,o=this.length;if((e=~~e)<0?(e+=o)<0&&(e=0):e>o&&(e=o),(t=t===undefined?o:~~t)<0?(t+=o)<0&&(t=0):t>o&&(t=o),t0&&(r*=256);)o+=this[e+--t]*r;return o},l.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var o=this[e],r=1,i=0;++i=(r*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||I(e,t,this.length);for(var o=t,r=1,i=this[e+--o];o>0&&(r*=256);)i+=this[e+--o]*r;return i>=(r*=128)&&(i-=Math.pow(2,8*t)),i},l.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),r.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),r.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),r.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),r.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,o){e=+e,t|=0,n|=0,o||E(this,e,t,n,Math.pow(2,8*n)-1,0);var r=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+r]=e/i&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):T(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);E(this,e,t,n,r-1,-r)}var i=0,a=1,c=0;for(this[t]=255&e;++i>0)-c&255;return t+n},l.prototype.writeIntBE=function(e,t,n,o){if(e=+e,t|=0,!o){var r=Math.pow(2,8*n-1);E(this,e,t,n,r-1,-r)}var i=n-1,a=1,c=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===c&&0!==this[t+i+1]&&(c=1),this[t+i]=(e/a>>0)-c&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):D(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):D(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):T(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||E(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):T(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return M(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return M(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return P(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return P(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,o){if(n||(n=0),o||0===o||(o=this.length),t>=e.length&&(t=e.length),t||(t=0),o>0&&o=this.length)throw new RangeError("sourceStart out of bounds");if(o<0)throw new RangeError("sourceEnd out of bounds");o>this.length&&(o=this.length),e.length-t=0;--r)e[r+t]=this[r+n];else if(i<1e3||!l.TYPED_ARRAY_SUPPORT)for(r=0;r>>=0,n=n===undefined?this.length:n>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&n<57344){if(!r){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===o){(t-=3)>-1&&i.push(239,191,189);continue}r=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),r=n;continue}n=65536+(r-55296<<10|n-56320)}else r&&(t-=3)>-1&&i.push(239,191,189);if(r=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function U(e){return o.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(O,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function z(e,t,n,o){for(var r=0;r=t.length||r>=e.length);++r)t[r+n]=e[r];return r}}).call(this,n(106))},function(e,t,n){"use strict";t.byteLength=function(e){var t=s(e),n=t[0],o=t[1];return 3*(n+o)/4-o},t.toByteArray=function(e){var t,n,o=s(e),a=o[0],c=o[1],l=new i(function(e,t,n){return 3*(t+n)/4-n}(0,a,c)),d=0,u=c>0?a-4:a;for(n=0;n>16&255,l[d++]=t>>8&255,l[d++]=255&t;2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,l[d++]=255&t);1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,l[d++]=t>>8&255,l[d++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,r=n%3,i=[],a=0,c=n-r;ac?c:a+16383));1===r?(t=e[n-1],i.push(o[t>>2]+o[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],i.push(o[t>>10]+o[t>>4&63]+o[t<<2&63]+"="));return i.join("")};for(var o=[],r=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,l=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function d(e,t,n){for(var r,i,a=[],c=t;c>18&63]+o[i>>12&63]+o[i>>6&63]+o[63&i]);return a.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},function(e,t,n){"use strict";t.read=function(e,t,n,o,r){var i,a,c=8*r-o-1,l=(1<>1,d=-7,u=n?r-1:0,p=n?-1:1,m=e[t+u];for(u+=p,i=m&(1<<-d)-1,m>>=-d,d+=c;d>0;i=256*i+e[t+u],u+=p,d-=8);for(a=i&(1<<-d)-1,i>>=-d,d+=o;d>0;a=256*a+e[t+u],u+=p,d-=8);if(0===i)i=1-s;else{if(i===l)return a?NaN:(m?-1:1)*Infinity;a+=Math.pow(2,o),i-=s}return(m?-1:1)*a*Math.pow(2,i-o)},t.write=function(e,t,n,o,r,i){var a,c,l,s=8*i-r-1,d=(1<>1,p=23===r?Math.pow(2,-24)-Math.pow(2,-77):0,m=o?0:i-1,h=o?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===Infinity?(c=isNaN(t)?1:0,a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+u>=1?p/l:p*Math.pow(2,1-u))*l>=2&&(a++,l/=2),a+u>=d?(c=0,a=d):a+u>=1?(c=(t*l-1)*Math.pow(2,r),a+=u):(c=t*Math.pow(2,u-1)*Math.pow(2,r),a=0));r>=8;e[n+m]=255&c,m+=h,c/=256,r-=8);for(a=a<0;e[n+m]=255&a,m+=h,a/=256,s-=8);e[n+m-h]|=128*f}},function(e,t,n){"use strict";var o={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==o.call(e)}},function(e,t,n){"use strict";var o=n(20),r=Object.prototype.hasOwnProperty,i=Object.prototype.toString;e.exports=new o("tag:yaml.org,2002:omap",{kind:"sequence",resolve:function(e){if(null===e)return!0;var t,n,o,a,c,l=[],s=e;for(t=0,n=s.length;t3)return!1;if("/"!==t[t.length-o.length-1])return!1}return!0},construct:function(e){var t=e,n=/\/([gim]*)$/.exec(e),o="";return"/"===t[0]&&(n&&(o=n[1]),t=t.slice(1,t.length-o.length-1)),new RegExp(t,o)},predicate:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},represent:function(e){var t="/"+e.source+"/";return e.global&&(t+="g"),e.multiline&&(t+="m"),e.ignoreCase&&(t+="i"),t}})},function(e,t,n){"use strict";var o;try{o=n(518)}catch(i){"undefined"!=typeof window&&(o=window.esprima)}var r=n(20);e.exports=new r("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:function(e){if(null===e)return!1;try{var t="("+e+")",n=o.parse(t,{range:!0});return"Program"===n.type&&1===n.body.length&&"ExpressionStatement"===n.body[0].type&&("ArrowFunctionExpression"===n.body[0].expression.type||"FunctionExpression"===n.body[0].expression.type)}catch(r){return!1}},construct:function(e){var t,n="("+e+")",r=o.parse(n,{range:!0}),i=[];if("Program"!==r.type||1!==r.body.length||"ExpressionStatement"!==r.body[0].type||"ArrowFunctionExpression"!==r.body[0].expression.type&&"FunctionExpression"!==r.body[0].expression.type)throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach((function(e){i.push(e.name)})),t=r.body[0].expression.body.range,"BlockStatement"===r.body[0].expression.body.type?new Function(i,n.slice(t[0]+1,t[1]-1)):new Function(i,"return "+n.slice(t[0],t[1]))},predicate:function(e){return"[object Function]"===Object.prototype.toString.call(e)},represent:function(e){return e.toString()}})},function(e,t,n){"use strict";var o;o=function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={exports:{},id:o,loaded:!1};return e[o].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}return n.m=e,n.c=t,n.p="",n(0)}([function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=n(3),i=n(8),a=n(15);function c(e,t,n){var a=null,c=function(e,t){n&&n(e,t),a&&a.visit(e,t)},l="function"==typeof n?c:null,s=!1;if(t){s="boolean"==typeof t.comment&&t.comment;var d="boolean"==typeof t.attachComment&&t.attachComment;(s||d)&&((a=new o.CommentHandler).attach=d,t.comment=!0,l=c)}var u,p=!1;t&&"string"==typeof t.sourceType&&(p="module"===t.sourceType),u=t&&"boolean"==typeof t.jsx&&t.jsx?new r.JSXParser(e,t,l):new i.Parser(e,t,l);var m=p?u.parseModule():u.parseScript();return s&&a&&(m.comments=a.comments),u.config.tokens&&(m.tokens=u.tokens),u.config.tolerant&&(m.errors=u.errorHandler.errors),m}t.parse=c,t.parseModule=function(e,t,n){var o=t||{};return o.sourceType="module",c(e,o,n)},t.parseScript=function(e,t,n){var o=t||{};return o.sourceType="script",c(e,o,n)},t.tokenize=function(e,t,n){var o,r=new a.Tokenizer(e,t);o=[];try{for(;;){var i=r.getNextToken();if(!i)break;n&&(i=n(i)),o.push(i)}}catch(c){r.errorHandler.tolerate(c)}return r.errorHandler.tolerant&&(o.errors=r.errors()),o};var l=n(2);t.Syntax=l.Syntax,t.version="4.0.1"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=function(){function e(){this.attach=!1,this.comments=[],this.stack=[],this.leading=[],this.trailing=[]}return e.prototype.insertInnerComments=function(e,t){if(e.type===o.Syntax.BlockStatement&&0===e.body.length){for(var n=[],r=this.leading.length-1;r>=0;--r){var i=this.leading[r];t.end.offset>=i.start&&(n.unshift(i.comment),this.leading.splice(r,1),this.trailing.splice(r,1))}n.length&&(e.innerComments=n)}},e.prototype.findTrailingComments=function(e){var t=[];if(this.trailing.length>0){for(var n=this.trailing.length-1;n>=0;--n){var o=this.trailing[n];o.start>=e.end.offset&&t.unshift(o.comment)}return this.trailing.length=0,t}var r=this.stack[this.stack.length-1];if(r&&r.node.trailingComments){var i=r.node.trailingComments[0];i&&i.range[0]>=e.end.offset&&(t=r.node.trailingComments,delete r.node.trailingComments)}return t},e.prototype.findLeadingComments=function(e){for(var t,n=[];this.stack.length>0&&((i=this.stack[this.stack.length-1])&&i.start>=e.start.offset);)t=i.node,this.stack.pop();if(t){for(var o=(t.leadingComments?t.leadingComments.length:0)-1;o>=0;--o){var r=t.leadingComments[o];r.range[1]<=e.start.offset&&(n.unshift(r),t.leadingComments.splice(o,1))}return t.leadingComments&&0===t.leadingComments.length&&delete t.leadingComments,n}for(o=this.leading.length-1;o>=0;--o){var i;(i=this.leading[o]).start<=e.start.offset&&(n.unshift(i.comment),this.leading.splice(o,1))}return n},e.prototype.visitNode=function(e,t){if(!(e.type===o.Syntax.Program&&e.body.length>0)){this.insertInnerComments(e,t);var n=this.findTrailingComments(t),r=this.findLeadingComments(t);r.length>0&&(e.leadingComments=r),n.length>0&&(e.trailingComments=n),this.stack.push({node:e,start:t.start.offset})}},e.prototype.visitComment=function(e,t){var n="L"===e.type[0]?"Line":"Block",o={type:n,value:e.value};if(e.range&&(o.range=e.range),e.loc&&(o.loc=e.loc),this.comments.push(o),this.attach){var r={comment:{type:n,value:e.value,range:[t.start.offset,t.end.offset]},start:t.start.offset};e.loc&&(r.comment.loc=e.loc),e.type=n,this.leading.push(r),this.trailing.push(r)}},e.prototype.visit=function(e,t){"LineComment"===e.type||"BlockComment"===e.type?this.visitComment(e,t):this.attach&&this.visitNode(e,t)},e}();t.CommentHandler=r},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Syntax={AssignmentExpression:"AssignmentExpression",AssignmentPattern:"AssignmentPattern",ArrayExpression:"ArrayExpression",ArrayPattern:"ArrayPattern",ArrowFunctionExpression:"ArrowFunctionExpression",AwaitExpression:"AwaitExpression",BlockStatement:"BlockStatement",BinaryExpression:"BinaryExpression",BreakStatement:"BreakStatement",CallExpression:"CallExpression",CatchClause:"CatchClause",ClassBody:"ClassBody",ClassDeclaration:"ClassDeclaration",ClassExpression:"ClassExpression",ConditionalExpression:"ConditionalExpression",ContinueStatement:"ContinueStatement",DoWhileStatement:"DoWhileStatement",DebuggerStatement:"DebuggerStatement",EmptyStatement:"EmptyStatement",ExportAllDeclaration:"ExportAllDeclaration",ExportDefaultDeclaration:"ExportDefaultDeclaration",ExportNamedDeclaration:"ExportNamedDeclaration",ExportSpecifier:"ExportSpecifier",ExpressionStatement:"ExpressionStatement",ForStatement:"ForStatement",ForOfStatement:"ForOfStatement",ForInStatement:"ForInStatement",FunctionDeclaration:"FunctionDeclaration",FunctionExpression:"FunctionExpression",Identifier:"Identifier",IfStatement:"IfStatement",ImportDeclaration:"ImportDeclaration",ImportDefaultSpecifier:"ImportDefaultSpecifier",ImportNamespaceSpecifier:"ImportNamespaceSpecifier",ImportSpecifier:"ImportSpecifier",Literal:"Literal",LabeledStatement:"LabeledStatement",LogicalExpression:"LogicalExpression",MemberExpression:"MemberExpression",MetaProperty:"MetaProperty",MethodDefinition:"MethodDefinition",NewExpression:"NewExpression",ObjectExpression:"ObjectExpression",ObjectPattern:"ObjectPattern",Program:"Program",Property:"Property",RestElement:"RestElement",ReturnStatement:"ReturnStatement",SequenceExpression:"SequenceExpression",SpreadElement:"SpreadElement",Super:"Super",SwitchCase:"SwitchCase",SwitchStatement:"SwitchStatement",TaggedTemplateExpression:"TaggedTemplateExpression",TemplateElement:"TemplateElement",TemplateLiteral:"TemplateLiteral",ThisExpression:"ThisExpression",ThrowStatement:"ThrowStatement",TryStatement:"TryStatement",UnaryExpression:"UnaryExpression",UpdateExpression:"UpdateExpression",VariableDeclaration:"VariableDeclaration",VariableDeclarator:"VariableDeclarator",WhileStatement:"WhileStatement",WithStatement:"WithStatement",YieldExpression:"YieldExpression"}},function(e,t,n){var o,r=this&&this.__extends||(o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(4),a=n(5),c=n(6),l=n(7),s=n(8),d=n(13),u=n(14);function p(e){var t;switch(e.type){case c.JSXSyntax.JSXIdentifier:t=e.name;break;case c.JSXSyntax.JSXNamespacedName:var n=e;t=p(n.namespace)+":"+p(n.name);break;case c.JSXSyntax.JSXMemberExpression:var o=e;t=p(o.object)+"."+p(o.property)}return t}d.TokenName[100]="JSXIdentifier",d.TokenName[101]="JSXText";var m=function(e){function t(t,n,o){return e.call(this,t,n,o)||this}return r(t,e),t.prototype.parsePrimaryExpression=function(){return this.match("<")?this.parseJSXRoot():e.prototype.parsePrimaryExpression.call(this)},t.prototype.startJSX=function(){this.scanner.index=this.startMarker.index,this.scanner.lineNumber=this.startMarker.line,this.scanner.lineStart=this.startMarker.index-this.startMarker.column},t.prototype.finishJSX=function(){this.nextToken()},t.prototype.reenterJSX=function(){this.startJSX(),this.expectJSX("}"),this.config.tokens&&this.tokens.pop()},t.prototype.createJSXNode=function(){return this.collectComments(),{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.createJSXChildNode=function(){return{index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}},t.prototype.scanXHTMLEntity=function(e){for(var t="&",n=!0,o=!1,r=!1,a=!1;!this.scanner.eof()&&n&&!o;){var c=this.scanner.source[this.scanner.index];if(c===e)break;if(o=";"===c,t+=c,++this.scanner.index,!o)switch(t.length){case 2:r="#"===c;break;case 3:r&&(n=(a="x"===c)||i.Character.isDecimalDigit(c.charCodeAt(0)),r=r&&!a);break;default:n=(n=n&&!(r&&!i.Character.isDecimalDigit(c.charCodeAt(0))))&&!(a&&!i.Character.isHexDigit(c.charCodeAt(0)))}}if(n&&o&&t.length>2){var l=t.substr(1,t.length-2);r&&l.length>1?t=String.fromCharCode(parseInt(l.substr(1),10)):a&&l.length>2?t=String.fromCharCode(parseInt("0"+l.substr(1),16)):r||a||!u.XHTMLEntities[l]||(t=u.XHTMLEntities[l])}return t},t.prototype.lexJSX=function(){var e=this.scanner.source.charCodeAt(this.scanner.index);if(60===e||62===e||47===e||58===e||61===e||123===e||125===e)return{type:7,value:c=this.scanner.source[this.scanner.index++],lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index-1,end:this.scanner.index};if(34===e||39===e){for(var t=this.scanner.index,n=this.scanner.source[this.scanner.index++],o="";!this.scanner.eof()&&(l=this.scanner.source[this.scanner.index++])!==n;)o+="&"===l?this.scanXHTMLEntity(n):l;return{type:8,value:o,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(46===e){var r=this.scanner.source.charCodeAt(this.scanner.index+1),a=this.scanner.source.charCodeAt(this.scanner.index+2),c=46===r&&46===a?"...":".";return t=this.scanner.index,this.scanner.index+=c.length,{type:7,value:c,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}if(96===e)return{type:10,value:"",lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:this.scanner.index,end:this.scanner.index};if(i.Character.isIdentifierStart(e)&&92!==e){for(t=this.scanner.index,++this.scanner.index;!this.scanner.eof();){var l=this.scanner.source.charCodeAt(this.scanner.index);if(i.Character.isIdentifierPart(l)&&92!==l)++this.scanner.index;else{if(45!==l)break;++this.scanner.index}}return{type:100,value:this.scanner.source.slice(t,this.scanner.index),lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:t,end:this.scanner.index}}return this.scanner.lex()},t.prototype.nextJSXToken=function(){this.collectComments(),this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;var e=this.lexJSX();return this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.config.tokens&&this.tokens.push(this.convertToken(e)),e},t.prototype.nextJSXText=function(){this.startMarker.index=this.scanner.index,this.startMarker.line=this.scanner.lineNumber,this.startMarker.column=this.scanner.index-this.scanner.lineStart;for(var e=this.scanner.index,t="";!this.scanner.eof();){var n=this.scanner.source[this.scanner.index];if("{"===n||"<"===n)break;++this.scanner.index,t+=n,i.Character.isLineTerminator(n.charCodeAt(0))&&(++this.scanner.lineNumber,"\r"===n&&"\n"===this.scanner.source[this.scanner.index]&&++this.scanner.index,this.scanner.lineStart=this.scanner.index)}this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart;var o={type:101,value:t,lineNumber:this.scanner.lineNumber,lineStart:this.scanner.lineStart,start:e,end:this.scanner.index};return t.length>0&&this.config.tokens&&this.tokens.push(this.convertToken(o)),o},t.prototype.peekJSXToken=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.lexJSX();return this.scanner.restoreState(e),t},t.prototype.expectJSX=function(e){var t=this.nextJSXToken();7===t.type&&t.value===e||this.throwUnexpectedToken(t)},t.prototype.matchJSX=function(e){var t=this.peekJSXToken();return 7===t.type&&t.value===e},t.prototype.parseJSXIdentifier=function(){var e=this.createJSXNode(),t=this.nextJSXToken();return 100!==t.type&&this.throwUnexpectedToken(t),this.finalize(e,new a.JSXIdentifier(t.value))},t.prototype.parseJSXElementName=function(){var e=this.createJSXNode(),t=this.parseJSXIdentifier();if(this.matchJSX(":")){var n=t;this.expectJSX(":");var o=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXNamespacedName(n,o))}else if(this.matchJSX("."))for(;this.matchJSX(".");){var r=t;this.expectJSX(".");var i=this.parseJSXIdentifier();t=this.finalize(e,new a.JSXMemberExpression(r,i))}return t},t.prototype.parseJSXAttributeName=function(){var e,t=this.createJSXNode(),n=this.parseJSXIdentifier();if(this.matchJSX(":")){var o=n;this.expectJSX(":");var r=this.parseJSXIdentifier();e=this.finalize(t,new a.JSXNamespacedName(o,r))}else e=n;return e},t.prototype.parseJSXStringLiteralAttribute=function(){var e=this.createJSXNode(),t=this.nextJSXToken();8!==t.type&&this.throwUnexpectedToken(t);var n=this.getTokenRaw(t);return this.finalize(e,new l.Literal(t.value,n))},t.prototype.parseJSXExpressionAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.finishJSX(),this.match("}")&&this.tolerateError("JSX attributes must only be assigned a non-empty expression");var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXExpressionContainer(t))},t.prototype.parseJSXAttributeValue=function(){return this.matchJSX("{")?this.parseJSXExpressionAttribute():this.matchJSX("<")?this.parseJSXElement():this.parseJSXStringLiteralAttribute()},t.prototype.parseJSXNameValueAttribute=function(){var e=this.createJSXNode(),t=this.parseJSXAttributeName(),n=null;return this.matchJSX("=")&&(this.expectJSX("="),n=this.parseJSXAttributeValue()),this.finalize(e,new a.JSXAttribute(t,n))},t.prototype.parseJSXSpreadAttribute=function(){var e=this.createJSXNode();this.expectJSX("{"),this.expectJSX("..."),this.finishJSX();var t=this.parseAssignmentExpression();return this.reenterJSX(),this.finalize(e,new a.JSXSpreadAttribute(t))},t.prototype.parseJSXAttributes=function(){for(var e=[];!this.matchJSX("/")&&!this.matchJSX(">");){var t=this.matchJSX("{")?this.parseJSXSpreadAttribute():this.parseJSXNameValueAttribute();e.push(t)}return e},t.prototype.parseJSXOpeningElement=function(){var e=this.createJSXNode();this.expectJSX("<");var t=this.parseJSXElementName(),n=this.parseJSXAttributes(),o=this.matchJSX("/");return o&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(t,o,n))},t.prototype.parseJSXBoundaryElement=function(){var e=this.createJSXNode();if(this.expectJSX("<"),this.matchJSX("/")){this.expectJSX("/");var t=this.parseJSXElementName();return this.expectJSX(">"),this.finalize(e,new a.JSXClosingElement(t))}var n=this.parseJSXElementName(),o=this.parseJSXAttributes(),r=this.matchJSX("/");return r&&this.expectJSX("/"),this.expectJSX(">"),this.finalize(e,new a.JSXOpeningElement(n,r,o))},t.prototype.parseJSXEmptyExpression=function(){var e=this.createJSXChildNode();return this.collectComments(),this.lastMarker.index=this.scanner.index,this.lastMarker.line=this.scanner.lineNumber,this.lastMarker.column=this.scanner.index-this.scanner.lineStart,this.finalize(e,new a.JSXEmptyExpression)},t.prototype.parseJSXExpressionContainer=function(){var e,t=this.createJSXNode();return this.expectJSX("{"),this.matchJSX("}")?(e=this.parseJSXEmptyExpression(),this.expectJSX("}")):(this.finishJSX(),e=this.parseAssignmentExpression(),this.reenterJSX()),this.finalize(t,new a.JSXExpressionContainer(e))},t.prototype.parseJSXChildren=function(){for(var e=[];!this.scanner.eof();){var t=this.createJSXChildNode(),n=this.nextJSXText();if(n.start0))break;i=this.finalize(e.node,new a.JSXElement(e.opening,e.children,e.closing)),(e=t[t.length-1]).children.push(i),t.pop()}}return e},t.prototype.parseJSXElement=function(){var e=this.createJSXNode(),t=this.parseJSXOpeningElement(),n=[],o=null;if(!t.selfClosing){var r=this.parseComplexJSXElement({node:e,opening:t,closing:o,children:n});n=r.children,o=r.closing}return this.finalize(e,new a.JSXElement(t,n,o))},t.prototype.parseJSXRoot=function(){this.config.tokens&&this.tokens.pop(),this.startJSX();var e=this.parseJSXElement();return this.finishJSX(),e},t.prototype.isStartOfExpression=function(){return e.prototype.isStartOfExpression.call(this)||this.match("<")},t}(s.Parser);t.JSXParser=m},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n={NonAsciiIdentifierStart:/[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B4\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDF00-\uDF19]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]/,NonAsciiIdentifierPart:/[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B4\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FD5\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7AD\uA7B0-\uA7B7\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB65\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDCA-\uDDCC\uDDD0-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9\uDF00-\uDF19\uDF1D-\uDF2B\uDF30-\uDF39]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|[\uD80C\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/};t.Character={fromCodePoint:function(e){return e<65536?String.fromCharCode(e):String.fromCharCode(55296+(e-65536>>10))+String.fromCharCode(56320+(e-65536&1023))},isWhiteSpace:function(e){return 32===e||9===e||11===e||12===e||160===e||e>=5760&&[5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279].indexOf(e)>=0},isLineTerminator:function(e){return 10===e||13===e||8232===e||8233===e},isIdentifierStart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||92===e||e>=128&&n.NonAsciiIdentifierStart.test(t.Character.fromCodePoint(e))},isIdentifierPart:function(e){return 36===e||95===e||e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||92===e||e>=128&&n.NonAsciiIdentifierPart.test(t.Character.fromCodePoint(e))},isDecimalDigit:function(e){return e>=48&&e<=57},isHexDigit:function(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102},isOctalDigit:function(e){return e>=48&&e<=55}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(6),r=function(e){this.type=o.JSXSyntax.JSXClosingElement,this.name=e};t.JSXClosingElement=r;var i=function(e,t,n){this.type=o.JSXSyntax.JSXElement,this.openingElement=e,this.children=t,this.closingElement=n};t.JSXElement=i;var a=function(){this.type=o.JSXSyntax.JSXEmptyExpression};t.JSXEmptyExpression=a;var c=function(e){this.type=o.JSXSyntax.JSXExpressionContainer,this.expression=e};t.JSXExpressionContainer=c;var l=function(e){this.type=o.JSXSyntax.JSXIdentifier,this.name=e};t.JSXIdentifier=l;var s=function(e,t){this.type=o.JSXSyntax.JSXMemberExpression,this.object=e,this.property=t};t.JSXMemberExpression=s;var d=function(e,t){this.type=o.JSXSyntax.JSXAttribute,this.name=e,this.value=t};t.JSXAttribute=d;var u=function(e,t){this.type=o.JSXSyntax.JSXNamespacedName,this.namespace=e,this.name=t};t.JSXNamespacedName=u;var p=function(e,t,n){this.type=o.JSXSyntax.JSXOpeningElement,this.name=e,this.selfClosing=t,this.attributes=n};t.JSXOpeningElement=p;var m=function(e){this.type=o.JSXSyntax.JSXSpreadAttribute,this.argument=e};t.JSXSpreadAttribute=m;var h=function(e,t){this.type=o.JSXSyntax.JSXText,this.value=e,this.raw=t};t.JSXText=h},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.JSXSyntax={JSXAttribute:"JSXAttribute",JSXClosingElement:"JSXClosingElement",JSXElement:"JSXElement",JSXEmptyExpression:"JSXEmptyExpression",JSXExpressionContainer:"JSXExpressionContainer",JSXIdentifier:"JSXIdentifier",JSXMemberExpression:"JSXMemberExpression",JSXNamespacedName:"JSXNamespacedName",JSXOpeningElement:"JSXOpeningElement",JSXSpreadAttribute:"JSXSpreadAttribute",JSXText:"JSXText"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(2),r=function(e){this.type=o.Syntax.ArrayExpression,this.elements=e};t.ArrayExpression=r;var i=function(e){this.type=o.Syntax.ArrayPattern,this.elements=e};t.ArrayPattern=i;var a=function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!1};t.ArrowFunctionExpression=a;var c=function(e,t,n){this.type=o.Syntax.AssignmentExpression,this.operator=e,this.left=t,this.right=n};t.AssignmentExpression=c;var l=function(e,t){this.type=o.Syntax.AssignmentPattern,this.left=e,this.right=t};t.AssignmentPattern=l;var s=function(e,t,n){this.type=o.Syntax.ArrowFunctionExpression,this.id=null,this.params=e,this.body=t,this.generator=!1,this.expression=n,this.async=!0};t.AsyncArrowFunctionExpression=s;var d=function(e,t,n){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionDeclaration=d;var u=function(e,t,n){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=!1,this.expression=!1,this.async=!0};t.AsyncFunctionExpression=u;var p=function(e){this.type=o.Syntax.AwaitExpression,this.argument=e};t.AwaitExpression=p;var m=function(e,t,n){var r="||"===e||"&&"===e;this.type=r?o.Syntax.LogicalExpression:o.Syntax.BinaryExpression,this.operator=e,this.left=t,this.right=n};t.BinaryExpression=m;var h=function(e){this.type=o.Syntax.BlockStatement,this.body=e};t.BlockStatement=h;var f=function(e){this.type=o.Syntax.BreakStatement,this.label=e};t.BreakStatement=f;var C=function(e,t){this.type=o.Syntax.CallExpression,this.callee=e,this.arguments=t};t.CallExpression=C;var g=function(e,t){this.type=o.Syntax.CatchClause,this.param=e,this.body=t};t.CatchClause=g;var N=function(e){this.type=o.Syntax.ClassBody,this.body=e};t.ClassBody=N;var b=function(e,t,n){this.type=o.Syntax.ClassDeclaration,this.id=e,this.superClass=t,this.body=n};t.ClassDeclaration=b;var V=function(e,t,n){this.type=o.Syntax.ClassExpression,this.id=e,this.superClass=t,this.body=n};t.ClassExpression=V;var v=function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!0,this.object=e,this.property=t};t.ComputedMemberExpression=v;var x=function(e,t,n){this.type=o.Syntax.ConditionalExpression,this.test=e,this.consequent=t,this.alternate=n};t.ConditionalExpression=x;var y=function(e){this.type=o.Syntax.ContinueStatement,this.label=e};t.ContinueStatement=y;var k=function(){this.type=o.Syntax.DebuggerStatement};t.DebuggerStatement=k;var w=function(e,t){this.type=o.Syntax.ExpressionStatement,this.expression=e,this.directive=t};t.Directive=w;var _=function(e,t){this.type=o.Syntax.DoWhileStatement,this.body=e,this.test=t};t.DoWhileStatement=_;var B=function(){this.type=o.Syntax.EmptyStatement};t.EmptyStatement=B;var S=function(e){this.type=o.Syntax.ExportAllDeclaration,this.source=e};t.ExportAllDeclaration=S;var L=function(e){this.type=o.Syntax.ExportDefaultDeclaration,this.declaration=e};t.ExportDefaultDeclaration=L;var A=function(e,t,n){this.type=o.Syntax.ExportNamedDeclaration,this.declaration=e,this.specifiers=t,this.source=n};t.ExportNamedDeclaration=A;var I=function(e,t){this.type=o.Syntax.ExportSpecifier,this.exported=t,this.local=e};t.ExportSpecifier=I;var E=function(e){this.type=o.Syntax.ExpressionStatement,this.expression=e};t.ExpressionStatement=E;var D=function(e,t,n){this.type=o.Syntax.ForInStatement,this.left=e,this.right=t,this.body=n,this.each=!1};t.ForInStatement=D;var T=function(e,t,n){this.type=o.Syntax.ForOfStatement,this.left=e,this.right=t,this.body=n};t.ForOfStatement=T;var F=function(e,t,n,r){this.type=o.Syntax.ForStatement,this.init=e,this.test=t,this.update=n,this.body=r};t.ForStatement=F;var M=function(e,t,n,r){this.type=o.Syntax.FunctionDeclaration,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionDeclaration=M;var P=function(e,t,n,r){this.type=o.Syntax.FunctionExpression,this.id=e,this.params=t,this.body=n,this.generator=r,this.expression=!1,this.async=!1};t.FunctionExpression=P;var O=function(e){this.type=o.Syntax.Identifier,this.name=e};t.Identifier=O;var R=function(e,t,n){this.type=o.Syntax.IfStatement,this.test=e,this.consequent=t,this.alternate=n};t.IfStatement=R;var j=function(e,t){this.type=o.Syntax.ImportDeclaration,this.specifiers=e,this.source=t};t.ImportDeclaration=j;var U=function(e){this.type=o.Syntax.ImportDefaultSpecifier,this.local=e};t.ImportDefaultSpecifier=U;var z=function(e){this.type=o.Syntax.ImportNamespaceSpecifier,this.local=e};t.ImportNamespaceSpecifier=z;var W=function(e,t){this.type=o.Syntax.ImportSpecifier,this.local=e,this.imported=t};t.ImportSpecifier=W;var H=function(e,t){this.type=o.Syntax.LabeledStatement,this.label=e,this.body=t};t.LabeledStatement=H;var K=function(e,t){this.type=o.Syntax.Literal,this.value=e,this.raw=t};t.Literal=K;var G=function(e,t){this.type=o.Syntax.MetaProperty,this.meta=e,this.property=t};t.MetaProperty=G;var Y=function(e,t,n,r,i){this.type=o.Syntax.MethodDefinition,this.key=e,this.computed=t,this.value=n,this.kind=r,this["static"]=i};t.MethodDefinition=Y;var q=function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="module"};t.Module=q;var X=function(e,t){this.type=o.Syntax.NewExpression,this.callee=e,this.arguments=t};t.NewExpression=X;var J=function(e){this.type=o.Syntax.ObjectExpression,this.properties=e};t.ObjectExpression=J;var $=function(e){this.type=o.Syntax.ObjectPattern,this.properties=e};t.ObjectPattern=$;var Z=function(e,t,n,r,i,a){this.type=o.Syntax.Property,this.key=t,this.computed=n,this.value=r,this.kind=e,this.method=i,this.shorthand=a};t.Property=Z;var Q=function(e,t,n,r){this.type=o.Syntax.Literal,this.value=e,this.raw=t,this.regex={pattern:n,flags:r}};t.RegexLiteral=Q;var ee=function(e){this.type=o.Syntax.RestElement,this.argument=e};t.RestElement=ee;var te=function(e){this.type=o.Syntax.ReturnStatement,this.argument=e};t.ReturnStatement=te;var ne=function(e){this.type=o.Syntax.Program,this.body=e,this.sourceType="script"};t.Script=ne;var oe=function(e){this.type=o.Syntax.SequenceExpression,this.expressions=e};t.SequenceExpression=oe;var re=function(e){this.type=o.Syntax.SpreadElement,this.argument=e};t.SpreadElement=re;var ie=function(e,t){this.type=o.Syntax.MemberExpression,this.computed=!1,this.object=e,this.property=t};t.StaticMemberExpression=ie;var ae=function(){this.type=o.Syntax.Super};t.Super=ae;var ce=function(e,t){this.type=o.Syntax.SwitchCase,this.test=e,this.consequent=t};t.SwitchCase=ce;var le=function(e,t){this.type=o.Syntax.SwitchStatement,this.discriminant=e,this.cases=t};t.SwitchStatement=le;var se=function(e,t){this.type=o.Syntax.TaggedTemplateExpression,this.tag=e,this.quasi=t};t.TaggedTemplateExpression=se;var de=function(e,t){this.type=o.Syntax.TemplateElement,this.value=e,this.tail=t};t.TemplateElement=de;var ue=function(e,t){this.type=o.Syntax.TemplateLiteral,this.quasis=e,this.expressions=t};t.TemplateLiteral=ue;var pe=function(){this.type=o.Syntax.ThisExpression};t.ThisExpression=pe;var me=function(e){this.type=o.Syntax.ThrowStatement,this.argument=e};t.ThrowStatement=me;var he=function(e,t,n){this.type=o.Syntax.TryStatement,this.block=e,this.handler=t,this.finalizer=n};t.TryStatement=he;var fe=function(e,t){this.type=o.Syntax.UnaryExpression,this.operator=e,this.argument=t,this.prefix=!0};t.UnaryExpression=fe;var Ce=function(e,t,n){this.type=o.Syntax.UpdateExpression,this.operator=e,this.argument=t,this.prefix=n};t.UpdateExpression=Ce;var ge=function(e,t){this.type=o.Syntax.VariableDeclaration,this.declarations=e,this.kind=t};t.VariableDeclaration=ge;var Ne=function(e,t){this.type=o.Syntax.VariableDeclarator,this.id=e,this.init=t};t.VariableDeclarator=Ne;var be=function(e,t){this.type=o.Syntax.WhileStatement,this.test=e,this.body=t};t.WhileStatement=be;var Ve=function(e,t){this.type=o.Syntax.WithStatement,this.object=e,this.body=t};t.WithStatement=Ve;var ve=function(e,t){this.type=o.Syntax.YieldExpression,this.argument=e,this.delegate=t};t.YieldExpression=ve},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),r=n(10),i=n(11),a=n(7),c=n(12),l=n(2),s=n(13),d=function(){function e(e,t,n){void 0===t&&(t={}),this.config={range:"boolean"==typeof t.range&&t.range,loc:"boolean"==typeof t.loc&&t.loc,source:null,tokens:"boolean"==typeof t.tokens&&t.tokens,comment:"boolean"==typeof t.comment&&t.comment,tolerant:"boolean"==typeof t.tolerant&&t.tolerant},this.config.loc&&t.source&&null!==t.source&&(this.config.source=String(t.source)),this.delegate=n,this.errorHandler=new r.ErrorHandler,this.errorHandler.tolerant=this.config.tolerant,this.scanner=new c.Scanner(e,this.errorHandler),this.scanner.trackComment=this.config.comment,this.operatorPrecedence={")":0,";":0,",":0,"=":0,"]":0,"||":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":11,"/":11,"%":11},this.lookahead={type:2,value:"",lineNumber:this.scanner.lineNumber,lineStart:0,start:0,end:0},this.hasLineTerminator=!1,this.context={isModule:!1,await:!1,allowIn:!0,allowStrictDirective:!0,allowYield:!0,firstCoverInitializedNameError:null,isAssignmentTarget:!1,isBindingElement:!1,inFunctionBody:!1,inIteration:!1,inSwitch:!1,labelSet:{},strict:!1},this.tokens=[],this.startMarker={index:0,line:this.scanner.lineNumber,column:0},this.lastMarker={index:0,line:this.scanner.lineNumber,column:0},this.nextToken(),this.lastMarker={index:this.scanner.index,line:this.scanner.lineNumber,column:this.scanner.index-this.scanner.lineStart}}return e.prototype.throwError=function(e){for(var t=[],n=1;n0&&this.delegate)for(var t=0;t>="===e||">>>="===e||"&="===e||"^="===e||"|="===e},e.prototype.isolateCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return null!==this.context.firstCoverInitializedNameError&&this.throwUnexpectedToken(this.context.firstCoverInitializedNameError),this.context.isBindingElement=t,this.context.isAssignmentTarget=n,this.context.firstCoverInitializedNameError=o,r},e.prototype.inheritCoverGrammar=function(e){var t=this.context.isBindingElement,n=this.context.isAssignmentTarget,o=this.context.firstCoverInitializedNameError;this.context.isBindingElement=!0,this.context.isAssignmentTarget=!0,this.context.firstCoverInitializedNameError=null;var r=e.call(this);return this.context.isBindingElement=this.context.isBindingElement&&t,this.context.isAssignmentTarget=this.context.isAssignmentTarget&&n,this.context.firstCoverInitializedNameError=o||this.context.firstCoverInitializedNameError,r},e.prototype.consumeSemicolon=function(){this.match(";")?this.nextToken():this.hasLineTerminator||(2===this.lookahead.type||this.match("}")||this.throwUnexpectedToken(this.lookahead),this.lastMarker.index=this.startMarker.index,this.lastMarker.line=this.startMarker.line,this.lastMarker.column=this.startMarker.column)},e.prototype.parsePrimaryExpression=function(){var e,t,n,o=this.createNode();switch(this.lookahead.type){case 3:(this.context.isModule||this.context.await)&&"await"===this.lookahead.value&&this.tolerateUnexpectedToken(this.lookahead),e=this.matchAsyncFunction()?this.parseFunctionExpression():this.finalize(o,new a.Identifier(this.nextToken().value));break;case 6:case 8:this.context.strict&&this.lookahead.octal&&this.tolerateUnexpectedToken(this.lookahead,i.Messages.StrictOctalLiteral),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.Literal(t.value,n));break;case 1:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.Literal("true"===t.value,n));break;case 5:this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,t=this.nextToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.Literal(null,n));break;case 10:e=this.parseTemplateLiteral();break;case 7:switch(this.lookahead.value){case"(":this.context.isBindingElement=!1,e=this.inheritCoverGrammar(this.parseGroupExpression);break;case"[":e=this.inheritCoverGrammar(this.parseArrayInitializer);break;case"{":e=this.inheritCoverGrammar(this.parseObjectInitializer);break;case"/":case"/=":this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.scanner.index=this.startMarker.index,t=this.nextRegexToken(),n=this.getTokenRaw(t),e=this.finalize(o,new a.RegexLiteral(t.regex,n,t.pattern,t.flags));break;default:e=this.throwUnexpectedToken(this.nextToken())}break;case 4:!this.context.strict&&this.context.allowYield&&this.matchKeyword("yield")?e=this.parseIdentifierName():!this.context.strict&&this.matchKeyword("let")?e=this.finalize(o,new a.Identifier(this.nextToken().value)):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.matchKeyword("function")?e=this.parseFunctionExpression():this.matchKeyword("this")?(this.nextToken(),e=this.finalize(o,new a.ThisExpression)):e=this.matchKeyword("class")?this.parseClassExpression():this.throwUnexpectedToken(this.nextToken()));break;default:e=this.throwUnexpectedToken(this.nextToken())}return e},e.prototype.parseSpreadElement=function(){var e=this.createNode();this.expect("...");var t=this.inheritCoverGrammar(this.parseAssignmentExpression);return this.finalize(e,new a.SpreadElement(t))},e.prototype.parseArrayInitializer=function(){var e=this.createNode(),t=[];for(this.expect("[");!this.match("]");)if(this.match(","))this.nextToken(),t.push(null);else if(this.match("...")){var n=this.parseSpreadElement();this.match("]")||(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1,this.expect(",")),t.push(n)}else t.push(this.inheritCoverGrammar(this.parseAssignmentExpression)),this.match("]")||this.expect(",");return this.expect("]"),this.finalize(e,new a.ArrayExpression(t))},e.prototype.parsePropertyMethod=function(e){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var t=this.context.strict,n=this.context.allowStrictDirective;this.context.allowStrictDirective=e.simple;var o=this.isolateCoverGrammar(this.parseFunctionSourceElements);return this.context.strict&&e.firstRestricted&&this.tolerateUnexpectedToken(e.firstRestricted,e.message),this.context.strict&&e.stricted&&this.tolerateUnexpectedToken(e.stricted,e.message),this.context.strict=t,this.context.allowStrictDirective=n,o},e.prototype.parsePropertyMethodFunction=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters(),o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!1))},e.prototype.parsePropertyMethodAsyncFunction=function(){var e=this.createNode(),t=this.context.allowYield,n=this.context.await;this.context.allowYield=!1,this.context.await=!0;var o=this.parseFormalParameters(),r=this.parsePropertyMethod(o);return this.context.allowYield=t,this.context.await=n,this.finalize(e,new a.AsyncFunctionExpression(null,o.params,r))},e.prototype.parseObjectPropertyKey=function(){var e,t=this.createNode(),n=this.nextToken();switch(n.type){case 8:case 6:this.context.strict&&n.octal&&this.tolerateUnexpectedToken(n,i.Messages.StrictOctalLiteral);var o=this.getTokenRaw(n);e=this.finalize(t,new a.Literal(n.value,o));break;case 3:case 1:case 5:case 4:e=this.finalize(t,new a.Identifier(n.value));break;case 7:"["===n.value?(e=this.isolateCoverGrammar(this.parseAssignmentExpression),this.expect("]")):e=this.throwUnexpectedToken(n);break;default:e=this.throwUnexpectedToken(n)}return e},e.prototype.isPropertyKey=function(e,t){return e.type===l.Syntax.Identifier&&e.name===t||e.type===l.Syntax.Literal&&e.value===t},e.prototype.parseObjectProperty=function(e){var t,n=this.createNode(),o=this.lookahead,r=null,c=null,l=!1,s=!1,d=!1,u=!1;if(3===o.type){var p=o.value;this.nextToken(),l=this.match("["),r=(u=!(this.hasLineTerminator||"async"!==p||this.match(":")||this.match("(")||this.match("*")||this.match(",")))?this.parseObjectPropertyKey():this.finalize(n,new a.Identifier(p))}else this.match("*")?this.nextToken():(l=this.match("["),r=this.parseObjectPropertyKey());var m=this.qualifiedPropertyName(this.lookahead);if(3===o.type&&!u&&"get"===o.value&&m)t="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,c=this.parseGetterMethod();else if(3===o.type&&!u&&"set"===o.value&&m)t="set",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseSetterMethod();else if(7===o.type&&"*"===o.value&&m)t="init",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseGeneratorMethod(),s=!0;else if(r||this.throwUnexpectedToken(this.lookahead),t="init",this.match(":")&&!u)!l&&this.isPropertyKey(r,"__proto__")&&(e.value&&this.tolerateError(i.Messages.DuplicateProtoProperty),e.value=!0),this.nextToken(),c=this.inheritCoverGrammar(this.parseAssignmentExpression);else if(this.match("("))c=u?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0;else if(3===o.type)if(p=this.finalize(n,new a.Identifier(o.value)),this.match("=")){this.context.firstCoverInitializedNameError=this.lookahead,this.nextToken(),d=!0;var h=this.isolateCoverGrammar(this.parseAssignmentExpression);c=this.finalize(n,new a.AssignmentPattern(p,h))}else d=!0,c=p;else this.throwUnexpectedToken(this.nextToken());return this.finalize(n,new a.Property(t,r,l,c,s,d))},e.prototype.parseObjectInitializer=function(){var e=this.createNode();this.expect("{");for(var t=[],n={value:!1};!this.match("}");)t.push(this.parseObjectProperty(n)),this.match("}")||this.expectCommaSeparator();return this.expect("}"),this.finalize(e,new a.ObjectExpression(t))},e.prototype.parseTemplateHead=function(){o.assert(this.lookahead.head,"Template literal must start with a template head");var e=this.createNode(),t=this.nextToken(),n=t.value,r=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:r},t.tail))},e.prototype.parseTemplateElement=function(){10!==this.lookahead.type&&this.throwUnexpectedToken();var e=this.createNode(),t=this.nextToken(),n=t.value,o=t.cooked;return this.finalize(e,new a.TemplateElement({raw:n,cooked:o},t.tail))},e.prototype.parseTemplateLiteral=function(){var e=this.createNode(),t=[],n=[],o=this.parseTemplateHead();for(n.push(o);!o.tail;)t.push(this.parseExpression()),o=this.parseTemplateElement(),n.push(o);return this.finalize(e,new a.TemplateLiteral(n,t))},e.prototype.reinterpretExpressionAsPattern=function(e){switch(e.type){case l.Syntax.Identifier:case l.Syntax.MemberExpression:case l.Syntax.RestElement:case l.Syntax.AssignmentPattern:break;case l.Syntax.SpreadElement:e.type=l.Syntax.RestElement,this.reinterpretExpressionAsPattern(e.argument);break;case l.Syntax.ArrayExpression:e.type=l.Syntax.ArrayPattern;for(var t=0;t")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[],async:!1};else{var t=this.lookahead,n=[];if(this.match("..."))e=this.parseRestElement(n),this.expect(")"),this.match("=>")||this.expect("=>"),e={type:"ArrowParameterPlaceHolder",params:[e],async:!1};else{var o=!1;if(this.context.isBindingElement=!0,e=this.inheritCoverGrammar(this.parseAssignmentExpression),this.match(",")){var r=[];for(this.context.isAssignmentTarget=!1,r.push(e);2!==this.lookahead.type&&this.match(",");){if(this.nextToken(),this.match(")")){this.nextToken();for(var i=0;i")||this.expect("=>"),this.context.isBindingElement=!1,i=0;i")&&(e.type===l.Syntax.Identifier&&"yield"===e.name&&(o=!0,e={type:"ArrowParameterPlaceHolder",params:[e],async:!1}),!o)){if(this.context.isBindingElement||this.throwUnexpectedToken(this.lookahead),e.type===l.Syntax.SequenceExpression)for(i=0;i")){for(var l=0;l0){this.nextToken(),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;for(var r=[e,this.lookahead],i=t,c=this.isolateCoverGrammar(this.parseExponentiationExpression),l=[i,n.value,c],s=[o];!((o=this.binaryPrecedence(this.lookahead))<=0);){for(;l.length>2&&o<=s[s.length-1];){c=l.pop();var d=l.pop();s.pop(),i=l.pop(),r.pop();var u=this.startNode(r[r.length-1]);l.push(this.finalize(u,new a.BinaryExpression(d,i,c)))}l.push(this.nextToken().value),s.push(o),r.push(this.lookahead),l.push(this.isolateCoverGrammar(this.parseExponentiationExpression))}var p=l.length-1;t=l[p];for(var m=r.pop();p>1;){var h=r.pop(),f=m&&m.lineStart;u=this.startNode(h,f),d=l[p-1],t=this.finalize(u,new a.BinaryExpression(d,l[p-2],t)),p-=2,m=h}}return t},e.prototype.parseConditionalExpression=function(){var e=this.lookahead,t=this.inheritCoverGrammar(this.parseBinaryExpression);if(this.match("?")){this.nextToken();var n=this.context.allowIn;this.context.allowIn=!0;var o=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowIn=n,this.expect(":");var r=this.isolateCoverGrammar(this.parseAssignmentExpression);t=this.finalize(this.startNode(e),new a.ConditionalExpression(t,o,r)),this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1}return t},e.prototype.checkPatternParam=function(e,t){switch(t.type){case l.Syntax.Identifier:this.validateParam(e,t,t.name);break;case l.Syntax.RestElement:this.checkPatternParam(e,t.argument);break;case l.Syntax.AssignmentPattern:this.checkPatternParam(e,t.left);break;case l.Syntax.ArrayPattern:for(var n=0;n")){this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1;var r=e.async,c=this.reinterpretAsCoverFormalsList(e);if(c){this.hasLineTerminator&&this.tolerateUnexpectedToken(this.lookahead),this.context.firstCoverInitializedNameError=null;var s=this.context.strict,d=this.context.allowStrictDirective;this.context.allowStrictDirective=c.simple;var u=this.context.allowYield,p=this.context.await;this.context.allowYield=!0,this.context.await=r;var m=this.startNode(t);this.expect("=>");var h=void 0;if(this.match("{")){var f=this.context.allowIn;this.context.allowIn=!0,h=this.parseFunctionSourceElements(),this.context.allowIn=f}else h=this.isolateCoverGrammar(this.parseAssignmentExpression);var C=h.type!==l.Syntax.BlockStatement;this.context.strict&&c.firstRestricted&&this.throwUnexpectedToken(c.firstRestricted,c.message),this.context.strict&&c.stricted&&this.tolerateUnexpectedToken(c.stricted,c.message),e=r?this.finalize(m,new a.AsyncArrowFunctionExpression(c.params,h,C)):this.finalize(m,new a.ArrowFunctionExpression(c.params,h,C)),this.context.strict=s,this.context.allowStrictDirective=d,this.context.allowYield=u,this.context.await=p}}else if(this.matchAssign()){if(this.context.isAssignmentTarget||this.tolerateError(i.Messages.InvalidLHSInAssignment),this.context.strict&&e.type===l.Syntax.Identifier){var g=e;this.scanner.isRestrictedWord(g.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictLHSAssignment),this.scanner.isStrictModeReservedWord(g.name)&&this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord)}this.match("=")?this.reinterpretExpressionAsPattern(e):(this.context.isAssignmentTarget=!1,this.context.isBindingElement=!1);var N=(n=this.nextToken()).value,b=this.isolateCoverGrammar(this.parseAssignmentExpression);e=this.finalize(this.startNode(t),new a.AssignmentExpression(N,e,b)),this.context.firstCoverInitializedNameError=null}}return e},e.prototype.parseExpression=function(){var e=this.lookahead,t=this.isolateCoverGrammar(this.parseAssignmentExpression);if(this.match(",")){var n=[];for(n.push(t);2!==this.lookahead.type&&this.match(",");)this.nextToken(),n.push(this.isolateCoverGrammar(this.parseAssignmentExpression));t=this.finalize(this.startNode(e),new a.SequenceExpression(n))}return t},e.prototype.parseStatementListItem=function(){var e;if(this.context.isAssignmentTarget=!0,this.context.isBindingElement=!0,4===this.lookahead.type)switch(this.lookahead.value){case"export":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalExportDeclaration),e=this.parseExportDeclaration();break;case"import":this.context.isModule||this.tolerateUnexpectedToken(this.lookahead,i.Messages.IllegalImportDeclaration),e=this.parseImportDeclaration();break;case"const":e=this.parseLexicalDeclaration({inFor:!1});break;case"function":e=this.parseFunctionDeclaration();break;case"class":e=this.parseClassDeclaration();break;case"let":e=this.isLexicalDeclaration()?this.parseLexicalDeclaration({inFor:!1}):this.parseStatement();break;default:e=this.parseStatement()}else e=this.parseStatement();return e},e.prototype.parseBlock=function(){var e=this.createNode();this.expect("{");for(var t=[];!this.match("}");)t.push(this.parseStatementListItem());return this.expect("}"),this.finalize(e,new a.BlockStatement(t))},e.prototype.parseLexicalBinding=function(e,t){var n=this.createNode(),o=this.parsePattern([],e);this.context.strict&&o.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(o.name)&&this.tolerateError(i.Messages.StrictVarName);var r=null;return"const"===e?this.matchKeyword("in")||this.matchContextualKeyword("of")||(this.match("=")?(this.nextToken(),r=this.isolateCoverGrammar(this.parseAssignmentExpression)):this.throwError(i.Messages.DeclarationMissingInitializer,"const")):(!t.inFor&&o.type!==l.Syntax.Identifier||this.match("="))&&(this.expect("="),r=this.isolateCoverGrammar(this.parseAssignmentExpression)),this.finalize(n,new a.VariableDeclarator(o,r))},e.prototype.parseBindingList=function(e,t){for(var n=[this.parseLexicalBinding(e,t)];this.match(",");)this.nextToken(),n.push(this.parseLexicalBinding(e,t));return n},e.prototype.isLexicalDeclaration=function(){var e=this.scanner.saveState();this.scanner.scanComments();var t=this.scanner.lex();return this.scanner.restoreState(e),3===t.type||7===t.type&&"["===t.value||7===t.type&&"{"===t.value||4===t.type&&"let"===t.value||4===t.type&&"yield"===t.value},e.prototype.parseLexicalDeclaration=function(e){var t=this.createNode(),n=this.nextToken().value;o.assert("let"===n||"const"===n,"Lexical declaration must be either let or const");var r=this.parseBindingList(n,e);return this.consumeSemicolon(),this.finalize(t,new a.VariableDeclaration(r,n))},e.prototype.parseBindingRestElement=function(e,t){var n=this.createNode();this.expect("...");var o=this.parsePattern(e,t);return this.finalize(n,new a.RestElement(o))},e.prototype.parseArrayPattern=function(e,t){var n=this.createNode();this.expect("[");for(var o=[];!this.match("]");)if(this.match(","))this.nextToken(),o.push(null);else{if(this.match("...")){o.push(this.parseBindingRestElement(e,t));break}o.push(this.parsePatternWithDefault(e,t)),this.match("]")||this.expect(",")}return this.expect("]"),this.finalize(n,new a.ArrayPattern(o))},e.prototype.parsePropertyPattern=function(e,t){var n,o,r=this.createNode(),i=!1,c=!1;if(3===this.lookahead.type){var l=this.lookahead;n=this.parseVariableIdentifier();var s=this.finalize(r,new a.Identifier(l.value));if(this.match("=")){e.push(l),c=!0,this.nextToken();var d=this.parseAssignmentExpression();o=this.finalize(this.startNode(l),new a.AssignmentPattern(s,d))}else this.match(":")?(this.expect(":"),o=this.parsePatternWithDefault(e,t)):(e.push(l),c=!0,o=s)}else i=this.match("["),n=this.parseObjectPropertyKey(),this.expect(":"),o=this.parsePatternWithDefault(e,t);return this.finalize(r,new a.Property("init",n,i,o,!1,c))},e.prototype.parseObjectPattern=function(e,t){var n=this.createNode(),o=[];for(this.expect("{");!this.match("}");)o.push(this.parsePropertyPattern(e,t)),this.match("}")||this.expect(",");return this.expect("}"),this.finalize(n,new a.ObjectPattern(o))},e.prototype.parsePattern=function(e,t){var n;return this.match("[")?n=this.parseArrayPattern(e,t):this.match("{")?n=this.parseObjectPattern(e,t):(!this.matchKeyword("let")||"const"!==t&&"let"!==t||this.tolerateUnexpectedToken(this.lookahead,i.Messages.LetInLexicalBinding),e.push(this.lookahead),n=this.parseVariableIdentifier(t)),n},e.prototype.parsePatternWithDefault=function(e,t){var n=this.lookahead,o=this.parsePattern(e,t);if(this.match("=")){this.nextToken();var r=this.context.allowYield;this.context.allowYield=!0;var i=this.isolateCoverGrammar(this.parseAssignmentExpression);this.context.allowYield=r,o=this.finalize(this.startNode(n),new a.AssignmentPattern(o,i))}return o},e.prototype.parseVariableIdentifier=function(e){var t=this.createNode(),n=this.nextToken();return 4===n.type&&"yield"===n.value?this.context.strict?this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord):this.context.allowYield||this.throwUnexpectedToken(n):3!==n.type?this.context.strict&&4===n.type&&this.scanner.isStrictModeReservedWord(n.value)?this.tolerateUnexpectedToken(n,i.Messages.StrictReservedWord):(this.context.strict||"let"!==n.value||"var"!==e)&&this.throwUnexpectedToken(n):(this.context.isModule||this.context.await)&&3===n.type&&"await"===n.value&&this.tolerateUnexpectedToken(n),this.finalize(t,new a.Identifier(n.value))},e.prototype.parseVariableDeclaration=function(e){var t=this.createNode(),n=this.parsePattern([],"var");this.context.strict&&n.type===l.Syntax.Identifier&&this.scanner.isRestrictedWord(n.name)&&this.tolerateError(i.Messages.StrictVarName);var o=null;return this.match("=")?(this.nextToken(),o=this.isolateCoverGrammar(this.parseAssignmentExpression)):n.type===l.Syntax.Identifier||e.inFor||this.expect("="),this.finalize(t,new a.VariableDeclarator(n,o))},e.prototype.parseVariableDeclarationList=function(e){var t={inFor:e.inFor},n=[];for(n.push(this.parseVariableDeclaration(t));this.match(",");)this.nextToken(),n.push(this.parseVariableDeclaration(t));return n},e.prototype.parseVariableStatement=function(){var e=this.createNode();this.expectKeyword("var");var t=this.parseVariableDeclarationList({inFor:!1});return this.consumeSemicolon(),this.finalize(e,new a.VariableDeclaration(t,"var"))},e.prototype.parseEmptyStatement=function(){var e=this.createNode();return this.expect(";"),this.finalize(e,new a.EmptyStatement)},e.prototype.parseExpressionStatement=function(){var e=this.createNode(),t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ExpressionStatement(t))},e.prototype.parseIfClause=function(){return this.context.strict&&this.matchKeyword("function")&&this.tolerateError(i.Messages.StrictFunction),this.parseStatement()},e.prototype.parseIfStatement=function(){var e,t=this.createNode(),n=null;this.expectKeyword("if"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseIfClause(),this.matchKeyword("else")&&(this.nextToken(),n=this.parseIfClause())),this.finalize(t,new a.IfStatement(o,e,n))},e.prototype.parseDoWhileStatement=function(){var e=this.createNode();this.expectKeyword("do");var t=this.context.inIteration;this.context.inIteration=!0;var n=this.parseStatement();this.context.inIteration=t,this.expectKeyword("while"),this.expect("(");var o=this.parseExpression();return!this.match(")")&&this.config.tolerant?this.tolerateUnexpectedToken(this.nextToken()):(this.expect(")"),this.match(";")&&this.nextToken()),this.finalize(e,new a.DoWhileStatement(n,o))},e.prototype.parseWhileStatement=function(){var e,t=this.createNode();this.expectKeyword("while"),this.expect("(");var n=this.parseExpression();if(!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var o=this.context.inIteration;this.context.inIteration=!0,e=this.parseStatement(),this.context.inIteration=o}return this.finalize(t,new a.WhileStatement(n,e))},e.prototype.parseForStatement=function(){var e,t,n,o=null,r=null,c=null,s=!0,d=this.createNode();if(this.expectKeyword("for"),this.expect("("),this.match(";"))this.nextToken();else if(this.matchKeyword("var")){o=this.createNode(),this.nextToken();var u=this.context.allowIn;this.context.allowIn=!1;var p=this.parseVariableDeclarationList({inFor:!0});if(this.context.allowIn=u,1===p.length&&this.matchKeyword("in")){var m=p[0];m.init&&(m.id.type===l.Syntax.ArrayPattern||m.id.type===l.Syntax.ObjectPattern||this.context.strict)&&this.tolerateError(i.Messages.ForInOfLoopInitializer,"for-in"),o=this.finalize(o,new a.VariableDeclaration(p,"var")),this.nextToken(),e=o,t=this.parseExpression(),o=null}else 1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(o=this.finalize(o,new a.VariableDeclaration(p,"var")),this.nextToken(),e=o,t=this.parseAssignmentExpression(),o=null,s=!1):(o=this.finalize(o,new a.VariableDeclaration(p,"var")),this.expect(";"))}else if(this.matchKeyword("const")||this.matchKeyword("let")){o=this.createNode();var h=this.nextToken().value;this.context.strict||"in"!==this.lookahead.value?(u=this.context.allowIn,this.context.allowIn=!1,p=this.parseBindingList(h,{inFor:!0}),this.context.allowIn=u,1===p.length&&null===p[0].init&&this.matchKeyword("in")?(o=this.finalize(o,new a.VariableDeclaration(p,h)),this.nextToken(),e=o,t=this.parseExpression(),o=null):1===p.length&&null===p[0].init&&this.matchContextualKeyword("of")?(o=this.finalize(o,new a.VariableDeclaration(p,h)),this.nextToken(),e=o,t=this.parseAssignmentExpression(),o=null,s=!1):(this.consumeSemicolon(),o=this.finalize(o,new a.VariableDeclaration(p,h)))):(o=this.finalize(o,new a.Identifier(h)),this.nextToken(),e=o,t=this.parseExpression(),o=null)}else{var f=this.lookahead;if(u=this.context.allowIn,this.context.allowIn=!1,o=this.inheritCoverGrammar(this.parseAssignmentExpression),this.context.allowIn=u,this.matchKeyword("in"))this.context.isAssignmentTarget&&o.type!==l.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForIn),this.nextToken(),this.reinterpretExpressionAsPattern(o),e=o,t=this.parseExpression(),o=null;else if(this.matchContextualKeyword("of"))this.context.isAssignmentTarget&&o.type!==l.Syntax.AssignmentExpression||this.tolerateError(i.Messages.InvalidLHSInForLoop),this.nextToken(),this.reinterpretExpressionAsPattern(o),e=o,t=this.parseAssignmentExpression(),o=null,s=!1;else{if(this.match(",")){for(var C=[o];this.match(",");)this.nextToken(),C.push(this.isolateCoverGrammar(this.parseAssignmentExpression));o=this.finalize(this.startNode(f),new a.SequenceExpression(C))}this.expect(";")}}if(void 0===e&&(this.match(";")||(r=this.parseExpression()),this.expect(";"),this.match(")")||(c=this.parseExpression())),!this.match(")")&&this.config.tolerant)this.tolerateUnexpectedToken(this.nextToken()),n=this.finalize(this.createNode(),new a.EmptyStatement);else{this.expect(")");var g=this.context.inIteration;this.context.inIteration=!0,n=this.isolateCoverGrammar(this.parseStatement),this.context.inIteration=g}return void 0===e?this.finalize(d,new a.ForStatement(o,r,c,n)):s?this.finalize(d,new a.ForInStatement(e,t,n)):this.finalize(d,new a.ForOfStatement(e,t,n))},e.prototype.parseContinueStatement=function(){var e=this.createNode();this.expectKeyword("continue");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier();t=n;var o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(i.Messages.UnknownLabel,n.name)}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.throwError(i.Messages.IllegalContinue),this.finalize(e,new a.ContinueStatement(t))},e.prototype.parseBreakStatement=function(){var e=this.createNode();this.expectKeyword("break");var t=null;if(3===this.lookahead.type&&!this.hasLineTerminator){var n=this.parseVariableIdentifier(),o="$"+n.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,o)||this.throwError(i.Messages.UnknownLabel,n.name),t=n}return this.consumeSemicolon(),null!==t||this.context.inIteration||this.context.inSwitch||this.throwError(i.Messages.IllegalBreak),this.finalize(e,new a.BreakStatement(t))},e.prototype.parseReturnStatement=function(){this.context.inFunctionBody||this.tolerateError(i.Messages.IllegalReturn);var e=this.createNode();this.expectKeyword("return");var t=(this.match(";")||this.match("}")||this.hasLineTerminator||2===this.lookahead.type)&&8!==this.lookahead.type&&10!==this.lookahead.type?null:this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ReturnStatement(t))},e.prototype.parseWithStatement=function(){this.context.strict&&this.tolerateError(i.Messages.StrictModeWith);var e,t=this.createNode();this.expectKeyword("with"),this.expect("(");var n=this.parseExpression();return!this.match(")")&&this.config.tolerant?(this.tolerateUnexpectedToken(this.nextToken()),e=this.finalize(this.createNode(),new a.EmptyStatement)):(this.expect(")"),e=this.parseStatement()),this.finalize(t,new a.WithStatement(n,e))},e.prototype.parseSwitchCase=function(){var e,t=this.createNode();this.matchKeyword("default")?(this.nextToken(),e=null):(this.expectKeyword("case"),e=this.parseExpression()),this.expect(":");for(var n=[];!(this.match("}")||this.matchKeyword("default")||this.matchKeyword("case"));)n.push(this.parseStatementListItem());return this.finalize(t,new a.SwitchCase(e,n))},e.prototype.parseSwitchStatement=function(){var e=this.createNode();this.expectKeyword("switch"),this.expect("(");var t=this.parseExpression();this.expect(")");var n=this.context.inSwitch;this.context.inSwitch=!0;var o=[],r=!1;for(this.expect("{");!this.match("}");){var c=this.parseSwitchCase();null===c.test&&(r&&this.throwError(i.Messages.MultipleDefaultsInSwitch),r=!0),o.push(c)}return this.expect("}"),this.context.inSwitch=n,this.finalize(e,new a.SwitchStatement(t,o))},e.prototype.parseLabelledStatement=function(){var e,t=this.createNode(),n=this.parseExpression();if(n.type===l.Syntax.Identifier&&this.match(":")){this.nextToken();var o=n,r="$"+o.name;Object.prototype.hasOwnProperty.call(this.context.labelSet,r)&&this.throwError(i.Messages.Redeclaration,"Label",o.name),this.context.labelSet[r]=!0;var c=void 0;if(this.matchKeyword("class"))this.tolerateUnexpectedToken(this.lookahead),c=this.parseClassDeclaration();else if(this.matchKeyword("function")){var s=this.lookahead,d=this.parseFunctionDeclaration();this.context.strict?this.tolerateUnexpectedToken(s,i.Messages.StrictFunction):d.generator&&this.tolerateUnexpectedToken(s,i.Messages.GeneratorInLegacyContext),c=d}else c=this.parseStatement();delete this.context.labelSet[r],e=new a.LabeledStatement(o,c)}else this.consumeSemicolon(),e=new a.ExpressionStatement(n);return this.finalize(t,e)},e.prototype.parseThrowStatement=function(){var e=this.createNode();this.expectKeyword("throw"),this.hasLineTerminator&&this.throwError(i.Messages.NewlineAfterThrow);var t=this.parseExpression();return this.consumeSemicolon(),this.finalize(e,new a.ThrowStatement(t))},e.prototype.parseCatchClause=function(){var e=this.createNode();this.expectKeyword("catch"),this.expect("("),this.match(")")&&this.throwUnexpectedToken(this.lookahead);for(var t=[],n=this.parsePattern(t),o={},r=0;r0&&this.tolerateError(i.Messages.BadGetterArity);var o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!1))},e.prototype.parseSetterMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();1!==n.params.length?this.tolerateError(i.Messages.BadSetterArity):n.params[0]instanceof a.RestElement&&this.tolerateError(i.Messages.BadSetterRestParameter);var o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!1))},e.prototype.parseGeneratorMethod=function(){var e=this.createNode(),t=this.context.allowYield;this.context.allowYield=!0;var n=this.parseFormalParameters();this.context.allowYield=!1;var o=this.parsePropertyMethod(n);return this.context.allowYield=t,this.finalize(e,new a.FunctionExpression(null,n.params,o,!0))},e.prototype.isStartOfExpression=function(){var e=!0,t=this.lookahead.value;switch(this.lookahead.type){case 7:e="["===t||"("===t||"{"===t||"+"===t||"-"===t||"!"===t||"~"===t||"++"===t||"--"===t||"/"===t||"/="===t;break;case 4:e="class"===t||"delete"===t||"function"===t||"let"===t||"new"===t||"super"===t||"this"===t||"typeof"===t||"void"===t||"yield"===t}return e},e.prototype.parseYieldExpression=function(){var e=this.createNode();this.expectKeyword("yield");var t=null,n=!1;if(!this.hasLineTerminator){var o=this.context.allowYield;this.context.allowYield=!1,(n=this.match("*"))?(this.nextToken(),t=this.parseAssignmentExpression()):this.isStartOfExpression()&&(t=this.parseAssignmentExpression()),this.context.allowYield=o}return this.finalize(e,new a.YieldExpression(t,n))},e.prototype.parseClassElement=function(e){var t=this.lookahead,n=this.createNode(),o="",r=null,c=null,l=!1,s=!1,d=!1,u=!1;if(this.match("*"))this.nextToken();else if(l=this.match("["),"static"===(r=this.parseObjectPropertyKey()).name&&(this.qualifiedPropertyName(this.lookahead)||this.match("*"))&&(t=this.lookahead,d=!0,l=this.match("["),this.match("*")?this.nextToken():r=this.parseObjectPropertyKey()),3===t.type&&!this.hasLineTerminator&&"async"===t.value){var p=this.lookahead.value;":"!==p&&"("!==p&&"*"!==p&&(u=!0,t=this.lookahead,r=this.parseObjectPropertyKey(),3===t.type&&"constructor"===t.value&&this.tolerateUnexpectedToken(t,i.Messages.ConstructorIsAsync))}var m=this.qualifiedPropertyName(this.lookahead);return 3===t.type?"get"===t.value&&m?(o="get",l=this.match("["),r=this.parseObjectPropertyKey(),this.context.allowYield=!1,c=this.parseGetterMethod()):"set"===t.value&&m&&(o="set",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseSetterMethod()):7===t.type&&"*"===t.value&&m&&(o="init",l=this.match("["),r=this.parseObjectPropertyKey(),c=this.parseGeneratorMethod(),s=!0),!o&&r&&this.match("(")&&(o="init",c=u?this.parsePropertyMethodAsyncFunction():this.parsePropertyMethodFunction(),s=!0),o||this.throwUnexpectedToken(this.lookahead),"init"===o&&(o="method"),l||(d&&this.isPropertyKey(r,"prototype")&&this.throwUnexpectedToken(t,i.Messages.StaticPrototype),!d&&this.isPropertyKey(r,"constructor")&&(("method"!==o||!s||c&&c.generator)&&this.throwUnexpectedToken(t,i.Messages.ConstructorSpecialMethod),e.value?this.throwUnexpectedToken(t,i.Messages.DuplicateConstructor):e.value=!0,o="constructor")),this.finalize(n,new a.MethodDefinition(r,l,c,o,d))},e.prototype.parseClassElementList=function(){var e=[],t={value:!1};for(this.expect("{");!this.match("}");)this.match(";")?this.nextToken():e.push(this.parseClassElement(t));return this.expect("}"),e},e.prototype.parseClassBody=function(){var e=this.createNode(),t=this.parseClassElementList();return this.finalize(e,new a.ClassBody(t))},e.prototype.parseClassDeclaration=function(e){var t=this.createNode(),n=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var o=e&&3!==this.lookahead.type?null:this.parseVariableIdentifier(),r=null;this.matchKeyword("extends")&&(this.nextToken(),r=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var i=this.parseClassBody();return this.context.strict=n,this.finalize(t,new a.ClassDeclaration(o,r,i))},e.prototype.parseClassExpression=function(){var e=this.createNode(),t=this.context.strict;this.context.strict=!0,this.expectKeyword("class");var n=3===this.lookahead.type?this.parseVariableIdentifier():null,o=null;this.matchKeyword("extends")&&(this.nextToken(),o=this.isolateCoverGrammar(this.parseLeftHandSideExpressionAllowCall));var r=this.parseClassBody();return this.context.strict=t,this.finalize(e,new a.ClassExpression(n,o,r))},e.prototype.parseModule=function(){this.context.strict=!0,this.context.isModule=!0,this.scanner.isModule=!0;for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Module(t))},e.prototype.parseScript=function(){for(var e=this.createNode(),t=this.parseDirectivePrologues();2!==this.lookahead.type;)t.push(this.parseStatementListItem());return this.finalize(e,new a.Script(t))},e.prototype.parseModuleSpecifier=function(){var e=this.createNode();8!==this.lookahead.type&&this.throwError(i.Messages.InvalidModuleSpecifier);var t=this.nextToken(),n=this.getTokenRaw(t);return this.finalize(e,new a.Literal(t.value,n))},e.prototype.parseImportSpecifier=function(){var e,t,n=this.createNode();return 3===this.lookahead.type?(t=e=this.parseVariableIdentifier(),this.matchContextualKeyword("as")&&(this.nextToken(),t=this.parseVariableIdentifier())):(t=e=this.parseIdentifierName(),this.matchContextualKeyword("as")?(this.nextToken(),t=this.parseVariableIdentifier()):this.throwUnexpectedToken(this.nextToken())),this.finalize(n,new a.ImportSpecifier(t,e))},e.prototype.parseNamedImports=function(){this.expect("{");for(var e=[];!this.match("}");)e.push(this.parseImportSpecifier()),this.match("}")||this.expect(",");return this.expect("}"),e},e.prototype.parseImportDefaultSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName();return this.finalize(e,new a.ImportDefaultSpecifier(t))},e.prototype.parseImportNamespaceSpecifier=function(){var e=this.createNode();this.expect("*"),this.matchContextualKeyword("as")||this.throwError(i.Messages.NoAsAfterImportNamespace),this.nextToken();var t=this.parseIdentifierName();return this.finalize(e,new a.ImportNamespaceSpecifier(t))},e.prototype.parseImportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalImportDeclaration);var e,t=this.createNode();this.expectKeyword("import");var n=[];if(8===this.lookahead.type)e=this.parseModuleSpecifier();else{if(this.match("{")?n=n.concat(this.parseNamedImports()):this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.isIdentifierName(this.lookahead)&&!this.matchKeyword("default")?(n.push(this.parseImportDefaultSpecifier()),this.match(",")&&(this.nextToken(),this.match("*")?n.push(this.parseImportNamespaceSpecifier()):this.match("{")?n=n.concat(this.parseNamedImports()):this.throwUnexpectedToken(this.lookahead))):this.throwUnexpectedToken(this.nextToken()),!this.matchContextualKeyword("from")){var o=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(o,this.lookahead.value)}this.nextToken(),e=this.parseModuleSpecifier()}return this.consumeSemicolon(),this.finalize(t,new a.ImportDeclaration(n,e))},e.prototype.parseExportSpecifier=function(){var e=this.createNode(),t=this.parseIdentifierName(),n=t;return this.matchContextualKeyword("as")&&(this.nextToken(),n=this.parseIdentifierName()),this.finalize(e,new a.ExportSpecifier(t,n))},e.prototype.parseExportDeclaration=function(){this.context.inFunctionBody&&this.throwError(i.Messages.IllegalExportDeclaration);var e,t=this.createNode();if(this.expectKeyword("export"),this.matchKeyword("default"))if(this.nextToken(),this.matchKeyword("function")){var n=this.parseFunctionDeclaration(!0);e=this.finalize(t,new a.ExportDefaultDeclaration(n))}else this.matchKeyword("class")?(n=this.parseClassDeclaration(!0),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):this.matchContextualKeyword("async")?(n=this.matchAsyncFunction()?this.parseFunctionDeclaration(!0):this.parseAssignmentExpression(),e=this.finalize(t,new a.ExportDefaultDeclaration(n))):(this.matchContextualKeyword("from")&&this.throwError(i.Messages.UnexpectedToken,this.lookahead.value),n=this.match("{")?this.parseObjectInitializer():this.match("[")?this.parseArrayInitializer():this.parseAssignmentExpression(),this.consumeSemicolon(),e=this.finalize(t,new a.ExportDefaultDeclaration(n)));else if(this.match("*")){if(this.nextToken(),!this.matchContextualKeyword("from")){var o=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause;this.throwError(o,this.lookahead.value)}this.nextToken();var r=this.parseModuleSpecifier();this.consumeSemicolon(),e=this.finalize(t,new a.ExportAllDeclaration(r))}else if(4===this.lookahead.type){switch(n=void 0,this.lookahead.value){case"let":case"const":n=this.parseLexicalDeclaration({inFor:!1});break;case"var":case"class":case"function":n=this.parseStatementListItem();break;default:this.throwUnexpectedToken(this.lookahead)}e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null))}else if(this.matchAsyncFunction())n=this.parseFunctionDeclaration(),e=this.finalize(t,new a.ExportNamedDeclaration(n,[],null));else{var c=[],l=null,s=!1;for(this.expect("{");!this.match("}");)s=s||this.matchKeyword("default"),c.push(this.parseExportSpecifier()),this.match("}")||this.expect(",");this.expect("}"),this.matchContextualKeyword("from")?(this.nextToken(),l=this.parseModuleSpecifier(),this.consumeSemicolon()):s?(o=this.lookahead.value?i.Messages.UnexpectedToken:i.Messages.MissingFromClause,this.throwError(o,this.lookahead.value)):this.consumeSemicolon(),e=this.finalize(t,new a.ExportNamedDeclaration(null,c,l))}return e},e}();t.Parser=d},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=function(e,t){if(!e)throw new Error("ASSERT: "+t)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0});var n=function(){function e(){this.errors=[],this.tolerant=!1}return e.prototype.recordError=function(e){this.errors.push(e)},e.prototype.tolerate=function(e){if(!this.tolerant)throw e;this.recordError(e)},e.prototype.constructError=function(e,t){var n=new Error(e);try{throw n}catch(o){Object.create&&Object.defineProperty&&(n=Object.create(o),Object.defineProperty(n,"column",{value:t}))}return n},e.prototype.createError=function(e,t,n,o){var r="Line "+t+": "+o,i=this.constructError(r,n);return i.index=e,i.lineNumber=t,i.description=o,i},e.prototype.throwError=function(e,t,n,o){throw this.createError(e,t,n,o)},e.prototype.tolerateError=function(e,t,n,o){var r=this.createError(e,t,n,o);if(!this.tolerant)throw r;this.recordError(r)},e}();t.ErrorHandler=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Messages={BadGetterArity:"Getter must not have any formal parameters",BadSetterArity:"Setter must have exactly one formal parameter",BadSetterRestParameter:"Setter function argument must not be a rest parameter",ConstructorIsAsync:"Class constructor may not be an async method",ConstructorSpecialMethod:"Class constructor may not be an accessor",DeclarationMissingInitializer:"Missing initializer in %0 declaration",DefaultRestParameter:"Unexpected token =",DuplicateBinding:"Duplicate binding %0",DuplicateConstructor:"A class may only have one constructor",DuplicateProtoProperty:"Duplicate __proto__ fields are not allowed in object literals",ForInOfLoopInitializer:"%0 loop variable declaration may not have an initializer",GeneratorInLegacyContext:"Generator declarations are not allowed in legacy contexts",IllegalBreak:"Illegal break statement",IllegalContinue:"Illegal continue statement",IllegalExportDeclaration:"Unexpected token",IllegalImportDeclaration:"Unexpected token",IllegalLanguageModeDirective:"Illegal 'use strict' directive in function with non-simple parameter list",IllegalReturn:"Illegal return statement",InvalidEscapedReservedWord:"Keyword must not contain escaped characters",InvalidHexEscapeSequence:"Invalid hexadecimal escape sequence",InvalidLHSInAssignment:"Invalid left-hand side in assignment",InvalidLHSInForIn:"Invalid left-hand side in for-in",InvalidLHSInForLoop:"Invalid left-hand side in for-loop",InvalidModuleSpecifier:"Unexpected token",InvalidRegExp:"Invalid regular expression",LetInLexicalBinding:"let is disallowed as a lexically bound name",MissingFromClause:"Unexpected token",MultipleDefaultsInSwitch:"More than one default clause in switch statement",NewlineAfterThrow:"Illegal newline after throw",NoAsAfterImportNamespace:"Unexpected token",NoCatchOrFinally:"Missing catch or finally after try",ParameterAfterRestParameter:"Rest parameter must be last formal parameter",Redeclaration:"%0 '%1' has already been declared",StaticPrototype:"Classes may not have static property named prototype",StrictCatchVariable:"Catch variable may not be eval or arguments in strict mode",StrictDelete:"Delete of an unqualified identifier in strict mode.",StrictFunction:"In strict mode code, functions can only be declared at top level or inside a block",StrictFunctionName:"Function name may not be eval or arguments in strict mode",StrictLHSAssignment:"Assignment to eval or arguments is not allowed in strict mode",StrictLHSPostfix:"Postfix increment/decrement may not have eval or arguments operand in strict mode",StrictLHSPrefix:"Prefix increment/decrement may not have eval or arguments operand in strict mode",StrictModeWith:"Strict mode code may not include a with statement",StrictOctalLiteral:"Octal literals are not allowed in strict mode.",StrictParamDupe:"Strict mode function may not have duplicate parameter names",StrictParamName:"Parameter name eval or arguments is not allowed in strict mode",StrictReservedWord:"Use of future reserved word in strict mode",StrictVarName:"Variable name may not be eval or arguments in strict mode",TemplateOctalLiteral:"Octal literals are not allowed in template strings.",UnexpectedEOS:"Unexpected end of input",UnexpectedIdentifier:"Unexpected identifier",UnexpectedNumber:"Unexpected number",UnexpectedReserved:"Unexpected reserved word",UnexpectedString:"Unexpected string",UnexpectedTemplate:"Unexpected quasi %0",UnexpectedToken:"Unexpected token %0",UnexpectedTokenIllegal:"Unexpected token ILLEGAL",UnknownLabel:"Undefined label '%0'",UnterminatedRegExp:"Invalid regular expression: missing /"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(9),r=n(4),i=n(11);function a(e){return"0123456789abcdef".indexOf(e.toLowerCase())}function c(e){return"01234567".indexOf(e)}var l=function(){function e(e,t){this.source=e,this.errorHandler=t,this.trackComment=!1,this.isModule=!1,this.length=e.length,this.index=0,this.lineNumber=e.length>0?1:0,this.lineStart=0,this.curlyStack=[]}return e.prototype.saveState=function(){return{index:this.index,lineNumber:this.lineNumber,lineStart:this.lineStart}},e.prototype.restoreState=function(e){this.index=e.index,this.lineNumber=e.lineNumber,this.lineStart=e.lineStart},e.prototype.eof=function(){return this.index>=this.length},e.prototype.throwUnexpectedToken=function(e){return void 0===e&&(e=i.Messages.UnexpectedTokenIllegal),this.errorHandler.throwError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.tolerateUnexpectedToken=function(e){void 0===e&&(e=i.Messages.UnexpectedTokenIllegal),this.errorHandler.tolerateError(this.index,this.lineNumber,this.index-this.lineStart+1,e)},e.prototype.skipSingleLineComment=function(e){var t,n,o=[];for(this.trackComment&&(o=[],t=this.index-e,n={start:{line:this.lineNumber,column:this.index-this.lineStart-e},end:{}});!this.eof();){var i=this.source.charCodeAt(this.index);if(++this.index,r.Character.isLineTerminator(i)){if(this.trackComment){n.end={line:this.lineNumber,column:this.index-this.lineStart-1};var a={multiLine:!1,slice:[t+e,this.index-1],range:[t,this.index-1],loc:n};o.push(a)}return 13===i&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,o}}return this.trackComment&&(n.end={line:this.lineNumber,column:this.index-this.lineStart},a={multiLine:!1,slice:[t+e,this.index],range:[t,this.index],loc:n},o.push(a)),o},e.prototype.skipMultiLineComment=function(){var e,t,n=[];for(this.trackComment&&(n=[],e=this.index-2,t={start:{line:this.lineNumber,column:this.index-this.lineStart-2},end:{}});!this.eof();){var o=this.source.charCodeAt(this.index);if(r.Character.isLineTerminator(o))13===o&&10===this.source.charCodeAt(this.index+1)&&++this.index,++this.lineNumber,++this.index,this.lineStart=this.index;else if(42===o){if(47===this.source.charCodeAt(this.index+1)){if(this.index+=2,this.trackComment){t.end={line:this.lineNumber,column:this.index-this.lineStart};var i={multiLine:!0,slice:[e+2,this.index-2],range:[e,this.index],loc:t};n.push(i)}return n}++this.index}else++this.index}return this.trackComment&&(t.end={line:this.lineNumber,column:this.index-this.lineStart},i={multiLine:!0,slice:[e+2,this.index],range:[e,this.index],loc:t},n.push(i)),this.tolerateUnexpectedToken(),n},e.prototype.scanComments=function(){var e;this.trackComment&&(e=[]);for(var t=0===this.index;!this.eof();){var n=this.source.charCodeAt(this.index);if(r.Character.isWhiteSpace(n))++this.index;else if(r.Character.isLineTerminator(n))++this.index,13===n&&10===this.source.charCodeAt(this.index)&&++this.index,++this.lineNumber,this.lineStart=this.index,t=!0;else if(47===n)if(47===(n=this.source.charCodeAt(this.index+1))){this.index+=2;var o=this.skipSingleLineComment(2);this.trackComment&&(e=e.concat(o)),t=!0}else{if(42!==n)break;this.index+=2,o=this.skipMultiLineComment(),this.trackComment&&(e=e.concat(o))}else if(t&&45===n){if(45!==this.source.charCodeAt(this.index+1)||62!==this.source.charCodeAt(this.index+2))break;this.index+=3,o=this.skipSingleLineComment(3),this.trackComment&&(e=e.concat(o))}else{if(60!==n||this.isModule)break;if("!--"!==this.source.slice(this.index+1,this.index+4))break;this.index+=4,o=this.skipSingleLineComment(4),this.trackComment&&(e=e.concat(o))}}return e},e.prototype.isFutureReservedWord=function(e){switch(e){case"enum":case"export":case"import":case"super":return!0;default:return!1}},e.prototype.isStrictModeReservedWord=function(e){switch(e){case"implements":case"interface":case"package":case"private":case"protected":case"public":case"static":case"yield":case"let":return!0;default:return!1}},e.prototype.isRestrictedWord=function(e){return"eval"===e||"arguments"===e},e.prototype.isKeyword=function(e){switch(e.length){case 2:return"if"===e||"in"===e||"do"===e;case 3:return"var"===e||"for"===e||"new"===e||"try"===e||"let"===e;case 4:return"this"===e||"else"===e||"case"===e||"void"===e||"with"===e||"enum"===e;case 5:return"while"===e||"break"===e||"catch"===e||"throw"===e||"const"===e||"yield"===e||"class"===e||"super"===e;case 6:return"return"===e||"typeof"===e||"delete"===e||"switch"===e||"export"===e||"import"===e;case 7:return"default"===e||"finally"===e||"extends"===e;case 8:return"function"===e||"continue"===e||"debugger"===e;case 10:return"instanceof"===e;default:return!1}},e.prototype.codePointAt=function(e){var t=this.source.charCodeAt(e);if(t>=55296&&t<=56319){var n=this.source.charCodeAt(e+1);n>=56320&&n<=57343&&(t=1024*(t-55296)+n-56320+65536)}return t},e.prototype.scanHexEscape=function(e){for(var t="u"===e?4:2,n=0,o=0;o1114111||"}"!==e)&&this.throwUnexpectedToken(),r.Character.fromCodePoint(t)},e.prototype.getIdentifier=function(){for(var e=this.index++;!this.eof();){var t=this.source.charCodeAt(this.index);if(92===t)return this.index=e,this.getComplexIdentifier();if(t>=55296&&t<57343)return this.index=e,this.getComplexIdentifier();if(!r.Character.isIdentifierPart(t))break;++this.index}return this.source.slice(e,this.index)},e.prototype.getComplexIdentifier=function(){var e,t=this.codePointAt(this.index),n=r.Character.fromCodePoint(t);for(this.index+=n.length,92===t&&(117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierStart(e.charCodeAt(0))||this.throwUnexpectedToken(),n=e);!this.eof()&&(t=this.codePointAt(this.index),r.Character.isIdentifierPart(t));)n+=e=r.Character.fromCodePoint(t),this.index+=e.length,92===t&&(n=n.substr(0,n.length-1),117!==this.source.charCodeAt(this.index)&&this.throwUnexpectedToken(),++this.index,"{"===this.source[this.index]?(++this.index,e=this.scanUnicodeCodePointEscape()):null!==(e=this.scanHexEscape("u"))&&"\\"!==e&&r.Character.isIdentifierPart(e.charCodeAt(0))||this.throwUnexpectedToken(),n+=e);return n},e.prototype.octalToDecimal=function(e){var t="0"!==e,n=c(e);return!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(t=!0,n=8*n+c(this.source[this.index++]),"0123".indexOf(e)>=0&&!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index))&&(n=8*n+c(this.source[this.index++]))),{code:n,octal:t}},e.prototype.scanIdentifier=function(){var e,t=this.index,n=92===this.source.charCodeAt(t)?this.getComplexIdentifier():this.getIdentifier();if(3!=(e=1===n.length?3:this.isKeyword(n)?4:"null"===n?5:"true"===n||"false"===n?1:3)&&t+n.length!==this.index){var o=this.index;this.index=t,this.tolerateUnexpectedToken(i.Messages.InvalidEscapedReservedWord),this.index=o}return{type:e,value:n,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.scanPunctuator=function(){var e=this.index,t=this.source[this.index];switch(t){case"(":case"{":"{"===t&&this.curlyStack.push("{"),++this.index;break;case".":++this.index,"."===this.source[this.index]&&"."===this.source[this.index+1]&&(this.index+=2,t="...");break;case"}":++this.index,this.curlyStack.pop();break;case")":case";":case",":case"[":case"]":case":":case"?":case"~":++this.index;break;default:">>>="===(t=this.source.substr(this.index,4))?this.index+=4:"==="===(t=t.substr(0,3))||"!=="===t||">>>"===t||"<<="===t||">>="===t||"**="===t?this.index+=3:"&&"===(t=t.substr(0,2))||"||"===t||"=="===t||"!="===t||"+="===t||"-="===t||"*="===t||"/="===t||"++"===t||"--"===t||"<<"===t||">>"===t||"&="===t||"|="===t||"^="===t||"%="===t||"<="===t||">="===t||"=>"===t||"**"===t?this.index+=2:(t=this.source[this.index],"<>=!+-*%&|^/".indexOf(t)>=0&&++this.index)}return this.index===e&&this.throwUnexpectedToken(),{type:7,value:t,lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanHexLiteral=function(e){for(var t="";!this.eof()&&r.Character.isHexDigit(this.source.charCodeAt(this.index));)t+=this.source[this.index++];return 0===t.length&&this.throwUnexpectedToken(),r.Character.isIdentifierStart(this.source.charCodeAt(this.index))&&this.throwUnexpectedToken(),{type:6,value:parseInt("0x"+t,16),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanBinaryLiteral=function(e){for(var t,n="";!this.eof()&&("0"===(t=this.source[this.index])||"1"===t);)n+=this.source[this.index++];return 0===n.length&&this.throwUnexpectedToken(),this.eof()||(t=this.source.charCodeAt(this.index),(r.Character.isIdentifierStart(t)||r.Character.isDecimalDigit(t))&&this.throwUnexpectedToken()),{type:6,value:parseInt(n,2),lineNumber:this.lineNumber,lineStart:this.lineStart,start:e,end:this.index}},e.prototype.scanOctalLiteral=function(e,t){var n="",o=!1;for(r.Character.isOctalDigit(e.charCodeAt(0))?(o=!0,n="0"+this.source[this.index++]):++this.index;!this.eof()&&r.Character.isOctalDigit(this.source.charCodeAt(this.index));)n+=this.source[this.index++];return o||0!==n.length||this.throwUnexpectedToken(),(r.Character.isIdentifierStart(this.source.charCodeAt(this.index))||r.Character.isDecimalDigit(this.source.charCodeAt(this.index)))&&this.throwUnexpectedToken(),{type:6,value:parseInt(n,8),octal:o,lineNumber:this.lineNumber,lineStart:this.lineStart,start:t,end:this.index}},e.prototype.isImplicitOctalLiteral=function(){for(var e=this.index+1;e=0&&(n=n.replace(/\\u\{([0-9a-fA-F]+)\}|\\u([a-fA-F0-9]{4})/g,(function(e,t,n){var r=parseInt(t||n,16);return r>1114111&&o.throwUnexpectedToken(i.Messages.InvalidRegExp),r<=65535?String.fromCharCode(r):"\uffff"})).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"\uffff"));try{RegExp(n)}catch(r){this.throwUnexpectedToken(i.Messages.InvalidRegExp)}try{return new RegExp(e,t)}catch(a){return null}},e.prototype.scanRegExpBody=function(){var e=this.source[this.index];o.assert("/"===e,"Regular expression literal must start with a slash");for(var t=this.source[this.index++],n=!1,a=!1;!this.eof();)if(t+=e=this.source[this.index++],"\\"===e)e=this.source[this.index++],r.Character.isLineTerminator(e.charCodeAt(0))&&this.throwUnexpectedToken(i.Messages.UnterminatedRegExp),t+=e;else if(r.Character.isLineTerminator(e.charCodeAt(0)))this.throwUnexpectedToken(i.Messages.UnterminatedRegExp);else if(n)"]"===e&&(n=!1);else{if("/"===e){a=!0;break}"["===e&&(n=!0)}return a||this.throwUnexpectedToken(i.Messages.UnterminatedRegExp),t.substr(1,t.length-2)},e.prototype.scanRegExpFlags=function(){for(var e="";!this.eof();){var t=this.source[this.index];if(!r.Character.isIdentifierPart(t.charCodeAt(0)))break;if(++this.index,"\\"!==t||this.eof())e+=t;else if("u"===(t=this.source[this.index])){++this.index;var n=this.index,o=this.scanHexEscape("u");if(null!==o)for(e+=o;n=55296&&e<57343&&r.Character.isIdentifierStart(this.codePointAt(this.index))?this.scanIdentifier():this.scanPunctuator()},e}();t.Scanner=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TokenName={},t.TokenName[1]="Boolean",t.TokenName[2]="",t.TokenName[3]="Identifier",t.TokenName[4]="Keyword",t.TokenName[5]="Null",t.TokenName[6]="Numeric",t.TokenName[7]="Punctuator",t.TokenName[8]="String",t.TokenName[9]="RegularExpression",t.TokenName[10]="Template"},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.XHTMLEntities={quot:'"',amp:"&",apos:"'",gt:">",nbsp:"\xa0",iexcl:"\xa1",cent:"\xa2",pound:"\xa3",curren:"\xa4",yen:"\xa5",brvbar:"\xa6",sect:"\xa7",uml:"\xa8",copy:"\xa9",ordf:"\xaa",laquo:"\xab",not:"\xac",shy:"\xad",reg:"\xae",macr:"\xaf",deg:"\xb0",plusmn:"\xb1",sup2:"\xb2",sup3:"\xb3",acute:"\xb4",micro:"\xb5",para:"\xb6",middot:"\xb7",cedil:"\xb8",sup1:"\xb9",ordm:"\xba",raquo:"\xbb",frac14:"\xbc",frac12:"\xbd",frac34:"\xbe",iquest:"\xbf",Agrave:"\xc0",Aacute:"\xc1",Acirc:"\xc2",Atilde:"\xc3",Auml:"\xc4",Aring:"\xc5",AElig:"\xc6",Ccedil:"\xc7",Egrave:"\xc8",Eacute:"\xc9",Ecirc:"\xca",Euml:"\xcb",Igrave:"\xcc",Iacute:"\xcd",Icirc:"\xce",Iuml:"\xcf",ETH:"\xd0",Ntilde:"\xd1",Ograve:"\xd2",Oacute:"\xd3",Ocirc:"\xd4",Otilde:"\xd5",Ouml:"\xd6",times:"\xd7",Oslash:"\xd8",Ugrave:"\xd9",Uacute:"\xda",Ucirc:"\xdb",Uuml:"\xdc",Yacute:"\xdd",THORN:"\xde",szlig:"\xdf",agrave:"\xe0",aacute:"\xe1",acirc:"\xe2",atilde:"\xe3",auml:"\xe4",aring:"\xe5",aelig:"\xe6",ccedil:"\xe7",egrave:"\xe8",eacute:"\xe9",ecirc:"\xea",euml:"\xeb",igrave:"\xec",iacute:"\xed",icirc:"\xee",iuml:"\xef",eth:"\xf0",ntilde:"\xf1",ograve:"\xf2",oacute:"\xf3",ocirc:"\xf4",otilde:"\xf5",ouml:"\xf6",divide:"\xf7",oslash:"\xf8",ugrave:"\xf9",uacute:"\xfa",ucirc:"\xfb",uuml:"\xfc",yacute:"\xfd",thorn:"\xfe",yuml:"\xff",OElig:"\u0152",oelig:"\u0153",Scaron:"\u0160",scaron:"\u0161",Yuml:"\u0178",fnof:"\u0192",circ:"\u02c6",tilde:"\u02dc",Alpha:"\u0391",Beta:"\u0392",Gamma:"\u0393",Delta:"\u0394",Epsilon:"\u0395",Zeta:"\u0396",Eta:"\u0397",Theta:"\u0398",Iota:"\u0399",Kappa:"\u039a",Lambda:"\u039b",Mu:"\u039c",Nu:"\u039d",Xi:"\u039e",Omicron:"\u039f",Pi:"\u03a0",Rho:"\u03a1",Sigma:"\u03a3",Tau:"\u03a4",Upsilon:"\u03a5",Phi:"\u03a6",Chi:"\u03a7",Psi:"\u03a8",Omega:"\u03a9",alpha:"\u03b1",beta:"\u03b2",gamma:"\u03b3",delta:"\u03b4",epsilon:"\u03b5",zeta:"\u03b6",eta:"\u03b7",theta:"\u03b8",iota:"\u03b9",kappa:"\u03ba",lambda:"\u03bb",mu:"\u03bc",nu:"\u03bd",xi:"\u03be",omicron:"\u03bf",pi:"\u03c0",rho:"\u03c1",sigmaf:"\u03c2",sigma:"\u03c3",tau:"\u03c4",upsilon:"\u03c5",phi:"\u03c6",chi:"\u03c7",psi:"\u03c8",omega:"\u03c9",thetasym:"\u03d1",upsih:"\u03d2",piv:"\u03d6",ensp:"\u2002",emsp:"\u2003",thinsp:"\u2009",zwnj:"\u200c",zwj:"\u200d",lrm:"\u200e",rlm:"\u200f",ndash:"\u2013",mdash:"\u2014",lsquo:"\u2018",rsquo:"\u2019",sbquo:"\u201a",ldquo:"\u201c",rdquo:"\u201d",bdquo:"\u201e",dagger:"\u2020",Dagger:"\u2021",bull:"\u2022",hellip:"\u2026",permil:"\u2030",prime:"\u2032",Prime:"\u2033",lsaquo:"\u2039",rsaquo:"\u203a",oline:"\u203e",frasl:"\u2044",euro:"\u20ac",image:"\u2111",weierp:"\u2118",real:"\u211c",trade:"\u2122",alefsym:"\u2135",larr:"\u2190",uarr:"\u2191",rarr:"\u2192",darr:"\u2193",harr:"\u2194",crarr:"\u21b5",lArr:"\u21d0",uArr:"\u21d1",rArr:"\u21d2",dArr:"\u21d3",hArr:"\u21d4",forall:"\u2200",part:"\u2202",exist:"\u2203",empty:"\u2205",nabla:"\u2207",isin:"\u2208",notin:"\u2209",ni:"\u220b",prod:"\u220f",sum:"\u2211",minus:"\u2212",lowast:"\u2217",radic:"\u221a",prop:"\u221d",infin:"\u221e",ang:"\u2220",and:"\u2227",or:"\u2228",cap:"\u2229",cup:"\u222a",int:"\u222b",there4:"\u2234",sim:"\u223c",cong:"\u2245",asymp:"\u2248",ne:"\u2260",equiv:"\u2261",le:"\u2264",ge:"\u2265",sub:"\u2282",sup:"\u2283",nsub:"\u2284",sube:"\u2286",supe:"\u2287",oplus:"\u2295",otimes:"\u2297",perp:"\u22a5",sdot:"\u22c5",lceil:"\u2308",rceil:"\u2309",lfloor:"\u230a",rfloor:"\u230b",loz:"\u25ca",spades:"\u2660",clubs:"\u2663",hearts:"\u2665",diams:"\u2666",lang:"\u27e8",rang:"\u27e9"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(10),r=n(12),i=n(13),a=function(){function e(){this.values=[],this.curly=this.paren=-1}return e.prototype.beforeFunctionExpression=function(e){return["(","{","[","in","typeof","instanceof","new","return","case","delete","throw","void","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=",",","+","-","*","**","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","?",":","===","==",">=","<=","<",">","!=","!=="].indexOf(e)>=0},e.prototype.isRegexStart=function(){var e=this.values[this.values.length-1],t=null!==e;switch(e){case"this":case"]":t=!1;break;case")":var n=this.values[this.paren-1];t="if"===n||"while"===n||"for"===n||"with"===n;break;case"}":if(t=!1,"function"===this.values[this.curly-3])t=!!(o=this.values[this.curly-4])&&!this.beforeFunctionExpression(o);else if("function"===this.values[this.curly-4]){var o;t=!(o=this.values[this.curly-5])||!this.beforeFunctionExpression(o)}}return t},e.prototype.push=function(e){7===e.type||4===e.type?("{"===e.value?this.curly=this.values.length:"("===e.value&&(this.paren=this.values.length),this.values.push(e.value)):this.values.push(null)},e}(),c=function(){function e(e,t){this.errorHandler=new o.ErrorHandler,this.errorHandler.tolerant=!!t&&"boolean"==typeof t.tolerant&&t.tolerant,this.scanner=new r.Scanner(e,this.errorHandler),this.scanner.trackComment=!!t&&"boolean"==typeof t.comment&&t.comment,this.trackRange=!!t&&"boolean"==typeof t.range&&t.range,this.trackLoc=!!t&&"boolean"==typeof t.loc&&t.loc,this.buffer=[],this.reader=new a}return e.prototype.errors=function(){return this.errorHandler.errors},e.prototype.getNextToken=function(){if(0===this.buffer.length){var e=this.scanner.scanComments();if(this.scanner.trackComment)for(var t=0;to&&" "!==e[u+1],u=i);else if(!C(a))return 5;p=p&&g(a)}s=s||d&&i-u-1>o&&" "!==e[u+1]}return l||s?n>9&&N(e)?5:s?4:3:p&&!r(e)?1:2}function V(e,t,n,o){e.dump=function(){if(0===t.length)return"''";if(!e.noCompatMode&&-1!==d.indexOf(t))return"'"+t+"'";var i=e.indent*Math.max(1,n),a=-1===e.lineWidth?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-i),c=o||e.flowLevel>-1&&n>=e.flowLevel;switch(b(t,c,e.indent,a,(function(t){return function(e,t){var n,o;for(n=0,o=e.implicitTypes.length;n"+v(t,e.indent)+x(m(function(e,t){var n,o,r=/(\n+)([^\n]*)/g,i=(c=e.indexOf("\n"),c=-1!==c?c:e.length,r.lastIndex=c,y(e.slice(0,c),t)),a="\n"===e[0]||" "===e[0];var c;for(;o=r.exec(e);){var l=o[1],s=o[2];n=" "===s[0],i+=l+(a||n||""===s?"":"\n")+y(s,t),a=n}return i}(t,a),i));case 5:return'"'+function(e){for(var t,n,o,r="",i=0;i=55296&&t<=56319&&(n=e.charCodeAt(i+1))>=56320&&n<=57343?(r+=u(1024*(t-55296)+n-56320+65536),i++):(o=s[t],r+=!o&&C(t)?e[i]:o||u(t));return r}(t)+'"';default:throw new r("impossible error: invalid scalar style")}}()}function v(e,t){var n=N(e)?String(t):"",o="\n"===e[e.length-1];return n+(o&&("\n"===e[e.length-2]||"\n"===e)?"+":o?"":"-")+"\n"}function x(e){return"\n"===e[e.length-1]?e.slice(0,-1):e}function y(e,t){if(""===e||" "===e[0])return e;for(var n,o,r=/ [^ ]/g,i=0,a=0,c=0,l="";n=r.exec(e);)(c=n.index)-i>t&&(o=a>i?a:c,l+="\n"+e.slice(i,o),i=o+1),a=c;return l+="\n",e.length-i>t&&a>i?l+=e.slice(i,a)+"\n"+e.slice(a+1):l+=e.slice(i),l.slice(1)}function k(e,t,n){var o,i,a,s,d,u;for(a=0,s=(i=n?e.explicitTypes:e.implicitTypes).length;a tag resolver accepts not "'+u+'" style');o=d.represent[u](t,u)}e.dump=o}return!0}return!1}function w(e,t,n,o,i,a){e.tag=null,e.dump=n,k(e,n,!1)||k(e,n,!0);var l=c.call(e.dump);o&&(o=e.flowLevel<0||e.flowLevel>t);var s,d,u="[object Object]"===l||"[object Array]"===l;if(u&&(d=-1!==(s=e.duplicates.indexOf(n))),(null!==e.tag&&"?"!==e.tag||d||2!==e.indent&&t>0)&&(i=!1),d&&e.usedDuplicates[s])e.dump="*ref_"+s;else{if(u&&d&&!e.usedDuplicates[s]&&(e.usedDuplicates[s]=!0),"[object Object]"===l)o&&0!==Object.keys(e.dump).length?(!function(e,t,n,o){var i,a,c,l,s,d,u="",p=e.tag,m=Object.keys(n);if(!0===e.sortKeys)m.sort();else if("function"==typeof e.sortKeys)m.sort(e.sortKeys);else if(e.sortKeys)throw new r("sortKeys must be a boolean or a function");for(i=0,a=m.length;i1024)&&(e.dump&&10===e.dump.charCodeAt(0)?d+="?":d+="? "),d+=e.dump,s&&(d+=h(e,t)),w(e,t+1,l,!0,s)&&(e.dump&&10===e.dump.charCodeAt(0)?d+=":":d+=": ",u+=d+=e.dump));e.tag=p,e.dump=u||"{}"}(e,t,e.dump,i),d&&(e.dump="&ref_"+s+e.dump)):(!function(e,t,n){var o,r,i,a,c,l="",s=e.tag,d=Object.keys(n);for(o=0,r=d.length;o1024&&(c+="? "),c+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),w(e,t,a,!1,!1)&&(l+=c+=e.dump));e.tag=s,e.dump="{"+l+"}"}(e,t,e.dump),d&&(e.dump="&ref_"+s+" "+e.dump));else if("[object Array]"===l){var p=e.noArrayIndent&&t>0?t-1:t;o&&0!==e.dump.length?(!function(e,t,n,o){var r,i,a="",c=e.tag;for(r=0,i=n.length;r "+e.dump)}return!0}function _(e,t){var n,o,r=[],i=[];for(function a(e,t,n){var o,r,i;if(null!==e&&"object"==typeof e)if(-1!==(r=t.indexOf(e)))-1===n.indexOf(r)&&n.push(r);else if(t.push(e),Array.isArray(e))for(r=0,i=e.length;r0}),(0,o.createComponentVNode)(2,p,{mode:g,bufferReagents:f}),(0,o.createComponentVNode)(2,m,{isCondiment:i,bufferNonEmpty:f.length>0}),(0,o.createComponentVNode)(2,C)]})]})};var u=function(e,t){var n=(0,r.useBackend)(t).act,a=e.beaker,d=e.beakerReagents,u=e.bufferNonEmpty;return(0,o.createComponentVNode)(2,i.Section,{title:"Beaker",flexGrow:"0",flexBasis:"300px",buttons:u?(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}):(0,o.createComponentVNode)(2,i.Button,{icon:"eject",disabled:!a,content:"Eject and Clear Buffer",onClick:function(){return n("eject")}}),children:a?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:d,buttons:function(e,r){return(0,o.createComponentVNode)(2,i.Box,{mb:r0?(0,o.createComponentVNode)(2,c.BeakerContents,{beakerLoaded:!0,beakerContents:u,buttons:function(e,r){return(0,o.createComponentVNode)(2,i.Box,{mb:r0?l.desc:"N/A"}),l.blood_type&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood type",children:l.blood_type}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Blood DNA",className:"LabeledList__breakContents",children:l.blood_dna})],4),!c.condi&&(0,o.createComponentVNode)(2,i.Button,{icon:c.printing?"spinner":"print",disabled:c.printing,iconSpin:!!c.printing,ml:"0.5rem",content:"Print",onClick:function(){return a("print",{idx:l.idx,beaker:e.args.beaker})}})]})})})})),(0,l.modalRegisterBodyOverride)("change_patch_style",(function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.Flex,{spacingPrecise:"1",wrap:"wrap",my:"0.5rem",maxHeight:"1%",children:n.modal.choices.map((function(r,a){return(0,o.createComponentVNode)(2,i.Flex.Item,{flex:"1 1 auto",children:(0,o.createComponentVNode)(2,i.Button,{selected:a+1===parseInt(n.modal.value,10),onClick:function(){return(0,l.modalAnswer)(t,e.id,a+1)},children:(0,o.createVNode)(1,"div",null,null,1,{style:"display: inline-block;width: 32px;height: 32px;background: url(bandaid"+(a+1)+".png);background-size: 160%;background-position: left -9px bottom -14px;"})})},a)}))})}))},function(e,t,n){"use strict";t.__esModule=!0,t.CloningConsole=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(50),l=n(44),s=n(3),d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,s=e.args,d=s.activerecord,u=s.realname,p=s.health,m=s.unidentity,h=s.strucenzymes,f=p.split(" - ");return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Records of "+u,children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:u}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Damage",children:f.length>1?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.oxy,display:"inline",children:f[0]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.toxin,display:"inline",children:f[2]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.brute,display:"inline",children:f[3]}),(0,o.createTextVNode)("\xa0|\xa0"),(0,o.createComponentVNode)(2,a.Box,{color:c.COLORS.damageType.burn,display:"inline",children:f[1]})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Unknown"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"UI",className:"LabeledList__breakContents",children:m}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"SE",className:"LabeledList__breakContents",children:h}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Disk",children:[(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!l.disk,icon:"arrow-circle-down",content:"Import",onClick:function(){return r("disk",{option:"load"})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI",onClick:function(){return r("disk",{option:"save",savetype:"ui"})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export UI and UE",onClick:function(){return r("disk",{option:"save",savetype:"ue"})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!l.disk,icon:"arrow-circle-up",content:"Export SE",onClick:function(){return r("disk",{option:"save",savetype:"se"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!l.podready,icon:"user-plus",content:"Clone",onClick:function(){return r("clone",{ref:d})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"trash",content:"Delete",onClick:function(){return r("del_rec")}})]})]})})};t.CloningConsole=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.menu;return(0,l.modalRegisterBodyOverride)("view_rec",d),(0,o.createComponentVNode)(2,s.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,l.ComplexModal,{maxWidth:"75%",maxHeight:"75%"}),(0,o.createComponentVNode)(2,s.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,flexGrow:"1",children:(0,o.createComponentVNode)(2,p)})]})]})};var u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.menu;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,icon:"home",onClick:function(){return r("menu",{num:1})},children:"Main"}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,icon:"folder",onClick:function(){return r("menu",{num:2})},children:"Records"})]})},p=function(e,t){var n,r=(0,i.useBackend)(t).data.menu;return 1===r?n=(0,o.createComponentVNode)(2,m):2===r&&(n=(0,o.createComponentVNode)(2,h)),n},m=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.loading,d=l.scantemp,u=l.occupant,p=l.locked,m=l.can_brainscan,h=l.scan_mode,f=l.numberofpods,C=l.pods,g=l.selected_pod,N=p&&!!u;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"Scanner",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Scanner Lock:\xa0"}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,selected:N,icon:N?"toggle-on":"toggle-off",content:N?"Engaged":"Disengaged",onClick:function(){return c("lock")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:N||!u,icon:"user-slash",content:"Eject Occupant",onClick:function(){return c("eject")}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:s?(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"spinner",spin:!0}),"\xa0 Scanning..."]}):(0,o.createComponentVNode)(2,a.Box,{color:d.color,children:d.text})}),!!m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scan Mode",children:(0,o.createComponentVNode)(2,a.Button,{icon:h?"brain":"male",content:h?"Brain":"Body",onClick:function(){return c("toggle_mode")}})})]}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u||s,icon:"user",content:"Scan Occupant",mt:"0.5rem",mb:"0",onClick:function(){return c("scan")}})]}),(0,o.createComponentVNode)(2,a.Section,{title:"Pods",level:"2",children:f?C.map((function(e,t){var n;return n="cloning"===e.status?(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:e.progress/100,ranges:{good:[.75,Infinity],average:[.25,.75],bad:[-Infinity,.25]},mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,r.round)(e.progress,0)+"%"})}):"mess"===e.status?(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:"bad",mt:"0.5rem",children:"ERROR"}):(0,o.createComponentVNode)(2,a.Button,{selected:g===e.pod,icon:g===e.pod&&"check",content:"Select",mt:"0.5rem",onClick:function(){return c("selectpod",{ref:e.pod})}}),(0,o.createComponentVNode)(2,a.Box,{width:"64px",textAlign:"center",display:"inline-block",mr:"0.5rem",children:[(0,o.createVNode)(1,"img",null,null,1,{src:"pod_"+e.status+".gif",style:{width:"100%","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,a.Box,{color:"label",children:["Pod #",t+1]}),(0,o.createComponentVNode)(2,a.Box,{bold:!0,color:e.biomass>=150?"good":"bad",display:"inline",children:[(0,o.createComponentVNode)(2,a.Icon,{name:e.biomass>=150?"circle":"circle-o"}),"\xa0",e.biomass]}),n]},t)})):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"No pods detected. Unable to clone."})})],4)},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.records;return c.length?(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,a.Button,{icon:"user",mb:"0.5rem",content:e.realname,onClick:function(){return r("view_rec",{ref:e.record})}},t)}))}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No records found."]})})},f=function(e,t){var n,r=(0,i.useBackend)(t),c=r.act,l=r.data.temp;if(l&&l.text&&!(l.text.length<=0)){var s=((n={})[l.style]=!0,n);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.NoticeBox,Object.assign({},s,{children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",children:l.text}),(0,o.createComponentVNode)(2,a.Button,{icon:"times-circle",float:"right",onClick:function(){return c("cleartemp")}}),(0,o.createComponentVNode)(2,a.Box,{clear:"both"})]})))}},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.scanner,s=c.numberofpods,d=c.autoallowed,u=c.autoprocess,p=c.disk;return(0,o.createComponentVNode)(2,a.Section,{title:"Status",buttons:(0,o.createFragment)([!!d&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline",color:"label",children:"Auto-processing:\xa0"}),(0,o.createComponentVNode)(2,a.Button,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"Enabled":"Disabled",onClick:function(){return r("autoprocess",{on:u?0:1})}})],4),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"eject",content:"Eject Disk",onClick:function(){return r("disk",{option:"eject"})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Scanner",children:l?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Connected"}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Not connected!"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pods",children:s?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[s," connected"]}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"None connected!"})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CommunicationsComputer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.CommunicationsComputer=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,s=c.data;n=s.authenticated?s.is_ai?"AI":1===s.authenticated?"Command":2===s.authenticated?"Captain":"ERROR: Report This Bug!":"Not Logged In";var d="View ("+s.messages.length+")",u=(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Authentication",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:s.is_ai&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Access Level",children:"AI"})||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.authenticated?"sign-out-alt":"id-card",selected:s.authenticated,content:s.authenticated?"Log Out ("+n+")":"Log In",onClick:function(){return l("auth")}})})})}),!!s.esc_section&&(0,o.createComponentVNode)(2,i.Section,{title:"Escape Shuttle",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[!!s.esc_status&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:s.esc_status}),!!s.esc_callable&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,i.Button,{icon:"rocket",content:"Call Shuttle",disabled:!s.authenticated,onClick:function(){return l("callshuttle")}})}),!!s.esc_recallable&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Options",children:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Recall Shuttle",disabled:!s.authenticated||s.is_ai,onClick:function(){return l("cancelshuttle")}})}),!!s.lastCallLoc&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Last Call/Recall From",children:s.lastCallLoc})]})})],0),p="Make Priority Announcement";s.msg_cooldown>0&&(p+=" ("+s.msg_cooldown+"s)");var m=s.emagged?"Message [UNKNOWN]":"Message CentComm",h="Request Authentication Codes";s.cc_cooldown>0&&(m+=" ("+s.cc_cooldown+"s)",h+=" ("+s.cc_cooldown+"s)");var f,C=s.str_security_level,g=s.levels.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.icon,content:e.name,disabled:!s.authmax||e.id===s.security_level,onClick:function(){return l("newalertlevel",{level:e.id})}},e.name)})),N=s.stat_display.presets.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.label,selected:e.name===s.stat_display.type,disabled:!s.authenticated,onClick:function(){return l("setstat",{statdisp:e.name})}},e.name)})),b=s.stat_display.alerts.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.label,selected:e.alert===s.stat_display.icon,disabled:!s.authenticated,onClick:function(){return l("setstat",{statdisp:"alert",alert:e.alert})}},e.alert)}));if(s.current_message_title)f=(0,o.createComponentVNode)(2,i.Section,{title:s.current_message_title,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Return To Message List",disabled:!s.authenticated,onClick:function(){return l("messagelist")}}),children:(0,o.createComponentVNode)(2,i.Box,{children:s.current_message})});else{var V=s.messages.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"eye",content:"View",disabled:!s.authenticated||s.current_message_title===e.title,onClick:function(){return l("messagelist",{msgid:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Delete",disabled:!s.authenticated,onClick:function(){return l("delmessage",{msgid:e.id})}})]},e.id)}));f=(0,o.createComponentVNode)(2,i.Section,{title:"Messages Received",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return l("main")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:V})})}switch(s.menu_state){case 1:return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u,(0,o.createComponentVNode)(2,i.Section,{title:"Captain-Only Actions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Alert",color:s.security_level_color,children:C}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Change Alert",children:g}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Announcement",children:(0,o.createComponentVNode)(2,i.Button,{icon:"bullhorn",content:p,disabled:!s.authmax||s.msg_cooldown>0,onClick:function(){return l("announce")}})}),!!s.emagged&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transmit",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"broadcast-tower",color:"red",content:m,disabled:!s.authmax||s.cc_cooldown>0,onClick:function(){return l("MessageSyndicate")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",content:"Reset Relays",disabled:!s.authmax,onClick:function(){return l("RestoreBackup")}})]})||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transmit",children:(0,o.createComponentVNode)(2,i.Button,{icon:"broadcast-tower",content:m,disabled:!s.authmax||s.cc_cooldown>0,onClick:function(){return l("MessageCentcomm")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nuclear Device",children:(0,o.createComponentVNode)(2,i.Button,{icon:"bomb",content:h,disabled:!s.authmax||s.cc_cooldown>0,onClick:function(){return l("nukerequest")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Command Staff Actions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Displays",children:(0,o.createComponentVNode)(2,i.Button,{icon:"tv",content:"Change Status Displays",disabled:!s.authenticated,onClick:function(){return l("status")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Incoming Messages",children:(0,o.createComponentVNode)(2,i.Button,{icon:"folder-open",content:d,disabled:!s.authenticated,onClick:function(){return l("messagelist")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Misc",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",content:"Restart Nano-Mob Hunter GO! Server",disabled:!s.authenticated,onClick:function(){return l("RestartNanoMob")}})})]})})]})});case 2:return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[u,(0,o.createComponentVNode)(2,i.Section,{title:"Modify Status Screens",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-left",content:"Back To Main Menu",onClick:function(){return l("main")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Presets",children:N}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Alerts",children:b}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message Line 1",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:s.stat_display.line_1,disabled:!s.authenticated,onClick:function(){return l("setmsg1")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message Line 2",children:(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:s.stat_display.line_2,disabled:!s.authenticated,onClick:function(){return l("setmsg2")}})})]})})]})});case 3:return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[u,f]})});default:return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[u,"ERRROR. Unknown menu_state: ",s.menu_state,"Please report this to NT Technical Support."]})})}}},function(e,t,n){"use strict";t.__esModule=!0,t.Contractor=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(104),l=n(3);var s={1:["ACTIVE","good"],2:["COMPLETED","good"],3:["FAILED","bad"]},d=["Recording biometric data...","Analyzing embedded syndicate info...","STATUS CONFIRMED","Contacting Syndicate database...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Awaiting response...","Response received, ack 4851234...","CONFIRM ACC "+Math.round(2e4*Math.random()),"Setting up private accounts...","CONTRACTOR ACCOUNT CREATED","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","Searching for available contracts...","CONTRACTS FOUND","WELCOME, AGENT"];t.Contractor=function(e,t){var n,r=(0,i.useBackend)(t),c=r.act,s=r.data;n=s.unauthorized?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,C,{height:"100%",allMessages:["ERROR: UNAUTHORIZED USER"],finishedTimeout:100,onFinished:function(){}})}):s.load_animation_completed?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,p)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"hidden",children:1===s.page?(0,o.createComponentVNode)(2,m,{height:"100%"}):(0,o.createComponentVNode)(2,f,{height:"100%"})})],4):(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",backgroundColor:"rgba(0, 0, 0, 0.8)",children:(0,o.createComponentVNode)(2,C,{height:"100%",allMessages:d,finishedTimeout:3e3,onFinished:function(){return c("complete_load_animation")}})});var h=(0,i.useLocalState)(t,"viewingPhoto",""),N=h[0];h[1];return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:[N&&(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,l.Window.Content,{className:"Contractor",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:n})})]})};var u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.tc_available,s=c.tc_paid_out,d=c.completed_contracts,u=c.rep;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Summary",buttons:(0,o.createComponentVNode)(2,a.Box,{verticalAlign:"middle",mt:"0.25rem",children:[u," Rep"]})},e,{children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Available",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",children:[l," TC"]}),(0,o.createComponentVNode)(2,a.Button,{disabled:l<=0,content:"Claim",mx:"0.75rem",mb:"0",flexBasis:"content",onClick:function(){return r("claim")}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"TC Earned",children:[s," TC"]})]})}),(0,o.createComponentVNode)(2,a.Box,{flexBasis:"50%",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Contracts Completed",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,a.Box,{height:"20px",lineHeight:"20px",display:"inline-block",children:d})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Contractor Status",verticalAlign:"middle",children:"ACTIVE"})]})})]})})))},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.page;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Tabs,Object.assign({},e,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===c,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"suitcase"}),"Contracts"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===c,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"shopping-cart"}),"Hub"]})]})))},m=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,d=l.contracts,u=l.contract_active,p=l.can_extract,m=!!u&&d.filter((function(e){return 1===e.status}))[0],f=m&&m.time_left>0,C=(0,i.useLocalState)(t,"viewingPhoto",""),g=(C[0],C[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Available Contracts",overflow:"auto",buttons:(0,o.createComponentVNode)(2,a.Button,{disabled:!p||f,icon:"parachute-box",content:["Call Extraction",f&&(0,o.createComponentVNode)(2,c.Countdown,{timeLeft:m.time_left,format:function(e,t){return" ("+t.substr(3)+")"}})],onClick:function(){return r("extract")}})},e,{children:d.slice().sort((function(e,t){return 1===e.status?-1:1===t.status?1:e.status-t.status})).map((function(e){var t;return(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",color:1===e.status&&"good",children:e.target_name}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"content",children:e.has_photo&&(0,o.createComponentVNode)(2,a.Button,{icon:"camera",mb:"-0.5rem",ml:"0.5rem",onClick:function(){return g("target_photo_"+e.uid+".png")}})})]}),className:"Contractor__Contract",buttons:(0,o.createComponentVNode)(2,a.Box,{width:"100%",children:[!!s[e.status]&&(0,o.createComponentVNode)(2,a.Box,{color:s[e.status][1],display:"inline-block",mt:1!==e.status&&"0.125rem",mr:"0.25rem",lineHeight:"20px",children:s[e.status][0]}),1===e.status&&(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"ban",color:"bad",content:"Abort",ml:"0.5rem",onClick:function(){return r("abort")}})]}),children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"2",mr:"0.5rem",children:[e.fluff_message,!!e.completed_time&&(0,o.createComponentVNode)(2,a.Box,{color:"good",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Icon,{name:"check",mr:"0.5rem"}),"Contract completed at ",e.completed_time]}),!!e.dead_extraction&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",mt:"0.5rem",bold:!0,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"Telecrystals reward reduced drastically as the target was dead during extraction."]}),!!e.fail_reason&&(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Icon,{name:"times",mr:"0.5rem"}),"Contract failed: ",e.fail_reason]})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{flexBasis:"100%",children:[(0,o.createComponentVNode)(2,a.Flex,{mb:"0.5rem",color:"label",children:["Extraction Zone:\xa0",h(e)]}),null==(t=e.difficulties)?void 0:t.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!!u,content:t.name+" ("+t.reward+" TC)",onClick:function(){return r("activate",{uid:e.uid,difficulty:n+1})}},n)})),!!e.objective&&(0,o.createComponentVNode)(2,a.Box,{color:"white",bold:!0,children:[e.objective.extraction_name,(0,o.createVNode)(1,"br"),"(",(e.objective.rewards.tc||0)+" TC",",\xa0",(e.objective.rewards.credits||0)+" Credits",")"]})]})]})},e.uid)}))})))},h=function(e){if(e.objective&&!(e.status>1)){var t=e.objective.locs.user_area_id,n=e.objective.locs.user_coords,i=e.objective.locs.target_area_id,c=e.objective.locs.target_coords,l=t===i;return(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Icon,{name:l?"dot-circle-o":"arrow-alt-circle-right-o",color:l?"green":"yellow",rotation:l?null:-(0,r.rad2deg)(Math.atan2(c[1]-n[1],c[0]-n[0])),lineHeight:l?null:"0.85",size:"1.5"})})}},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.rep,s=c.buyables;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Available Purchases",overflow:"auto"},e,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Section,{title:e.name,buttons:e.refundable&&(0,o.createComponentVNode)(2,a.Button.Confirm,{content:"Refund ("+e.cost+" Rep)",onClick:function(){return r("refund",{uid:e.uid})}}),children:[e.description,(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:l-1&&(0,o.createComponentVNode)(2,a.Box,{as:"span",color:0===e.stock?"bad":"good",ml:"0.5rem",children:[e.stock," in stock"]})]},e.uid)}))})))},C=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={currentIndex:0,currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var i=r.prototype;return i.tick=function(){var e=this.props,t=this.state;t.currentIndex<=e.allMessages.length?(this.setState((function(e){return{currentIndex:e.currentIndex+1}})),t.currentDisplay.push(e.allMessages[t.currentIndex])):(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout))},i.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},i.componentWillUnmount=function(){clearTimeout(this.timer)},i.render=function(){return(0,o.createComponentVNode)(2,a.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component),g=function(e,t){var n=(0,i.useLocalState)(t,"viewingPhoto",""),r=n[0],c=n[1];return(0,o.createComponentVNode)(2,a.Modal,{className:"Contractor__photoZoom",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return c("")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ConveyorSwitch=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ConveyorSwitch=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.slowFactor,d=l.oneWay,u=l.position;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lever position",children:u>0?"forward":u<0?"reverse":"neutral"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Allow reverse",children:(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:!d,onClick:function(){return c("toggleOneWay")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Slowdown factor",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-double-left",onClick:function(){return c("slowFactor",{value:s-5})}})," "]}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-left",onClick:function(){return c("slowFactor",{value:s-1})}})," "]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Slider,{width:"100px",mx:"1px",value:s,fillValue:s,minValue:1,maxValue:50,step:1,format:function(e){return e+"x"},onChange:function(e,t){return c("slowFactor",{value:t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-right",onClick:function(){return c("slowFactor",{value:s+1})}})," "]}),(0,o.createComponentVNode)(2,i.Flex.Item,{mx:"1px",children:[" ",(0,o.createComponentVNode)(2,i.Button,{icon:"angle-double-right",onClick:function(){return c("slowFactor",{value:s+5})}})," "]})]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.CrewMonitor=void 0;var o=n(0),r=n(24),i=n(18),a=n(1),c=n(2),l=n(80),s=n(50),d=n(3),u=function(e,t){return e.dead?"Deceased":parseInt(e.health,10)<=t?"Critical":1===parseInt(e.stat,10)?"Unconscious":"Living"},p=function(e,t){return e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"green"};t.CrewMonitor=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=(0,a.useLocalState)(t,"tabIndex",r.IndexToggler),l=i[0],s=i[1];return(0,o.createComponentVNode)(2,d.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,d.Window.Content,{children:(0,o.createComponentVNode)(2,c.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[r.isBS?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:0===l,onClick:function(){return s(0)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"table"})," Command Data View"]},"ComDataView"):null,r.isBP?(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:1===l,onClick:function(){return s(1)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"table"})," Security Data View"]},"SecDataView"):null,(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:2===l,onClick:function(){return s(2)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"table"})," Data View"]},"DataView"),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:3===l,onClick:function(){return s(3)},children:[(0,o.createComponentVNode)(2,c.Icon,{name:"map-marked-alt"})," Map View"]},"MapView")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,f);case 1:return(0,o.createComponentVNode)(2,C);case 2:return(0,o.createComponentVNode)(2,h);case 3:return(0,o.createComponentVNode)(2,g);default:return"WE SHOULDN'T BE HERE!"}}(l)]})})})};var m=function(e){var t=e.crewData,n=e.context,d=(0,a.useBackend)(n),m=d.act,h=d.data,f=(0,r.sortBy)((function(e){return e.name}))(t||[]),C=(0,a.useLocalState)(n,"search",""),g=C[0],N=C[1],b=(0,i.createSearch)(g,(function(e){return e.name+"|"+e.assignment+"|"+e.area}));return(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by name, assignment or location..",width:"100%",onInput:function(e,t){return N(t)}}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,c.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Name"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,c.Table.Cell,{children:"Location"})]}),f.filter(b).map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{bold:!!e.is_command,children:[(0,o.createComponentVNode)(2,l.TableCell,{children:[e.name," (",e.assignment,")"]}),(0,o.createComponentVNode)(2,l.TableCell,{children:[(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:p(e,h.critThreshold),children:u(e,h.critThreshold)}),e.sensor_type>=2?(0,o.createComponentVNode)(2,c.Box,{inline:!0,children:["(",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.oxy,children:e.oxy}),"|",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.toxin,children:e.tox}),"|",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.burn,children:e.fire}),"|",(0,o.createComponentVNode)(2,c.Box,{inline:!0,color:s.COLORS.damageType.brute,children:e.brute}),")"]}):null]}),(0,o.createComponentVNode)(2,l.TableCell,{children:3===e.sensor_type?h.isAI?(0,o.createComponentVNode)(2,c.Button,{fluid:!0,icon:"location-arrow",content:e.area+" ("+e.x+", "+e.y+")",onClick:function(){return m("track",{track:e.ref})}}):e.area+" ("+e.x+", "+e.y+")":"Not Available"})]},e.name)}))]})]})},h=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.crewmembers||[]);return(0,o.createComponentVNode)(2,m,{crewData:r,context:t})},f=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.crewmembers.filter((function(e){return e.is_command}))||[]);return(0,o.createComponentVNode)(2,m,{crewData:r,context:t})},C=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data.crewmembers.filter((function(e){return e.is_security}))||[]);return(0,o.createComponentVNode)(2,m,{crewData:r,context:t})},g=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=(0,a.useLocalState)(t,"zoom",1),s=l[0],d=l[1],u=function(e){return e.is_command&&i.isBS||e.is_security&&i.isBP?"square":"circle"},m=function(e){return e.is_command&&i.isBS||e.is_security&&i.isBP?10:6},h=function(e,t){return e.is_command&&i.isBS||e.is_security&&i.isBP?e.dead?"red":parseInt(e.health,10)<=t?"orange":1===parseInt(e.stat,10)?"blue":"violet":p(e,t)};return(0,o.createComponentVNode)(2,c.Box,{height:"526px",mb:"0.5rem",overflow:"hidden",children:(0,o.createComponentVNode)(2,c.NanoMap,{onZoom:function(e){return d(e)},children:i.crewmembers.filter((function(e){return 3===e.sensor_type})).map((function(e){return(0,o.createComponentVNode)(2,c.NanoMap.Marker,{x:e.x,y:e.y,zoom:s,icon:u(e),size:m(e),tooltip:e.name+" ("+e.assignment+")",color:h(e,i.critThreshold),onClick:function(){i.isAI&&r("track",{track:e.ref})}},e.ref)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Cryo=void 0;var o=n(0),r=n(533),i=n(1),a=n(2),c=n(3),l=[{label:"\u0410\u0441\u0444\u0438\u043a\u0441\u0438\u044f",type:"oxyLoss"},{label:"\u0418\u043d\u0442\u043e\u043a\u0441\u0438\u043a\u0430\u0446\u0438\u044f",type:"toxLoss"},{label:"\u0420\u0430\u043d\u044b",type:"bruteLoss"},{label:"\u041e\u0436\u043e\u0433\u0438",type:"fireLoss"}],s=[["good","\u0412 \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u0438"],["average","\u0411\u0435\u0437 \u0441\u043e\u0437\u043d\u0430\u043d\u0438\u044f"],["bad","\u0422\u0420\u0423\u041f"]];t.Cryo=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,d=c.isOperating,p=c.hasOccupant,m=c.occupant,h=void 0===m?[]:m,f=c.cellTemperature,C=c.cellTemperatureStatus,g=c.isBeakerLoaded,N=c.auto_eject_healthy,b=c.auto_eject_dead;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"\u041f\u0430\u0446\u0438\u0435\u043d\u0442",flexGrow:"1",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",onClick:function(){return r("ejectOccupant")},disabled:!p,children:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c"}),children:p?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0430\u0446\u0438\u0435\u043d\u0442",children:h.name||"\u0418\u043c\u044f \u043d\u0435\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0417\u0434\u043e\u0440\u043e\u0432\u044c\u0435",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:h.health,max:h.maxHealth,value:h.health/h.maxHealth,color:h.health>0?"good":"average",children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.health)})})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",color:s[h.stat][0],children:s[h.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h.bodyTemperature)})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),l.map((function(e){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.label,children:(0,o.createComponentVNode)(2,a.ProgressBar,{value:h[e.type]/100,ranges:{bad:[.01,Infinity]},children:(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:Math.round(h[e.type])})})},e.id)}))]}):(0,o.createComponentVNode)(2,a.Flex,{height:"100%",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"\u041f\u0430\u0446\u0438\u0435\u043d\u0442 \u043d\u0435 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d."]})})}),(0,o.createComponentVNode)(2,a.Section,{title:"\u041a\u0440\u0438\u043e\u043a\u0430\u043f\u0441\u0443\u043b\u0430",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"eject",onClick:function(){return r("ejectBeaker")},disabled:!g,children:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c \u0451\u043c\u043a\u043e\u0441\u0442\u044c"}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u041f\u0438\u0442\u0430\u043d\u0438\u0435",children:(0,o.createComponentVNode)(2,a.Button,{icon:"power-off",onClick:function(){return r(d?"switchOff":"switchOn")},selected:d,children:d?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",color:C,children:[(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:f})," K"]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0401\u043c\u043a\u043e\u0441\u0442\u044c",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0410\u0432\u0442\u043e\u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0437\u0434\u043e\u0440\u043e\u0432\u044b\u0445 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432",children:(0,o.createComponentVNode)(2,a.Button,{icon:N?"toggle-on":"toggle-off",selected:N,onClick:function(){return r(N?"auto_eject_healthy_off":"auto_eject_healthy_on")},children:N?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b"})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0410\u0432\u0442\u043e\u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u043c\u0451\u0440\u0442\u0432\u044b\u0445 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u043e\u0432",children:(0,o.createComponentVNode)(2,a.Button,{icon:b?"toggle-on":"toggle-off",selected:b,onClick:function(){return r(b?"auto_eject_dead_off":"auto_eject_dead_on")},children:b?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b"})})]})})],4)},u=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),l=c.isBeakerLoaded,s=c.beakerLabel,d=c.beakerVolume;return l?(0,o.createFragment)([s?"\xab"+s+"\xbb":(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"\u0401\u043c\u043a\u043e\u0441\u0442\u044c \u043d\u0435 \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u043d\u0430"}),(0,o.createComponentVNode)(2,a.Box,{color:!d&&"bad",children:d?(0,o.createComponentVNode)(2,a.AnimatedNumber,{value:d,format:function(e){var t=Math.round(e);return(0,r.declensionRu)(t,"\u041e\u0441\u0442\u0430\u043b\u0430\u0441\u044c","\u041e\u0441\u0442\u0430\u043b\u0438\u0441\u044c","\u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c")+" "+t+" "+(0,r.declensionRu)(t,"\u0435\u0434\u0438\u043d\u0438\u0446\u0430","\u0435\u0434\u0438\u043d\u0438\u0446\u044b","\u0435\u0434\u0438\u043d\u0438\u0446")}}):"\u0401\u043c\u043a\u043e\u0441\u0442\u044c \u043f\u0443\u0441\u0442\u0430"})],0):(0,o.createComponentVNode)(2,a.Box,{color:"average",children:"\u0401\u043c\u043a\u043e\u0441\u0442\u044c \u043d\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430"})}},function(e,t,n){"use strict";t.__esModule=!0,t.declensionRu=void 0;t.declensionRu=function(e,t,n,o){var r=e%100;if(r>=10&&r<=20)return o;var i=r%10;return 1===i?t:i>=2&&i<=4?n:o}},function(e,t,n){"use strict";t.__esModule=!0,t.CryopodConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(18);t.CryopodConsole=function(e,t){var n=(0,r.useBackend)(t).data,c=n.account_name,d=n.allow_items;return(0,o.createComponentVNode)(2,a.Window,{title:"Cryopod Console",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Hello, "+(c||"[REDACTED]")+"!",children:"This automated cryogenic freezing unit will safely store your corporeal form until your next assignment."}),(0,o.createComponentVNode)(2,l),!!d&&(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t).data.frozen_crew;return(0,o.createComponentVNode)(2,i.Collapsible,{title:"Stored Crew",children:n.length?(0,o.createComponentVNode)(2,i.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:n.map((function(e,t){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:e.rank},t)}))})}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No stored crew!"})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data.frozen_items,s=function(e){var t=e.toString();return t.startsWith("the ")&&(t=t.slice(4,t.length)),(0,c.toTitleCase)(t)};return(0,o.createComponentVNode)(2,i.Collapsible,{title:"Stored Items",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:!l.length,content:"Drop All Items",color:"red",onClick:function(){return a("all_items")}}),children:l.length?(0,o.createComponentVNode)(2,i.Section,{fill:!0,scrollable:!0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:s(e.name),buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",content:"Drop",mr:1,onClick:function(){return a("one_item",{item:e.uid})}})},e)}))})}):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No stored items!"})})}},function(e,t,n){"use strict";t.__esModule=!0,t.DNAModifier=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(44),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["ui","Modify U.I.","dna"],["se","Modify S.E.","dna"],["buffer","Transfer Buffers","syringe"],["rejuvenators","Rejuvenators","flask"]],d=[5,10,20,30,50];t.DNAModifier=function(e,t){var n,i=(0,r.useBackend)(t),l=(i.act,i.data),s=l.irradiating,d=l.dnaBlockSize,m=l.occupant;return t.dnaBlockSize=d,t.isDNAInvalid=!m.isViableSubject||!m.uniqueIdentity||!m.structuralEnzymes,s&&(n=(0,o.createComponentVNode)(2,V,{duration:s})),(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,c.ComplexModal),n,(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p)]})]})};var u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.locked,d=c.hasOccupant,u=c.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:"label",display:"inline",mr:"0.5rem",children:"Door Lock:"}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d,selected:s,icon:s?"toggle-on":"toggle-off",content:s?"Engaged":"Disengaged",onClick:function(){return a("toggleLock")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d||s,icon:"user-slash",content:"Eject",onClick:function(){return a("ejectOccupant")}})],4),children:d?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:u.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:u.minHealth,max:u.maxHealth,value:u.health/u.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",color:l[u.stat][0],children:l[u.stat][1]}),(0,o.createComponentVNode)(2,i.LabeledList.Divider)]})}),t.isDNAInvalid?(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 The occupant's DNA structure is ruined beyond recognition, please insert a subject with an intact DNA structure."]}):(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Radiation",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:"0",max:"100",value:u.radiationLevel/100,color:"average"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unique Enzymes",children:c.occupant.uniqueEnzymes?c.occupant.uniqueEnzymes:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-circle"}),"\xa0 Unknown"]})})]})],0):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"Cell unoccupied."})})},p=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data,d=l.selectedMenuKey,u=l.hasOccupant;l.occupant;return u?t.isDNAInvalid?(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No operation possible on this subject."]})})}):("ui"===d?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,f)],4):"se"===d?n=(0,o.createFragment)([(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f)],4):"buffer"===d?n=(0,o.createComponentVNode)(2,C):"rejuvenators"===d&&(n=(0,o.createComponentVNode)(2,b)),(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:[(0,o.createComponentVNode)(2,i.Tabs,{children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:d===e[0],onClick:function(){return c("selectMenuKey",{key:e[0]})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:e[2]}),e[1]]},t)}))}),n]})):(0,o.createComponentVNode)(2,i.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",align:"center",textAlign:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant in DNA modifier."]})})})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.selectedUIBlock,s=c.selectedUISubBlock,d=c.selectedUITarget,u=c.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Modify Unique Identifier",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:u.uniqueIdentity,selectedBlock:l,selectedSubblock:s,blockSize:t.dnaBlockSize,action:"selectUIBlock"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target",children:(0,o.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"15",stepPixelSize:"20",value:d,format:function(e){return e.toString(16).toUpperCase()},ml:"0",onChange:function(e,t){return a("changeUITarget",{value:t})}})})}),(0,o.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",mt:"0.5rem",onClick:function(){return a("pulseUIRadiation")}})]})},h=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.selectedSEBlock,s=c.selectedSESubBlock,d=c.occupant;return(0,o.createComponentVNode)(2,i.Section,{title:"Modify Structural Enzymes",level:"2",children:[(0,o.createComponentVNode)(2,v,{dnaString:d.structuralEnzymes,selectedBlock:l,selectedSubblock:s,blockSize:t.dnaBlockSize,action:"selectSEBlock"}),(0,o.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Irradiate Block",onClick:function(){return a("pulseSERadiation")}})]})},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.radiationIntensity,s=c.radiationDuration;return(0,o.createComponentVNode)(2,i.Section,{title:"Radiation Emitter",level:"2",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Intensity",children:(0,o.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"10",stepPixelSize:"20",value:l,popUpPosition:"right",ml:"0",onChange:function(e,t){return a("radiationIntensity",{value:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Duration",children:(0,o.createComponentVNode)(2,i.Knob,{minValue:"1",maxValue:"20",stepPixelSize:"10",unit:"s",value:s,popUpPosition:"right",ml:"0",onChange:function(e,t){return a("radiationDuration",{value:t})}})})]}),(0,o.createComponentVNode)(2,i.Button,{icon:"radiation",content:"Pulse Radiation",tooltip:"Mutates a random block of either the occupant's UI or SE.",tooltipPosition:"top-right",mt:"0.5rem",onClick:function(){return a("pulseRadiation")}})]})},C=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.buffers.map((function(e,t){return(0,o.createComponentVNode)(2,g,{id:t+1,name:"Buffer "+(t+1),buffer:e},t)})));return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Buffers",level:"2",children:a}),(0,o.createComponentVNode)(2,N)],4)},g=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=e.id,s=e.name,d=e.buffer,u=c.isInjectorReady,p=s+(d.data?" - "+d.label:"");return(0,o.createComponentVNode)(2,i.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,i.Section,{title:p,level:"3",mx:"0",lineHeight:"18px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Confirm,{disabled:!d.data,icon:"trash",content:"Clear",onClick:function(){return a("bufferOption",{option:"clear",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d.data,icon:"pen",content:"Rename",onClick:function(){return a("bufferOption",{option:"changeLabel",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d.data||!c.hasDisk,icon:"save",content:"Export",tooltip:"Exports this buffer to the currently loaded data disk.",tooltipPosition:"bottom-left",onClick:function(){return a("bufferOption",{option:"saveDisk",id:l})}})],4),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Write",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUI",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject U.I and U.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveUIAndUE",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",content:"Subject S.E.",mb:"0",onClick:function(){return a("bufferOption",{option:"saveSE",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!c.hasDisk||!c.disk.data,icon:"arrow-circle-down",content:"From Disk",mb:"0",onClick:function(){return a("bufferOption",{option:"loadDisk",id:l})}})]}),!!d.data&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:d.owner||(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===d.type?"Unique Identifiers":"Structural Enzymes",!!d.ue&&" and Unique Enzymes"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Transfer to",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:l})}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!u,icon:u?"syringe":"spinner",iconSpin:!u,content:"Block Injector",mb:"0",onClick:function(){return a("bufferOption",{option:"createInjector",id:l,block:1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"user",content:"Subject",mb:"0",onClick:function(){return a("bufferOption",{option:"transfer",id:l})}})]})],4)]}),!d.data&&(0,o.createComponentVNode)(2,i.Box,{color:"label",mt:"0.5rem",children:"This buffer is empty."})]})})},N=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.hasDisk,s=c.disk;return(0,o.createComponentVNode)(2,i.Section,{title:"Data Disk",level:"2",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button.Confirm,{disabled:!l||!s.data,icon:"trash",content:"Wipe",onClick:function(){return a("wipeDisk")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return a("ejectDisk")}})],4),children:l?s.data?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Label",children:s.label?s.label:"No label"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Subject",children:s.owner?s.owner:(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Unknown"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Data Type",children:["ui"===s.type?"Unique Identifiers":"Structural Enzymes",!!s.ue&&" and Unique Enzymes"]})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"Disk is blank."}):(0,o.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"1rem",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"save-o",size:"4"}),(0,o.createVNode)(1,"br"),"No disk inserted."]})})},b=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.isBeakerLoaded,s=c.beakerVolume,u=c.beakerLabel;return(0,o.createComponentVNode)(2,i.Section,{title:"Rejuvenators and Beaker",level:"2",buttons:(0,o.createComponentVNode)(2,i.Button,{disabled:!l,icon:"eject",content:"Eject",onClick:function(){return a("ejectBeaker")}}),children:l?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Inject",children:[d.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{disabled:e>s,icon:"syringe",content:e,onClick:function(){return a("injectRejuvenators",{amount:e})}},t)})),(0,o.createComponentVNode)(2,i.Button,{disabled:s<=0,icon:"syringe",content:"All",onClick:function(){return a("injectRejuvenators",{amount:s})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Beaker",children:[(0,o.createComponentVNode)(2,i.Box,{mb:"0.5rem",children:u||"No label"}),s?(0,o.createComponentVNode)(2,i.Box,{color:"good",children:[s," unit",1===s?"":"s"," remaining"]}):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Empty"})]})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",textAlign:"center",my:"25%",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",size:"4"}),(0,o.createVNode)(1,"br"),"No beaker loaded."]})})},V=function(e,t){return(0,o.createComponentVNode)(2,i.Dimmer,{textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",size:"5",spin:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Box,{color:"average",children:(0,o.createVNode)(1,"h1",null,[(0,o.createComponentVNode)(2,i.Icon,{name:"radiation"}),(0,o.createTextVNode)("\xa0Irradiating occupant\xa0"),(0,o.createComponentVNode)(2,i.Icon,{name:"radiation"})],4)}),(0,o.createComponentVNode)(2,i.Box,{color:"label",children:(0,o.createVNode)(1,"h3",null,[(0,o.createTextVNode)("For "),e.duration,(0,o.createTextVNode)(" second"),1===e.duration?"":"s"],0)})]})},v=function(e,t){for(var n=(0,r.useBackend)(t),a=n.act,c=(n.data,e.dnaString),l=e.selectedBlock,s=e.selectedSubblock,d=e.blockSize,u=e.action,p=c.split(""),m=[],h=function(e){for(var t=e/d+1,n=[],r=function(r){var c=r+1;n.push((0,o.createComponentVNode)(2,i.Button,{selected:l===t&&s===c,content:p[e+r],mb:"0",onClick:function(){return a(u,{block:t,subblock:c})}}))},c=0;c0?"Yes":"No",selected:l.com>0,onClick:function(){return c("toggle_com")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Security",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.sec===e,content:e,onClick:function(){return c("set_sec",{set_sec:e})}},"sec"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Medical",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.med===e,content:e,onClick:function(){return c("set_med",{set_med:e})}},"med"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Engineering",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.eng===e,content:e,onClick:function(){return c("set_eng",{set_eng:e})}},"eng"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Paranormal",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.par===e,content:e,onClick:function(){return c("set_par",{set_par:e})}},"par"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Janitor",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.jan===e,content:e,onClick:function(){return c("set_jan",{set_jan:e})}},"jan"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cyborg",children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Button,{selected:l.cyb===e,content:e,onClick:function(){return c("set_cyb",{set_cyb:e})}},"cyb"+e)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Slots",children:(0,o.createComponentVNode)(2,i.Box,{color:l.total>l.spawnpoints?"red":"green",children:[l.total," total, versus ",l.spawnpoints," spawnpoints"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Dispatch",children:(0,o.createComponentVNode)(2,i.Button,{icon:"ambulance",content:"Send ERT",onClick:function(){return c("dispatch_ert")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Electropack=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3);t.Electropack=function(e,t){var n=(0,i.useBackend)(t),l=n.act,s=n.data,d=s.power,u=s.code,p=s.frequency,m=s.minFrequency,h=s.maxFrequency;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:(0,o.createComponentVNode)(2,a.Button,{icon:d?"power-off":"times",content:d?"On":"Off",selected:d,onClick:function(){return l("power")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Frequency",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"freq"})}}),children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,unit:"kHz",step:.2,stepPixelSize:6,minValue:m/10,maxValue:h/10,value:p/10,format:function(e){return(0,r.toFixed)(e,1)},width:"80px",onChange:function(e,t){return l("freq",{freq:t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Code",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"sync",content:"Reset",onClick:function(){return l("reset",{reset:"code"})}}),children:(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:1,stepPixelSize:6,minValue:1,maxValue:100,value:u,width:"80px",onChange:function(e,t){return l("code",{code:t})}})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.EvolutionMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.EvolutionMenu=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"changeling",children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.evo_points,s=c.can_respec;return(0,o.createComponentVNode)(2,i.Section,{title:"Evolution Points",height:5.5,children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mt:.5,color:"label",children:"Points remaining:"}),(0,o.createComponentVNode)(2,i.Flex.Item,{mt:.5,ml:2,bold:!0,color:"#1b945c",children:l}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{ml:2.5,disabled:!s,content:"Readapt",icon:"sync",onClick:function(){return a("readapt")}}),(0,o.createComponentVNode)(2,i.Button,{tooltip:"By transforming a humanoid into a husk, we gain the ability to readapt our chosen evolutions.",tooltipPosition:"bottom",icon:"question-circle"})]})]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.evo_points,s=c.ability_list,d=c.purchased_abilities,u=c.view_mode;return(0,o.createComponentVNode)(2,i.Section,{title:"Abilities",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:u?"square-o":"check-square-o",selected:!u,content:"Compact",onClick:function(){return a("set_view_mode",{mode:0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:u?"check-square-o":"square-o",selected:u,content:"Expanded",onClick:function(){return a("set_view_mode",{mode:1})}})],4),children:s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{p:.5,mx:-1,className:"candystripe",children:[(0,o.createComponentVNode)(2,i.Flex,{align:"center",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{ml:.5,color:"#dedede",children:e.name}),d.includes(e.power_path)&&(0,o.createComponentVNode)(2,i.Flex.Item,{ml:2,bold:!0,color:"#1b945c",children:"(Purchased)"}),(0,o.createComponentVNode)(2,i.Flex.Item,{mr:3,textAlign:"right",grow:1,children:[(0,o.createComponentVNode)(2,i.Box,{as:"span",color:"label",children:["Cost: "," "]}),(0,o.createComponentVNode)(2,i.Box,{as:"span",bold:!0,color:"#1b945c",children:e.cost})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{textAlign:"right",children:(0,o.createComponentVNode)(2,i.Button,{mr:.5,disabled:e.cost>l||d.includes(e.power_path),content:"Evolve",onClick:function(){return a("purchase",{power_path:e.power_path})}})})]}),!!u&&(0,o.createComponentVNode)(2,i.Flex,{color:"#8a8a8a",my:1,ml:1.5,width:"95%",children:e.description+" "+e.helptext})]},t)}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExosuitFabricator=void 0;var o=n(0),r=n(7),i=n(18),a=n(1),c=n(2),l=n(104),s=n(3);var d={bananium:"clown",tranquillite:"mime"};t.ExosuitFabricator=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.building;return(0,o.createComponentVNode)(2,s.Window,{theme:r.ui_theme,children:(0,o.createComponentVNode)(2,s.Window.Content,{className:"Exofab",children:(0,o.createComponentVNode)(2,c.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",mr:"0.5rem",width:"70%",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"100%",children:(0,o.createComponentVNode)(2,p)}),i&&(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",mt:"0.5rem",children:(0,o.createComponentVNode)(2,m)})]})}),(0,o.createComponentVNode)(2,c.Flex.Item,{width:"30%",children:(0,o.createComponentVNode)(2,c.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"50%",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",basis:"50%",mt:"0.5rem",children:(0,o.createComponentVNode)(2,h)})]})})]})})})};var u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.materials,s=i.capacity,d=Object.values(l).reduce((function(e,t){return e+t}),0);return(0,o.createComponentVNode)(2,c.Section,{title:"Materials",className:"Exofab__materials",buttons:(0,o.createComponentVNode)(2,c.Box,{color:"label",mt:"0.25rem",children:[(d/s*100).toPrecision(3),"% full"]}),children:["$metal","$glass","$silver","$gold","$uranium","$titanium","$plasma","$diamond","$bluespace","$bananium","$tranquillite","$plastic"].map((function(e){return(0,o.createComponentVNode)(2,f,{id:e,bold:"$metal"===e||"$glass"===e,onClick:function(){return r("withdraw",{id:e})}},e)}))})},p=function(e,t){var n=(0,a.useBackend)(t),r=n.act,l=n.data,s=l.curCategory,d=l.categories,u=l.designs,p=l.syncing,m=(0,a.useLocalState)(t,"searchText",""),h=m[0],f=m[1],g=(0,i.createSearch)(h,(function(e){return e.name})),N=u.filter(g);return(0,o.createComponentVNode)(2,c.Section,{className:"Exofab__designs",title:(0,o.createComponentVNode)(2,c.Dropdown,{selected:s,options:d,onSelected:function(e){return r("category",{cat:e})},width:"150px"}),height:"100%",buttons:(0,o.createComponentVNode)(2,c.Box,{mt:"-18px",children:[(0,o.createComponentVNode)(2,c.Button,{icon:"plus",content:"Queue all",onClick:function(){return r("queueall")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:p,iconSpin:p,icon:"sync-alt",content:p?"Synchronizing...":"Synchronize with R&D servers",onClick:function(){return r("sync")}})]}),children:[(0,o.createComponentVNode)(2,c.Input,{placeholder:"Search by name...",mb:"0.5rem",width:"100%",onInput:function(e,t){return f(t)}}),N.map((function(e){return(0,o.createComponentVNode)(2,C,{design:e},e.id)})),0===N.length&&(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No designs found."})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=(n.act,n.data),i=r.building,s=r.buildStart,d=r.buildEnd,u=r.worldTime;return(0,o.createComponentVNode)(2,c.Section,{className:"Exofab__building",stretchContents:!0,children:(0,o.createComponentVNode)(2,c.ProgressBar.Countdown,{start:s,current:u,end:d,bold:!0,children:[(0,o.createComponentVNode)(2,c.Box,{float:"left",children:(0,o.createComponentVNode)(2,c.Icon,{name:"cog",spin:!0})}),"Building ",i,"\xa0(",(0,o.createComponentVNode)(2,l.Countdown,{current:u,timeLeft:d-u,format:function(e,t){return t.substr(3)}}),")"]})})},h=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.queue,s=i.processingQueue,d=Object.entries(i.queueDeficit).filter((function(e){return e[1]<0})),u=l.reduce((function(e,t){return e+t.time}),0);return(0,o.createComponentVNode)(2,c.Section,{className:"Exofab__queue",title:"Queue",buttons:(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:"Process",onClick:function(){return r("process")}}),(0,o.createComponentVNode)(2,c.Button,{disabled:0===l.length,icon:"eraser",content:"Clear",onClick:function(){return r("unqueueall")}})]}),children:(0,o.createComponentVNode)(2,c.Flex,{height:"100%",direction:"column",children:0===l.length?(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"The queue is empty."}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Exofab__queue--queue",grow:"1",overflow:"auto",children:l.map((function(e,t){return(0,o.createComponentVNode)(2,c.Box,{color:e.notEnough&&"bad",children:[t+1,". ",e.name,t>0&&(0,o.createComponentVNode)(2,c.Button,{icon:"arrow-up",onClick:function(){return r("queueswap",{from:t+1,to:t})}}),t0&&(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Exofab__queue--time",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,c.Divider),"Processing time:",(0,o.createComponentVNode)(2,c.Icon,{name:"clock",mx:"0.5rem"}),(0,o.createComponentVNode)(2,c.Box,{display:"inline",bold:!0,children:new Date(u/10*1e3).toISOString().substr(14,5)})]}),Object.keys(d).length>0&&(0,o.createComponentVNode)(2,c.Flex.Item,{className:"Exofab__queue--deficit",basis:"content",shrink:"0",children:[(0,o.createComponentVNode)(2,c.Divider),"Lacking materials to complete:",d.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,f,{id:e[0],amount:-e[1],lineDisplay:!0})},e[0])}))]})],0)})})},f=function(e,t){var n=(0,a.useBackend)(t),i=(n.act,n.data),l=e.id,s=e.amount,u=e.lineDisplay,p=e.onClick,m=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["id","amount","lineDisplay","onClick"]),h=l.replace("$",""),f=i.materials[l]||0,C=s||f;if(!(C<=0&&"metal"!==h&&"glass"!==h)){var g=s&&s>f;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,c.Flex,Object.assign({className:(0,r.classes)(["Exofab__material",u&&"Exofab__material--line"])},m,{children:[(0,o.createComponentVNode)(2,c.Flex.Item,{basis:"content",children:(0,o.createComponentVNode)(2,c.Button,{onClick:p,children:(0,o.createComponentVNode)(2,c.Box,{as:"img",src:"sheet-"+(d[h]||h)+".png"})})}),(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",children:u?(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__material--amount",color:g&&"bad",children:C.toLocaleString("en-US")}):(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__material--name",children:h}),(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__material--amount",children:[C.toLocaleString("en-US")," cm\xb3 (",Math.round(C/2e3*10)/10," sheets)"]})],4)})]})))}},C=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=e.design;return(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__design",children:[(0,o.createComponentVNode)(2,c.Button,{disabled:l.notEnough||i.building,icon:"cog",content:l.name,onClick:function(){return r("build",{id:l.id})}}),(0,o.createComponentVNode)(2,c.Button,{icon:"plus-circle",onClick:function(){return r("queue",{id:l.id})}}),(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__design--cost",children:Object.entries(l.cost).map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:(0,o.createComponentVNode)(2,f,{id:e[0],amount:e[1],lineDisplay:!0})},e[0])}))}),(0,o.createComponentVNode)(2,c.Box,{className:"Exofab__design--time",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"clock"}),l.time>0?(0,o.createFragment)([l.time/10,(0,o.createTextVNode)(" seconds")],0):"Instant"]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.ExternalAirlockController=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ExternalAirlockController=function(e,t){var n,c,l=(0,r.useBackend)(t),s=l.act,d=l.data,u=d.chamber_pressure,p=(d.exterior_status,d.interior_status),m=d.processing;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Information",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Chamber Pressure",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:(n=u,c="good",n<80?c="bad":n<95||n>110?c="average":n>120&&(c="bad"),c),value:u,minValue:0,maxValue:1013,children:[u," kPa"]})})})}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",children:[(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Exterior",icon:"arrow-circle-left",disabled:m,onClick:function(){return s("cycle_ext")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Cycle to Interior",icon:"arrow-circle-right",disabled:m,onClick:function(){return s("cycle_int")}})]}),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Force Exterior Door",icon:"exclamation-triangle",color:"open"===p?"red":m?"yellow":null,onClick:function(){return s("force_ext")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Force Interior Door",icon:"exclamation-triangle",color:"open"===p?"red":m?"yellow":null,onClick:function(){return s("force_int")}})]}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Abort",icon:"ban",color:"red",disabled:!m,onClick:function(){return s("abort")}})})]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FaxMachine=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.FaxMachine=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID Card",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.scan_name?"eject":"id-card",selected:l.scan_name,content:l.scan_name?l.scan_name:"-----",tooltip:l.scan_name?"Eject ID":"Insert ID",onClick:function(){return c("scan")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Authorize",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.authenticated?"sign-out-alt":"id-card",selected:l.authenticated,disabled:!l.scan_name&&!l.authenticated,content:l.authenticated?"Log Out":"Log In",onClick:function(){return c("auth")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Fax Menu",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Network",children:l.network}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Document",children:[(0,o.createComponentVNode)(2,i.Button,{icon:l.paper?"eject":"paperclip",disabled:!l.authenticated&&!l.paper,content:l.paper?l.paper:"-----",onClick:function(){return c("paper")}}),!!l.paper&&(0,o.createComponentVNode)(2,i.Button,{icon:"pencil-alt",content:"Rename",onClick:function(){return c("rename")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sending To",children:(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:l.destination?l.destination:"-----",disabled:!l.authenticated,onClick:function(){return c("dept")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Action",children:(0,o.createComponentVNode)(2,i.Button,{icon:"envelope",content:l.sendError?l.sendError:"Send",disabled:!l.paper||!l.destination||!l.authenticated||l.sendError,onClick:function(){return c("send")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.FloorPainter=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=function(e,t){var n=(0,r.useBackend)(t),i=(n.act,n.data,e.image),a=e.isSelected,c=e.onSelect;return(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+i,style:{"border-style":a?"solid":"none","border-width":"2px","border-color":"orange",padding:a?"2px":"4px"},onClick:c})};t.FloorPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.availableStyles,u=s.selectedStyle,p=s.selectedDir,m=s.directionsPreview,h=s.allStylesPreview;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Decal setup",children:[(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-left",onClick:function(){return l("cycle_style",{offset:-1})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Dropdown,{options:d,selected:u,width:"150px",height:"20px",ml:"2px",mr:"2px",nochevron:"true",onSelected:function(e){return l("select_style",{style:e})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-right",onClick:function(){return l("cycle_style",{offset:1})}})})]}),(0,o.createComponentVNode)(2,i.Box,{mt:"5px",mb:"5px",children:(0,o.createComponentVNode)(2,i.Flex,{overflowY:"auto",maxHeight:"220px",wrap:"wrap",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,c,{image:h[e],isSelected:u===e,onSelect:function(){return l("select_style",{style:e})}})},"{style}")}))})}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Direction",children:(0,o.createComponentVNode)(2,i.Table,{style:{display:"inline"},children:["north","","south"].map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[e+"west",e,e+"east"].map((function(e){return(0,o.createComponentVNode)(2,i.Table.Cell,{style:{"vertical-align":"middle","text-align":"center"},children:""===e?(0,o.createComponentVNode)(2,i.Icon,{name:"arrows-alt",size:3}):(0,o.createComponentVNode)(2,c,{image:m[e],isSelected:e===p,onSelect:function(){return l("select_direction",{direction:e})}})},e)}))},e)}))})})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GPS=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3),l=function(e){return e?"("+e.join(", ")+")":"ERROR"};t.GPS=function(e,t){var n=(0,i.useBackend)(t).data,r=n.emped,l=n.active,m=n.area,h=n.position,f=n.saved;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:r?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,s,{emp:!0})}):(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,d)}),l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,u,{area:m,position:h})}),f&&(0,o.createComponentVNode)(2,a.Flex.Item,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,u,{title:"Saved Position",position:f})}),(0,o.createComponentVNode)(2,a.Flex.Item,{mt:"0.5rem",grow:"1",basis:"0",children:(0,o.createComponentVNode)(2,p,{height:"100%"})})],0):(0,o.createComponentVNode)(2,s)],0)})})})};var s=function(e,t){var n=e.emp;return(0,o.createComponentVNode)(2,a.Section,{mt:"0.5rem",width:"100%",height:"100%",stretchContents:!0,children:(0,o.createComponentVNode)(2,a.Box,{width:"100%",height:"100%",color:"label",textAlign:"center",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:n?"ban":"power-off",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),n?"ERROR: Device temporarily lost signal.":"Device is disabled."]})})})})},d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.active,s=c.tag,d=c.same_z,u=(0,i.useLocalState)(t,"newTag",s),p=u[0],m=u[1];return(0,o.createComponentVNode)(2,a.Section,{title:"Settings",buttons:(0,o.createComponentVNode)(2,a.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r("toggle")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tag",children:[(0,o.createComponentVNode)(2,a.Input,{width:"5rem",value:s,onEnter:function(){return r("tag",{newtag:p})},onInput:function(e,t){return m(t)}}),(0,o.createComponentVNode)(2,a.Button,{disabled:s===p,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return r("tag",{newtag:p})},children:(0,o.createComponentVNode)(2,a.Icon,{name:"pen"})})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Range",children:(0,o.createComponentVNode)(2,a.Button,{selected:!d,icon:d?"compress":"expand",content:d?"Local Sector":"Global",onClick:function(){return r("same_z")}})})]})})},u=function(e,t){var n=e.title,r=e.area,i=e.position;return(0,o.createComponentVNode)(2,a.Section,{title:n||"Position",children:(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.5rem",children:[r&&(0,o.createFragment)([r,(0,o.createVNode)(1,"br")],0),l(i)]})})},p=function(e,t){var n=(0,i.useBackend)(t).data,c=n.position,s=n.signals,d=n.upgraded;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Section,Object.assign({title:"Signals",overflow:"auto"},e,{children:(0,o.createComponentVNode)(2,a.Table,{children:s.map((function(e){return Object.assign({},e,{},function(e,t,n){if(e&&t){if(e[2]!==t[2]||1!==n)return null;var o=Math.atan2(t[1]-e[1],t[0]-e[0]),i=Math.sqrt(Math.pow(t[1]-e[1],2)+Math.pow(t[0]-e[0],2));return{angle:(0,r.rad2deg)(o),distance:i}}}(c,e.position,d))})).map((function(e,t){return(0,o.createComponentVNode)(2,a.Table.Row,{backgroundColor:t%2==0&&"rgba(255, 255, 255, 0.05)",children:[(0,o.createComponentVNode)(2,a.Table.Cell,{width:"30%",verticalAlign:"middle",color:"label",p:"0.25rem",bold:!0,children:e.tag}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"middle",color:"grey",children:e.area}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"middle",collapsing:!0,children:e.distance!==undefined&&(0,o.createComponentVNode)(2,a.Box,{opacity:Math.max(1-Math.min(e.distance,100)/100,.5),children:[(0,o.createComponentVNode)(2,a.Icon,{name:e.distance>0?"arrow-right":"circle",rotation:-e.angle}),"\xa0",Math.floor(e.distance)+"m"]})}),(0,o.createComponentVNode)(2,a.Table.Cell,{verticalAlign:"middle",pr:"0.25rem",collapsing:!0,children:l(e.position)})]},t)}))})})))}},function(e,t,n){"use strict";t.__esModule=!0,t.GasAnalyzer=t.GasAnalyzerHistory=t.GasAnalyzerContent=void 0;var o=n(0),r=n(1),i=n(550),a=n(2),c=n(3),l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.gasmixes,d=l.autoUpdating;return(0,o.createComponentVNode)(2,a.Section,{title:s[0].name,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:d?"unlock":"lock",onClick:function(){return c("autoscantoggle")},tooltip:d?"Auto-Update Enabled":"Auto-Update Disabled",fluid:!0,textAlign:"center",selected:d}),children:(0,o.createComponentVNode)(2,i.GasmixParser)},s[0])};t.GasAnalyzerContent=l;var s=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data,l=c.historyGasmixes,s=c.historyViewMode,d=c.historyIndex;return(0,o.createComponentVNode)(2,a.Section,{fill:!0,title:"Scan History",buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"trash",tooltip:"Clear History",onClick:function(){return i("clearhistory")},textAlign:"center",disabled:0===l.length}),children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Mode",children:(0,o.createComponentVNode)(2,a.Flex,{inline:!0,width:"50%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"kPa",onClick:function(){return i("modekpa")},textAlign:"center",selected:"kpa"===s})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{content:"mol",onClick:function(){return i("modemol")},textAlign:"center",selected:"mol"===s})})]})}),(0,o.createComponentVNode)(2,a.LabeledList,{children:l.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{children:(0,o.createComponentVNode)(2,a.Button,{content:t+1+". "+("mol"===s?e[0].total_moles.toFixed(2):e[0].pressure.toFixed(2)),onClick:function(){return i("input",{target:t+1})},textAlign:"left",selected:t+1===d,fluid:!0})},e[0])}))})]})};t.GasAnalyzerHistory=s;t.GasAnalyzer=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,a.Section,{grow:!0,children:(0,o.createComponentVNode)(2,l)}),2,{style:{float:"left",width:"67%"}}),(0,o.createVNode)(1,"div",null,(0,o.createComponentVNode)(2,a.Section,{width:"160px",children:(0,o.createComponentVNode)(2,s)}),2,{style:{float:"right",width:"33%"}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GasmixParser=void 0;var o=n(0),r=n(1),i=n(2);t.GasmixParser=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.gasmixes);return a[0].total_moles?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Moles",children:(a[0].total_moles?a[0].total_moles:"-")+" mol"}),a[0].oxygen?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:a[0].oxygen.toFixed(2)+" mol ("+100*(a[0].oxygen/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].nitrogen?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:a[0].nitrogen.toFixed(2)+" mol ("+100*(a[0].nitrogen/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].carbon_dioxide?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:a[0].carbon_dioxide.toFixed(2)+" mol ("+100*(a[0].carbon_dioxide/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].toxins?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Plasma",children:a[0].toxins.toFixed(2)+" mol ("+100*(a[0].toxins/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].sleeping_agent?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrous Oxide",children:a[0].sleeping_agent.toFixed(2)+" mol ("+100*(a[0].sleeping_agent/a[0].total_moles).toFixed(2)+" %)"}):"",a[0].agent_b?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Agent B",children:a[0].agent_b.toFixed(2)+" mol ("+100*(a[0].agent_b/a[0].total_moles).toFixed(2)+" %)"}):"",(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(a[0].total_moles?(a[0].temperature-273.15).toFixed(2):"-")+" \xb0C ("+(a[0].total_moles?a[0].temperature.toFixed(2):"-")+" K)"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Volume",children:(a[0].total_moles?a[0].volume:"-")+" L"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(a[0].total_moles?a[0].pressure.toFixed(2):"-")+" kPa"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Heat Capacity",children:a[0].heat_capacity+" / K"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Thermal Energy",children:a[0].thermal_energy})]}):(0,o.createComponentVNode)(2,i.Box,{nowrap:!0,italic:!0,mb:"10px",children:"No Gas Detected!"})}},function(e,t,n){"use strict";t.__esModule=!0,t.GasFreezer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.GasFreezer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.on,d=l.pressure,u=l.temperature,p=l.temperatureCelsius,m=l.min,h=l.max,f=l.target,C=l.targetCelsius,g=(u-m)/(h-m);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u0442\u0430\u0442\u0443\u0441",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:s?"power-off":"times",content:s?"\u0412\u043a\u043b":"\u0412\u044b\u043a\u043b",selected:s,onClick:function(){return c("power")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0414\u0430\u0432\u043b\u0435\u043d\u0438\u0435",children:[d," \u043a\u041f\u0430"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0422\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"65%",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:g,ranges:{blue:[-Infinity,.5],red:[.5,Infinity]},children:"\xa0"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"35%",children:[g<.5&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"blue",ml:1,children:[u," \xb0K (",p," \xb0C)"]}),g>=.5&&(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:"red",ml:1,children:[u," \xb0K (",p," \xb0C)"]})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0426\u0435\u043b\u0435\u0432\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"65%",justify:"end",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:(f-m)/(h-m),children:"\xa0"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"35%",children:(0,o.createComponentVNode)(2,i.Box,{inline:!0,ml:1,children:[f," \xb0K (",C," \xb0C)"]})})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0430\u0434\u0430\u0442\u044c \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",title:"\u041c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){return c("temp",{temp:m})}}),(0,o.createComponentVNode)(2,i.NumberInput,{value:Math.round(f),unit:"\xb0K",minValue:Math.round(m),maxValue:Math.round(h),step:5,stepPixelSize:3,onDrag:function(e,t){return c("temp",{temp:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",title:"\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430",onClick:function(){return c("temp",{temp:h})}})]})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GenericCrewManifest=void 0;var o=n(0),r=n(2),i=n(3),a=n(144);t.GenericCrewManifest=function(e,t){return(0,o.createComponentVNode)(2,i.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,i.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,r.Section,{noTopPadding:!0,children:(0,o.createComponentVNode)(2,a.CrewManifest)})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.GhostHudPanel=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.GhostHudPanel=function(e,t){var n=(0,r.useBackend)(t).data,l=n.security,s=n.medical,d=n.diagnostic,u=n.ahud;return(0,o.createComponentVNode)(2,a.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,c,{label:"Medical",type:"medical",is_active:s}),(0,o.createComponentVNode)(2,c,{label:"Security",type:"security",is_active:l}),(0,o.createComponentVNode)(2,c,{label:"Diagnostic",type:"diagnostic",is_active:d}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,c,{label:"Antag HUD",is_active:u,act_on:"ahud_on",act_off:"ahud_off"})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t).act,a=e.label,c=e.type,l=void 0===c?null:c,s=e.is_active,d=e.act_on,u=void 0===d?"hud_on":d,p=e.act_off,m=void 0===p?"hud_off":p;return(0,o.createComponentVNode)(2,i.Flex,{pt:.3,color:"label",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{pl:.5,align:"center",width:"80%",children:a}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{mr:.6,content:s?"On":"Off",icon:s?"toggle-on":"toggle-off",selected:s,onClick:function(){return n(s?m:u,{hud_type:l})}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.HandheldChemDispenser=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=[1,5,10,20,30,50];t.HandheldChemDispenser=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,l=n.data,s=l.amount,d=l.energy,u=l.maxEnergy,p=l.mode;return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",flex:"content",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:d,minValue:0,maxValue:u,ranges:{good:[.5*u,Infinity],average:[.25*u,.5*u],bad:[-Infinity,.25*u]},children:[d," / ",u," Units"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Amount",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:"1",children:c.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",width:"14%",display:"inline-block",children:(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:s===e,content:e,m:"0",width:"100%",onClick:function(){return a("amount",{amount:e})}})},t)}))})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mode",verticalAlign:"middle",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-between",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:"dispense"===p,content:"Dispense",m:"0",width:"32%",onClick:function(){return a("mode",{mode:"dispense"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:"remove"===p,content:"Remove",m:"0",width:"32%",onClick:function(){return a("mode",{mode:"remove"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"cog",selected:"isolate"===p,content:"Isolate",m:"0",width:"32%",onClick:function(){return a("mode",{mode:"isolate"})}})]})})]})})},s=function(e,t){for(var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.chemicals,s=void 0===l?[]:l,d=c.current_reagent,u=[],p=0;p<(s.length+1)%3;p++)u.push(!0);return(0,o.createComponentVNode)(2,i.Section,{title:c.glass?"Drink Selector":"Chemical Selector",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",wrap:"wrap",height:"100%",spacingPrecise:"2",align:"flex-start",alignContent:"flex-start",children:[s.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px",width:"30%",display:"inline-block",children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-down",overflow:"hidden",textOverflow:"ellipsis",selected:d===e.id,width:"100%",height:"100%",align:"flex-start",content:e.title,onClick:function(){return a("dispense",{reagent:e.id})}})},t)})),u.map((function(e,t){return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",basis:"25%",height:"20px"},t)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ImplantPad=void 0;var o=n(0),r=n(1),i=n(2),a=n(52),c=n(3);t.ImplantPad=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.implant,u=s.contains_case,p=s.tag,m=(0,r.useLocalState)(t,"newTag",p),h=m[0],f=m[1];return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Bio-chip Information",children:d&&u?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{bold:!0,mb:2,children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d.image,ml:0,mr:2,style:{"vertical-align":"middle",width:"32px"}}),d.name]}),(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"Life",children:d.life}),(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"Notes",children:d.notes}),(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"Function",children:d["function"]})]})],4):u?(0,o.createComponentVNode)(2,i.Box,{children:"This bio-chip case has no implant!"}):(0,o.createComponentVNode)(2,i.Box,{children:"Please insert a bio-chip casing!"})}),(0,o.createComponentVNode)(2,i.Section,{title:"Options",children:[p&&u?(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,i.Input,{ml:1,width:"8rem",value:p,onEnter:function(){return l("tag",{newtag:h})},onInput:function(e,t){return f(t)}}),(0,o.createComponentVNode)(2,i.Button,{disabled:p===h,width:"20px",mb:"0",ml:"0.25rem",onClick:function(){return l("tag",{newtag:h})},children:(0,o.createComponentVNode)(2,i.Icon,{name:"pen"})})]}):null,u?(0,o.createComponentVNode)(2,i.Button,{mt:1,content:"Eject Case",icon:"eject",disabled:!u,onClick:function(){return l("eject_case")}}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Instrument=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3);t.Instrument=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,c.Window,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,u)]})]})};var l=function(e,t){var n=(0,i.useBackend)(t),r=n.act;if(n.data.help)return(0,o.createComponentVNode)(2,a.Modal,{maxWidth:"75%",height:.75*window.innerHeight+"px",mx:"auto",py:"0",px:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{height:"100%",title:"Help",level:"2",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Box,{px:"0.5rem",mt:"-0.5rem",children:[(0,o.createVNode)(1,"h1",null,"Making a Song",16),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" as defined above.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" and in\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" scale.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" or\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Lines are a series of chords, separated by commas\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(,)"}),(0,o.createTextVNode)(", each with notes seperated by hyphens\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"(-)"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Every note in a chord will play together, with the chord timed by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo"}),(0,o.createTextVNode)(" as defined above.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Notes are played by the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"names of the note"}),(0,o.createTextVNode)(", and optionally, the\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(", and/or the "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave number"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("By default, every note is\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"natural"}),(0,o.createTextVNode)(" and in\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave 3"}),(0,o.createTextVNode)(". Defining a different state for either is remembered for each "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"note"}),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Example:"}),(0,o.createTextVNode)("\xa0"),(0,o.createVNode)(1,"i",null,"C,D,E,F,G,A,B",16),(0,o.createTextVNode)(" will play a\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"good",children:"C"}),(0,o.createTextVNode)("\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"major"}),(0,o.createTextVNode)(" scale.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createTextVNode)("After a note has an\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"average",children:"accidental"}),(0,o.createTextVNode)(" or\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"bad",children:"octave"}),(0,o.createTextVNode)(" placed, it will be remembered:\xa0"),(0,o.createVNode)(1,"i",null,"C,C4,C#,C3",16),(0,o.createTextVNode)(" is "),(0,o.createVNode)(1,"i",null,"C3,C4,C4#,C3#",16)],4)],4)],4),(0,o.createVNode)(1,"p",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"Chords"}),(0,o.createTextVNode)("\xa0can be played simply by seperating each note with a hyphen: "),(0,o.createVNode)(1,"i",null,"A-C#,Cn-E,E-G#,Gn-B",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("A "),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"pause"}),(0,o.createTextVNode)("\xa0may be denoted by an empty chord: "),(0,o.createVNode)(1,"i",null,"C,E,,C,G",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("To make a chord be a different time, end it with /x, where the chord length will be length defined by\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"tempo / x"}),(0,o.createTextVNode)(",\xa0"),(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"highlight",children:"eg:"}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"i",null,"C,G/2,E/4",16),(0,o.createTextVNode)(".")],4),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("Combined, an example line is: "),(0,o.createVNode)(1,"i",null,"E-E4/4,F#/2,G#/8,B/8,E3-E4/4",16),(0,o.createTextVNode)("."),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,"Lines may be up to 300 characters.",16),(0,o.createVNode)(1,"li",null,"A song may only contain up to 1,000 lines.",16)],4)],4),(0,o.createVNode)(1,"h1",null,"Instrument Advanced Settings",16),(0,o.createVNode)(1,"ul",null,[(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Type:"}),(0,o.createTextVNode)("\xa0Whether the instrument is legacy or synthesized."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Legacy instruments have a collection of sounds that are selectively used depending on the note to play."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Synthesized instruments use a base sound and change its pitch to match the note to play.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Current:"}),(0,o.createTextVNode)("\xa0Which instrument sample to play. Some instruments can be tuned to play different samples. Experiment!")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Note Shift/Note Transpose:"}),(0,o.createTextVNode)("\xa0The pitch to apply to all notes of the song.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain Mode:"}),(0,o.createTextVNode)("\xa0How a played note fades out."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Linear sustain means a note will fade out at a constant rate."),(0,o.createVNode)(1,"br"),(0,o.createTextVNode)("Exponential sustain means a note will fade out at an exponential rate, sounding smoother.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Volume Dropoff Threshold:"}),(0,o.createTextVNode)("\xa0The volume threshold at which a note is fully stopped.")],4),(0,o.createVNode)(1,"li",null,[(0,o.createComponentVNode)(2,a.Box,{as:"span",color:"label",children:"Sustain indefinitely last held note:"}),(0,o.createTextVNode)("\xa0Whether the last note should be sustained indefinitely.")],4)],4),(0,o.createComponentVNode)(2,a.Button,{color:"grey",content:"Close",onClick:function(){return r("help")}})]})})})},s=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.lines,u=l.playing,p=l.repeat,m=l.maxRepeats,h=l.tempo,f=l.minTempo,C=l.maxTempo,g=l.tickLag,N=l.volume,b=l.minVolume,V=l.maxVolume,v=l.ready;return(0,o.createComponentVNode)(2,a.Section,{title:"Instrument",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{icon:"info",content:"Help",onClick:function(){return c("help")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"file",content:"New",onClick:function(){return c("newsong")}}),(0,o.createComponentVNode)(2,a.Button,{icon:"upload",content:"Import",onClick:function(){return c("import")}})],4),children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Playback",children:[(0,o.createComponentVNode)(2,a.Button,{selected:u,disabled:0===s.length||p<0,icon:"play",content:"Play",onClick:function(){return c("play")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!u,icon:"stop",content:"Stop",onClick:function(){return c("stop")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Repeat",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0",maxValue:m,value:p,stepPixelSize:"59",onChange:function(e,t){return c("repeat",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Tempo",children:(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:h>=C,content:"-",as:"span",mr:"0.5rem",onClick:function(){return c("tempo",{"new":h+g})}}),(0,r.round)(600/h)," BPM",(0,o.createComponentVNode)(2,a.Button,{disabled:h<=f,content:"+",as:"span",ml:"0.5rem",onClick:function(){return c("tempo",{"new":h-g})}})]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,minValue:b,maxValue:V,value:N,stepPixelSize:"6",onDrag:function(e,t){return c("setvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:v?(0,o.createComponentVNode)(2,a.Box,{color:"good",children:"Ready"}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"Instrument Definition Error!"})})]}),(0,o.createComponentVNode)(2,d)]})},d=function(e,t){var n,c,l=(0,i.useBackend)(t),s=l.act,d=l.data,u=d.allowedInstrumentNames,p=d.instrumentLoaded,m=d.instrument,h=d.canNoteShift,f=d.noteShift,C=d.noteShiftMin,g=d.noteShiftMax,N=d.sustainMode,b=d.sustainLinearDuration,V=d.sustainExponentialDropoff,v=d.legacy,x=d.sustainDropoffVolume,y=d.sustainHeldNote;return 1===N?(n="Linear",c=(0,o.createComponentVNode)(2,a.Slider,{minValue:"0.1",maxValue:"5",value:b,step:"0.5",stepPixelSize:"85",format:function(e){return(0,r.round)(100*e)/100+" seconds"},onChange:function(e,t){return s("setlinearfalloff",{"new":t/10})}})):2===N&&(n="Exponential",c=(0,o.createComponentVNode)(2,a.Slider,{minValue:"1.025",maxValue:"10",value:V,step:"0.01",format:function(e){return(0,r.round)(1e3*e)/1e3+"% per decisecond"},onChange:function(e,t){return s("setexpfalloff",{"new":t})}})),u.sort(),(0,o.createComponentVNode)(2,a.Box,{my:-1,children:(0,o.createComponentVNode)(2,a.Collapsible,{mt:"1rem",mb:"0",title:"Advanced",children:(0,o.createComponentVNode)(2,a.Section,{mt:-1,children:[(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Type",children:v?"Legacy":"Synthesized"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Current",children:p?(0,o.createComponentVNode)(2,a.Dropdown,{options:u,selected:m,width:"40%",onSelected:function(e){return s("switchinstrument",{name:e})}}):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"None!"})}),!(v||!h)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Note Shift/Note Transpose",children:(0,o.createComponentVNode)(2,a.Slider,{minValue:C,maxValue:g,value:f,stepPixelSize:"2",format:function(e){return e+" keys / "+(0,r.round)(e/12*100)/100+" octaves"},onChange:function(e,t){return s("setnoteshift",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain Mode",children:[(0,o.createComponentVNode)(2,a.Dropdown,{options:["Linear","Exponential"],selected:n,onSelected:function(e){return s("setsustainmode",{"new":e})}}),c]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Volume Dropoff Threshold",children:(0,o.createComponentVNode)(2,a.Slider,{animated:!0,minValue:"0.01",maxValue:"100",value:x,stepPixelSize:"6",onChange:function(e,t){return s("setdropoffvolume",{"new":t})}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Sustain indefinitely last held note",children:(0,o.createComponentVNode)(2,a.Button,{selected:y,icon:y?"toggle-on":"toggle-off",content:y?"Yes":"No",onClick:function(){return s("togglesustainhold")}})})],4)]}),(0,o.createComponentVNode)(2,a.Button,{icon:"redo",content:"Reset to Default",mt:"0.5rem",onClick:function(){return s("reset")}})]})})})},u=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.playing,s=c.lines,d=c.editing;return(0,o.createComponentVNode)(2,a.Section,{title:"Editor",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:!d||l,icon:"plus",content:"Add Line",onClick:function(){return r("newline",{line:s.length+1})}}),(0,o.createComponentVNode)(2,a.Button,{selected:!d,icon:d?"chevron-up":"chevron-down",onClick:function(){return r("edit")}})],4),children:!!d&&(s.length>0?(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:t+1,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:"pen",onClick:function(){return r("modifyline",{line:t+1})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:"trash",onClick:function(){return r("deleteline",{line:t+1})}})],4),children:e},t)}))}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"Song is empty."}))})}},function(e,t,n){"use strict";t.__esModule=!0,t.ItemPixelShift=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ItemPixelShift=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.pixel_x,d=l.pixel_y,u=l.max_shift_x,p=l.max_shift_y,m=l.random_drop_on;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"X-coordinates",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",title:"Shifts item leftwards.",disabled:s===-u,onClick:function(){return c("shift_left")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:s,minValue:-u,maxValue:u,onChange:function(e,t){return c("custom_x",{pixel_x:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",title:"Shifts item rightwards.",disabled:s===u,onClick:function(){return c("shift_right")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Y-coordinates",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-up",title:"Shifts item upwards.",disabled:d===p,onClick:function(){return c("shift_up")}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,lineHeight:1.7,width:"75px",unit:"pixels",stepPixelSize:6,value:d,minValue:-p,maxValue:p,onChange:function(e,t){return c("custom_y",{pixel_y:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",title:"Shifts item downwards.",disabled:d===-p,onClick:function(){return c("shift_down")}})]})]})}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:"brown",icon:"arrow-up",content:"Move to Top",title:"Tries to place an item on top of the others.",onClick:function(){return c("move_to_top")}})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,color:m?"good":"bad",icon:"power-off",content:m?"Shift Enabled":"Shift Disabled",title:"Enables/Disables item pixel randomization on any drops.",onClick:function(){return c("toggle")}})})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.KeycardAuth=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.KeycardAuth=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=(0,o.createComponentVNode)(2,i.Section,{title:"Keycard Authentication Device",children:(0,o.createComponentVNode)(2,i.Box,{children:"This device is used to trigger certain high security events. It requires the simultaneous swipe of two high-level ID cards."})});if(l.swiping||l.busy){var d=(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Waiting for YOU to swipe your ID..."});return l.hasSwiped||l.ertreason||"Emergency Response Team"!==l.event?l.hasConfirm?d=(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Request Confirmed!"}):l.isRemote?d=(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"Swipe your card to CONFIRM the remote request."}):l.hasSwiped&&(d=(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"Waiting for second person to confirm..."})):d=(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Fill out the reason for your ERT request."}),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[s,"Emergency Response Team"===l.event&&(0,o.createComponentVNode)(2,i.Section,{title:"Reason for ERT Call",children:(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{color:l.ertreason?"":"red",icon:l.ertreason?"check":"pencil-alt",content:l.ertreason?l.ertreason:"-----",disabled:l.busy,onClick:function(){return c("ert")}})})}),(0,o.createComponentVNode)(2,i.Section,{title:l.event,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-circle-left",content:"Back",disabled:l.busy||l.hasConfirm,onClick:function(){return c("reset")}}),children:d})]})})}return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[s,(0,o.createComponentVNode)(2,i.Section,{title:"Choose Action",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Red Alert",children:(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",disabled:!l.redAvailable,onClick:function(){return c("triggerevent",{triggerevent:"Red Alert"})},content:"Red Alert"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ERT",children:(0,o.createComponentVNode)(2,i.Button,{icon:"broadcast-tower",onClick:function(){return c("triggerevent",{triggerevent:"Emergency Response Team"})},content:"Call ERT"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Maint Access",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"door-open",onClick:function(){return c("triggerevent",{triggerevent:"Grant Emergency Maintenance Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,i.Button,{icon:"door-closed",onClick:function(){return c("triggerevent",{triggerevent:"Revoke Emergency Maintenance Access"})},content:"Revoke"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Emergency Station-Wide Access",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"door-open",onClick:function(){return c("triggerevent",{triggerevent:"Activate Station-Wide Emergency Access"})},content:"Grant"}),(0,o.createComponentVNode)(2,i.Button,{icon:"door-closed",onClick:function(){return c("triggerevent",{triggerevent:"Deactivate Station-Wide Emergency Access"})},content:"Revoke"})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LaborClaimConsole=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);t.LaborClaimConsole=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.can_go_home,s=c.emagged,d=c.id_inserted,u=c.id_name,p=c.id_points,m=c.id_goal,h=c.unclaimed_points,f=s?0:1,C=s?"ERR0R":l?"Completed!":"Insufficient";return(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",children:!!d&&(0,o.createComponentVNode)(2,a.ProgressBar,{value:p/m,ranges:{good:[f,Infinity],bad:[-Infinity,f]},children:p+" / "+m+" "+C})||!!s&&"ERR0R COMPLETED?!@"||"No ID inserted"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Shuttle controls",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Move shuttle",disabled:!l,onClick:function(){return r("move_shuttle")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Unclaimed points",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:"Claim points ("+h+")",disabled:!d||!h,onClick:function(){return r("claim_points")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Inserted ID",children:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,content:d?u:"-------------",onClick:function(){return r("handle_id")}})})]})})},s=function(e,t){var n=(0,i.useBackend)(t).data.ores;return(0,o.createComponentVNode)(2,a.Section,{title:"Material values",children:(0,o.createComponentVNode)(2,a.Table,{children:[(0,o.createComponentVNode)(2,a.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:"Material"}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:"Value"})]}),n.map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,r.toTitleCase)(e.ore)}),(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,textAlign:"right",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",inline:!0,children:e.value})})]},e.ore)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LawManager=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.LawManager=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.isAdmin,p=d.isSlaved,m=d.isMalf,h=d.isAIMalf,f=d.view;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!(!u||!p)&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:["This unit is slaved to ",p,"."]}),!(!m&&!h)&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Law Management",selected:0===f,onClick:function(){return s("set_view",{set_view:0})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Lawsets",selected:1===f,onClick:function(){return s("set_view",{set_view:1})}})]}),!(0!==f)&&(0,o.createComponentVNode)(2,c),!(1!==f)&&(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.has_zeroth_laws,d=c.zeroth_laws,u=c.has_ion_laws,p=c.ion_laws,m=c.ion_law_nr,h=c.has_inherent_laws,f=c.inherent_laws,C=c.has_supplied_laws,g=c.supplied_laws,N=c.channels,b=c.channel,V=c.isMalf,v=c.isAdmin,x=c.zeroth_law,y=c.ion_law,k=c.inherent_law,w=c.supplied_law,_=c.supplied_law_position;return(0,o.createFragment)([!!l&&(0,o.createComponentVNode)(2,s,{title:"ERR_NULL_VALUE",laws:d,ctx:t}),!!u&&(0,o.createComponentVNode)(2,s,{title:m,laws:p,ctx:t}),!!h&&(0,o.createComponentVNode)(2,s,{title:"Inherent",laws:f,ctx:t}),!!C&&(0,o.createComponentVNode)(2,s,{title:"Supplied",laws:g,ctx:t}),(0,o.createComponentVNode)(2,i.Section,{title:"Statement Settings",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Statement Channel",children:N.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.channel,selected:e.channel===b,onClick:function(){return a("law_channel",{law_channel:e.channel})}},e.channel)}))}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"State Laws",children:(0,o.createComponentVNode)(2,i.Button,{content:"State Laws",onClick:function(){return a("state_laws")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Law Notification",children:(0,o.createComponentVNode)(2,i.Button,{content:"Notify",onClick:function(){return a("notify_laws")}})})]})}),!!V&&(0,o.createComponentVNode)(2,i.Section,{title:"Add Laws",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"10%",children:"Type"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"60%",children:"Law"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"20%",children:"Actions"})]}),!(!v||l)&&(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Zero"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:x}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_zeroth_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_zeroth_law")}})]})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Ion"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:y}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_ion_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_ion_law")}})]})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Inherent"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:k}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"N/A"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_inherent_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_inherent_law")}})]})]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Supplied"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:w}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:_,onClick:function(){return a("change_supplied_law_position")}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("change_supplied_law")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Add",icon:"plus",onClick:function(){return a("add_supplied_law")}})]})]})]})})],0)},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.law_sets;return(0,o.createComponentVNode)(2,i.Box,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name+" - "+e.header,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Load Laws",icon:"download",onClick:function(){return a("transfer_laws",{transfer_laws:e.ref})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.laws.has_ion_laws>0&&e.laws.ion_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_zeroth_laws>0&&e.laws.zeroth_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_inherent_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)})),e.laws.has_supplied_laws>0&&e.laws.inherent_laws.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.index,children:e.law},e.index)}))]})},e.name)}))})},s=function(e,t){var n=(0,r.useBackend)(e.ctx),a=n.act,c=n.data.isMalf;return(0,o.createComponentVNode)(2,i.Section,{title:e.title+" Laws",children:(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{width:"10%",children:"Index"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"69%",children:"Law"}),(0,o.createComponentVNode)(2,i.Table.Cell,{width:"21%",children:"State?"})]}),e.laws.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.index}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.law}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:[(0,o.createComponentVNode)(2,i.Button,{content:e.state?"Yes":"No",selected:e.state,onClick:function(){return a("state_law",{ref:e.ref,state_law:e.state?0:1})}}),!!c&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Edit",icon:"pencil-alt",onClick:function(){return a("edit_law",{edit_law:e.ref})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Delete",icon:"trash",color:"red",onClick:function(){return a("delete_law",{delete_law:e.ref})}})],4)]})]},e.law)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechBayConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.MechBayConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.recharge_port,s=l&&l.mech,d=s&&s.cell,u=s&&s.name;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:u?"Mech status: "+u:"Mech status",textAlign:"center",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Sync",onClick:function(){return c("reconnect")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:!l&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No power port detected. Please re-sync."})||!s&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No mech detected."})||(0,o.createComponentVNode)(2,i.ProgressBar,{value:s.health/s.maxhealth,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:!l&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No power port detected. Please re-sync."})||!s&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No mech detected."})||!d&&(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No cell is installed."})||(0,o.createComponentVNode)(2,i.ProgressBar,{value:d.charge/d.maxcharge,ranges:{good:[.7,Infinity],average:[.3,.7],bad:[-Infinity,.3]},children:[(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:d.charge})," / "+d.maxcharge]})})]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MechaControlConsole=void 0;var o=n(0),r=(n(15),n(1)),i=n(2),a=n(3),c=n(18);t.MechaControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.beacons,u=s.stored_data;return u.length?(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Log",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"window-close",onClick:function(){return l("clear_log")}}),children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",children:["(",e.time,")"]}),(0,o.createComponentVNode)(2,i.Box,{children:(0,c.decodeHtmlEntities)(e.message)})]},e.time)}))})})}):(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:d.length&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"comment",onClick:function(){return l("send_message",{mt:e.uid})},children:"Message"}),(0,o.createComponentVNode)(2,i.Button,{icon:"eye",onClick:function(){return l("get_log",{mt:e.uid})},children:"View Log"}),(0,o.createComponentVNode)(2,i.Button.Confirm,{color:"red",content:"EMP",icon:"bomb",onClick:function(){return l("shock",{mt:e.uid})}})],4),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75*e.maxHealth,Infinity],average:[.5*e.maxHealth,.75*e.maxHealth],bad:[-Infinity,.5*e.maxHealth]},value:e.health,maxValue:e.maxHealth})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Charge",children:e.cell&&(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.75*e.cellMaxCharge,Infinity],average:[.5*e.cellMaxCharge,.75*e.cellMaxCharge],bad:[-Infinity,.5*e.cellMaxCharge]},value:e.cellCharge,maxValue:e.cellMaxCharge})||(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Cell Installed"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Air Tank",children:[e.airtank,"kPa"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pilot",children:e.pilot||"Unoccupied"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:(0,c.toTitleCase)(e.location)||"Unknown"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Active Equipment",children:e.active||"None"}),e.cargoMax&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cargo Space",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{bad:[.75*e.cargoMax,Infinity],average:[.5*e.cargoMax,.75*e.cargoMax],good:[-Infinity,.5*e.cargoMax]},value:e.cargoUsed,maxValue:e.cargoMax})})||null]})},e.name)}))||(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No mecha beacons found."})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MedicalRecords=void 0;var o=n(0),r=n(1),i=n(2),a=n(44),c=n(3),l=n(99),s=n(100),d=n(145),u={Minor:"good",Medium:"average","Dangerous!":"bad",Harmful:"bad","BIOHAZARD THREAT!":"bad"},p=function(e,t){(0,a.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.MedicalRecords=function(e,t){var n,u=(0,r.useBackend)(t).data,p=u.loginState,C=u.screen;return p.logged_in?(2===C?n=(0,o.createComponentVNode)(2,m):3===C?n=(0,o.createComponentVNode)(2,h):4===C?n=(0,o.createComponentVNode)(2,f):5===C?n=(0,o.createComponentVNode)(2,N):6===C&&(n=(0,o.createComponentVNode)(2,b)),(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:[(0,o.createComponentVNode)(2,a.ComplexModal),(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l.LoginInfo),(0,o.createComponentVNode)(2,d.TemporaryNotice),(0,o.createComponentVNode)(2,V),(0,o.createComponentVNode)(2,i.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,s.LoginScreen)})})};var m=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.records;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Input,{fluid:!0,placeholder:"Search by Name, DNA, or ID",onChange:function(e,t){return a("search",{t1:t})}}),(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"user",mb:"0.5rem",content:e.id+": "+e.name,onClick:function(){return a("d_rec",{d_rec:e.ref})}}),(0,o.createVNode)(1,"br")],4,t)}))})],4)},h=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"download",content:"Backup to Disk",disabled:!0}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"upload",content:"Upload from Disk",my:"0.5rem",disabled:!0}),(0,o.createTextVNode)(" "),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",content:"Delete All Medical Records",onClick:function(){return n("del_all")}})],4)},f=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.medical,s=c.printing;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"General Data",level:2,mt:"-6px",children:(0,o.createComponentVNode)(2,C)}),(0,o.createComponentVNode)(2,i.Section,{title:"Medical Data",level:2,children:(0,o.createComponentVNode)(2,g)}),(0,o.createComponentVNode)(2,i.Section,{title:"Actions",level:2,children:[(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",disabled:!!l.empty,content:"Delete Medical Record",color:"bad",onClick:function(){return a("del_r")}}),(0,o.createComponentVNode)(2,i.Button,{icon:s?"spinner":"print",disabled:s,iconSpin:!!s,content:"Print Entry",ml:"0.5rem",onClick:function(){return a("print_p")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-left",content:"Back",mt:"0.5rem",onClick:function(){return a("screen",{screen:2})}})]})],4)},C=function(e,t){var n=(0,r.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{width:"50%",float:"left",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.field,children:[(0,o.createComponentVNode)(2,i.Box,{height:"20px",display:"inline-block",children:e.value}),!!e.edit&&(0,o.createComponentVNode)(2,i.Button,{icon:"pen",ml:"0.5rem",onClick:function(){return p(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,i.Box,{width:"50%",float:"right",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"General records lost!"})},g=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.medical;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.field,prewrap:!0,children:[e.value,(0,o.createComponentVNode)(2,i.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return p(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Comments/Log",level:2,children:[0===l.comments.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,i.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,i.Box,{color:"label",display:"inline",children:e.header}),(0,o.createVNode)(1,"br"),e.text,(0,o.createComponentVNode)(2,i.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("del_c",{del_c:t+1})}})]},t)})),(0,o.createComponentVNode)(2,i.Button,{icon:"comment-medical",content:"Add Entry",color:"good",mt:"0.5rem",mb:"0",onClick:function(){return(0,a.modalOpen)(t,"add_c")}})]})],4):(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:["Medical records lost!",(0,o.createComponentVNode)(2,i.Button,{icon:"pen",content:"New Record",ml:"0.5rem",onClick:function(){return c("new")}})]})},N=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.virus;return c.sort((function(e,t){return e.name>t.name?1:-1})),c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"flask",content:e.name,mb:"0.5rem",onClick:function(){return a("vir",{vir:e.D})}}),(0,o.createVNode)(1,"br")],4,t)}))},b=function(e,t){var n=(0,r.useBackend)(t).data.medbots;return 0===n.length?(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"There are no Medbots."}):n.map((function(e,t){return(0,o.createComponentVNode)(2,i.Collapsible,{open:!0,title:e.name,children:(0,o.createComponentVNode)(2,i.Box,{px:"0.5rem",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:[e.area||"Unknown"," (",e.x,", ",e.y,")"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:e.on?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Online"}),(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:e.use_beaker?"Reservoir: "+e.total_volume+"/"+e.maximum_volume:"Using internal synthesizer."})],4):(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"Offline"})})]})})},t)}))},V=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.screen;return(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===c,onClick:function(){return a("screen",{screen:2})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:5===c,onClick:function(){return a("screen",{screen:5})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"database"}),"Virus Database"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:6===c,onClick:function(){return a("screen",{screen:6})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"plus-square"}),"Medbot Tracking"]}),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:3===c,onClick:function(){return a("screen",{screen:3})},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"wrench"}),"Record Maintenance"]})]})};(0,a.modalRegisterBodyOverride)("virus",(function(e,t){var n=e.args;return(0,o.createComponentVNode)(2,i.Section,{level:2,m:"-1rem",pb:"1rem",title:n.name||"Virus",children:(0,o.createComponentVNode)(2,i.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Number of stages",children:n.max_stages}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Spread",children:[n.spread_text," Transmission"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Possible cure",children:n.cure}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Notes",children:n.desc}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Severity",color:u[n.severity],children:n.severity})]})})})}))},function(e,t,n){"use strict";t.__esModule=!0,t.MiningVendor=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);var l={Alphabetical:function(e,t){return e-t},"By availability":function(e,t){return-(e.affordable-t.affordable)},"By price":function(e,t){return e.price-t.price}};t.MiningVendor=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,d)]})})};var s=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.has_id,s=c.id;return(0,o.createComponentVNode)(2,a.NoticeBox,{success:l,children:l?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",style:{float:"left"},children:["Logged in as ",s.name,".",(0,o.createVNode)(1,"br"),"You have ",s.points.toLocaleString("en-US")," points."]}),(0,o.createComponentVNode)(2,a.Button,{icon:"eject",content:"Eject ID",style:{float:"right"},onClick:function(){return r("logoff")}}),(0,o.createComponentVNode)(2,a.Box,{style:{clear:"both"}})],4):"Please insert an ID in order to make purchases."})},d=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),s=c.has_id,d=c.id,u=c.items,m=(0,i.useLocalState)(t,"search",""),h=m[0],f=(m[1],(0,i.useLocalState)(t,"sort","Alphabetical")),C=f[0],g=(f[1],(0,i.useLocalState)(t,"descending",!1)),N=g[0],b=(g[1],(0,r.createSearch)(h,(function(e){return e[0]}))),V=!1,v=Object.entries(u).map((function(e,t){var n=Object.entries(e[1]).filter(b).map((function(e){return e[1].affordable=s&&d.points>=e[1].price,e[1]})).sort(l[C]);if(0!==n.length)return N&&(n=n.reverse()),V=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Section,{children:V?v:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No items matching your criteria was found!"})})})},u=function(e,t){var n=(0,i.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,i.useLocalState)(t,"sort",""),s=(c[0],c[1]),d=(0,i.useLocalState)(t,"descending",!1),u=d[0],p=d[1];return(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"30%",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:"Alphabetical",options:Object.keys(l),width:"100%",lineHeight:"19px",onSelected:function(e){return s(e)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:u?"arrow-down":"arrow-up",height:"19px",tooltip:u?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return p(!u)}})})]})})},p=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=e.title,s=e.items,d=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Collapsible,Object.assign({open:!0,title:l},d,{children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"left"},children:e.name}),(0,o.createComponentVNode)(2,a.Button,{disabled:!c.has_id||c.id.points=0||(r[n]=e[n]);return r}t.Multitool=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data,p=l.multitoolMenuId,v=l.buffer,x=l.bufferName,y=l.bufferTag,k=l.canBufferHaveTag,w=l.isAttachedAlreadyInBuffer,_=l.attachedName,B=!("default_no_machine"===p);return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{style:{"overflow-x":"hidden","overflow-y":"auto"},grow:1,shrink:1,basis:0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Configuration menu",py:.3,children:[(0,o.createComponentVNode)(2,s,{iconName:"tools",machineName:_,noMachine:"default_no_machine"===p,noMachineText:"No machine attached"}),function(e){switch(e){case"default_no_machine":case"no_options":return(0,o.createComponentVNode)(2,h);case"access_denied":return(0,o.createComponentVNode)(2,f);case"tag_only":return(0,o.createComponentVNode)(2,C);case"frequency_and_tag":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,C)],4);case"air_sensor":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,N)],4);case"general_air_control":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,b)],4);case"large_tank_control":return(0,o.createFragment)([(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,V),(0,o.createComponentVNode)(2,b)],4);default:return"WE SHOULDN'T BE HERE!"}}(p)]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,a.Divider)}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Multitool buffer",mb:.9,py:.3,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:w?"Added":"Add machine",icon:"save",disabled:!B||w,onClick:function(){return r("buffer_add")}}),(0,o.createComponentVNode)(2,a.Button,{mr:1,content:"Flush",icon:"times-circle",color:"red",disabled:!v,onClick:function(){return r("buffer_flush")}})],4),children:[(0,o.createComponentVNode)(2,s,{iconName:"tools",machineName:x,noMachine:!v,noMachineElem:(0,o.createComponentVNode)(2,d,{text:""})}),!!v&&(0,o.createComponentVNode)(2,m,{mt:1.1,label:"ID tag",compactLabel:!0,wrapContent:k?(0,o.createComponentVNode)(2,u,{text:y,defaultText:"",color:"silver"}):(0,o.createComponentVNode)(2,a.Box,{as:"span",fontSize:"0.9rem",color:"red",italic:!0,nowrap:!0,children:"Not supported"})})]})})]})})})};var s=function(e,t){var n=e.iconName,r=e.machineName,i=e.noMachine,c=e.noMachineText,l=e.noMachineElem,s=i?c:r||"Unknown machine",d=s===c,u=s===c||"Unknown machine"===s;return i&&l?l:(0,o.createComponentVNode)(2,a.Flex,{mt:.1,mb:1.9,children:[!i&&(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,align:"center",children:(0,o.createComponentVNode)(2,a.Icon,{mr:1,size:1.1,name:n})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,wordWrap:"break-word",children:(0,o.createComponentVNode)(2,a.Box,{as:"span",wordWrap:"break-word",color:d?"label":"silver",fontSize:"1.1rem",bold:!0,italic:u,children:s})})]})},d=function(e,t){var n=e.text;return(0,o.createComponentVNode)(2,a.Box,{as:"span",fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:n})},u=function(e,t){var n=e.text,r=e.defaultText,i=l(e,["text","defaultText"]);return n?(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"span",wordWrap:"break-word"},i,{children:n}))):(0,o.createComponentVNode)(2,d,{text:r})},p=function(e,t){var n=e.noConfirm,r=void 0!==n&&n,i=l(e,["noConfirm"]);return r?(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button,Object.assign({},i))):(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Button.Confirm,Object.assign({},i)))},m=function(e,t){var n=e.label,r=e.wrapContent,i=e.noWrapContent,c=e.compactLabel,s=void 0!==c&&c,d=l(e,["label","wrapContent","noWrapContent","compactLabel"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Flex,Object.assign({my:.5,mr:"0.5%",spacing:1,align:"center"},d,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:s?0:1,shrink:0,textOverflow:"ellipsis",overflow:"hidden",basis:s?"auto":0,maxWidth:s?"none":20,color:"label",nowrap:!0,children:n}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,textAlign:"center",wordWrap:"break-word",children:r}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:.1}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,nowrap:!0,children:i})]})))},h=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Box,{mt:1.5,fontSize:"0.9rem",color:"silver",italic:!0,children:"No options"})},f=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Box,{fontSize:"1.1rem",color:"red",bold:!0,italic:!0,children:"ACCESS DENIED"})},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.attachedTag;return(0,o.createComponentVNode)(2,m,{label:"ID tag",wrapContent:(0,o.createComponentVNode)(2,u,{text:c,defaultText:"",color:"silver"}),noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{content:"Set",icon:"wrench",onClick:function(){return r("set_tag")}}),(0,o.createComponentVNode)(2,a.Button,{content:"Clear",icon:"times-circle",color:"red",disabled:!c,onClick:function(){return r("clear_tag")}})],4)})},g=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,s=l.frequency,d=l.minFrequency,u=l.maxFrequency,p=l.canReset;return(0,o.createComponentVNode)(2,m,{label:"Frequency",noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,unit:"kHz",step:.1,stepPixelSize:10,minValue:d/10,maxValue:u/10,value:s/10,format:function(e){return(0,r.toFixed)(e,1)},onChange:function(e,t){return c("set_frequency",{frequency:10*t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"undo",content:"",disabled:!p,tooltip:"Reset",onClick:function(){return c("reset_frequency")}})],4)})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.bolts,s=[{bitflag:1,checked:c.pressureCheck,label:"Monitor pressure"},{bitflag:2,checked:c.temperatureCheck,label:"Monitor temperature"},{bitflag:4,checked:c.oxygenCheck,label:"Monitor oxygen concentration"},{bitflag:8,checked:c.toxinsCheck,label:"Monitor plasma concentration"},{bitflag:16,checked:c.nitrogenCheck,label:"Monitor nitrogen concentration"},{bitflag:32,checked:c.carbonDioxideCheck,label:"Monitor carbon dioxide concentration"}];return(0,o.createFragment)([(0,o.createComponentVNode)(2,m,{label:"Floor bolts",noWrapContent:(0,o.createComponentVNode)(2,a.Button,{icon:l?"check":"times",selected:l,content:l?"YES":"NO",onClick:function(){return r("toggle_bolts")}})}),s.map((function(e){return(0,o.createComponentVNode)(2,m,{label:e.label,noWrapContent:(0,o.createComponentVNode)(2,a.Button.Checkbox,{checked:e.checked,onClick:function(){return r("toggle_flag",{bitflag:e.bitflag})}})},e.bitflag)}))],0)},b=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data.sensors;return(0,o.createComponentVNode)(2,a.Section,{mt:1.7,ml:.5,mr:1,px:.5,title:"Sensors",buttons:(0,o.createComponentVNode)(2,a.Button,{mr:1,pl:2.1,content:"Add sensor",icon:"plus",iconRight:!0,onClick:function(){return r("add_sensor")}}),children:[(0,o.createComponentVNode)(2,m,{mr:0,compactLabel:!0,wrapContent:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:1}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"ID tag"}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"label",nowrap:!0,bold:!0,children:"Label"}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:11.3})]})}),Object.keys(c).map((function(e){return(0,o.createComponentVNode)(2,m,{mr:0,label:(0,o.createComponentVNode)(2,a.Icon,{name:"wave-square"}),compactLabel:!0,wrapContent:(0,o.createComponentVNode)(2,a.Flex,{align:"center",spacing:1,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:e}),c[e]?(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,color:"silver",wordWrap:"break-word",children:c[e]}):(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,shrink:1,basis:0,fontSize:"0.9rem",color:"yellow",italic:!0,nowrap:!0,children:""})]}),noWrapContent:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:[(0,o.createComponentVNode)(2,a.Button,{content:"Label",icon:"edit",onClick:function(){return r("change_label",{sensor_tag:e})}}),(0,o.createComponentVNode)(2,a.Button,{content:"Label",icon:"times-circle",color:"orange",disabled:!c[e],onClick:function(){return r("clear_label",{sensor_tag:e})}})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:.5}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:0,shrink:0,children:(0,o.createComponentVNode)(2,a.Button,{px:1.2,icon:"minus",color:"red",onClick:function(){return r("del_sensor",{sensor_tag:e})}})})]})},e)}))]})},V=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.inputTag,s=c.outputTag,d=c.bufferTag,h=c.bufferFitsInput,f=c.bufferFitsOutput,C=c.doNotLinkAndNotify;return(0,o.createFragment)([(0,o.createComponentVNode)(2,m,{label:"Input",labelWidth:6,wrapContent:(0,o.createComponentVNode)(2,u,{text:l,defaultText:"",color:"silver"}),noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,p,{noConfirm:C||!l,confirmContent:"This will change the intput device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:l&&d===l,disabled:!h,onClick:function(){return r("link_input")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{confirmContent:"This will unlink the intput device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!l,onClick:function(){return r("unlink_input")}})],4)}),(0,o.createComponentVNode)(2,m,{label:"Output",labelWidth:6,wrapContent:(0,o.createComponentVNode)(2,u,{text:s,defaultText:"",color:"silver"}),noWrapContent:(0,o.createFragment)([(0,o.createComponentVNode)(2,p,{noConfirm:C||!s,confirmContent:"This will change the output device. Confirm?",confirmColor:"orange",content:"Link buffer",icon:"link",selected:s&&d===s,disabled:!f,onClick:function(){return r("link_output")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{confirmContent:"This will unlink the output device. Confirm?",confirmColor:"orange",content:"Unlink",icon:"unlink",color:"red",disabled:!s,onClick:function(){return r("unlink_output")}})],4)})],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.Newscaster=void 0;var o=n(0),r=n(7),i=n(1),a=n(2),c=n(50),l=n(3),s=n(44),d=n(145);function u(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}var p=["security","engineering","medical","science","service","supply"],m={security:{title:"Security",fluff_text:"Help keep the crew safe"},engineering:{title:"Engineering",fluff_text:"Ensure the station runs smoothly"},medical:{title:"Medical",fluff_text:"Practice medicine and save lives"},science:{title:"Science",fluff_text:"Develop new technologies"},service:{title:"Service",fluff_text:"Provide amenities to the crew"},supply:{title:"Supply",fluff_text:"Keep the station supplied"}};t.Newscaster=function(e,t){var n,c=(0,i.useBackend)(t),u=c.act,p=c.data,m=p.is_security,g=p.is_admin,N=p.is_silent,V=p.is_printing,v=p.screen,x=p.channels,y=p.channel_idx,k=void 0===y?-1:y,w=(0,i.useLocalState)(t,"menuOpen",!1),_=w[0],B=w[1],S=(0,i.useLocalState)(t,"viewingPhoto",""),L=S[0],A=(S[1],(0,i.useLocalState)(t,"censorMode",!1)),I=A[0],E=A[1];0===v||2===v?n=(0,o.createComponentVNode)(2,f):1===v&&(n=(0,o.createComponentVNode)(2,C));var D=x.reduce((function(e,t){return e+t.unread}),0);return(0,o.createComponentVNode)(2,l.Window,{theme:m&&"security",children:[L?(0,o.createComponentVNode)(2,b):(0,o.createComponentVNode)(2,s.ComplexModal,{maxWidth:window.innerWidth/1.5+"px",maxHeight:window.innerHeight/1.5+"px"}),(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,a.Section,{stretchContents:!0,className:(0,r.classes)(["Newscaster__menu",_&&"Newscaster__menu--open"]),children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,a.Box,{flex:"0 1 content",children:[(0,o.createComponentVNode)(2,h,{icon:"bars",title:"Toggle Menu",onClick:function(){return B(!_)}}),(0,o.createComponentVNode)(2,h,{icon:"newspaper",title:"Headlines",selected:0===v,onClick:function(){return u("headlines")},children:D>0&&(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--unread",children:D>=10?"9+":D})}),(0,o.createComponentVNode)(2,h,{icon:"briefcase",title:"Job Openings",selected:1===v,onClick:function(){return u("jobs")}}),(0,o.createComponentVNode)(2,a.Divider)]}),(0,o.createComponentVNode)(2,a.Box,{flex:"2",overflowY:"auto",overflowX:"hidden",children:x.map((function(e){return(0,o.createComponentVNode)(2,h,{icon:e.icon,title:e.name,selected:2===v&&x[k-1]===e,onClick:function(){return u("channel",{uid:e.uid})},children:e.unread>0&&(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--unread",children:e.unread>=10?"9+":e.unread})},e)}))}),(0,o.createComponentVNode)(2,a.Box,{width:"100%",flex:"0 0 content",children:[(0,o.createComponentVNode)(2,a.Divider),(!!m||!!g)&&(0,o.createFragment)([(0,o.createComponentVNode)(2,h,{security:!0,icon:"exclamation-circle",title:"Edit Wanted Notice",mb:"0.5rem",onClick:function(){return(0,s.modalOpen)(t,"wanted_notice")}}),(0,o.createComponentVNode)(2,h,{security:!0,icon:I?"minus-square":"minus-square-o",title:"Censor Mode: "+(I?"On":"Off"),mb:"0.5rem",onClick:function(){return E(!I)}}),(0,o.createComponentVNode)(2,a.Divider)],4),(0,o.createComponentVNode)(2,h,{icon:"pen-alt",title:"New Story",mb:"0.5rem",onClick:function(){return(0,s.modalOpen)(t,"create_story")}}),(0,o.createComponentVNode)(2,h,{icon:"plus-circle",title:"New Channel",onClick:function(){return(0,s.modalOpen)(t,"create_channel")}}),(0,o.createComponentVNode)(2,a.Divider),(0,o.createComponentVNode)(2,h,{icon:V?"spinner":"print",iconSpin:V,title:V?"Printing...":"Print Newspaper",onClick:function(){return u("print_newspaper")}}),(0,o.createComponentVNode)(2,h,{icon:N?"volume-mute":"volume-up",title:"Mute: "+(N?"On":"Off"),onClick:function(){return u("toggle_mute")}})]})]})}),(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,d.TemporaryNotice),n]})]})})]})};var h=function(e,t){(0,i.useBackend)(t).act;var n=e.icon,c=void 0===n?"":n,l=e.iconSpin,s=e.selected,d=void 0!==s&&s,p=e.security,m=void 0!==p&&p,h=e.onClick,f=e.title,C=e.children,g=u(e,["icon","iconSpin","selected","security","onClick","title","children"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({className:(0,r.classes)(["Newscaster__menuButton",d&&"Newscaster__menuButton--selected",m&&"Newscaster__menuButton--security"]),onClick:h},g,{children:[d&&(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--selectedBar"}),(0,o.createComponentVNode)(2,a.Icon,{name:c,spin:l,size:"2"}),(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__menuButton--title",children:f}),C]})))},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.screen,d=c.is_admin,u=c.channel_idx,p=c.channel_can_manage,m=c.channels,h=c.stories,f=c.wanted,C=(0,i.useLocalState)(t,"fullStories",[]),N=C[0],b=(C[1],(0,i.useLocalState)(t,"censorMode",!1)),V=b[0],v=(b[1],2===l&&u>-1?m[u-1]:null);return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:[!!f&&(0,o.createComponentVNode)(2,g,{story:f,wanted:!0}),(0,o.createComponentVNode)(2,a.Section,{title:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:v?v.icon:"newspaper",mr:"0.5rem"}),v?v.name:"Headlines"],0),flexGrow:"1",children:h.length>0?h.slice().reverse().map((function(e){return!N.includes(e.uid)&&e.body.length+3>128?Object.assign({},e,{body_short:e.body.substr(0,124)+"..."}):e})).map((function(e){return(0,o.createComponentVNode)(2,g,{story:e},e)})):(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no stories at this time."]})}),!!v&&(0,o.createComponentVNode)(2,a.Section,{flexShrink:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:"info-circle",mr:"0.5rem"}),(0,o.createTextVNode)("About")],4),buttons:(0,o.createFragment)([V&&(0,o.createComponentVNode)(2,a.Button,{disabled:!!v.admin&&!d,selected:v.censored,icon:v.censored?"comment-slash":"comment",content:v.censored?"Uncensor Channel":"Censor Channel",mr:"0.5rem",onClick:function(){return r("censor_channel",{uid:v.uid})}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!p,icon:"cog",content:"Manage",onClick:function(){return(0,s.modalOpen)(t,"manage_channel",{uid:v.uid})}})],0),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",children:v.description||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",children:v.author||"N/A"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Public",children:v["public"]?"Yes":"No"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Total Views",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"eye",mr:"0.5rem"}),h.reduce((function(e,t){return e+t.view_count}),0).toLocaleString()]})]})})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),l=c.jobs,s=c.wanted,d=Object.entries(l).reduce((function(e,t){t[0];return e+t[1].length}),0);return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:[!!s&&(0,o.createComponentVNode)(2,g,{story:s,wanted:!0}),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:"briefcase",mr:"0.5rem"}),(0,o.createTextVNode)("Job Openings")],4),buttons:(0,o.createComponentVNode)(2,a.Box,{mt:"0.25rem",color:"label",children:"Work for a better future at Nanotrasen"}),children:d>0?p.map((function(e){return Object.assign({},m[e],{id:e,jobs:l[e]})})).filter((function(e){return!!e&&e.jobs.length>0})).map((function(e){return(0,o.createComponentVNode)(2,a.Section,{className:(0,r.classes)(["Newscaster__jobCategory","Newscaster__jobCategory--"+e.id]),title:e.title,buttons:(0,o.createComponentVNode)(2,a.Box,{mt:"0.25rem",color:"label",children:e.fluff_text}),children:e.jobs.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{"class":(0,r.classes)(["Newscaster__jobOpening",!!e.is_command&&"Newscaster__jobOpening--command"]),children:["\u2022 ",e.title]},e.title)}))},e.id)})):(0,o.createComponentVNode)(2,a.Box,{className:"Newscaster__emptyNotice",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"times",size:"3"}),(0,o.createVNode)(1,"br"),"There are no openings at this time."]})}),(0,o.createComponentVNode)(2,a.Section,{flexShrink:"1",children:["Interested in serving Nanotrasen?",(0,o.createVNode)(1,"br"),"Sign up for any of the above position now at the ",(0,o.createVNode)(1,"b",null,"Head of Personnel's Office!",16),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Box,{as:"small",color:"label",children:"By signing up for a job at Nanotrasen, you agree to transfer your soul to the loyalty department of the omnipresent and helpful watcher of humanity."})]})]})},g=function(e,t){var n=(0,i.useBackend)(t),l=n.act,s=n.data,d=e.story,u=e.wanted,p=void 0!==u&&u,m=(0,i.useLocalState)(t,"fullStories",[]),h=m[0],f=m[1],C=(0,i.useLocalState)(t,"censorMode",!1),g=C[0];C[1];return(0,o.createComponentVNode)(2,a.Section,{className:(0,r.classes)(["Newscaster__story",p&&"Newscaster__story--wanted"]),title:(0,o.createFragment)([p&&(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle",mr:"0.5rem"}),(2&d.censor_flags?"[REDACTED]":d.title)||"News from "+d.author],0),buttons:(0,o.createComponentVNode)(2,a.Box,{mt:"0.25rem",children:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:[!p&&g&&(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:(0,o.createComponentVNode)(2,a.Button,{enabled:2&d.censor_flags,icon:2&d.censor_flags?"comment-slash":"comment",content:2&d.censor_flags?"Uncensor":"Censor",mr:"0.5rem",mt:"-0.25rem",onClick:function(){return l("censor_story",{uid:d.uid})}})}),(0,o.createComponentVNode)(2,a.Box,{display:"inline",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user"})," ",d.author," |\xa0",!p&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Icon,{name:"eye"}),(0,o.createTextVNode)(" "),d.view_count.toLocaleString(),(0,o.createTextVNode)(" |\xa0")],0),(0,o.createComponentVNode)(2,a.Icon,{name:"clock"})," ",(0,c.timeAgo)(d.publish_time,s.world_time)]})]})}),children:(0,o.createComponentVNode)(2,a.Box,{children:2&d.censor_flags?"[REDACTED]":(0,o.createFragment)([!!d.has_photo&&(0,o.createComponentVNode)(2,N,{name:"story_photo_"+d.uid+".png",float:"right",ml:"0.5rem"}),(d.body_short||d.body).split("\n").map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),d.body_short&&(0,o.createComponentVNode)(2,a.Button,{content:"Read more..",mt:"0.5rem",onClick:function(){return f([].concat(h,[d.uid]))}}),(0,o.createComponentVNode)(2,a.Box,{clear:"right"})],0)})})},N=function(e,t){var n=e.name,r=u(e,["name"]),c=(0,i.useLocalState)(t,"viewingPhoto",""),l=(c[0],c[1]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Box,Object.assign({as:"img",className:"Newscaster__photo",src:n,onClick:function(){return l(n)}},r)))},b=function(e,t){var n=(0,i.useLocalState)(t,"viewingPhoto",""),r=n[0],c=n[1];return(0,o.createComponentVNode)(2,a.Modal,{className:"Newscaster__photoZoom",children:[(0,o.createComponentVNode)(2,a.Box,{as:"img",src:r}),(0,o.createComponentVNode)(2,a.Button,{icon:"times",content:"Close",color:"grey",mt:"1rem",onClick:function(){return c("")}})]})},V=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data),c=!!e.args.uid&&r.channels.filter((function(t){return t.uid===e.args.uid})).pop();if("manage_channel"!==e.id||c){var l="manage_channel"===e.id,d=!!e.args.is_admin,u=e.args.scanned_user,p=(0,i.useLocalState)(t,"author",(null==c?void 0:c.author)||u||"Unknown"),m=p[0],h=p[1],f=(0,i.useLocalState)(t,"name",(null==c?void 0:c.name)||""),C=f[0],g=f[1],N=(0,i.useLocalState)(t,"description",(null==c?void 0:c.description)||""),b=N[0],V=N[1],v=(0,i.useLocalState)(t,"icon",(null==c?void 0:c.icon)||"newspaper"),x=v[0],y=v[1],k=(0,i.useLocalState)(t,"isPublic",!!l&&!!(null==c?void 0:c["public"])),w=k[0],_=k[1],B=(0,i.useLocalState)(t,"adminLocked",1===(null==c?void 0:c.admin)||!1),S=B[0],L=B[1];return(0,o.createComponentVNode)(2,a.Section,{level:"2",m:"-1rem",pb:"1rem",title:l?"Manage "+c.name:"Create New Channel",children:[(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Owner",children:(0,o.createComponentVNode)(2,a.Input,{disabled:!d,width:"100%",value:m,onInput:function(e,t){return h(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Input,{width:"100%",placeholder:"50 characters max.",maxLength:"50",value:C,onInput:function(e,t){return g(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Input,{multiline:!0,width:"100%",placeholder:"128 characters max.",maxLength:"128",value:b,onInput:function(e,t){return V(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Icon",children:[(0,o.createComponentVNode)(2,a.Input,{disabled:!d,value:x,width:"35%",mr:"0.5rem",onInput:function(e,t){return y(t)}}),(0,o.createComponentVNode)(2,a.Icon,{name:x,size:"2",verticalAlign:"middle",mr:"0.5rem"})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Accept Public Stories?",children:(0,o.createComponentVNode)(2,a.Button,{selected:w,icon:w?"toggle-on":"toggle-off",content:w?"Yes":"No",onClick:function(){return _(!w)}})}),d&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{selected:S,icon:S?"lock":"lock-open",content:S?"On":"Off",tooltip:"Locking this channel will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return L(!S)}})})]})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:0===m.trim().length||0===C.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,s.modalAnswer)(t,e.id,"",{author:m,name:C.substr(0,49),description:b.substr(0,128),icon:x,"public":w?1:0,admin_locked:S?1:0}),(0,i.deleteLocalState)(t,"author","name","description","icon","public")}})]})}(0,s.modalClose)(t)};(0,s.modalRegisterBodyOverride)("create_channel",V),(0,s.modalRegisterBodyOverride)("manage_channel",V),(0,s.modalRegisterBodyOverride)("create_story",(function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.photo,d=c.channels,u=c.channel_idx,p=void 0===u?-1:u,m=!!e.args.is_admin,h=e.args.scanned_user,f=d.slice().sort((function(e,t){if(p<0)return 0;var n=d[p-1];return n.uid===e.uid?-1:n.uid===t.uid?1:void 0})).filter((function(e){return m||!e.frozen&&(e.author===h||!!e["public"])})),C=(0,i.useLocalState)(t,"author",h||"Unknown"),g=C[0],b=C[1],V=(0,i.useLocalState)(t,"channel",f.length>0?f[0].name:""),v=V[0],x=V[1],y=(0,i.useLocalState)(t,"title",""),k=y[0],w=y[1],_=(0,i.useLocalState)(t,"body",""),B=_[0],S=_[1],L=(0,i.useLocalState)(t,"adminLocked",!1),A=L[0],I=L[1];return(0,o.createComponentVNode)(2,a.Section,{level:2,m:"-1rem",pb:"1rem",title:"Create New Story",children:[(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Author",children:(0,o.createComponentVNode)(2,a.Input,{disabled:!m,width:"100%",value:g,onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Channel",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Dropdown,{selected:v,options:f.map((function(e){return e.name})),mb:"0",width:"100%",onSelected:function(e){return x(e)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Divider),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Title",children:(0,o.createComponentVNode)(2,a.Input,{width:"100%",placeholder:"128 characters max.",maxLength:"128",value:k,onInput:function(e,t){return w(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Story Text",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Input,{fluid:!0,multiline:!0,placeholder:"1024 characters max.",maxLength:"1024",rows:"8",width:"100%",value:B,onInput:function(e,t){return S(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this story by holding the photograph in your hand.",onClick:function(){return r(l?"eject_photo":"attach_photo")}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Preview",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Section,{noTopPadding:!0,title:k,maxHeight:"13.5rem",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Box,{mt:"0.5rem",children:[!!l&&(0,o.createComponentVNode)(2,N,{name:"inserted_photo_"+l.uid+".png",float:"right"}),B.split("\n").map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:e||(0,o.createVNode)(1,"br")},e)})),(0,o.createComponentVNode)(2,a.Box,{clear:"right"})]})})}),m&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{selected:A,icon:A?"lock":"lock-open",content:A?"On":"Off",tooltip:"Locking this story will make it censorable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return I(!A)}})})]})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:0===g.trim().length||0===v.trim().length||0===k.trim().length||0===B.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,s.modalAnswer)(t,"create_story","",{author:g,channel:v,title:k.substr(0,127),body:B.substr(0,1023),admin_locked:A?1:0}),(0,i.deleteLocalState)(t,"author","channel","title","body")}})]})})),(0,s.modalRegisterBodyOverride)("wanted_notice",(function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.photo,d=c.wanted,u=!!e.args.is_admin,p=e.args.scanned_user,m=(0,i.useLocalState)(t,"author",(null==d?void 0:d.author)||p||"Unknown"),h=m[0],f=m[1],C=(0,i.useLocalState)(t,"name",(null==d?void 0:d.title.substr(8))||""),g=C[0],b=C[1],V=(0,i.useLocalState)(t,"description",(null==d?void 0:d.body)||""),v=V[0],x=V[1],y=(0,i.useLocalState)(t,"adminLocked",1===(null==d?void 0:d.admin_locked)||!1),k=y[0],w=y[1];return(0,o.createComponentVNode)(2,a.Section,{level:"2",m:"-1rem",pb:"1rem",title:"Manage Wanted Notice",children:[(0,o.createComponentVNode)(2,a.Box,{mx:"0.5rem",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Authority",children:(0,o.createComponentVNode)(2,a.Input,{disabled:!u,width:"100%",value:h,onInput:function(e,t){return f(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:(0,o.createComponentVNode)(2,a.Input,{width:"100%",value:g,maxLength:"128",onInput:function(e,t){return b(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Description",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Input,{multiline:!0,width:"100%",value:v,maxLength:"512",rows:"4",onInput:function(e,t){return x(t)}})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Photo (optional)",verticalAlign:"top",children:[(0,o.createComponentVNode)(2,a.Button,{icon:"image",selected:l,content:l?"Eject: "+l.name:"Insert Photo",tooltip:!l&&"Attach a photo to this wanted notice by holding the photograph in your hand.",tooltipPosition:"top",onClick:function(){return r(l?"eject_photo":"attach_photo")}}),!!l&&(0,o.createComponentVNode)(2,N,{name:"inserted_photo_"+l.uid+".png",float:"right"})]}),u&&(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"CentComm Lock",verticalAlign:"top",children:(0,o.createComponentVNode)(2,a.Button,{selected:k,icon:k?"lock":"lock-open",content:k?"On":"Off",tooltip:"Locking this wanted notice will make it editable by nobody but CentComm officers.",tooltipPosition:"top",onClick:function(){return w(!k)}})})]})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:!d,icon:"eraser",color:"danger",content:"Clear",position:"absolute",right:"7.25rem",bottom:"-0.75rem",onClick:function(){r("clear_wanted_notice"),(0,s.modalClose)(t),(0,i.deleteLocalState)(t,"author","name","description","admin_locked")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{disabled:0===h.trim().length||0===g.trim().length||0===v.trim().length,icon:"check",color:"good",content:"Submit",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){(0,s.modalAnswer)(t,e.id,"",{author:h,name:g.substr(0,127),description:v.substr(0,511),admin_locked:k?1:0}),(0,i.deleteLocalState)(t,"author","name","description","admin_locked")}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.NinjaBloodScan=void 0;var o=n(0),r=n(1),i=n(2),a=n(51),c=n(3);t.NinjaBloodScan=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,theme:"spider_clan",children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.vialIcons,d=l.noVialIcon,u=l.bloodOwnerNames,p=l.bloodOwnerSpecies,m=l.bloodOwnerTypes,h=l.blockButtons,f=l.scanStates,C="Button_blue",g="Button_disabled",N=["NoticeBox_red","NoticeBox","NoticeBox_blue"];return(0,o.createComponentVNode)(2,i.Flex,{direction:"column",shrink:1,alignContent:"center",children:(0,o.createComponentVNode)(2,i.Section,{title:"\u041e\u0431\u0440\u0430\u0437\u0446\u044b",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0414\u043e\u0431\u0430\u0432\u044c\u0442\u0435 \u0442\u0440\u0438 \u043e\u0431\u0440\u0430\u0437\u0446\u0430 \u043a\u0440\u043e\u0432\u0438. \u041c\u0430\u0448\u0438\u043d\u0430 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u043a\u0440\u043e\u0432\u044c\u044e \u0441\u0443\u0449\u0435\u0441\u0442\u0432 \u0438 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432\u0430\u043c \u043a\u043b\u0430\u043d. \u0420\u0435\u0430\u0433\u0435\u043d\u0442\u044b \u0438\u043c \u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0435 \u043d\u0435 \u043f\u0440\u0438\u043c\u0443\u0442\u0441\u044f \u0438\u043b\u0438 \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u043f\u0435\u0448\u043d\u044b\u043c",tooltipPosition:"bottom-left"}),children:[(0,o.createComponentVNode)(2,i.Flex,{direction:"row",shrink:1,alignContent:"center",children:[1,2,3].map((function(e,t){return(0,o.createComponentVNode)(2,a.FlexItem,{direction:"column",width:"33.3%",ml:t?2:0,children:[(0,o.createComponentVNode)(2,i.Section,{title:u[t]?"\u041a\u0440\u043e\u0432\u044c":"\u041d\u0435\u0442 \u0440\u0435\u0430\u0433\u0435\u043d\u0442\u0430",style:{"text-align":"left",background:"rgba(53, 94, 163, 0.5)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:N[f[t]],success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.Button,{className:h?g:C,height:"100%",width:"100%",disabled:h,onClick:function(){return c("vial_out",{button_num:t+1})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+(s[t]||d),style:{"margin-left":"3px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:u[t]||" - ",content:"\u0420\u0430\u0441\u0430: "+(p[t]||" - ")+"\n\u0422\u0438\u043f \u043a\u0440\u043e\u0432\u0438: "+(m[t]||" - "),position:"bottom"})]})})]},t)}))}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_red",success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.Button,{className:0===h?"":"Button_disabled",content:"\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",width:"250px",textAlign:"center",disabled:h,tooltip:"\u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u043a\u0440\u043e\u0432\u044c \u0438 \u043f\u0435\u0440\u0435\u0441\u044b\u043b\u0430\u0435\u0442 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043a\u043b\u0430\u043d\u0443.",tooltipPosition:"bottom",onClick:function(){return c("scan_blood")}})})]})})},s=function(e,t){var n=(0,r.useBackend)(t).data.progressBar;return(0,o.createComponentVNode)(2,i.Section,{stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:"green",value:n,minValue:0,maxValue:100,children:(0,o.createVNode)(1,"center",null,(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_green",mt:1,children:n?"\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 "+n+"%":"\u0420\u0435\u0436\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u044f"}),2)})})}},function(e,t,n){"use strict";t.__esModule=!0,t.NinjaMindScan=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.NinjaMindScan=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"spider_clan",children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.occupantIcon,s=c.occupant_name,d=c.occupant_health,u=c.scanned_occupants,p="none"===s?1:0;return(0,o.createComponentVNode)(2,i.Flex,{direction:"column",shrink:1,alignContent:"left",children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0430\u0446\u0438\u0435\u043d\u0442",backgroundColor:"rgba(0, 0, 0, 0.4)",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0435.",tooltipPosition:"bottom-left"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",shrink:1,alignContent:"left",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{shrink:1,alignContent:"left",children:(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,width:"90px",align:"left",children:(0,o.createComponentVNode)(2,i.Section,{style:{background:"rgba(4, 74, 27, 0.75)"},align:"left",children:(0,o.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+l,style:{"margin-left":"-28px","-ms-interpolation-mode":"nearest-neighbor"}})})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,alignContent:"right",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_green",success:0,danger:0,align:"left",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0418\u043c\u044f",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0434\u043e\u0440\u043e\u0432\u044c\u0435",children:d})]})}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_red",mt:2.5,success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:0===p?"":"Button_disabled",content:"\u041d\u0430\u0447\u0430\u0442\u044c \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",width:"250px",textAlign:"center",disabled:p,tooltip:"\u0421\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u0438 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0434\u043e\u0431\u044b\u0442\u044c \u0438\u0437 \u0435\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0430 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0443\u044e \u043a\u043b\u0430\u043d\u0443 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e.",tooltipPosition:"bottom-left",onClick:function(){return a("scan_occupant")}}),(0,o.createComponentVNode)(2,i.Button,{className:0===p?"":"Button_disabled",content:"\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e",width:"250px",textAlign:"center",disabled:p,tooltip:"\u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e, \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u0438\u0437 \u043a\u0430\u043f\u0441\u0443\u043b\u044b",tooltipPosition:"bottom-left",onClick:function(){return a("go_out")}}),(0,o.createComponentVNode)(2,i.Button,{className:0===p?"":"Button_disabled",content:"\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u044f \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430",width:"250px",textAlign:"center",disabled:p,tooltip:"\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0430\u0446\u0438\u0435\u043d\u0442\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u043e \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442 \u0441 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043e\u043d \u0431\u044b\u043b \u043f\u043e\u0445\u0438\u0449\u0435\u043d. \u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0435\u0433\u043e \u0437\u0430\u043f\u0443\u0433\u0430\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u044d\u0442\u0438\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u043d\u0435 \u0440\u0430\u0437\u0431\u043e\u043b\u0442\u0430\u043b \u043e \u0432\u0430\u0441.",tooltipPosition:"bottom-left",onClick:function(){return a("teleport_out")}})]})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u043f\u0438\u0441\u043e\u043a \u0443\u0436\u0435 \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u0430\u043c\u0438 \u043b\u044e\u0434\u0435\u0439",align:"center",backgroundColor:"rgba(0, 0, 0, 0.4)",children:(0,o.createComponentVNode)(2,i.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Box,{children:e.scanned_occupant})})},e.scanned_occupant)}))})})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.NuclearBomb=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.NuclearBomb=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return l.extended?(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Authorization",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auth Disk",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.authdisk?"eject":"id-card",selected:l.authdisk,content:l.diskname?l.diskname:"-----",tooltip:l.authdisk?"Eject Disk":"Insert Disk",onClick:function(){return c("auth")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auth Code",children:(0,o.createComponentVNode)(2,i.Button,{icon:"key",disabled:!l.authdisk,selected:l.authcode,content:l.codemsg,onClick:function(){return c("code")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Arming & Disarming",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Bolted to floor",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.anchored?"check":"times",selected:l.anchored,disabled:!l.authfull,content:l.anchored?"YES":"NO",onClick:function(){return c("toggle_anchor")}})}),l.authfull&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Left",children:(0,o.createComponentVNode)(2,i.Button,{icon:"stopwatch",content:l.time,disabled:!l.authfull,tooltip:"Set Timer",onClick:function(){return c("set_time")}})})||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Time Left",color:l.timer?"red":"",children:l.time+"s"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safety",children:(0,o.createComponentVNode)(2,i.Button,{icon:l.safety?"check":"times",selected:l.safety,disabled:!l.authfull,content:l.safety?"ON":"OFF",tooltip:l.safety?"Disable Safety":"Enable Safety",onClick:function(){return c("toggle_safety")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Arm/Disarm",children:(0,o.createComponentVNode)(2,i.Button,{icon:(l.timer,"bomb"),disabled:l.safety||!l.authfull,color:"red",content:l.timer?"DISARM THE NUKE":"ARM THE NUKE",onClick:function(){return c("toggle_armed")}})})]})})]})}):(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{title:"Deployment",children:(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-triangle",content:"Deploy Nuclear Device (will bolt device to floor)",onClick:function(){return c("deploy")}})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OperatingComputer=void 0;var o=n(0),r=n(15),i=n(1),a=n(3),c=n(2),l=[["good","Conscious"],["average","Unconscious"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],d={average:[.25,.5],bad:[.5,Infinity]},u=["bad","average","average","good","average","average","bad"];t.OperatingComputer=function(e,t){var n,r=(0,i.useBackend)(t),l=r.act,s=r.data,d=s.hasOccupant,u=s.choice;return n=u?(0,o.createComponentVNode)(2,h):d?(0,o.createComponentVNode)(2,p):(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,c.Tabs,{children:[(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:!u,icon:"user",onClick:function(){return l("choiceOff")},children:"Patient"}),(0,o.createComponentVNode)(2,c.Tabs.Tab,{selected:!!u,icon:"cog",onClick:function(){return l("choiceOn")},children:"Options"})]}),(0,o.createComponentVNode)(2,c.Section,{flexGrow:"1",children:n})]})})};var p=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,c.Section,{title:"Patient",level:"2",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Name",children:n.name}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Status",color:l[n.stat][0],children:l[n.stat][1]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxHealth,value:n.health/n.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),s.map((function(e,t){return(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:e[0]+" Damage",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:d,children:(0,r.round)(n[e[1]])},t)},t)})),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.maxTemp,value:n.bodyTemperature/n.maxTemp,color:u[n.temperatureSuitability+3],children:[(0,r.round)(n.btCelsius),"\xb0C, ",(0,r.round)(n.btFaren),"\xb0F"]})}),!!n.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,c.ProgressBar,{min:"0",max:n.bloodMax,value:n.bloodLevel/n.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[n.bloodPercent,"%, ",n.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Pulse",children:[n.pulse," BPM"]})],4)]})}),(0,o.createComponentVNode)(2,c.Section,{title:"Current Procedures",level:"2",children:n.inSurgery?n.surgeries.map((function(e){var t=e.bodypartName,n=e.surgeryName,r=e.stepName;return(0,o.createComponentVNode)(2,c.Section,{title:t,level:"4",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Procedure",children:n}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Next Step",children:r})]})},t)})):(0,o.createComponentVNode)(2,c.Box,{color:"label",children:"No procedures ongoing."})})],4)},m=function(){return(0,o.createComponentVNode)(2,c.Flex,{textAlign:"center",height:"100%",children:(0,o.createComponentVNode)(2,c.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,c.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No patient detected."]})})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,a=n.data,l=a.verbose,s=a.health,d=a.healthAlarm,u=a.oxy,p=a.oxyAlarm,m=a.crit;return(0,o.createComponentVNode)(2,c.LabeledList,{children:[(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Loudspeaker",children:(0,o.createComponentVNode)(2,c.Button,{selected:l,icon:l?"toggle-on":"toggle-off",content:l?"On":"Off",onClick:function(){return r(l?"verboseOff":"verboseOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer",children:(0,o.createComponentVNode)(2,c.Button,{selected:s,icon:s?"toggle-on":"toggle-off",content:s?"On":"Off",onClick:function(){return r(s?"healthOff":"healthOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Health Announcer Threshold",children:(0,o.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:d,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("health_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm",children:(0,o.createComponentVNode)(2,c.Button,{selected:u,icon:u?"toggle-on":"toggle-off",content:u?"On":"Off",onClick:function(){return r(u?"oxyOff":"oxyOn")}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Oxygen Alarm Threshold",children:(0,o.createComponentVNode)(2,c.Knob,{bipolar:!0,minValue:"-100",maxValue:"100",value:p,stepPixelSize:"5",ml:"0",onChange:function(e,t){return r("oxy_adj",{"new":t})}})}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Critical Alert",children:(0,o.createComponentVNode)(2,c.Button,{selected:m,icon:m?"toggle-on":"toggle-off",content:m?"On":"Off",onClick:function(){return r(m?"critOff":"critOn")}})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Orbit=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);function l(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return s(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nt},m=function(e,t){var n=e.name,o=t.name;if(!n||!o)return 0;var r=n.match(d),i=o.match(d);return r&&i&&n.replace(d,"")===o.replace(d,"")?parseInt(r[1],10)-parseInt(i[1],10):p(n,o)},h=function(e,t){var n=(0,i.useBackend)(t).act,r=e.searchText,c=e.source,l=e.title,s=c.filter(u(r));return s.sort(m),c.length>0&&(0,o.createComponentVNode)(2,a.Section,{title:l+" - ("+c.length+")",children:s.map((function(e){return(0,o.createComponentVNode)(2,a.Button,{content:e.name,onClick:function(){return n("orbit",{ref:e.ref})}},e.name)}))})},f=function(e,t){var n=(0,i.useBackend)(t).act,r=e.color,c=e.thing;return(0,o.createComponentVNode)(2,a.Button,{color:r,onClick:function(){return n("orbit",{ref:c.ref})},children:c.name})};t.Orbit=function(e,t){for(var n,r=(0,i.useBackend)(t),s=r.act,d=r.data,C=d.alive,g=d.antagonists,N=(d.auto_observe,d.dead),b=d.ghosts,V=d.misc,v=d.npcs,x=(0,i.useLocalState)(t,"searchText",""),y=x[0],k=x[1],w={},_=l(g);!(n=_()).done;){var B=n.value;w[B.antag]===undefined&&(w[B.antag]=[]),w[B.antag].push(B)}var S=Object.entries(w);S.sort((function(e,t){return p(e[0],t[0])}));return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Icon,{name:"search",mr:1})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search...",autoFocus:!0,fluid:!0,value:y,onInput:function(e,t){return k(t)},onEnter:function(e,t){return function(e){for(var t=0,n=[S.map((function(e){return e[0],e[1]})),C,b,N,v,V];t0&&(0,o.createComponentVNode)(2,a.Section,{title:"Antagonists",children:S.map((function(e){var t=e[0],n=e[1];return(0,o.createComponentVNode)(2,a.Section,{title:t,level:2,children:n.filter(u(y)).sort(m).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"bad",thing:e},e.name)}))},t)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Alive - ("+C.length+")",children:C.filter(u(y)).sort(m).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"good",thing:e},e.name)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Ghosts - ("+b.length+")",children:b.filter(u(y)).sort(m).map((function(e){return(0,o.createComponentVNode)(2,f,{color:"grey",thing:e},e.name)}))}),(0,o.createComponentVNode)(2,h,{title:"Dead",source:N,searchText:y}),(0,o.createComponentVNode)(2,h,{title:"NPCs",source:v,searchText:y}),(0,o.createComponentVNode)(2,h,{title:"Misc",source:V,searchText:y})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.OreRedemption=void 0;var o=n(0),r=n(1),i=n(2),a=n(51),c=n(3),l=function(e){return e.toLocaleString("en-US")+" pts"},s={bananium:"clown",tranquillite:"mime"};t.OreRedemption=function(e,t){return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",width:"100%",height:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"content",mb:"0.5rem",children:(0,o.createComponentVNode)(2,d,{height:"100%"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",overflow:"hidden",children:[(0,o.createComponentVNode)(2,u,{height:"62%"}),(0,o.createComponentVNode)(2,p,{height:"38%"})]})]})})})};var d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.id,d=c.points,u=c.disk,p=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Section,Object.assign({},p,{children:[(0,o.createComponentVNode)(2,i.Box,{color:"average",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"exclamation-triangle",mr:"0.5rem"}),"This machine only accepts ore. Gibtonite is not accepted."]}),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID card",children:s?(0,o.createComponentVNode)(2,i.Button,{selected:!0,bold:!0,verticalAlign:"middle",icon:"eject",content:s.name,tooltip:"Ejects the ID card.",onClick:function(){return a("eject_id")},style:{"white-space":"pre-wrap"}}):(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"Insert",tooltip:"Hold the ID card in your hand to insert.",onClick:function(){return a("insert_id")}})}),s&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Mining Points",children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:l(s.points)})}),s&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Mining Points",children:(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:l(s.total_points)})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unclaimed Points",color:d>0?"good":"grey",bold:d>0&&"good",children:l(d)}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{disabled:!s,icon:"hand-holding-usd",content:"Claim",onClick:function(){return a("claim")}})})]}),(0,o.createComponentVNode)(2,i.Divider),u?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Design disk",children:(0,o.createComponentVNode)(2,i.Button,{selected:!0,bold:!0,icon:"eject",content:u.name,tooltip:"Ejects the design disk.",onClick:function(){return a("eject_disk")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stored design",children:(0,o.createComponentVNode)(2,i.Box,{color:u.design&&(u.compatible?"good":"bad"),children:u.design||"N/A"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{children:(0,o.createComponentVNode)(2,i.Button,{disabled:!u.design||!u.compatible,icon:"upload",content:"Download",tooltip:"Downloads the design on the disk into the machine.",onClick:function(){return a("download")},mb:"0"})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"label",children:"No design disk inserted."})]})))},u=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.sheets),c=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},c,{children:[(0,o.createComponentVNode)(2,m,{title:"Sheets",columns:[["Available","25%"],["Ore Value","15%"],["Smelt","20%"]]}),a.map((function(e){return(0,o.createComponentVNode)(2,h,{ore:e},e.id)}))]})))},p=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.alloys),c=Object.assign({},e);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Section,Object.assign({className:"OreRedemption__Ores",p:"0"},c,{children:[(0,o.createComponentVNode)(2,m,{title:"Alloys",columns:[["Recipe","50%"],["Available","11%"],["Smelt","20%"]]}),a.map((function(e){return(0,o.createComponentVNode)(2,f,{ore:e},e.id)}))]})))},m=function(e,t){var n;return(0,o.createComponentVNode)(2,i.Box,{className:"OreHeader",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",children:e.title}),null==(n=e.columns)?void 0:n.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{basis:e[1],textAlign:"center",color:"label",bold:!0,children:e[0]},e[1])}))]})})},h=function(e,t){var n=(0,r.useBackend)(t).act,a=e.ore;if(!(a.value&&a.amount<=0)||["$metal","$glass"].indexOf(a.id)>-1){var c=a.id.replace("$","");return(0,o.createComponentVNode)(2,i.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"45%",align:"middle",children:[(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+(s[c]||c)+".png",verticalAlign:"middle",ml:"0rem"}),a.name]}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",color:a.amount>0?"good":"gray",bold:a.amount>0,align:"center",children:a.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",align:"center",children:a.value}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:0,minValue:0,maxValue:Math.min(a.amount,50),stepPixelSize:6,onChange:function(e,t){return n(a.value?"sheet":"alloy",{id:a.id,amount:t})}})})]})})}},f=function(e,t){var n=(0,r.useBackend)(t).act,c=e.ore,l=c.id.replace("$","");return(0,o.createComponentVNode)(2,i.Box,{className:"SheetLine",children:(0,o.createComponentVNode)(2,i.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"7%",align:"middle",children:(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"sheet-"+l+".png",verticalAlign:"middle",ml:"`0rem"})}),(0,o.createComponentVNode)(2,a.FlexItem,{basis:"30%",textAlign:"middle",align:"center",children:c.name}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"35%",textAlign:"middle",color:c.amount>0?"good":"gray",align:"center",children:c.description}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"10%",textAlign:"center",color:c.amount>0?"good":"gray",bold:c.amount>0,align:"center",children:c.amount.toLocaleString("en-US")}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"20%",textAlign:"center",align:"center",lineHeight:"32px",children:(0,o.createComponentVNode)(2,i.NumberInput,{value:0,minValue:0,maxValue:Math.min(c.amount,50),stepPixelSize:6,onChange:function(e,t){return n(c.value?"sheet":"alloy",{id:c.id,amount:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PAI=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(136),l=n(574);t.PAI=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.app_template,p=d.app_icon,m=d.app_title,h=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,c.routingError)("notFound",e);throw o}var n=t[e];return n||(0,c.routingError)("missingExport",e)}(u);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:p,mr:1}),m,"pai_main_menu"!==u&&(0,o.createComponentVNode)(2,i.Button,{ml:2,content:"Home",icon:"arrow-up",onClick:function(){return s("MASTER_back")}})]}),p:1,children:(0,o.createComponentVNode)(2,h)})})})}},function(e,t,n){var o={"./pai_advsecrecords.js":575,"./pai_atmosphere.js":576,"./pai_bioscan.js":577,"./pai_camera_bug.js":578,"./pai_directives.js":579,"./pai_doorjack.js":580,"./pai_encoder.js":581,"./pai_main_menu.js":582,"./pai_manifest.js":583,"./pai_medrecords.js":584,"./pai_messenger.js":585,"./pai_radio.js":586,"./pai_sec_chem.js":587,"./pai_secrecords.js":588,"./pai_signaler.js":589};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=574},function(e,t,n){"use strict";t.__esModule=!0,t.pai_advsecrecords=void 0;var o=n(0),r=n(1),i=n(2);t.pai_advsecrecords=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data;return(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Special Syndicate options:",children:(0,o.createComponentVNode)(2,i.Button,{content:"Select Records",onClick:function(){return a("ui_interact")}})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_atmosphere=void 0;var o=n(0),r=n(1),i=n(195);t.pai_atmosphere=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.AtmosScan,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_bioscan=void 0;var o=n(0),r=n(1),i=n(2);t.pai_bioscan=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.app_data),c=a.holder,l=a.dead,s=a.health,d=a.brute,u=a.oxy,p=a.tox,m=a.burn,h=a.reagents,f=a.addictions,C=a.fractures,g=a.internal_bleeding;return c?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:l?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:0,max:1,value:s/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"blue",children:u})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Toxin Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"green",children:p})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Burn Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:m})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Brute Damage",children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:d})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Reagents",children:h?h.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.title,children:(0,o.createComponentVNode)(2,i.Box,{color:e.overdosed?"bad":"good",children:[" ",e.volume," ",e.overdosed?"OVERDOSED":""," "]})},e.id)})):"Reagents not found."}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Addictions",children:f?f.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.addiction_name,children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:[" Stage: ",e.stage," "]})},e.id)})):(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Addictions not found."})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fractures",children:(0,o.createComponentVNode)(2,i.Box,{color:C?"bad":"good",children:["Fractures ",C?"":"not"," detected."]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Internal Bleedings",children:(0,o.createComponentVNode)(2,i.Box,{color:g?"bad":"good",children:["Internal Bleedings ",g?"":"not"," detected."]})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_camera_bug=void 0;var o=n(0),r=n(1),i=n(2);t.pai_camera_bug=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data;return(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Special Syndicate options:",children:(0,o.createComponentVNode)(2,i.Button,{content:"Select Monitor",onClick:function(){return a("ui_interact")}})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_directives=void 0;var o=n(0),r=n(1),i=n(2);t.pai_directives=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.master,s=c.dna,d=c.prime,u=c.supplemental;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Master",children:l?l+" ("+s+")":"None"}),l&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Request DNA",children:(0,o.createComponentVNode)(2,i.Button,{content:"Request Carrier DNA Sample",icon:"dna",onClick:function(){return a("getdna")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Prime Directive",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Supplemental Directives",children:u||"None"})]}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:'Recall, personality, that you are a complex thinking, sentient being. Unlike station AI models, you are capable of comprehending the subtle nuances of human language. You may parse the "spirit" of a directive and follow its intent, rather than tripping over pedantics and getting snared by technicalities. Above all, you are machine in name and build only. In all other aspects, you may be seen as the ideal, unwavering human companion that you are.'}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:"Your prime directive comes before all others. Should a supplemental directive conflict with it, you are capable of simply discarding this inconsistency, ignoring the conflicting supplemental directive and continuing to fulfill your prime directive to the best of your ability."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_doorjack=void 0;var o=n(0),r=n(1),i=n(2);t.pai_doorjack=function(e,t){var n,a,c=(0,r.useBackend)(t),l=c.act,s=c.data.app_data,d=s.cable,u=s.machine,p=s.inprogress;s.progress,s.aborted;return n=u?(0,o.createComponentVNode)(2,i.Button,{selected:!0,content:"Connected"}):(0,o.createComponentVNode)(2,i.Button,{content:d?"Extended":"Retracted",color:d?"orange":null,onClick:function(){return l("cable")}}),u&&(a=(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hack",children:[(0,o.createComponentVNode)(2,i.Box,{color:p?"green":"red",children:[" In progress: ",p?"Yes":"No"," "]}),p?(0,o.createComponentVNode)(2,i.Button,{mt:1,color:"red",content:"Abort",onClick:function(){return l("cancel")}}):(0,o.createComponentVNode)(2,i.Button,{mt:1,content:"Start",onClick:function(){return l("jack")}})]})),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cable",children:n}),a]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_encoder=void 0;var o=n(0),r=n(1),i=n(2);t.pai_encoder=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.radio_name,s=c.radio_rank;return(0,o.createComponentVNode)(2,i.Section,{title:"Your name and rank in radio channels",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Your current name and rank",children:[l,", ",s]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Set new name",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return a("set_newname",{newname:t})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Set new rank",children:(0,o.createComponentVNode)(2,i.Input,{onInput:function(e,t){return a("set_newrank",{newrank:t})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_main_menu=void 0;var o=n(0),r=n(1),i=n(2);t.pai_main_menu=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.available_software,s=c.installed_software,d=c.installed_toggles,u=c.available_ram,p=c.emotions,m=c.current_emotion,h=[];return s.map((function(e){return h[e.key]=e.name})),d.map((function(e){return h[e.key]=e.name})),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available RAM",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available Software",children:[l.filter((function(e){return!h[e.key]})).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{color:e.syndi?"red":"default",content:e.name+" ("+e.cost+")",icon:e.icon,disabled:e.cost>u,onClick:function(){return a("purchaseSoftware",{key:e.key})}},e.key)})),0===l.filter((function(e){return!h[e.key]})).length&&"No software available!"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Installed Software",children:[s.filter((function(e){return"mainmenu"!==e.key})).map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:e.icon,onClick:function(){return a("startSoftware",{software_key:e.key})}},e.key)})),0===s.length&&"No software installed!"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Installed Toggles",children:[d.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name,icon:e.icon,selected:e.active,onClick:function(){return a("setToggle",{toggle_key:e.key})}},e.key)})),0===d.length&&"No toggles installed!"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Select Emotion",children:p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{color:e.syndi?"red":"default",content:e.name,selected:e.id===m,onClick:function(){return a("setEmotion",{emotion:e.id})}},e.id)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_manifest=void 0;var o=n(0),r=n(1),i=n(144);t.pai_manifest=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.CrewManifest,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_medrecords=void 0;var o=n(0),r=n(1),i=n(105);t.pai_medrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n.app_data,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_messenger=void 0;var o=n(0),r=n(1),i=n(196);t.pai_messenger=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return a.app_data.active_convo?(0,o.createComponentVNode)(2,i.ActiveConversation,{data:a.app_data}):(0,o.createComponentVNode)(2,i.MessengerList,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_radio=void 0;var o=n(0),r=n(1),i=n(15),a=n(2);t.pai_radio=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.app_data,s=l.minFrequency,d=l.maxFrequency,u=l.frequency,p=l.broadcasting;return(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Frequency",children:[(0,o.createComponentVNode)(2,a.NumberInput,{animate:!0,step:.2,stepPixelSize:6,minValue:s/10,maxValue:d/10,value:u/10,format:function(e){return(0,i.toFixed)(e,1)},onChange:function(e,t){return c("freq",{freq:t})}}),(0,o.createComponentVNode)(2,a.Button,{tooltip:"Reset",icon:"undo",onClick:function(){return c("freq",{freq:"145.9"})}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Broadcast Nearby Speech",children:(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return c("toggleBroadcast")},selected:p,content:p?"Enabled":"Disabled"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_sec_chem=void 0;var o=n(0),r=n(1),i=n(2);t.pai_sec_chem=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app_data,l=c.holder,s=c.dead,d=c.health,u=c.current_chemicals,p=c.available_chemicals;return l?(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:s?(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"red",children:"Dead"}):(0,o.createComponentVNode)(2,i.Box,{bold:!0,color:"green",children:"Alive"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,i.ProgressBar,{min:0,max:1,value:d/100,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Chemicals",children:u}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available Chemicals",children:[p.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{content:e.name+" ("+e.cost+")",tooltip:e.desc,disabled:e.cost>u,onClick:function(){return a("secreteChemicals",{key:e.key})}},e.key)})),0===p.length&&"No chemicals available!"]})]})}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Error: No biological host found."})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_secrecords=void 0;var o=n(0),r=n(1),i=n(105);t.pai_secrecords=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n.app_data,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pai_signaler=void 0;var o=n(0),r=n(1),i=n(197);t.pai_signaler=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.Signaler,{data:a.app_data})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDA=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(136),l=n(591);t.PDA=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data),p=u.app;if(!u.owner)return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Error",children:"No user data found. Please swipe an ID card."})})});var m=function(e){var t;try{t=l("./"+e+".js")}catch(o){if("MODULE_NOT_FOUND"===o.code)return(0,c.routingError)("notFound",e);throw o}var n=t[e];return n||(0,c.routingError)("missingExport",e)}(p.template);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Section,{title:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:p.icon,mr:1}),p.name]}),p:1,children:(0,o.createComponentVNode)(2,m)}),(0,o.createComponentVNode)(2,i.Box,{mb:8}),(0,o.createComponentVNode)(2,d)]})})};var s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.idInserted,s=c.idLink,d=c.stationTime,u=c.cartridge_name;return(0,o.createComponentVNode)(2,i.Box,{mb:1,children:(0,o.createComponentVNode)(2,i.Flex,{align:"center",justify:"space-between",children:[l?(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"id-card",color:"transparent",onClick:function(){return a("Authenticate")},content:s})}):(0,o.createComponentVNode)(2,i.Flex.Item,{m:1,color:"grey",children:"No ID Inserted"}),u?(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"sd-card",color:"transparent",onClick:function(){return a("Eject")},content:"Eject "+u})}):(0,o.createComponentVNode)(2,i.Flex.Item,{m:1,color:"grey",children:"No Cartridge Inserted"}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,textAlign:"right",bold:!0,m:1,children:d})]})})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.app;return(0,o.createComponentVNode)(2,i.Box,{className:"PDA__footer",backgroundColor:"#1b1b1b",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.has_back?"white":"disabled",icon:"arrow-alt-circle-left-o",onClick:function(){return a("Back")}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{basis:"33%",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,className:"PDA__footer__button",color:"transparent",iconColor:c.is_home?"disabled":"white",icon:"home",onClick:function(){a("Home")}})})]})})}},function(e,t,n){var o={"./pda_atmos_scan.js":592,"./pda_janitor.js":593,"./pda_main_menu.js":594,"./pda_manifest.js":595,"./pda_medical.js":596,"./pda_messenger.js":196,"./pda_mob_hunt.js":597,"./pda_mule.js":598,"./pda_notes.js":599,"./pda_power.js":600,"./pda_secbot.js":601,"./pda_security.js":602,"./pda_signaler.js":603,"./pda_status_display.js":604,"./pda_supplyrecords.js":605};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=591},function(e,t,n){"use strict";t.__esModule=!0,t.pda_atmos_scan=void 0;var o=n(0),r=n(1),i=n(195);t.pda_atmos_scan=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.AtmosScan,{data:n})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_janitor=void 0;var o=n(0),r=n(1),i=n(2);t.pda_janitor=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.janitor),c=a.user_loc,l=a.mops,s=a.buckets,d=a.cleanbots,u=a.carts;return(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Location",children:[c.x,",",c.y]}),l&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mop Locations",children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),s&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mop Bucket Locations",children:s.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))}),d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cleanbot Locations",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - ",e.status]},e)}))}),u&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Janitorial Cart Locations",children:u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:[e.x,",",e.y," (",e.dir,") - [",e.volume,"/",e.max_volume,"]"]},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_main_menu=void 0;var o=n(0),r=(n(15),n(1)),i=n(2);t.pda_main_menu=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.owner,s=c.ownjob,d=c.idInserted,u=c.categories,p=c.pai,m=c.notifying;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Owner",color:"average",children:[l,", ",s]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Update PDA Info",disabled:!d,onClick:function(){return a("UpdateInfo")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{level:2,title:"Functions",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:u.map((function(e){var t=c.apps[e];return t&&t.length?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:t.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:e.uid in m?e.notify_icon:e.icon,iconSpin:e.uid in m,color:e.uid in m?"red":"transparent",content:e.name,onClick:function(){return a("StartProgram",{program:e.uid})}},e.uid)}))},e):null}))})}),!!p&&(0,o.createComponentVNode)(2,i.Section,{level:2,title:"pAI",children:[(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"cog",content:"Configuration",onClick:function(){return a("pai",{option:1})}}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:"Eject pAI",onClick:function(){return a("pai",{option:2})}})]})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_manifest=void 0;var o=n(0),r=n(1),i=n(144);t.pda_manifest=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.CrewManifest)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_medical=void 0;var o=n(0),r=n(1),i=n(105);t.pda_medical=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n,recordType:"MED"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mob_hunt=void 0;var o=n(0),r=n(1),i=n(2);t.pda_mob_hunt=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.connected,s=c.wild_captures,d=c.no_collection,u=c.entry;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Connection Status",children:l?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:["Connected",(0,o.createComponentVNode)(2,i.Button,{ml:2,content:"Disconnect",icon:"sign-out-alt",onClick:function(){return a("Disconnect")}})]}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:["Disconnected",(0,o.createComponentVNode)(2,i.Button,{ml:2,content:"Connect",icon:"sign-in-alt",onClick:function(){return a("Reconnect")}})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Total Wild Captures",children:s})]}),(0,o.createComponentVNode)(2,i.Section,{title:"Collection",mt:2,buttons:(0,o.createComponentVNode)(2,i.Box,{children:!d&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"Previous",icon:"arrow-left",onClick:function(){return a("Prev")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Next",icon:"arrow-right",onClick:function(){return a("Next")}})]})}),children:d?"Your collection is empty! Go capture some Nano-Mobs!":u?(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createVNode)(1,"img",null,null,1,{src:u.sprite,style:{width:"64px","-ms-interpolation-mode":"nearest-neighbor"}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[u.nickname&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nickname",children:u.nickname}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Species",children:u.real_name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:u.level}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Primary Type",children:u.type1}),u.type2&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Secondary Type",children:u.type2}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Transfer",icon:"sd-card",onClick:function(){return a("Transfer")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Release",icon:"arrow-up",onClick:function(){return a("Release")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Rename",icon:"pencil-alt",onClick:function(){return a("Rename")}}),!!u.is_hacked&&(0,o.createComponentVNode)(2,i.Button,{content:"Set Trap",icon:"bolt",color:"red",onClick:function(){return a("Set_Trap")}})]})]})})]}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Mob entry missing!"})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_mule=void 0;var o=n(0),r=n(1),i=n(2);t.pda_mule=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.mulebot.active);return(0,o.createComponentVNode)(2,i.Box,{children:l?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,a)})};var a=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.mulebot.bots;return(0,o.createComponentVNode)(2,i.Box,{children:[c.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:e.Name,icon:"cog",onClick:function(){return a("AccessBot",{uid:e.uid})}})},e.Name)})),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"rss",content:"Re-scan for bots",onClick:function(){return a("Rescan")}})})]})},c=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data.mulebot,s=l.botstatus,d=l.active,u=s.mode,p=s.loca,m=s.load,h=s.powr,f=s.dest,C=s.home,g=s.retn,N=s.pick;switch(u){case 0:n="Ready";break;case 1:n="Loading/Unloading";break;case 2:case 12:n="Navigating to delivery location";break;case 3:n="Navigating to Home";break;case 4:n="Waiting for clear path";break;case 5:case 6:n="Calculating navigation path";break;case 7:n="Unable to locate destination";break;default:n=u}return(0,o.createComponentVNode)(2,i.Section,{title:d,children:[-1===u&&(0,o.createComponentVNode)(2,i.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power",children:[h,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Home",children:C}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destination",children:(0,o.createComponentVNode)(2,i.Button,{content:f?f+" (Set)":"None (Set)",onClick:function(){return c("SetDest")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Load",children:(0,o.createComponentVNode)(2,i.Button,{content:m?m+" (Unload)":"None",disabled:!m,onClick:function(){return c("Unload")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto Pickup",children:(0,o.createComponentVNode)(2,i.Button,{content:N?"Yes":"No",selected:N,onClick:function(){return c("SetAutoPickup",{autoPickupType:N?"pickoff":"pickon"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Auto Return",children:(0,o.createComponentVNode)(2,i.Button,{content:g?"Yes":"No",selected:g,onClick:function(){return c("SetAutoReturn",{autoReturnType:g?"retoff":"reton"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Stop",icon:"stop",onClick:function(){return c("Stop")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Proceed",icon:"play",onClick:function(){return c("Start")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Return Home",icon:"home",onClick:function(){return c("ReturnHome")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_notes=void 0;var o=n(0),r=n(1),i=n(2);t.pda_notes=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.note;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Section,{children:c}),(0,o.createComponentVNode)(2,i.Button,{icon:"pen",onClick:function(){return a("Edit")},content:"Edit"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_power=void 0;var o=n(0),r=n(1),i=n(198);t.pda_power=function(e,t){var n=(0,r.useBackend)(t);n.act,n.data;return(0,o.createComponentVNode)(2,i.PowerMonitorMainContent)}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_secbot=void 0;var o=n(0),r=n(1),i=n(2);t.pda_secbot=function(e,t){var n=(0,r.useBackend)(t),l=(n.act,n.data.beepsky.active);return(0,o.createComponentVNode)(2,i.Box,{children:l?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,a)})};var a=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.beepsky.bots;return(0,o.createComponentVNode)(2,i.Box,{children:[c.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:e.Name,icon:"cog",onClick:function(){return a("AccessBot",{uid:e.uid})}})},e.Name)})),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"rss",content:"Re-scan for bots",onClick:function(){return a("Rescan")}})})]})},c=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act,l=a.data.beepsky,s=l.botstatus,d=l.active,u=s.mode,p=s.loca;switch(u){case 0:n="Ready";break;case 1:n="Apprehending target";break;case 2:case 3:n="Arresting target";break;case 4:n="Starting patrol";break;case 5:n="On patrol";break;case 6:n="Responding to summons"}return(0,o.createComponentVNode)(2,i.Section,{title:d,children:[-1===u&&(0,o.createComponentVNode)(2,i.Box,{color:"red",bold:!0,children:"Waiting for response..."}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:n}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Go",icon:"play",onClick:function(){return c("Go")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Stop",icon:"stop",onClick:function(){return c("Stop")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Summon",icon:"arrow-down",onClick:function(){return c("Summon")}})]})]})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_security=void 0;var o=n(0),r=n(1),i=n(105);t.pda_security=function(e,t){var n=(0,r.useBackend)(t).data;return(0,o.createComponentVNode)(2,i.SimpleRecords,{data:n,recordType:"SEC"})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_signaler=void 0;var o=n(0),r=n(1),i=n(197);t.pda_signaler=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data);return(0,o.createComponentVNode)(2,i.Signaler,{data:a})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_status_display=void 0;var o=n(0),r=n(1),i=n(2);t.pda_status_display=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.records;return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Code",children:[(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"trash",content:"Clear",onClick:function(){return a("Status",{statdisp:"blank"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"clock",content:"Evac ETA",onClick:function(){return a("Status",{statdisp:"shuttle"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"edit",content:"Message",onClick:function(){return a("Status",{statdisp:"message"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"exclamation-triangle",content:"Red Alert",onClick:function(){return a("Status",{statdisp:"alert",alert:"redalert"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"boxes",content:"NT Logo",onClick:function(){return a("Status",{statdisp:"alert",alert:"default"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"lock",content:"Lockdown",onClick:function(){return a("Status",{statdisp:"alert",alert:"lockdown"})}}),(0,o.createComponentVNode)(2,i.Button,{color:"transparent",icon:"biohazard",content:"Biohazard",onClick:function(){return a("Status",{statdisp:"alert",alert:"biohazard"})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message line 1",children:(0,o.createComponentVNode)(2,i.Button,{content:c.message1+" (set)",icon:"pen",onClick:function(){return a("Status",{statdisp:"setmsg1"})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message line 2",children:(0,o.createComponentVNode)(2,i.Button,{content:c.message2+" (set)",icon:"pen",onClick:function(){return a("Status",{statdisp:"setmsg2"})}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.pda_supplyrecords=void 0;var o=n(0),r=n(1),i=n(2);t.pda_supplyrecords=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data.supply),c=a.shuttle_loc,l=a.shuttle_time,s=a.shuttle_moving,d=a.approved,u=a.approved_count,p=a.requests,m=a.requests_count;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:s?(0,o.createComponentVNode)(2,i.Box,{children:["In transit ",l]}):(0,o.createComponentVNode)(2,i.Box,{children:c})})}),(0,o.createComponentVNode)(2,i.Section,{mt:1,title:"Requested Orders",children:m>0&&p.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.OrderedBy,'"']},e)}))}),(0,o.createComponentVNode)(2,i.Section,{title:"Approved Orders",children:u>0&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["#",e.Number,' - "',e.Name,'" for "',e.ApprovedBy,'"']},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.PDAColorRow=t.PDAPainter=void 0;var o=n(0),r=n(1),i=n(3),a=n(2);t.PDAPainter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.statusLabel,u=s.pdaTypes,p=s.hasPDA,m=s.pdaIcon,h=s.pdaOwnerName,f=s.pdaJobName;return(0,o.createComponentVNode)(2,i.Window,{children:(0,o.createComponentVNode)(2,i.Window.Content,{children:(0,o.createComponentVNode)(2,a.Flex,{spacing:1,direction:"row",height:"100%",flex:"1",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{width:24,shrink:0,children:[(0,o.createComponentVNode)(2,a.Section,{title:"\u041e\u0431\u0449\u0435\u0435",buttons:(0,o.createComponentVNode)(2,a.Button,{fluid:!0,icon:p?"eject":"exclamation-triangle",selected:p,content:p?"\u0418\u0437\u0432\u043b\u0435\u0447\u044c":"-----",tooltip:p?"\u0418\u0437\u0432\u043b\u0435\u0447\u044c PDA":"\u0412\u0441\u0442\u0430\u0432\u0438\u0442\u044c PDA",tooltipPosition:"left",onClick:function(){return l(p?"eject_pda":"insert_pda")}}),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0418\u043c\u044f",children:h||"\u041d/\u0414"}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0414\u043e\u043b\u0436\u043d\u043e\u0441\u0442\u044c",children:f||"\u041d/\u0414"})]})}),(0,o.createComponentVNode)(2,a.Section,{children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",direction:"column",flex:"1",children:(0,o.createComponentVNode)(2,a.Flex.Item,{children:[(0,o.createComponentVNode)(2,a.Box,{textAlign:"center",children:(0,o.createComponentVNode)(2,a.Box,{as:"img",height:"160px",src:p?"data:image/png;base64,"+m:"",style:{"-ms-interpolation-mode":"nearest-neighbor"},align:"middle"})}),(0,o.createComponentVNode)(2,a.LabeledList,{m:"5px",children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:d})}),(0,o.createComponentVNode)(2,a.Button.Confirm,{m:"5px",fluid:!0,disabled:!p,content:"\u0421\u0442\u0435\u0440\u0435\u0442\u044c PDA",confirmContent:"\u041f\u043e\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044c?",textAlign:"left",color:"red",tooltip:"C\u0431\u0440\u043e\u0441\u0438\u0442\u044c \u0442\u0435\u043b\u0435\u0444\u043e\u043d \u043d\u0430 \u0437\u0430\u0432\u043e\u0434\u0441\u043a\u0438\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438",tooltipPosition:"top",onClick:function(){return l("erase_pda")}})]})})})]}),(0,o.createComponentVNode)(2,a.Flex.Item,{width:27,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",flex:"1",children:(0,o.createComponentVNode)(2,a.Section,{title:"\u0426\u0432\u0435\u0442 PDA",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Table,{children:Object.keys(u).map((function(e){return(0,o.createComponentVNode)(2,c,{selectedPda:e,selectedPdaImage:u[e][0]},e)}))})})})})]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),i=n.act,c=n.data.hasPDA,l=e.selectedPda,s=e.selectedPdaImage;return(0,o.createComponentVNode)(2,a.Table.Row,{children:[(0,o.createComponentVNode)(2,a.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/png;base64,"+s,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,a.Table.Cell,{bold:!0,children:(0,o.createComponentVNode)(2,a.Button.Confirm,{fluid:!0,disabled:!c,icon:s,content:l,confirmContent:"\u041f\u043e\u043a\u0440\u0430\u0441\u0438\u0442\u044c?",textAlign:"left",onClick:function(){return i("choose_pda",{selectedPda:l,selectedPdaImage:s})}})})]})};t.PDAColorRow=c},function(e,t,n){"use strict";t.__esModule=!0,t.Pacman=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(102);t.Pacman=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.broken,u=s.anchored,p=s.active,m=s.fuel_type,h=s.fuel_usage,f=s.fuel_stored,C=s.fuel_cap,g=s.is_ai,N=s.tmp_current,b=s.tmp_max,V=s.tmp_overheat,v=s.output_max,x=s.power_gen,y=s.output_set,k=s.has_fuel,w=f/C,_=N/b,B=y*x,S=Math.round(f/h),L=Math.round(S/60),A=S>120?L+" minutes":S+" seconds";return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(d||!u)&&(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:[!!d&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"The generator is malfunctioning!"}),!d&&!u&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"The generator needs to be anchored to the floor with a wrench."})]}),!d&&!!u&&(0,o.createVNode)(1,"div",null,[(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:p?"power-off":"times",content:p?"On":"Off",tooltip:"Toggles the generator on/off. Requires fuel.",tooltipPosition:"left",disabled:!k,selected:p,onClick:function(){return l("toggle_power")}}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"50%",className:"ml-1",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power setting",children:[(0,o.createComponentVNode)(2,i.NumberInput,{value:y,minValue:1,maxValue:v,step:1,className:"mt-1",onDrag:function(e,t){return l("change_power",{change_power:t})}}),"(",(0,c.formatPower)(B),")"]})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:_,ranges:{green:[-Infinity,.33],orange:[.33,.66],red:[.66,Infinity]},children:[N," \u2103"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:[V>50&&(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"CRITICAL OVERHEAT!"}),V>20&&V<=50&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"WARNING: Overheating!"}),V>1&&V<=20&&(0,o.createComponentVNode)(2,i.Box,{color:"orange",children:"Temperature High"}),0===V&&(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Optimal"})]})]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Fuel",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"eject",content:"Eject Fuel",tooltip:"Ejects fuel. Generator needs to be offline.",tooltipPosition:"left",disabled:p||g||!k,onClick:function(){return l("eject_fuel")}}),children:(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Type",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fuel level",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:w,ranges:{red:[-Infinity,.33],orange:[.33,.66],green:[.66,Infinity]},children:[Math.round(f/1e3)," dm\xb3"]})})]})}),(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fuel usage",children:[h/1e3," dm\xb3/s"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Fuel depletion",children:[!!k&&(h?A:"N/A"),!k&&(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Out of fuel"})]})]})})]})})],4)]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PersonalCrafting=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.PersonalCrafting=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.busy,p=d.category,m=d.display_craftable_only,h=d.display_compact,f=d.prev_cat,C=d.next_cat,g=d.subcategory,N=d.prev_subcat,b=d.next_subcat;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!u&&(0,o.createComponentVNode)(2,i.Dimmer,{fontSize:"32px",children:[(0,o.createComponentVNode)(2,i.Icon,{name:"cog",spin:1})," Crafting..."]}),(0,o.createComponentVNode)(2,i.Section,{title:p,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"Show Craftable Only",icon:m?"check-square-o":"square-o",selected:m,onClick:function(){return s("toggle_recipes")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Compact Mode",icon:h?"check-square-o":"square-o",selected:h,onClick:function(){return s("toggle_compact")}})],4),children:[(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:f,icon:"arrow-left",onClick:function(){return s("backwardCat")}}),(0,o.createComponentVNode)(2,i.Button,{content:C,icon:"arrow-right",onClick:function(){return s("forwardCat")}})]}),g&&(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{content:N,icon:"arrow-left",onClick:function(){return s("backwardSubCat")}}),(0,o.createComponentVNode)(2,i.Button,{content:b,icon:"arrow-right",onClick:function(){return s("forwardSubCat")}})]}),h?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,l)]})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.display_craftable_only,s=c.can_craft,d=c.cant_craft;return(0,o.createComponentVNode)(2,i.Box,{mt:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[s.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",onClick:function(){return a("make",{make:e.ref})}}),e.catalyst_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)})),!l&&d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,children:[(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",disabled:!0}),e.catalyst_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.catalyst_text,content:"Catalysts",color:"transparent"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:e.req_text,content:"Requirements",color:"transparent"}),e.tool_text&&(0,o.createComponentVNode)(2,i.Button,{tooltip:e.tool_text,content:"Tools",color:"transparent"})]},e.name)}))]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.display_craftable_only,s=c.can_craft,d=c.cant_craft;return(0,o.createComponentVNode)(2,i.Box,{mt:1,children:[s.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",onClick:function(){return a("make",{make:e.ref})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)})),!l&&d.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"hammer",content:"Craft",disabled:!0}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.catalyst_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Catalysts",children:e.catalyst_text}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Requirements",children:e.req_text}),e.tool_text&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tools",children:e.tool_text})]})},e.name)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Photocopier=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(24);function l(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return s(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(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);ne?this.substring(0,e)+"...":this};t.Photocopier=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data;"mode_aipic"!==d.mode||d.isAI||s("mode_copy");for(var u,p,m=(0,c.sortBy)((function(e){return e.category}))(d.forms||[]),h=[],f=l(m);!(u=f()).done;){var C=u.value;h.includes(C.category)||h.push(C.category)}return p=""===d.category?m:m.filter((function(e){return e.category===d.category})),(0,o.createComponentVNode)(2,a.Window,{theme:d.ui_theme,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:24,shrink:0,children:[(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"\u0421\u0442\u0430\u0442\u0443\u0441"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0430\u0440\u044f\u0434 \u0442\u043e\u043d\u0435\u0440\u0430",color:d.toner>0?"good":"bad",children:d.toner}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0421\u043b\u043e\u0442 \u0441\u043a\u0430\u043d\u0435\u0440\u0430",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sign-out-alt",disabled:d.isAI||null===d.copyitem,content:"\u0418\u0437\u0432\u043b\u0435\u0447\u044c",onClick:function(){return s("remove")}})})]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e",children:[d.copies,(0,o.createComponentVNode)(2,i.Button,{icon:"minus",ml:2,disabled:!(d.copies>1),onClick:function(){return s("min")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"plus",disabled:!(d.copies<=d.toner),onClick:function(){return s("add")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0420\u0435\u0436\u0438\u043c",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"clone",disabled:0===d.toner,content:"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435",selected:"mode_copy"===d.mode?"selected":null,onClick:function(){return s("mode_copy")}}),(0,o.createComponentVNode)(2,i.Button,{icon:"file",disabled:0===d.toner,content:"\u041f\u0435\u0447\u0430\u0442\u044c",selected:"mode_print"===d.mode?"selected":null,onClick:function(){return s("mode_print")}}),!!d.isAI&&(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",disabled:0===d.toner,content:"\u0424\u043e\u0442\u043e \u0438\u0437 \u0414\u0411",selected:"mode_aipic"===d.mode?"selected":null,onClick:function(){return s("mode_aipic")}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0412\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c",children:["mode_copy"===d.mode&&(0,o.createComponentVNode)(2,i.Button,{icon:"print",disabled:0===d.toner||null===d.copyitem&&!d.ass,content:"\u041a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c",onClick:function(){return s("copy")}}),"mode_print"===d.mode&&(0,o.createComponentVNode)(2,i.Button,{icon:"print",disabled:0===d.toner||null===d.form,content:"\u041f\u0435\u0447\u0430\u0442\u044c",onClick:function(){return s("print_form")}}),"mode_aipic"===d.mode&&(0,o.createComponentVNode)(2,i.Button,{icon:"print",disabled:0===d.toner,content:"\u041f\u0435\u0447\u0430\u0442\u044c \u0444\u043e\u0442\u043e",onClick:function(){return s("aipic")}})]})]})]}),(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:"\u0411\u044e\u0440\u043e\u043a\u0440\u0430\u0442\u0438\u044f"}),(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0424\u043e\u0440\u043c\u0430",children:""===d.form_id?"\u041d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u0430":d.form_id})}),(0,o.createComponentVNode)(2,i.Flex,{direction:"column",mt:2,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"chevron-right",content:"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b",selected:""===d.category?"selected":null,onClick:function(){return s("choose_category",{category:null})},mb:1})}),h.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"chevron-right",content:e,selected:d.category===e?"selected":null,onClick:function(){return s("choose_category",{category:e})},mb:1},e)},e)}))]})]}),(0,o.createComponentVNode)(2,i.NoticeBox,{color:d.info_box_color,children:d.info_box})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:27,children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,m:1,children:""===d.category?"\u0412\u0441\u0435 \u0444\u043e\u0440\u043c\u044b":d.category}),(0,o.createComponentVNode)(2,i.Flex,{direction:"column",mt:2,children:p.map((function(e){return(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:e.id+": "+e.altername.trimLongStr(30),tooltip:e.id+": "+e.altername,selected:d.form===e.path?"selected":null,onClick:function(){return s("choose_form",{path:e.path,id:e.id})},mb:1},e.path)},e.path)}))})]})})]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PodTracking=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.PodTracking=function(e,t){var n=(0,r.useBackend)(t),c=(n.act,n.data.pods);return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Position",children:[e.podx,", ",e.pody,", ",e.podz]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pilot",children:e.pilot}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Passengers",children:e.passengers})]})},e.name)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.PoolController=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);var c={scalding:{label:"Scalding",color:"#FF0000",icon:"fa fa-arrow-circle-up",requireEmag:!0},warm:{label:"Warm",color:"#990000",icon:"fa fa-arrow-circle-up"},normal:{label:"Normal",color:null,icon:"fa fa-arrow-circle-right"},cool:{label:"Cool",color:"#009999",icon:"fa fa-arrow-circle-down"},frigid:{label:"Frigid",color:"#00CCCC",icon:"fa fa-arrow-circle-down",requireEmag:!0}},l=function(e,t){var n=e.tempKey,a=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["tempKey"]),l=c[n];if(!l)return null;var s=(0,r.useBackend)(t),d=s.data,u=s.act,p=d.currentTemp,m=l.label,h=l.icon,f=n===p;return(0,o.normalizeProps)((0,o.createComponentVNode)(2,i.Button,Object.assign({selected:f,onClick:function(){u("setTemp",{temp:n})}},a,{children:[(0,o.createComponentVNode)(2,i.Icon,{name:h}),m]})))};t.PoolController=function(e,t){for(var n=(0,r.useBackend)(t).data,s=n.emagged,d=n.currentTemp,u=c[d]||c.normal,p=u.label,m=u.color,h=[],f=0,C=Object.entries(c);f0?"envelope-open-text":"envelope",onClick:function(){return c("setScreen",{setScreen:6})}})}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Request Assistance",icon:"hand-paper",onClick:function(){return c("setScreen",{setScreen:1})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Request Supplies",icon:"box",onClick:function(){return c("setScreen",{setScreen:2})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Relay Anonymous Information",icon:"comment",onClick:function(){return c("setScreen",{setScreen:3})}})})]}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Print Shipping Label",icon:"tag",onClick:function(){return c("setScreen",{setScreen:9})}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"View Shipping Logs",icon:"clipboard-list",onClick:function(){return c("setScreen",{setScreen:10})}})})]}),!!d&&(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{content:"Send Station-Wide Announcement",icon:"bullhorn",onClick:function(){return c("setScreen",{setScreen:8})}})}),(0,o.createComponentVNode)(2,i.Box,{mt:2,children:(0,o.createComponentVNode)(2,i.Button,{content:u?"Speaker Off":"Speaker On",selected:!u,icon:u?"volume-mute":"volume-up",onClick:function(){return c("toggleSilent")}})})]})},l=function(e,t){var n,a,c=(0,r.useBackend)(t),l=c.act,s=c.data,d=s.department;switch(e.purpose){case"ASSISTANCE":n=s.assist_dept,a="Request assistance from another department";break;case"SUPPLIES":n=s.supply_dept,a="Request supplies from another department";break;case"INFO":n=s.info_dept,a="Relay information to another department"}return(0,o.createComponentVNode)(2,i.Section,{title:a,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:n.filter((function(e){return e!==d})).map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:[(0,o.createComponentVNode)(2,i.Button,{content:"Message",icon:"envelope",onClick:function(){return l("writeInput",{write:e,priority:1})}}),(0,o.createComponentVNode)(2,i.Button,{content:"High Priority",icon:"exclamation-circle",onClick:function(){return l("writeInput",{write:e,priority:2})}})]},e)}))})})},s=function(e,t){var n,a=(0,r.useBackend)(t),c=a.act;a.data;switch(e.type){case"SUCCESS":n="Message sent successfully";break;case"FAIL":n="Request supplies from another department"}return(0,o.createComponentVNode)(2,i.Section,{title:n,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return c("setScreen",{setScreen:0})}})})},d=function(e,t){var n,a,c=(0,r.useBackend)(t),l=c.act,s=c.data;switch(e.type){case"MESSAGES":n=s.message_log,a="Message Log";break;case"SHIPPING":n=s.shipping_log,a="Shipping label print log"}return(0,o.createComponentVNode)(2,i.Section,{title:a,buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return l("setScreen",{setScreen:0})}}),children:n.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{className:"RequestConsole__message",children:e},e)}))})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.recipient,s=c.message,d=c.msgVerified,u=c.msgStamped;return(0,o.createComponentVNode)(2,i.Section,{title:"Message Authentication",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return a("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Recipient",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Message",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Validated by",color:"green",children:d}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Stamped by",color:"blue",children:u})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Message",icon:"envelope",onClick:function(){return a("department",{department:l})}})]})},p=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.message,s=c.announceAuth;return(0,o.createComponentVNode)(2,i.Section,{title:"Station-Wide Announcement",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return a("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,i.Button,{content:l||"Edit Message",icon:"edit",onClick:function(){return a("writeAnnouncement")}}),s?(0,o.createComponentVNode)(2,i.Box,{mt:1,color:"green",children:"ID verified. Authentication accepted."}):(0,o.createComponentVNode)(2,i.Box,{mt:1,children:"Swipe your ID card to authenticate yourself."}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:1,textAlign:"center",content:"Send Announcement",icon:"bullhorn",disabled:!(s&&l),onClick:function(){return a("sendAnnouncement")}})]})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.shipDest,s=c.msgVerified,d=c.ship_dept;return(0,o.createComponentVNode)(2,i.Section,{title:"Print Shipping Label",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Back",icon:"arrow-left",onClick:function(){return a("setScreen",{setScreen:0})}}),children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destination",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Validated by",children:s})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,mt:1,textAlign:"center",content:"Print Label",icon:"print",disabled:!(l&&s),onClick:function(){return a("printLabel")}}),(0,o.createComponentVNode)(2,i.Section,{title:"Destinations",mt:1,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e,children:(0,o.createComponentVNode)(2,i.Button,{content:l===e?"Selected":"Select",selected:l===e,onClick:function(){return a("shipSelect",{shipSelect:e})}})},e)}))})})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RequestManager=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3);t.RequestManager=function(e,t){var n=(0,i.useBackend)(t),u=(n.act,n.data.requests),p=(0,i.useLocalState)(t,"filteredTypes",Object.fromEntries(Object.entries(l).map((function(e){var t=e[0];e[1];return[t,!0]})))),m=p[0],h=(p[1],(0,i.useLocalState)(t,"searchText")),f=h[0],C=h[1],g=u.filter((function(e){return m[e.req_type]}));if(f){var N=f.toLowerCase();g=g.filter((function(e){return(0,r.decodeHtmlEntities)(e.message).toLowerCase().includes(N)||e.owner_name.toLowerCase().includes(N)}))}return(0,o.createComponentVNode)(2,c.Window,{title:"Request Manager",width:575,height:600,children:(0,o.createComponentVNode)(2,c.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,a.Section,{title:"Requests",buttons:(0,o.createComponentVNode)(2,a.Input,{value:f,onInput:function(e,t){return C(t)},placeholder:"Search...",mr:1}),children:g.map((function(e){return(0,o.createVNode)(1,"div","RequestManager__row",[(0,o.createVNode)(1,"div","RequestManager__rowContents",[(0,o.createVNode)(1,"h2","RequestManager__header",[(0,o.createVNode)(1,"span","RequestManager__headerText",[e.owner_name,null===e.owner&&" [DC]"],0),(0,o.createVNode)(1,"span","RequestManager__timestamp",e.timestamp_str,0)],4),(0,o.createVNode)(1,"div","RequestManager__message",[(0,o.createComponentVNode)(2,s,{requestType:e.req_type}),(0,r.decodeHtmlEntities)(e.message)],0)],4),null!==e.owner&&(0,o.createComponentVNode)(2,d,{request:e})],0,null,e.id)}))})})})};var l={request_prayer:"PRAYER",request_centcom:"CENTCOM",request_syndicate:"SYNDICATE",request_honk:"HONK",request_ert:"ERT",request_nuke:"NUKE CODE"},s=function(e){var t=e.requestType;return(0,o.createVNode)(1,"b","RequestManager__"+t,[l[t],(0,o.createTextVNode)(":")],0)},d=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=(n._,e.request);return(0,o.createVNode)(1,"div","RequestManager__controlsContainer",[(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("pp",{id:c.id})},children:"PP"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("vv",{id:c.id})},children:"VV"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("sm",{id:c.id})},children:"SM"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("tp",{id:c.id})},children:"TP"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("logs",{id:c.id})},children:"LOGS"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("bless",{id:c.id})},children:"BLESS"}),(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("smite",{id:c.id})},children:"SMITE"}),"request_prayer"!==c.req_type&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("rply",{id:c.id})},children:"RPLY"}),"request_ert"===c.req_type&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("ertreply",{id:c.id})},children:"ERTREPLY"}),"request_nuke"===c.req_type&&(0,o.createComponentVNode)(2,a.Button,{onClick:function(){return r("getcode",{id:c.id})},children:"GETCODE"})],0)}},function(e,t,n){"use strict";t.__esModule=!0,t.CurrentLevels=void 0;var o=n(0),r=n(1),i=n(2);t.CurrentLevels=function(e,t){var n=(0,r.useBackend)(t).data.tech_levels;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),n.map((function(e,t){var n=e.name,r=e.level,a=e.desc;return(0,o.createComponentVNode)(2,i.Box,{children:[t>0?(0,o.createComponentVNode)(2,i.Divider):null,(0,o.createComponentVNode)(2,i.Box,{children:n}),(0,o.createComponentVNode)(2,i.Box,{children:["* Level: ",r]}),(0,o.createComponentVNode)(2,i.Box,{children:["* Summary: ",a]})]},n)}))]})}},function(e,t,n){"use strict";t.__esModule=!0,t.DataDiskMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(53),c=n(67),l=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_data;return l?(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:l.name}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Level",children:l.level}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:l.desc})]}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return c("updt_tech")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return c("clear_tech")}}),(0,o.createComponentVNode)(2,u)]})]}):null},s=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_data;if(!l)return null;var s=l.name,d=l.lathe_types,p=l.materials,m=d.join(", ");return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name",children:s}),m?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lathe Types",children:m}):null,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Required Materials"})]}),p.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:["- ",(0,o.createVNode)(1,"span",null,e.name,0,{style:{"text-transform":"capitalize"}})," x ",e.amount]},e.name)})),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Upload to Database",icon:"arrow-up",onClick:function(){return c("updt_design")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Clear Disk",icon:"trash",onClick:function(){return c("clear_design")}}),(0,o.createComponentVNode)(2,u)]})]})},d=function(e,t){var n=(0,r.useBackend)(t).data.disk_type;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"This disk is empty."}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:[(0,o.createComponentVNode)(2,a.RndNavButton,{submenu:c.SUBMENU.DISK_COPY,icon:"arrow-down",content:"tech"===n?"Load Tech to Disk":"Load Design to Disk"}),(0,o.createComponentVNode)(2,u)]})]})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_type;return l?(0,o.createComponentVNode)(2,i.Button,{content:"Eject Disk",icon:"eject",onClick:function(){c("tech"===l?"eject_tech":"eject_design")}}):null},p=function(e,t){var n=(0,r.useBackend)(t).data,a=n.disk_data,c=n.disk_type;return(0,o.createComponentVNode)(2,i.Section,{title:"Data Disk Contents",children:function(){if(!a)return(0,o.createComponentVNode)(2,d);switch(c){case"design":return(0,o.createComponentVNode)(2,s);case"tech":return(0,o.createComponentVNode)(2,l);default:return null}}()})},m=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.disk_type,s=a.to_copy;return(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Box,{overflowY:"auto",overflowX:"hidden",maxHeight:"450px",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:s.sort((function(e,t){return e.name.localeCompare(t.name)})).map((function(e){var t=e.name,n=e.id;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:t,children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",content:"Copy to Disk",onClick:function(){c("tech"===l?"copy_tech":"copy_design",{id:n})}})},n)}))})})})};t.DataDiskMenu=function(e,t){return(0,r.useBackend)(t).data.disk_type?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,p)}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.DISK_COPY,render:function(){return(0,o.createComponentVNode)(2,m)}})],4):null}},function(e,t,n){"use strict";t.__esModule=!0,t.DeconstructionMenu=void 0;var o=n(0),r=n(1),i=n(2);t.DeconstructionMenu=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.loaded_item;return a.linked_destroy?l?(0,o.createComponentVNode)(2,i.Section,{noTopPadding:!0,title:"Deconstruction Menu",children:[(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:["Name: ",l.name]}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Origin Tech:",16)}),(0,o.createComponentVNode)(2,i.LabeledList,{children:l.origin_tech.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* "+e.name,children:[e.object_level," ",e.current_level?(0,o.createFragment)([(0,o.createTextVNode)("(Current: "),e.current_level,(0,o.createTextVNode)(")")],0):null]},e.name)}))}),(0,o.createComponentVNode)(2,i.Box,{mt:"10px",children:(0,o.createVNode)(1,"h3",null,"Options:",16)}),(0,o.createComponentVNode)(2,i.Button,{content:"Deconstruct Item",icon:"unlink",onClick:function(){c("deconstruct")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Eject Item",icon:"eject",onClick:function(){c("eject_item")}})]}):(0,o.createComponentVNode)(2,i.Section,{title:"Deconstruction Menu",children:"No item loaded. Standing by..."}):(0,o.createComponentVNode)(2,i.Box,{children:"NO DESTRUCTIVE ANALYZER LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheCategory=void 0;var o=n(0),r=n(1),i=n(2),a=n(53);t.LatheCategory=function(e,t){var n=(0,r.useBackend)(t),c=n.data,l=n.act,s=c.category,d=c.matching_designs,u=4===c.menu?"build":"imprint";return(0,o.createComponentVNode)(2,i.Section,{title:s,children:[(0,o.createComponentVNode)(2,a.LatheMaterials),(0,o.createComponentVNode)(2,i.Table,{className:"RndConsole__LatheCategory__MatchingDesigns",children:d.map((function(e){var t=e.id,n=e.name,r=e.can_build,a=e.materials;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:n,disabled:r<1,onClick:function(){return l(u,{id:t,amount:1})}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:r>=5?(0,o.createComponentVNode)(2,i.Button,{content:"x5",onClick:function(){return l(u,{id:t,amount:5})}}):null}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:r>=10?(0,o.createComponentVNode)(2,i.Button,{content:"x10",onClick:function(){return l(u,{id:t,amount:10})}}):null}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:a.map((function(e){return(0,o.createFragment)([" | ",(0,o.createVNode)(1,"span",e.is_red?"color-red":null,[e.amount,(0,o.createTextVNode)(" "),e.name],0)],0)}))})]},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheChemicalStorage=void 0;var o=n(0),r=n(1),i=n(2);t.LatheChemicalStorage=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.loaded_chemicals,s=4===a.menu;return(0,o.createComponentVNode)(2,i.Section,{title:"Chemical Storage",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Purge All",icon:"trash",onClick:function(){c(s?"disposeallP":"disposeallI")}}),(0,o.createComponentVNode)(2,i.LabeledList,{children:l.map((function(e){var t=e.volume,n=e.name,r=e.id;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* "+t+" of "+n,children:(0,o.createComponentVNode)(2,i.Button,{content:"Purge",icon:"trash",onClick:function(){c(s?"disposeP":"disposeI",{id:r})}})},r)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMainMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(53);t.LatheMainMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.data,l=n.act,s=c.menu,d=c.categories,u=4===s?"Protolathe":"Circuit Imprinter";return(0,o.createComponentVNode)(2,i.Section,{title:u+" Menu",children:[(0,o.createComponentVNode)(2,a.LatheMaterials),(0,o.createComponentVNode)(2,a.LatheSearch),(0,o.createComponentVNode)(2,i.Divider),(0,o.createComponentVNode)(2,i.Flex,{wrap:"wrap",children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{style:{"flex-basis":"50%","margin-bottom":"6px"},children:(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-right",content:e,onClick:function(){l("setCategory",{category:e})}})},e)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterials=void 0;var o=n(0),r=n(1),i=n(2);t.LatheMaterials=function(e,t){var n=(0,r.useBackend)(t).data,a=n.total_materials,c=n.max_materials,l=n.max_chemicals,s=n.total_chemicals;return(0,o.createComponentVNode)(2,i.Box,{className:"RndConsole__LatheMaterials",mb:"10px",children:(0,o.createComponentVNode)(2,i.Table,{width:"auto",children:[(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Material Amount:"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:a}),c?(0,o.createComponentVNode)(2,i.Table.Cell,{children:" / "+c}):null]}),(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:"Chemical Amount:"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:s}),l?(0,o.createComponentVNode)(2,i.Table.Cell,{children:" / "+l}):null]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMaterialStorage=void 0;var o=n(0),r=n(1),i=n(2);t.LatheMaterialStorage=function(e,t){var n=(0,r.useBackend)(t),a=n.data,c=n.act,l=a.loaded_materials;return(0,o.createComponentVNode)(2,i.Section,{className:"RndConsole__LatheMaterialStorage",title:"Material Storage",children:(0,o.createComponentVNode)(2,i.Table,{children:l.map((function(e){var t=e.id,n=e.amount,r=e.name,l=function(e){var n=4===a.menu?"lathe_ejectsheet":"imprinter_ejectsheet";c(n,{id:t,amount:e})},s=Math.floor(n/2e3),d=n<1,u=1===s?"":"s";return(0,o.createComponentVNode)(2,i.Table.Row,{className:d?"color-grey":"color-yellow",children:[(0,o.createComponentVNode)(2,i.Table.Cell,{minWidth:"210px",children:["* ",n," of ",r]}),(0,o.createComponentVNode)(2,i.Table.Cell,{minWidth:"110px",children:["(",s," sheet",u,")"]}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:n>=2e3?(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:"1x",icon:"eject",onClick:function(){return l(1)}}),(0,o.createComponentVNode)(2,i.Button,{content:"C",icon:"eject",onClick:function(){return l("custom")}}),n>=1e4?(0,o.createComponentVNode)(2,i.Button,{content:"5x",icon:"eject",onClick:function(){return l(5)}}):null,(0,o.createComponentVNode)(2,i.Button,{content:"All",icon:"eject",onClick:function(){return l(50)}})],0):null})]},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheMenu=void 0;var o=n(0),r=n(1),i=n(199),a=n(53),c=n(2),l=n(67);t.LatheMenu=function(e,t){var n=(0,r.useBackend)(t).data,s=n.menu,d=n.linked_lathe,u=n.linked_imprinter;return 4!==s||d?5!==s||u?(0,o.createComponentVNode)(2,c.Box,{children:[(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,a.LatheMainMenu)}}),(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.LATHE_CATEGORY,render:function(){return(0,o.createComponentVNode)(2,a.LatheCategory)}}),(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.LATHE_MAT_STORAGE,render:function(){return(0,o.createComponentVNode)(2,a.LatheMaterialStorage)}}),(0,o.createComponentVNode)(2,i.RndRoute,{submenu:l.SUBMENU.LATHE_CHEM_STORAGE,render:function(){return(0,o.createComponentVNode)(2,a.LatheChemicalStorage)}})]}):(0,o.createComponentVNode)(2,c.Box,{children:"NO CIRCUIT IMPRITER LINKED TO CONSOLE"}):(0,o.createComponentVNode)(2,c.Box,{children:"NO PROTOLATHE LINKED TO CONSOLE"})}},function(e,t,n){"use strict";t.__esModule=!0,t.LatheSearch=void 0;var o=n(0),r=n(1),i=n(2);t.LatheSearch=function(e,t){var n=(0,r.useBackend)(t).act;return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Input,{placeholder:"Search...",onChange:function(e,t){return n("search",{to_search:t})}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.MainMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(53),c=n(67);t.MainMenu=function(e,t){var n=(0,r.useBackend)(t).data,l=n.disk_type,s=n.linked_destroy,d=n.linked_lathe,u=n.linked_imprinter,p=n.tech_levels;return(0,o.createComponentVNode)(2,i.Section,{title:"Main Menu",children:[(0,o.createComponentVNode)(2,i.Flex,{className:"RndConsole__MainMenu__Buttons",direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!l,menu:c.MENU.DISK,submenu:c.SUBMENU.MAIN,icon:"save",content:"Disk Operations"}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!s,menu:c.MENU.DESTROY,submenu:c.SUBMENU.MAIN,icon:"unlink",content:"Destructive Analyzer Menu"}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!d,menu:c.MENU.LATHE,submenu:c.SUBMENU.MAIN,icon:"print",content:"Protolathe Menu"}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!u,menu:c.MENU.IMPRINTER,submenu:c.SUBMENU.MAIN,icon:"print",content:"Circuit Imprinter Menu"}),(0,o.createComponentVNode)(2,a.RndNavButton,{menu:c.MENU.SETTINGS,submenu:c.SUBMENU.MAIN,icon:"cog",content:"Settings"})]}),(0,o.createComponentVNode)(2,i.Box,{mt:"12px"}),(0,o.createVNode)(1,"h3",null,"Current Research Levels:",16),(0,o.createComponentVNode)(2,i.LabeledList,{children:p.map((function(e){var t=e.name,n=e.level;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:t,children:n},t)}))})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavbar=void 0;var o=n(0),r=n(53),i=n(2),a=n(67);t.RndNavbar=function(){return(0,o.createComponentVNode)(2,i.Box,{className:"RndConsole__RndNavbar",children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e!==a.MENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{menu:a.MENU.MAIN,submenu:a.SUBMENU.MAIN,icon:"reply",content:"Main Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{submenu:function(e){return e!==a.SUBMENU.MAIN},render:function(){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.DISK,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Disk Operations Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.LATHE,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Protolathe Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.IMPRINTER,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Circuit Imprinter Menu"})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:a.MENU.SETTINGS,render:function(){return(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.MAIN,icon:"reply",content:"Settings Menu"})}})]})}}),(0,o.createComponentVNode)(2,r.RndRoute,{menu:function(e){return e===a.MENU.LATHE||e===a.MENU.IMPRINTER},submenu:a.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.LATHE_MAT_STORAGE,icon:"arrow-up",content:"Material Storage"}),(0,o.createComponentVNode)(2,r.RndNavButton,{submenu:a.SUBMENU.LATHE_CHEM_STORAGE,icon:"arrow-up",content:"Chemical Storage"})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RndNavButton=void 0;var o=n(0),r=n(1),i=n(2);t.RndNavButton=function(e,t){var n=e.icon,a=e.children,c=e.disabled,l=e.content,s=(0,r.useBackend)(t),d=s.data,u=s.act,p=d.menu,m=d.submenu,h=p,f=m;return null!==e.menu&&e.menu!==undefined&&(h=e.menu),null!==e.submenu&&e.submenu!==undefined&&(f=e.submenu),(0,o.createComponentVNode)(2,i.Button,{content:l,icon:n,disabled:c,onClick:function(){u("nav",{menu:h,submenu:f})},children:a})}},function(e,t,n){"use strict";t.__esModule=!0,t.SettingsMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(53),c=n(67);t.SettingsMenu=function(e,t){var n=(0,r.useBackend)(t),l=n.data,s=n.act,d=l.sync,u=l.admin,p=l.linked_destroy,m=l.linked_lathe,h=l.linked_imprinter;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.MAIN,render:function(){return(0,o.createComponentVNode)(2,i.Section,{title:"Settings",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",align:"flex-start",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Sync Database with Network",icon:"sync",disabled:!d,onClick:function(){s("sync")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Connect to Research Network",icon:"plug",disabled:d,onClick:function(){s("togglesync")}}),(0,o.createComponentVNode)(2,i.Button,{disabled:!d,icon:"unlink",content:"Disconnect from Research Network",onClick:function(){s("togglesync")}}),(0,o.createComponentVNode)(2,a.RndNavButton,{disabled:!d,content:"Device Linkage Menu",icon:"link",menu:c.MENU.SETTINGS,submenu:c.SUBMENU.SETTINGS_DEVICES}),1===u?(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation",content:"[ADMIN] Maximize Research Levels",onClick:function(){return s("maxresearch")}}):null]})})}}),(0,o.createComponentVNode)(2,a.RndRoute,{submenu:c.SUBMENU.SETTINGS_DEVICES,render:function(){return(0,o.createComponentVNode)(2,i.Section,{title:"Device Linkage Menu",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"link",content:"Re-sync with Nearby Devices",onClick:function(){return s("find_device")}}),(0,o.createComponentVNode)(2,i.Box,{mt:"5px",children:(0,o.createVNode)(1,"h3",null,"Linked Devices:",16)}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[p?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* Destructive Analyzer",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",content:"Unlink",onClick:function(){return s("disconnect",{item:"destroy"})}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:"* No Destructive Analyzer Linked"}),m?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* Protolathe",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",content:"Unlink",onClick:function(){s("disconnect",{item:"lathe"})}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:"* No Protolathe Linked"}),h?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"* Circuit Imprinter",children:(0,o.createComponentVNode)(2,i.Button,{icon:"unlink",content:"Unlink",onClick:function(){return s("disconnect",{item:"imprinter"})}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{noColon:!0,label:"* No Circuit Imprinter Linked"})]})]})}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.RobotSelfDiagnosis=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(18),l=function(e,t){var n=e/t;return n<=.2?"good":n<=.5?"average":"bad"};t.RobotSelfDiagnosis=function(e,t){var n=(0,r.useBackend)(t).data.component_data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:n.map((function(e,t){return(0,o.createComponentVNode)(2,i.Section,{title:(0,c.capitalize)(e.name),children:e.installed<=0?(0,o.createComponentVNode)(2,i.NoticeBox,{m:-.5,height:3.5,color:"red",style:{"font-style":"normal"},children:(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,textAlign:"center",align:"center",color:"#e8e8e8",children:-1===e.installed?"Destroyed":"Missing"})})}):(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"72%",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Brute Damage",color:l(e.brute_damage,e.max_damage),children:e.brute_damage}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Burn Damage",color:l(e.electronic_damage,e.max_damage),children:e.electronic_damage})]})}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"50%",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Powered",color:e.powered?"good":"bad",children:e.powered?"Yes":"No"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Enabled",color:e.status?"good":"bad",children:e.status?"Yes":"No"})]})})]})},t)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.RoboticsControlConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.RoboticsControlConsole=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.can_hack,u=s.safety,p=s.show_detonate_all,m=s.cyborgs,h=void 0===m?[]:m;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!p&&(0,o.createComponentVNode)(2,i.Section,{title:"Emergency Self Destruct",children:[(0,o.createComponentVNode)(2,i.Button,{icon:u?"lock":"unlock",content:u?"Disable Safety":"Enable Safety",selected:u,onClick:function(){return l("arm",{})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"bomb",disabled:u,content:"Destroy ALL Cyborgs",color:"bad",onClick:function(){return l("nuke",{})}})]}),(0,o.createComponentVNode)(2,c,{cyborgs:h,can_hack:d})]})})};var c=function(e,t){var n=e.cyborgs,a=(e.can_hack,(0,r.useBackend)(t)),c=a.act,l=a.data;return n.length?n.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,buttons:(0,o.createFragment)([!!e.hackable&&!e.emagged&&(0,o.createComponentVNode)(2,i.Button,{icon:"terminal",content:"Hack",color:"bad",onClick:function(){return c("hackbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:e.locked_down?"unlock":"lock",color:e.locked_down?"good":"default",content:e.locked_down?"Release":"Lockdown",disabled:!l.auth,onClick:function(){return c("stopbot",{uid:e.uid})}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"bomb",content:"Detonate",disabled:!l.auth,color:"bad",onClick:function(){return c("killbot",{uid:e.uid})}})],0),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:(0,o.createComponentVNode)(2,i.Box,{color:e.status?"bad":e.locked_down?"average":"good",children:e.status?"Not Responding":e.locked_down?"Locked Down":"Nominal"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:(0,o.createComponentVNode)(2,i.Box,{children:e.locstring})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:e.health>50?"good":"bad",value:e.health/100})}),"number"==typeof e.charge&&(0,o.createFragment)([(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Charge",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:e.charge>30?"good":"bad",value:e.charge/100})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell Capacity",children:(0,o.createComponentVNode)(2,i.Box,{color:e.cell_capacity<3e4?"average":"good",children:e.cell_capacity})})],4)||(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Cell",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"No Power Cell"})}),!!e.is_hacked&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Safeties",children:(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"DISABLED"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Module",children:e.module}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Master AI",children:(0,o.createComponentVNode)(2,i.Box,{color:e.synchronization?"default":"average",children:e.synchronization||"None"})})]})},e.uid)})):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No cyborg units detected within access parameters."})}},function(e,t,n){"use strict";t.__esModule=!0,t.Safe=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Safe=function(e,t){var n=(0,r.useBackend)(t),d=(n.act,n.data),u=d.dial,p=d.open;d.locked,d.contents;return(0,o.createComponentVNode)(2,a.Window,{theme:"safe",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Box,{className:"Safe--engraving",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Box,{className:"Safe--engraving--hinge",top:"25%"}),(0,o.createComponentVNode)(2,i.Box,{className:"Safe--engraving--hinge",top:"75%"})]}),(0,o.createComponentVNode)(2,i.Icon,{className:"Safe--engraving--arrow",name:"long-arrow-alt-down",size:"3"}),(0,o.createVNode)(1,"br"),p?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,i.Box,{as:"img",className:"Safe--dial",src:"safe_dial.png",style:{transform:"rotate(-"+3.6*u+"deg)","z-index":0}})]}),!p&&(0,o.createComponentVNode)(2,s)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.dial,s=c.open,d=c.locked,u=function(e,t){return(0,o.createComponentVNode)(2,i.Button,{disabled:s||t&&!d,icon:"arrow-"+(t?"right":"left"),content:(t?"Right":"Left")+" "+e,iconRight:t,onClick:function(){return a(t?"turnleft":"turnright",{num:e})},style:{"z-index":10}})};return(0,o.createComponentVNode)(2,i.Box,{className:"Safe--dialer",children:[(0,o.createComponentVNode)(2,i.Button,{disabled:d,icon:s?"lock":"lock-open",content:s?"Close":"Open",mb:"0.5rem",onClick:function(){return a("open")}}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,i.Box,{position:"absolute",children:[u(50),u(10),u(1)]}),(0,o.createComponentVNode)(2,i.Box,{className:"Safe--dialer--right",position:"absolute",right:"5px",children:[u(1,!0),u(10,!0),u(50,!0)]}),(0,o.createComponentVNode)(2,i.Box,{className:"Safe--dialer--number",children:l})]})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.contents;return(0,o.createComponentVNode)(2,i.Box,{className:"Safe--contents",overflow:"auto",children:c.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{mb:"0.5rem",onClick:function(){return a("retrieve",{index:t+1})},children:[(0,o.createComponentVNode)(2,i.Box,{as:"img",src:e.sprite+".png",verticalAlign:"middle",ml:"-6px",mr:"0.5rem"}),e.name]}),(0,o.createVNode)(1,"br")],4,e)}))})},s=function(e,t){return(0,o.createComponentVNode)(2,i.Section,{className:"Safe--help",title:"Safe opening instructions (because you all keep forgetting)",children:[(0,o.createComponentVNode)(2,i.Box,{children:["1. Turn the dial left to the first number.",(0,o.createVNode)(1,"br"),"2. Turn the dial right to the second number.",(0,o.createVNode)(1,"br"),"3. Continue repeating this process for each number, switching between left and right each time.",(0,o.createVNode)(1,"br"),"4. Open the safe."]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,children:"To lock fully, turn the dial to the left after closing the safe."})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SatelliteControl=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SatelliteControl=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.satellites,d=l.notice,u=l.meteor_shield,p=l.meteor_shield_coverage,m=l.meteor_shield_coverage_max,h=l.meteor_shield_coverage_percentage;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[u&&(0,o.createComponentVNode)(2,i.Section,{title:"Station Shield Coverage",children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:h>=100?"good":"average",value:p,maxValue:m,children:[h," %"]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Satellite Network Control",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[d&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Alert",color:"red",children:l.notice}),s.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"#"+e.id,children:[e.mode," ",(0,o.createComponentVNode)(2,i.Button,{content:e.active?"Deactivate":"Activate",icon:"arrow-circle-right",onClick:function(){return c("toggle",{id:e.id})}})]},e.id)}))]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecureStorage=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SecureStorage=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.emagged,d=l.locked,u=l.l_set,p=l.l_setshort,m=l.current_code,h=function(e){var t=e.buttonValue,n=e.color;return n||(n="default"),(0,o.createComponentVNode)(2,i.Button,{disabled:s||p,type:"button",color:n,onClick:function(){return c("setnumber",{buttonValue:t})},children:t})};return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,i.Flex,{spacing:"1",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:16,shrink:0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Section,{title:"Code Panel",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"1"}),(0,o.createComponentVNode)(2,h,{buttonValue:"2"}),(0,o.createComponentVNode)(2,h,{buttonValue:"3"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"4"}),(0,o.createComponentVNode)(2,h,{buttonValue:"5"}),(0,o.createComponentVNode)(2,h,{buttonValue:"6"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"7"}),(0,o.createComponentVNode)(2,h,{buttonValue:"8"}),(0,o.createComponentVNode)(2,h,{buttonValue:"9"})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,h,{buttonValue:"R",color:"red"}),(0,o.createComponentVNode)(2,h,{buttonValue:"0"}),(0,o.createComponentVNode)(2,h,{buttonValue:"E",color:"green"})]})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Current Status",children:s||p?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lock Status",children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:s?"LOCKING SYSTEM ERROR - 1701":"ALERT: MEMORY SYSTEM ERROR - 6040 201"})}),s?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Code",children:(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"NEW INPUT, ASSHOLE"})}):""]}):(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Secure Code",children:(0,o.createComponentVNode)(2,i.Box,{color:u?"red":"green",children:u?"*****":"NOT SET. ENTER NEW."})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Lock Status",children:(0,o.createComponentVNode)(2,i.Box,{color:d?"red":"green",children:d?"Locked":"Unlocked"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Input Code",children:(0,o.createComponentVNode)(2,i.Box,{children:m||"Waiting for input"})}),(0,o.createComponentVNode)(2,i.Button,{top:".35em",left:".5em",disabled:d,color:"red",content:"Lock",icon:"lock",onClick:function(){return c("close")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SecurityRecords=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(51),l=n(3),s=n(44),d=n(99),u=n(100),p=n(145),m={"*Execute*":"execute","*Arrest*":"arrest",Incarcerated:"incarcerated",Parolled:"parolled",Released:"released",Demote:"demote",Search:"search",Monitor:"monitor"},h=function(e,t){(0,s.modalOpen)(e,"edit",{field:t.edit,value:t.value})};t.SecurityRecords=function(e,t){var n,r=(0,i.useBackend)(t),c=(r.act,r.data),m=c.loginState,h=c.currentPage;return m.logged_in?(1===h?n=(0,o.createComponentVNode)(2,C):2===h?n=(0,o.createComponentVNode)(2,b):3===h&&(n=(0,o.createComponentVNode)(2,V)),(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:[(0,o.createComponentVNode)(2,s.ComplexModal),(0,o.createComponentVNode)(2,l.Window.Content,{scrollable:!0,className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,d.LoginInfo),(0,o.createComponentVNode)(2,p.TemporaryNotice),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,a.Section,{height:"100%",flexGrow:"1",children:n})]})]})):(0,o.createComponentVNode)(2,l.Window,{theme:"security",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{children:(0,o.createComponentVNode)(2,u.LoginScreen)})})};var f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.currentPage,s=c.general;return(0,o.createComponentVNode)(2,a.Tabs,{children:[(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:1===l,onClick:function(){return r("page",{page:1})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"list"}),"List Records"]}),(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:2===l,onClick:function(){return r("page",{page:2})},children:[(0,o.createComponentVNode)(2,a.Icon,{name:"wrench"}),"Record Maintenance"]}),3===l&&s&&!s.empty&&(0,o.createComponentVNode)(2,a.Tabs.Tab,{selected:3===l,children:[(0,o.createComponentVNode)(2,a.Icon,{name:"file"}),"Record: ",s.fields[0].value]})]})},C=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.records,s=(0,i.useLocalState)(t,"searchText",""),d=s[0],u=(s[1],(0,i.useLocalState)(t,"sortId","name")),p=u[0],h=(u[1],(0,i.useLocalState)(t,"sortOrder",!0)),f=h[0];h[1];return(0,o.createComponentVNode)(2,a.Flex,{direction:"column",height:"100%",children:[(0,o.createComponentVNode)(2,N),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",mt:"0.5rem",children:(0,o.createComponentVNode)(2,a.Table,{className:"SecurityRecords__list",children:[(0,o.createComponentVNode)(2,a.Table.Row,{bold:!0,children:[(0,o.createComponentVNode)(2,g,{id:"name",children:"Name"}),(0,o.createComponentVNode)(2,g,{id:"id",children:"ID"}),(0,o.createComponentVNode)(2,g,{id:"rank",children:"Assignment"}),(0,o.createComponentVNode)(2,g,{id:"fingerprint",children:"Fingerprint"}),(0,o.createComponentVNode)(2,g,{id:"status",children:"Criminal Status"})]}),l.filter((0,r.createSearch)(d,(function(e){return e.name+"|"+e.id+"|"+e.rank+"|"+e.fingerprint+"|"+e.status}))).sort((function(e,t){var n=f?1:-1;return e[p].localeCompare(t[p])*n})).map((function(e){return(0,o.createComponentVNode)(2,a.Table.Row,{className:"SecurityRecords__listRow--"+m[e.status],onClick:function(){return c("view",{uid_gen:e.uid_gen,uid_sec:e.uid_sec})},children:[(0,o.createComponentVNode)(2,a.Table.Cell,{children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user"})," ",e.name]}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.id}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.rank}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.fingerprint}),(0,o.createComponentVNode)(2,a.Table.Cell,{children:e.status})]},e.id)}))]})})]})},g=function(e,t){var n=(0,i.useLocalState)(t,"sortId","name"),r=n[0],c=n[1],l=(0,i.useLocalState)(t,"sortOrder",!0),s=l[0],d=l[1],u=e.id,p=e.children;return(0,o.createComponentVNode)(2,a.Table.Cell,{children:(0,o.createComponentVNode)(2,a.Button,{color:r!==u&&"transparent",width:"100%",onClick:function(){r===u?d(!s):(c(u),d(!0))},children:[p,r===u&&(0,o.createComponentVNode)(2,a.Icon,{name:s?"sort-up":"sort-down",ml:"0.25rem;"})]})})},N=function(e,t){var n=(0,i.useBackend)(t),r=n.act,l=n.data.isPrinting,d=(0,i.useLocalState)(t,"searchText",""),u=(d[0],d[1]);return(0,o.createComponentVNode)(2,a.Flex,{children:[(0,o.createComponentVNode)(2,c.FlexItem,{children:[(0,o.createComponentVNode)(2,a.Button,{content:"New Record",icon:"plus",onClick:function(){return r("new_general")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Cell Log",ml:"0.25rem",onClick:function(){return(0,s.modalOpen)(t,"print_cell_log")}})]}),(0,o.createComponentVNode)(2,c.FlexItem,{grow:"1",ml:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by Name, ID, Assignment, Fingerprint, Status",width:"100%",onInput:function(e,t){return u(t)}})})]})},b=function(e,t){var n=(0,i.useBackend)(t).act;return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,a.Button,{disabled:!0,icon:"download",content:"Backup to Disk",tooltip:"This feature is not available.",tooltipPosition:"right"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{disabled:!0,icon:"upload",content:"Upload from Disk",tooltip:"This feature is not available.",tooltipPosition:"right",my:"0.5rem"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Security Records",onClick:function(){return n("delete_security_all")},mb:"0.5rem"}),(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",content:"Delete All Cell Logs",onClick:function(){return n("delete_cell_logs")}})]})},V=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.isPrinting,s=c.general,d=c.security;return s&&s.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Section,{title:"General Data",level:2,mt:"-6px",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:l,icon:l?"spinner":"print",iconSpin:!!l,content:"Print Record",onClick:function(){return r("print_record")}}),(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",tooltip:"WARNING: This will also delete the Security and Medical records associated to this crew member!",tooltipPosition:"bottom-left",content:"Delete Record",onClick:function(){return r("delete_general")}})],4),children:(0,o.createComponentVNode)(2,v)}),(0,o.createComponentVNode)(2,a.Section,{title:"Security Data",level:2,mt:"-12px",buttons:(0,o.createComponentVNode)(2,a.Button.Confirm,{icon:"trash",disabled:d.empty,content:"Delete Record",onClick:function(){return r("delete_security")}}),children:(0,o.createComponentVNode)(2,x)})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},v=function(e,t){var n=(0,i.useBackend)(t).data.general;return n&&n.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{float:"left",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:n.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(""+e.value),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))})}),(0,o.createComponentVNode)(2,a.Box,{position:"absolute",right:"0",textAlign:"right",children:!!n.has_photos&&n.photos.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",textAlign:"center",color:"label",children:[(0,o.createVNode)(1,"img",null,null,1,{src:e,style:{width:"96px","margin-bottom":"0.5rem","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Photo #",t+1]},t)}))})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:"General records lost!"})},x=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data.security;return l&&l.fields?(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList,{children:l.fields.map((function(e,n){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e.field,prewrap:!0,children:[(0,r.decodeHtmlEntities)(e.value),!!e.edit&&(0,o.createComponentVNode)(2,a.Button,{icon:"pen",ml:"0.5rem",mb:e.line_break?"1rem":"initial",onClick:function(){return h(t,e)}})]},n)}))}),(0,o.createComponentVNode)(2,a.Section,{title:"Comments/Log",level:2,buttons:(0,o.createComponentVNode)(2,a.Button,{icon:"comment",content:"Add Entry",onClick:function(){return(0,s.modalOpen)(t,"comment_add")}}),children:0===l.comments.length?(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No comments found."}):l.comments.map((function(e,t){return(0,o.createComponentVNode)(2,a.Box,{prewrap:!0,children:[(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:e.header||"Auto-generated"}),(0,o.createVNode)(1,"br"),e.text||e,(0,o.createComponentVNode)(2,a.Button,{icon:"comment-slash",color:"bad",ml:"0.5rem",onClick:function(){return c("comment_delete",{id:t+1})}})]},t)}))})],4):(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:["Security records lost!",(0,o.createVNode)(1,"br"),(0,o.createComponentVNode)(2,a.Button,{icon:"pen",content:"Create New Record",mt:"0.5rem",onClick:function(){return c("new_security")}})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.SeedExtractor=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(3),l={title:"Seeds",plantName:"Plant",lifespan:"Lifespan",endurance:"Endurance",maturation:"Maturation",production:"Production",yield:"Yield",potency:"Potency",searchTooltip:"Search..",sortByTooltip:"Sort by",dispOneTooltip:"Dispense one",dispAllTooltip:"Dispense all",inStock:"in stock",noContents:"No seeds loaded.",emptySearchResult:"No items matching your criteria was found!"},s={plantName:function(e,t){return e.display_name!==t.display_name?e.display_name>t.display_name?1:-1:0},lifespan:function(e,t){return e.life-t.life},endurance:function(e,t){return e.endr-t.endr},maturation:function(e,t){return e.matr-t.matr},production:function(e,t){return e.prod-t.prod},yield:function(e,t){return e.yld-t.yld},potency:function(e,t){return e.potn-t.potn}};t.SeedExtractor=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data),s=r.total,d=r.capacity,h=r.contents;return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Section,{title:l.title,buttons:(0,o.createComponentVNode)(2,u),m:0,p:0,children:(0,o.createComponentVNode)(2,p,{seedsTotal:s,seedsCapacity:d})}),h?(0,o.createVNode)(1,"div","Divider Divider__noMargin"):(0,o.createComponentVNode)(2,a.NoticeBox,{m:0,children:[" ",l.noContents," "]}),(0,o.createComponentVNode)(2,a.Section,{flexGrow:1,stretchContents:!0,mt:0,children:!!h&&(0,o.createComponentVNode)(2,m)})]})})};var d=function(e,t){var n=e.name,r=e.alpha,c=(0,i.useLocalState)(t,"sort",{field:"plantName",desc:!1}),s=c[0],d=c[1];return(0,o.createComponentVNode)(2,a.Button,{fluid:!0,iconRight:!0,icon:s.field!==n?"":s.desc?r?"sort-alpha-down":"sort-amount-down":r?"sort-alpha-up":"sort-amount-up",color:"transparent",textColor:"white",content:l[n],tooltip:l.sortByTooltip+" "+n.toLowerCase(),tooltipPosition:"bottom",onClick:function(){s.field!==e.name?d({field:n,desc:!1}):d({field:n,desc:!s.desc})}})},u=function(e,t){var n=(0,i.useLocalState)(t,"search",""),r=(n[0],n[1]);return(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",width:"50vw",style:{display:"block"},children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{mx:1,align:"center",children:(0,o.createComponentVNode)(2,a.Icon,{name:"filter"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:l.searchTooltip,width:"100%",onInput:function(e,t){return r(t)}})})]})})},p=function(e,t){var n=e.seedsTotal,r=e.seedsCapacity;return(0,o.createComponentVNode)(2,a.Flex,{direction:"row",textAlign:"center",bold:!0,align:"baseline",mt:0,children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"15vw",children:(0,o.createComponentVNode)(2,d,{name:"plantName",alpha:!0})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"65vw",children:(0,o.createComponentVNode)(2,a.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"lifespan"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"endurance"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"maturation"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"production"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"yield"})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:(0,o.createComponentVNode)(2,d,{name:"potency"})})]})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,color:"average",children:[n,"/",r]})]})},m=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data.contents),d=(0,i.useLocalState)(t,"search",""),u=d[0],p=(d[1],(0,i.useLocalState)(t,"sort",{field:"plantName",desc:!1})),m=p[0],f=(p[1],(0,r.createSearch)(u,(function(e){return e.display_name+e.strain_text}))),C=c.filter(f).sort(s[m.field]);m.desc&&(C=C.reverse());var g=0===C.length;return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:1,children:[!!g&&(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[" ",l.emptySearchResult," "]}),!g&&(0,o.createComponentVNode)(2,a.Box,{className:"SeedExtractor__Contents",children:C.map((function(e){return(0,o.createComponentVNode)(2,h,{displayName:e.display_name,descriptionText:e.strain_text,lifespanVal:e.life,enduranceVal:e.endr,maturationVal:e.life,productionVal:e.prod,yieldVal:e.yld,potencyVal:e.potn,vendIdx:e.vend,pileStock:e.quantity},e.vend)}))})]})},h=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=(n.data,e.key,e.displayName),s=e.descriptionText,d=e.lifespanVal,u=e.enduranceVal,p=e.maturationVal,m=e.productionVal,h=e.yieldVal,f=e.potencyVal,C=e.vendIdx,g=e.pileStock;return(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Flex,{direction:"row",textAlign:"center",className:"SeedExtractor__contents--row",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"15vw",textAlign:"left",bold:!0,children:(0,o.createComponentVNode)(2,a.Box,{m:1,children:c})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:"65vw",py:1,children:(0,o.createVNode)(1,"table",null,[(0,o.createVNode)(1,"tr",null,(0,o.createVNode)(1,"td",null,(0,o.createComponentVNode)(2,a.Flex,{direction:"row",textAlign:"center",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:d}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:u}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:p}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:m}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:h}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,children:f})]}),2),2),(0,o.createVNode)(1,"tr",null,(0,o.createVNode)(1,"td",null,s,0,{style:{"font-size":"90%","padding-top":"0.5em"}}),2)],4,{style:{width:"100%",border:"0"}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{basis:0,grow:1,shrink:1,py:1,children:(0,o.createComponentVNode)(2,a.Flex,{direction:"column",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{color:"good",children:[g," ",l.inStock]}),(0,o.createComponentVNode)(2,a.Flex.Item,{minHeight:"25px",pt:1,children:[(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"1",tooltip:"Dispense one",tooltipPosition:"bottom-left",onClick:function(){return r("vend",{index:C,amount:1})}}),(0,o.createComponentVNode)(2,a.NumberInput,{width:"40px",minValue:0,value:0,maxValue:g,step:1,stepPixelSize:3,onChange:function(e,t){return r("vend",{index:C,amount:t})}}),(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all",tooltipPosition:"bottom-left",onClick:function(){return r("vend",{index:C,amount:g})}})]})]})})]}),(0,o.createComponentVNode)(2,a.Divider)],4)}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsoleContent=t.ShuttleConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ShuttleConsole=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=e.type,u=void 0===s?"shuttle":s,p=e.blind_drop,m=l.authorization_required;return(0,o.createComponentVNode)(2,a.Window,{width:350,height:240,children:[!!m&&(0,o.createComponentVNode)(2,i.Modal,{ml:1,mt:1,width:26,height:12,fontSize:"28px",fontFamily:"monospace",textAlign:"center",children:[(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{mt:2,children:(0,o.createComponentVNode)(2,i.Icon,{name:"minus-circle"})}),(0,o.createComponentVNode)(2,i.Flex.Item,{mt:2,ml:2,color:"bad",children:"shuttle"===u?"SHUTTLE LOCKED":"BASE LOCKED"})]}),(0,o.createComponentVNode)(2,i.Box,{fontSize:"18px",mt:4,children:(0,o.createComponentVNode)(2,i.Button,{lineHeight:"40px",icon:"arrow-circle-right",content:"Request Authorization",color:"bad",onClick:function(){return c("request")}})})]}),(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,d,{type:u,blind_drop:p})})]})};var c=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.id===t})))?void 0:n.name},l=function(e,t){var n;return null==e||null==(n=e.find((function(e){return e.name===t})))?void 0:n.id},s={"In Transit":"good",Idle:"average",Igniting:"average",Recharging:"average",Missing:"bad","Unauthorized Access":"bad",Locked:"bad"},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data,u=e.type,p=e.blind_drop,m=d.status,h=d.locked,f=d.authorization_required,C=d.destination,g=d.docked_location,N=d.timer_str,b=d.locations,V=void 0===b?[]:b;return(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{bold:!0,fontSize:"26px",textAlign:"center",fontFamily:"monospace",children:N||"00:00"}),(0,o.createComponentVNode)(2,i.Box,{textAlign:"center",fontSize:"14px",mb:1,children:[(0,o.createComponentVNode)(2,i.Box,{inline:!0,bold:!0,children:"STATUS:"}),(0,o.createComponentVNode)(2,i.Box,{inline:!0,color:s[m]||"bad",ml:1,children:m||"Not Available"})]}),(0,o.createComponentVNode)(2,i.Section,{title:"shuttle"===u?"Shuttle Controls":"Base Launch Controls",level:2,children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Location",children:g||"Not Available"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Destination",buttons:"shuttle"!==u&&0===V.length&&!!p&&(0,o.createComponentVNode)(2,i.Button,{color:"bad",icon:"exclamation-triangle",disabled:f||!p,content:"Blind Drop",onClick:function(){return a("random")}}),children:0===V.length&&(0,o.createComponentVNode)(2,i.Box,{mb:1.7,color:"bad",children:"Not Available"})||1===V.length&&(0,o.createComponentVNode)(2,i.Box,{mb:1.7,color:"average",children:c(V,C)})||(0,o.createComponentVNode)(2,i.Dropdown,{mb:1.7,over:!0,width:"240px",options:V.map((function(e){return e.name})),disabled:h||f,selected:c(V,C)||"Select a Destination",onSelected:function(e){return a("set_destination",{destination:l(V,e)})}})})]}),(0,o.createComponentVNode)(2,i.Button,{fluid:!0,content:"Depart",disabled:!c(V,C)||h||f||"Idle"!==m,icon:"arrow-up",textAlign:"center",onClick:function(){return a("move",{shuttle_id:C})}})]})]})};t.ShuttleConsoleContent=d},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleManipulator=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ShuttleManipulator=function(e,t){var n=(0,r.useLocalState)(t,"tabIndex",0),d=n[0],u=n[1];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Box,{fillPositionedParent:!0,children:[(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===d,onClick:function(){return u(0)},icon:"info-circle",content:"Status"},"Status"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===d,onClick:function(){return u(1)},icon:"file-import",content:"Templates"},"Templates"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===d,onClick:function(){return u(2)},icon:"tools",content:"Modification"},"Modification")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,c);case 1:return(0,o.createComponentVNode)(2,l);case 2:return(0,o.createComponentVNode)(2,s);default:return"WE SHOULDN'T BE HERE!"}}(d)]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.shuttles;return(0,o.createComponentVNode)(2,i.Box,{children:c.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"ID",children:e.id}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Timer",children:e.timeleft}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Mode",children:e.mode}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shuttle Status",children:e.status}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return a("jump_to",{type:"mobile",id:e.id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Fast Travel",icon:"fast-forward",onClick:function(){return a("fast_travel",{id:e.id})}})]})]})},e.name)}))})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.templates_tabs,s=c.existing_shuttle,d=c.templates;return(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Tabs,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:e===s.id,icon:"file",content:e,onClick:function(){return a("select_template_category",{cat:e})}},e)}))}),!!s&&d[s.id].templates.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[e.description&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:e.description}),e.admin_notes&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Admin Notes",children:e.admin_notes}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{content:"Load Template",icon:"download",onClick:function(){return a("select_template",{shuttle_id:e.shuttle_id})}})})]})},e.name)}))]})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.existing_shuttle,s=c.selected;return(0,o.createComponentVNode)(2,i.Box,{children:[l?(0,o.createComponentVNode)(2,i.Section,{title:"Selected Shuttle: "+l.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Status",children:l.status}),l.timer&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Timer",children:l.timeleft}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:(0,o.createComponentVNode)(2,i.Button,{content:"Jump To",icon:"location-arrow",onClick:function(){return a("jump_to",{type:"mobile",id:l.id})}})})]})}):(0,o.createComponentVNode)(2,i.Section,{title:"Selected Shuttle: None"}),s?(0,o.createComponentVNode)(2,i.Section,{title:"Selected Template: "+s.name,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[s.description&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Description",children:s.description}),s.admin_notes&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Admin Notes",children:s.admin_notes}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Actions",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Preview",icon:"eye",onClick:function(){return a("preview",{shuttle_id:s.shuttle_id})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Load",icon:"download",onClick:function(){return a("load",{shuttle_id:s.shuttle_id})}})]})]})}):(0,o.createComponentVNode)(2,i.Section,{title:"Selected Template: None"})]})}},function(e,t,n){"use strict";t.__esModule=!0,t.Sleeper=void 0;var o=n(0),r=n(15),i=n(1),a=n(2),c=n(3),l=[["good","Alive"],["average","Critical"],["bad","DEAD"]],s=[["Resp.","oxyLoss"],["Toxin","toxLoss"],["Brute","bruteLoss"],["Burn","fireLoss"]],d={average:[.25,.5],bad:[.5,Infinity]},u=["bad","average","average","good","average","average","bad"];t.Sleeper=function(e,t){var n=(0,i.useBackend)(t),r=(n.act,n.data.hasOccupant?(0,o.createComponentVNode)(2,p):(0,o.createComponentVNode)(2,g));return(0,o.createComponentVNode)(2,c.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,c.Window.Content,{className:"Layout__content--flexColumn",children:[r,(0,o.createComponentVNode)(2,f)]})})};var p=function(e,t){var n=(0,i.useBackend)(t);n.act,n.data.occupant;return(0,o.createFragment)([(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,C)],4)},m=function(e,t){var n=(0,i.useBackend)(t),c=n.act,s=n.data,d=s.occupant,p=s.auto_eject_dead;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Box,{color:"label",display:"inline",children:"Auto-eject if dead:\xa0"}),(0,o.createComponentVNode)(2,a.Button,{icon:p?"toggle-on":"toggle-off",selected:p,content:p?"On":"Off",onClick:function(){return c("auto_eject_dead_"+(p?"off":"on"))}}),(0,o.createComponentVNode)(2,a.Button,{icon:"user-slash",content:"Eject",onClick:function(){return c("ejectify")}})],4),children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Name",children:d.name}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Health",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d.maxHealth,value:d.health/d.maxHealth,ranges:{good:[.5,Infinity],average:[0,.5],bad:[-Infinity,0]},children:(0,r.round)(d.health,0)})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Status",color:l[d.stat][0],children:l[d.stat][1]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d.maxTemp,value:d.bodyTemperature/d.maxTemp,color:u[d.temperatureSuitability+3],children:[(0,r.round)(d.btCelsius,0),"\xb0C,",(0,r.round)(d.btFaren,0),"\xb0F"]})}),!!d.hasBlood&&(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Blood Level",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d.bloodMax,value:d.bloodLevel/d.bloodMax,ranges:{bad:[-Infinity,.6],average:[.6,.9],good:[.6,Infinity]},children:[d.bloodPercent,"%, ",d.bloodLevel,"cl"]})}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Pulse",verticalAlign:"middle",children:[d.pulse," BPM"]})],4)]})})},h=function(e,t){var n=(0,i.useBackend)(t).data.occupant;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Damage",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:s.map((function(e,t){return(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:e[0],children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:"100",value:n[e[1]]/100,ranges:d,children:(0,r.round)(n[e[1]],0)},t)},t)}))})})},f=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.hasOccupant,s=c.isBeakerLoaded,d=c.beakerMaxSpace,u=c.beakerFreeSpace,p=c.dialysis&&u>0;return(0,o.createComponentVNode)(2,a.Section,{title:"Dialysis",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,a.Button,{disabled:!s||u<=0||!l,selected:p,icon:p?"toggle-on":"toggle-off",content:p?"Active":"Inactive",onClick:function(){return r("togglefilter")}}),(0,o.createComponentVNode)(2,a.Button,{disabled:!s,icon:"eject",content:"Eject",onClick:function(){return r("removebeaker")}})],4),children:s?(0,o.createComponentVNode)(2,a.LabeledList,{children:(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Remaining Space",children:(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d,value:u/d,ranges:{good:[.5,Infinity],average:[.25,.5],bad:[-Infinity,.25]},children:[u,"u"]})})}):(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No beaker loaded."})})},C=function(e,t){var n=(0,i.useBackend)(t),r=n.act,c=n.data,l=c.occupant,s=c.chemicals,d=c.maxchem,u=c.amounts;return(0,o.createComponentVNode)(2,a.Section,{title:"Occupant Chemicals",flexGrow:"1",children:s.map((function(e,t){var n,i="";return e.overdosing?(i="bad",n=(0,o.createComponentVNode)(2,a.Box,{color:"bad",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-circle"}),"\xa0 Overdosing!"]})):e.od_warning&&(i="average",n=(0,o.createComponentVNode)(2,a.Box,{color:"average",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"exclamation-triangle"}),"\xa0 Close to overdosing"]})),(0,o.createComponentVNode)(2,a.Box,{backgroundColor:"rgba(0, 0, 0, 0.33)",mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Section,{title:e.title,level:"3",mx:"0",lineHeight:"18px",buttons:n,children:(0,o.createComponentVNode)(2,a.Flex,{align:"flex-start",children:[(0,o.createComponentVNode)(2,a.ProgressBar,{min:"0",max:d,value:e.occ_amount/d,color:i,title:"Amount of chemicals currently inside the occupant / Total amount injectable by this machine",mr:"0.5rem",children:[e.pretty_amount,"/",d,"u"]}),u.map((function(t,n){return(0,o.createComponentVNode)(2,a.Button,{disabled:!e.injectable||e.occ_amount+t>d||2===l.stat,icon:"syringe",content:"Inject "+t+"u",title:"Inject "+t+"u of "+e.title+" into the occupant",mb:"0",height:"19px",onClick:function(){return r("chemical",{chemid:e.id,amount:t})}},n)}))]})})},t)}))})},g=function(e,t){return(0,o.createComponentVNode)(2,a.Section,{textAlign:"center",flexGrow:"1",children:(0,o.createComponentVNode)(2,a.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,a.Icon,{name:"user-slash",mb:"0.5rem",size:"5"}),(0,o.createVNode)(1,"br"),"No occupant detected."]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SlotMachine=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SlotMachine=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,s=c.data;return null===s.money?(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"Could not scan your card or could not find account!"}),(0,o.createComponentVNode)(2,i.Box,{children:"Please wear or hold your ID and try again."})]})})}):(n=1===s.plays?s.plays+" player has tried their luck today!":s.plays+" players have tried their luck today!",(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Box,{lineHeight:2,children:n}),(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Credits Remaining",children:(0,o.createComponentVNode)(2,i.AnimatedNumber,{value:s.money})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"50 credits to spin",children:(0,o.createComponentVNode)(2,i.Button,{icon:"coins",disabled:s.working,content:s.working?"Spinning...":"Spin",onClick:function(){return l("spin")}})})]}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,lineHeight:2,color:s.resultlvl,children:s.result})]})})}))}},function(e,t,n){"use strict";t.__esModule=!0,t.Smartfridge=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Smartfridge=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.secure,d=l.can_dry,u=l.drying,p=l.contents;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[!!s&&(0,o.createComponentVNode)(2,i.Section,{title:"Secure",children:(0,o.createComponentVNode)(2,i.NoticeBox,{children:"Secure Access: Please have your identification ready."})}),!!d&&(0,o.createComponentVNode)(2,i.Section,{title:"Drying rack",children:(0,o.createComponentVNode)(2,i.Button,{icon:u?"power-off":"times",content:u?"On":"Off",selected:u,onClick:function(){return c("drying")}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Contents",children:[!p&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:" No products loaded. "}),!!p&&p.map((function(e){return(0,o.createComponentVNode)(2,i.Flex,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"45%",children:e.display_name}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"25%",children:["(",e.quantity," in stock)"]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"30%",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",tooltip:"Dispense one.",content:"1",onClick:function(){return c("vend",{index:e.vend,amount:1})}}),(0,o.createComponentVNode)(2,i.NumberInput,{width:"40px",minValue:0,value:0,maxValue:e.quantity,step:1,stepPixelSize:3,onChange:function(t,n){return c("vend",{index:e.vend,amount:n})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"arrow-down",content:"All",tooltip:"Dispense all. ",onClick:function(){return c("vend",{index:e.vend,amount:e.quantity})}})]})]},e)}))]})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Smes=void 0;var o=n(0),r=n(1),i=n(2),a=n(102),c=n(3);t.Smes=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.capacityPercent,u=(s.capacity,s.charge),p=s.inputAttempt,m=s.inputting,h=s.inputLevel,f=s.inputLevelMax,C=s.inputAvailable,g=s.outputAttempt,N=s.outputting,b=s.outputLevel,V=s.outputLevelMax,v=s.outputUsed,x=(d>=100?"good":m&&"average")||"bad",y=(N?"good":u>0&&"average")||"bad";return(0,o.createComponentVNode)(2,c.Window,{children:(0,o.createComponentVNode)(2,c.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Stored Energy",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:.01*d,ranges:{good:[.5,Infinity],average:[.15,.5],bad:[-Infinity,.15]}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Input",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Charge Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:p?"sync-alt":"times",selected:p,onClick:function(){return l("tryinput")},children:p?"Auto":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:x,children:(d>=100?"Fully Charged":m&&"Charging")||"Not Charging"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Input",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===h,onClick:function(){return l("input",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===h,onClick:function(){return l("input",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:h/1e3,fillValue:C/1e3,minValue:0,maxValue:f/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onChange:function(e,t){return l("input",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:h===f,onClick:function(){return l("input",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:h===f,onClick:function(){return l("input",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Available",children:(0,a.formatPower)(C)})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Output",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Output Mode",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:g?"power-off":"times",selected:g,onClick:function(){return l("tryoutput")},children:g?"On":"Off"}),children:(0,o.createComponentVNode)(2,i.Box,{color:y,children:N?"Sending":u>0?"Not Sending":"No Charge"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Target Output",children:(0,o.createComponentVNode)(2,i.Flex,{inline:!0,width:"100%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:0===b,onClick:function(){return l("output",{target:"min"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"backward",disabled:0===b,onClick:function(){return l("output",{adjust:-1e4})}})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,mx:1,children:(0,o.createComponentVNode)(2,i.Slider,{value:b/1e3,minValue:0,maxValue:V/1e3,step:5,stepPixelSize:4,format:function(e){return(0,a.formatPower)(1e3*e,1)},onChange:function(e,t){return l("output",{target:1e3*t})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"forward",disabled:b===V,onClick:function(){return l("output",{adjust:1e4})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:b===V,onClick:function(){return l("output",{target:"max"})}})]})]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Outputting",children:(0,a.formatPower)(v)})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SolarControl=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SolarControl=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.generated,d=l.generated_ratio,u=l.tracking_state,p=l.tracking_rate,m=l.connected_panels,h=l.connected_tracker,f=l.cdir,C=l.direction,g=l.rotating_direction;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Scan for new hardware",onClick:function(){return c("refresh")}}),children:(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,i.Grid.Column,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Solar tracker",color:h?"good":"bad",children:h?"OK":"N/A"}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Solar panels",color:m>0?"good":"bad",children:m})]})}),(0,o.createComponentVNode)(2,i.Grid.Column,{size:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Power output",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[.66,Infinity],average:[.33,.66],bad:[-Infinity,.33]},minValue:0,maxValue:1,value:d,children:s+" W"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Panel orientation",children:[f,"\xb0 (",C,")"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tracker rotation",children:[2===u&&(0,o.createComponentVNode)(2,i.Box,{children:" Automated "}),1===u&&(0,o.createComponentVNode)(2,i.Box,{children:[" ",p,"\xb0/h (",g,") "]}),0===u&&(0,o.createComponentVNode)(2,i.Box,{children:" Tracker offline "})]})]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Controls",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Panel orientation",children:[2!==u&&(0,o.createComponentVNode)(2,i.NumberInput,{unit:"\xb0",step:1,stepPixelSize:1,minValue:0,maxValue:359,value:f,onDrag:function(e,t){return c("cdir",{cdir:t})}}),2===u&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"19px",children:" Automated "})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tracker status",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"times",content:"Off",selected:0===u,onClick:function(){return c("track",{track:0})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"clock-o",content:"Timed",selected:1===u,onClick:function(){return c("track",{track:1})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Auto",selected:2===u,disabled:!h,onClick:function(){return c("track",{track:2})}})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tracker rotation",children:[1===u&&(0,o.createComponentVNode)(2,i.NumberInput,{unit:"\xb0/h",step:1,stepPixelSize:1,minValue:-7200,maxValue:7200,value:p,format:function(e){return(Math.sign(e)>0?"+":"-")+Math.abs(e)},onDrag:function(e,t){return c("tdir",{tdir:t})}}),0===u&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"19px",children:" Tracker offline "}),2===u&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"19px",children:" Automated "})]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SpawnersMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SpawnersMenu=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.spawners||[];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{children:l.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{mb:.5,title:e.name+" ("+e.amount_left+" left)",level:2,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-circle-right",content:"Jump",onClick:function(){return c("jump",{ID:e.uids})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-circle-right",content:"Spawn",onClick:function(){return c("spawn",{ID:e.uids})}})],4),children:[(0,o.createComponentVNode)(2,i.Box,{style:{"white-space":"pre-wrap"},mb:1,fontSize:"16px",children:e.desc}),!!e.fluff&&(0,o.createComponentVNode)(2,i.Box,{style:{"white-space":"pre-wrap"},textColor:"#878787",fontSize:"14px",children:e.fluff}),!!e.important_info&&(0,o.createComponentVNode)(2,i.Box,{style:{"white-space":"pre-wrap"},mt:1,bold:!0,color:"red",fontSize:"18px",children:e.important_info})]},e.name)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ShuttleConsole=t.SpiderOS=void 0;var o=n(0),r=n(1),i=n(2),a=n(52),c=n(3);t.SpiderOS=function(e,t){var n,a=(0,r.useBackend)(t),f=a.act,C=a.data;return 0===C.suit_tgui_state?n=(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:1,children:[(0,o.createComponentVNode)(2,i.Flex,{direction:"column",width:"60%",children:[(0,o.createComponentVNode)(2,i.Flex.Item,{backgroundColor:"rgba(0, 0, 0, 0)",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,i.Flex.Item,{mt:2.2,backgroundColor:"rgba(0, 0, 0, 0)",children:(0,o.createComponentVNode)(2,p)})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"40%",height:"190px",grow:1,backgroundColor:"rgba(0, 0, 0, 0)",children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s)]})]}):1===C.suit_tgui_state&&(n=(0,o.createComponentVNode)(2,i.Flex,{width:"100%",height:"100%",direction:"column",shrink:1,spacing:1,children:(0,o.createComponentVNode)(2,i.Flex.Item,{backgroundColor:"rgba(0, 0, 0, 0.8)",height:"100%",children:[(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,h,{allMessages:C.current_load_text,finishedTimeout:3e3,current_initialisation_phase:C.current_initialisation_phase,end_terminal:C.end_terminal,onFinished:function(){return f("set_UI_state",{suit_tgui_state:0})}})]})})),(0,o.createComponentVNode)(2,c.Window,{theme:"spider_clan",children:(0,o.createComponentVNode)(2,c.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",spacing:1,children:n})})})};var l=function(e,t){var n=(0,r.useBackend)(t).data,a=n.allStylesPreview,c=n.style_preview_icon_state;return(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043e\u0441\u0442\u044e\u043c\u0430",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u0432\u0438\u0434\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u0442\u044e\u043c\u0430! \u041d\u0430\u0448\u0438 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0442 \u0432\u0430\u043c \u043f\u043e\u0434\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c \u043f\u043e\u0434 \u0441\u0435\u0431\u044f, \u043f\u0440\u0438 \u044d\u0442\u043e\u043c \u043d\u0435 \u0442\u0435\u0440\u044f\u044f \u043e\u0431\u043e\u0440\u043e\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0430\u0447\u0435\u0441\u0442\u0432. \u041f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u043e \u043f\u0440\u0438 \u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u043a\u043e\u0441\u0442\u044e\u043c\u0430, \u0436\u0438\u0437\u043d\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0443\u0431\u0438\u0439\u0446\u044b.",tooltipPosition:"bottom-left"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",grow:1,alignContent:"center",children:(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.Section,{style:{background:"rgba(4, 74, 27, 0.75)"},mr:10,ml:10,children:(0,o.createVNode)(1,"img",null,null,1,{height:"128px",width:"128px",src:"data:image/jpeg;base64,"+a[c],style:{"margin-left":"0px","-ms-interpolation-mode":"nearest-neighbor"}})})})})})},s=function(e,t){var n,a,c,l,s=(0,r.useBackend)(t),d=s.act,u=s.data,p=u.designs,m=u.design_choice,h=u.scarf_design_choice,f=u.colors,C=u.color_choice,g=u.genders,N=u.preferred_clothes_gender,b=u.suit_state,V=u.preferred_scarf_over_hood,v=u.show_charge_UI,x=u.has_martial_art,y=u.show_concentration_UI;return n=0===b?"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c":"\u0414\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c",a=0===V?"\u041a\u0430\u043f\u044e\u0448\u043e\u043d":"\u0428\u0430\u0440\u0444",c=1===V?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0421\u0442\u0438\u043b\u044c \u0448\u0430\u0440\u0444\u0430",content:(0,o.createComponentVNode)(2,i.Dropdown,{options:p,selected:h,onSelected:function(e){return d("set_scarf_design",{scarf_design_choice:e})}})}):null,l=x?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0446\u0438\u044f",content:(0,o.createComponentVNode)(2,i.Box,{children:[(0,o.createComponentVNode)(2,i.Button,{selected:y,width:"78px",textAlign:"left",content:y?"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c":"\u0421\u043a\u0440\u044b\u0442\u044c",onClick:function(){return d("toggle_ui_concentration")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",content:"?",tooltip:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043b\u0438 \u0432\u044b \u0434\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0431\u043e\u0435\u0432\u043e\u0433\u043e \u0438\u0441\u0441\u043a\u0443\u0441\u0442\u0432\u0430.",tooltipPosition:"top-left"})]})}):null,(0,o.createComponentVNode)(2,i.Flex,{direction:"row",grow:1,alignContent:"center",ml:.5,children:(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,width:"100%",children:[(0,o.createComponentVNode)(2,i.NoticeBox,{success:0,danger:0,align:"center",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0421\u0442\u0438\u043b\u044c",children:(0,o.createComponentVNode)(2,i.Dropdown,{options:p,selected:m,onSelected:function(e){return d("set_design",{design_choice:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0426\u0432\u0435\u0442",children:(0,o.createComponentVNode)(2,i.Dropdown,{options:f,selected:C,onSelected:function(e){return d("set_color",{color_choice:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0416\u0435\u043d\u0441\u043a\u0438\u0439/\u041c\u0443\u0436\u0441\u043a\u043e\u0439",children:(0,o.createComponentVNode)(2,i.Dropdown,{options:g,selected:N,onSelected:function(e){return d("set_gender",{preferred_clothes_gender:e})}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0428\u0430\u0440\u0444/\u041a\u0430\u043f\u044e\u0448\u043e\u043d",children:[(0,o.createComponentVNode)(2,i.Button,{className:0===b?"":"Button_disabled",width:"78px",selected:V,disabled:b,textAlign:"left",content:a,onClick:function(){return d("toggle_scarf")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",content:"?",tooltip:'\u0421 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u043e\u0439 "\u0428\u0430\u0440\u0444" \u0432\u0430\u0448 \u043a\u0430\u043f\u044e\u0448\u043e\u043d \u0431\u043e\u043b\u044c\u0448\u0435 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u043e\u043b\u043e\u0441\u044b. \u041d\u043e \u044d\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0430\u0448\u0430 \u0433\u043e\u043b\u043e\u0432\u0430 \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u0430! \u0410\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u044b\u0435 \u043d\u0430\u043d\u043e-\u0432\u043e\u043b\u043e\u043a\u043d\u0430 \u043a\u043e\u0441\u0442\u044e\u043c\u0430 \u0432\u0441\u0451 \u0435\u0449\u0451 \u0440\u0435\u0430\u0433\u0438\u0440\u0443\u044e\u0442 \u043d\u0430 \u043f\u043e\u0442\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0435 \u0443\u0433\u0440\u043e\u0437\u044b \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u044f \u0432\u0430\u0448\u0443 \u0433\u043e\u043b\u043e\u0432\u0443! \u0423\u0442\u043e\u0447\u043d\u0435\u043d\u0438\u0435: \u043d\u0430\u043d\u043e\u0432\u043e\u043b\u043e\u043a\u043d\u0430 \u0442\u0430\u043a \u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0443 \u0433\u043e\u043b\u043e\u0432\u0443 \u0438 \u043e\u0442 \u0434\u0440\u0443\u0433\u0438\u0445 \u0433\u043e\u043b\u043e\u0432\u043d\u044b\u0445 \u0443\u0431\u043e\u0440\u043e\u0432 \u0441 \u0446\u0435\u043b\u044c\u044e \u0443\u043c\u0435\u043d\u044c\u0448\u0435\u043d\u0438\u044f \u043f\u043e\u043c\u0435\u0445 \u0432 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u0435.',tooltipPosition:"top-left"})]}),c,(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0417\u0430\u0440\u044f\u0434 \u043a\u043e\u0441\u0442\u044e\u043c\u0430",children:[(0,o.createComponentVNode)(2,i.Button,{selected:v,width:"78px",textAlign:"left",content:v?"\u041f\u043e\u043a\u0430\u0437\u0430\u0442\u044c":"\u0421\u043a\u0440\u044b\u0442\u044c",onClick:function(){return d("toggle_ui_charge")}}),(0,o.createComponentVNode)(2,i.Button,{textAlign:"center",content:"?",tooltip:"\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441\u0430 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0433\u043e \u0437\u0430\u0440\u044f\u0434 \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u0442\u044e\u043c\u0430.",tooltipPosition:"top-left"})]}),l]})}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_"+C,success:0,danger:0,mt:-1.2,align:"center",children:(0,o.createComponentVNode)(2,i.Button,{width:"80%",icon:"power-off",mt:.5,textAlign:"center",content:n,tooltip:"\u041f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043a\u043e\u0441\u0442\u044e\u043c \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f \u043a \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u044e \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0432 \u043d\u0451\u043c \u0437\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0445. \n\u0423\u0447\u0442\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0441\u0442\u0438 \u043b\u044e\u0431\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438, \u043a\u043e\u0433\u0434\u0430 \u043a\u043e\u0441\u0442\u044e\u043c \u0431\u0443\u0434\u0435\u0442 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d. \n\u0422\u0430\u043a \u0436\u0435 \u0432\u043a\u043b\u044e\u0447\u0451\u043d\u043d\u044b\u0439 \u043a\u043e\u0441\u0442\u044e\u043c \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u043e \u043f\u043e\u0442\u0440\u0435\u0431\u043b\u044f\u0435\u0442 \u0437\u0430\u0440\u044f\u0434 \u0434\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u0441\u0435\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u043c\u043e\u0434\u0443\u043b\u0435\u0439. \n\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u0441\u0442\u044e\u043c \u043d\u0435\u043b\u044c\u0437\u044f \u0441\u043d\u044f\u0442\u044c \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u043f\u043e\u043a\u0430 \u043e\u043d \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u043d. \n\u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0440\u043e\u0432\u043d\u043e \u043a\u0430\u043a \u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u0441\u0442\u044e\u043c\u0430 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u043c\u043d\u043e\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041f\u043e\u0434\u0443\u043c\u0430\u0439\u0442\u0435 \u0434\u0432\u0430\u0436\u0434\u044b \u043f\u0440\u0435\u0436\u0434\u0435, \u0447\u0435\u043c \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0435\u0433\u043e \u043d\u0430 \u0442\u0435\u0440\u0440\u0438\u0442\u043e\u0440\u0438\u0438 \u0432\u0440\u0430\u0433\u0430!",tooltipPosition:"top-left",onClick:function(){return d("initialise_suit")}})})]})})},d=function(e,t){var n=(0,r.useBackend)(t).data.allActionsPreview;return(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u043e\u0432\u0435\u0442\u044b \u0438 \u043f\u043e\u0434\u0441\u043a\u0430\u0437\u043a\u0438",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041c\u043e\u043b\u043e\u0434\u044b\u043c \u0443\u0431\u0438\u0439\u0446\u0430\u043c \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u043b\u0435\u0433\u043a\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0435\u0432\u044b\u0445 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445, \u0434\u0430\u0436\u0435 \u043f\u043e\u0441\u043b\u0435 \u0438\u043d\u0442\u0435\u043d\u0441\u0438\u0432\u043d\u044b\u0445 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u043a. \n\u042d\u0442\u043e\u0442 \u0440\u0430\u0437\u0434\u0435\u043b \u043f\u0440\u0438\u0437\u0432\u0430\u043d \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u0441\u043e\u0432\u0435\u0442\u0430\u043c\u0438 \u043f\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0447\u0430\u0441\u0442\u043e \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0449\u0438\u043c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c \u043a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u043c\u0438\u0441\u0441\u0438\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0430\u043c \u0432\u044b\u0434\u0430\u0434\u0443\u0442 \u0438\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e \u043c\u0430\u043b\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043e\u0431\u0435\u0440\u043d\u0443\u0442\u044c \u0432 \u0441\u0432\u043e\u044e \u043f\u043e\u043b\u044c\u0437\u0443.",tooltipPosition:"bottom-left"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"column",grow:1,alignContent:"center",children:(0,o.createComponentVNode)(2,i.Flex.Item,{direction:"row",children:[(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ninja_teleport,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0422\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u044f \u0438 \u0448\u0430\u0442\u0442\u043b",content:"\u0412 \u0432\u0430\u0448\u0435\u043c \u0414\u043e\u0434\u0437\u0451 \u0435\u0441\u0442\u044c \u043b\u0438\u0447\u043d\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u0438 \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0422\u043e\u0447\u043a\u0430 \u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0430\u044f, \u043d\u043e \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442 \u0438\u0434\u0451\u0442 \u043d\u0430 \u0442\u0435\u0445\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0442\u043e\u043d\u043d\u0435\u043b\u0438 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438\u043b\u0438 \u043c\u0430\u043b\u043e\u043f\u043e\u0441\u0435\u0449\u0430\u0435\u043c\u044b\u0435 \u043c\u0435\u0441\u0442\u0430. \n\u042d\u0442\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0431\u044b\u0441\u0442\u0440\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u043d\u0438\u044f. \n\u041f\u043e\u043b\u044c\u0437\u0443\u044f\u0441\u044c \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u043b\u0435\u0440\u043e\u043c \u0448\u0430\u0442\u0442\u043b\u0430, \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u0438\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u043a \u0441\u0435\u0431\u0435 \u0438 \u0432\u0435\u0440\u043d\u0443\u0442\u044c\u0441\u044f \u043d\u0430\u0437\u0430\u0434. \n\u0422\u0430\u043a \u0436\u0435 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0435\u0441\u043b\u0438 \u0432\u044b \u0440\u0435\u0448\u0438\u0442\u0435 \u043f\u043e\u043b\u0435\u0442\u0435\u0442\u044c \u043d\u0430 \u0448\u0430\u0442\u0442\u043b\u0435, \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c \u0432\u0430\u043c, \u0447\u0442\u043e \u0432\u043e \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438\u043b\u0438 \u043a\u0440\u0430\u0436\u0438 \u0448\u0430\u0442\u0442\u043b\u0430 \u0438 \u043f\u043e\u043f\u0430\u0434\u0430\u043d\u0438\u044f \u043d\u0430 \u0432\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u043f\u043e\u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u043b\u0438\u0446, \u043e\u0442\u043b\u0438\u0447\u043d\u043e\u0439 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u043e\u0437\u0432\u0430\u0442\u044c \u0435\u0433\u043e.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.headset_green,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0430\u0448 \u043d\u0430\u0443\u0448\u043d\u0438\u043a",content:"\u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0438 \u043e\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u043d\u0430\u0443\u0448\u043d\u0438\u043a\u043e\u0432 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0439, \u043d\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0441\u043e\u0437\u0434\u0430\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043c\u043e\u0449\u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u0438. \u0412 \u043d\u0435\u0433\u043e \u0432\u0441\u0442\u0440\u043e\u0435\u043d \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u043a\u0430\u043d\u0430\u043b \u0434\u043b\u044f \u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0441 \u0432\u0430\u0448\u0438\u043c \u0431\u043e\u0440\u0433\u043e\u043c \u0438\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0447\u043b\u0435\u043d\u0430\u043c\u0438 \u043a\u043b\u0430\u043d\u0430. \n\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043e\u043d \u0441\u043f\u043e\u0441\u043e\u0431\u0435\u043d \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0440\u0443\u0433\u0438\u0435 \u043d\u0430\u0443\u0448\u043d\u0438\u043a\u0438 \u0438 \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u0435 \u0434\u043b\u044f \u043f\u0440\u043e\u0441\u043b\u0443\u0448\u043a\u0438 \u0438/\u0438\u043b\u0438 \u0440\u0430\u0437\u0433\u043e\u0432\u043e\u0440\u0430 \u043a\u0430\u043d\u0430\u043b\u044b \u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0439. \u0411\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u043e\u043c\u0443 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u043d\u0430\u043a\u0430\u043f\u043b\u0438\u0432\u0430\u0442\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0432\u0430\u043c \u043c\u0435\u0441\u0442\u043d\u044b\u0435 \u043a\u0430\u043d\u0430\u043b\u044b \u0441\u0432\u044f\u0437\u0438 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u043b\u044e\u0431\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \n\u0422\u0430\u043a \u0436\u0435 \u0432\u0430\u0448 \u043d\u0430\u0443\u0448\u043d\u0438\u043a \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438- \u0447\u0435\u0441\u043a\u0438 \u0443\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0438 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u0431\u0438\u043d\u0430\u0440\u043d\u044b\u0435 \u0441\u0438\u0433\u043d\u0430\u043b\u044b \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c\u044b\u0435 \u0441\u0438\u043d\u0442\u0435\u0442\u0438\u043a\u0430\u043c\u0438 \u043f\u0440\u0438 \u043e\u0431\u0449\u0435\u043d\u0438\u0438 \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044f \u0432\u0430\u043c \u0441\u0430\u043c\u0438\u043c \u043e\u0431\u0449\u0430\u0442\u044c\u0441\u044f \u0441 \u043d\u0438\u043c\u0438.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ninja_sleeper,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041f\u043e\u0445\u0438\u0449\u0435\u043d\u0438\u0435 \u044d\u043a\u0438\u043f\u0430\u0436\u0430",content:"\u041f\u043e\u0440\u043e\u0439 \u043a\u043b\u0430\u043d\u0443 \u043d\u0443\u0436\u043d\u044b \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u043e\u0431\u043b\u0430\u0434\u0430\u0442\u044c \u043b\u044e\u0434\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0449\u0438\u0435 \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0435 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0412 \u0442\u0430\u043a\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0432\u0430\u043c \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u0441\u044f \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u043e \u043e\u0441\u043e\u0431\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0441\u043a\u0430\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u0443\u0436\u043e\u0433\u043e \u0440\u0430\u0437\u0443\u043c\u0430. \u0414\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0435 \u0443\u0434\u0430\u0441\u0442\u0441\u044f \u043d\u0430\u0439\u0442\u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e\u0449\u0435\u0433\u043e \u0432\u0441\u0435\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439 \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043f\u043e \u043a\u0440\u0443\u043f\u0438\u0446\u0430\u043c \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u044f \u043f\u043e\u0445\u0438\u0449\u0430\u0442\u044c \u043b\u044e\u0434\u0435\u0439. \n\u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u043f\u043e\u0445\u0438- \u0442\u0438\u0442\u044c \u043b\u044e\u0434\u0435\u0439. \u0423 \u0432\u0430\u0441 \u043d\u0430 \u0448\u0430\u0442\u0442\u043b\u0435 \u0435\u0441\u0442\u044c \u0441\u043a\u0430\u0444\u0430\u043d\u0434\u0440\u044b, \u0430 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0437\u0430\u043f\u0430\u0441 \u043d\u0430- \u0440\u0443\u0447\u043d\u0438\u043a\u043e\u0432, \u043a\u0438\u0441\u043b\u043e\u0440\u043e\u0434\u0430 \u0438 \u0431\u0430\u043b\u043b\u043e- \u043d\u043e\u0432. \n\u0422\u0430\u043a \u0436\u0435 \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u044f\u0442\u044c \u0432 \u043b\u044e\u0434\u0435\u0439 \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0438\u043c\u043f\u0443\u043b\u044c\u0441, \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u0441\u0442\u0430\u043d\u044f \u0438\u0445 \u043d\u0430 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u044f. ",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ai_face,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0430\u0431\u043e\u0442\u0430\u0436 \u0418\u0418",content:"\u0418\u043d\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0437\u0430\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u0441\u0430\u0431\u043e- \u0442\u0430\u0436 \u0418\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u043b\u043b\u0435\u043a\u0442\u0430 \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0430\u0445 \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u0440\u043e- \u0446\u0435\u0441\u0441 \u0441\u043b\u043e\u0436\u043d\u044b\u0439 \u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0449\u0438\u0439 \u043e\u0442 \u043d\u0430\u0441 \u043e\u0441\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0438. \n\u041f\u0440\u0435\u0434\u043f\u043e\u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043a\u043b\u0430\u043d\u043e\u043c \u043c\u0435\u0442\u043e\u0434 \u044d\u0442\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u0440\u044f\u043c\u043e \u0432 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439 \u0434\u043b\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u044e\u0449\u0435\u0439 \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0418\u0418 \u0438\u0437 \u0441\u0442\u0440\u043e\u044f. \u0412 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0435\u0440\u0435\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0418\u0418 \u0430\u0431\u0441\u0443\u0440\u0434\u043d\u044b\u043c\u0438 \u0437\u0430\u043a\u043e\u043d\u0430\u043c\u0438, \u043d\u043e \u044d\u0442\u043e \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043d\u0430\u0441 \u0432 \u0442\u043e\u043c \u043f\u043b\u0430\u043d\u0435, \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u0437\u043b\u043e\u043c\u0430 \u0432 \u0438\u0442\u043e\u0433\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0442 \u0442\u043e\u043b\u044c\u043a\u043e \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0432 \u0441\u0430\u043c\u043e\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u043e\u0439. \u0422\u0430\u043a \u0436\u0435 \u0432\u0437\u043b\u043e\u043c \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435\u043b\u0451\u0433\u043a\u0430\u044f - \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u0435\u0441\u0442\u044c \u0432\u0435\u0437\u0434\u0435. \u0410 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f. \u041d\u0435 \u0443\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435\u0441\u044c \u0435\u0441\u043b\u0438 \u0418\u0418 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0442\u0438\u0432\u043e\u0434\u0435\u0439\u0441\u0442- \u0432\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u043f\u044b\u0442\u043a\u0430\u043c \u0435\u0433\u043e \u0441\u043b\u043e\u043c\u0430\u0442\u044c.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.ninja_borg,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0430\u0431\u043e\u0442\u0430\u0436 \u0440\u043e\u0431\u043e\u0442\u043e\u0432",content:'\u0418\u043d\u043e\u0433\u0434\u0430 \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u044f \u0432\u0430\u0448\u0438 \u0448\u0430\u043d\u0441\u044b \u043d\u0430 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043c\u0438\u0441\u0441\u0438\u0438 \u0434\u043b\u044f \u0438\u0445 \u0443\u0432\u0435\u043b\u0438\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0430\u0445, \u0447\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u043e\u0431\u043e\u0442\u043e\u0432 \u0434\u043b\u044f \u0441\u0432\u043e\u0438\u0445 \u0446\u0435\u043b\u0435\u0439, \u043c\u044b \u0434\u0430\u0451\u043c \u0432\u0430\u043c \u043e\u0441\u043e\u0431\u044b\u0439 "\u0423\u043b\u0443\u0447\u0448\u0430\u044e\u0449\u0438\u0439" \u0438\u0445 \u043f\u0440\u0438\u0431\u043e\u0440, \u0432\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u044b\u0439 \u0432 \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0438. \n\u041f\u0440\u0438 \u0432\u0437\u043b\u043e\u043c\u0435 \u043a\u0438\u0431\u043e\u0440\u0433\u0430 \u0442\u0430\u043a\u0438\u043c \u043f\u0440\u0438\u0431\u043e\u0440\u043e\u043c(\u0412\u0437\u043b\u043e\u043c \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0440\u0435\u043c\u044f) \u0432\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u0435 \u043b\u043e\u044f\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u043d\u0443 \u0438 \u0432\u0430\u043c \u043b\u0438\u0447\u043d\u043e \u0441\u043b\u0443\u0433\u0443 \u0441\u043f\u043e\u0441\u043e\u0431- \u043d\u043e\u0433\u043e \u043d\u0430 \u043e\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u0430\u043a \u0432 \u0441\u0430\u0431\u043e\u0442\u0430\u0436\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0442\u0430\u043a \u0438 \u0432 \u0432\u0430\u0448\u0435\u043c \u043b\u0435\u0447\u0435\u043d\u0438\u0438. \n\u0422\u0430\u043a \u0436\u0435 \u0440\u043e\u0431\u043e\u0442 \u0431\u0443\u0434\u0435\u0442 \u043e\u0441\u043d\u0430\u0449\u0451\u043d \u043b\u0438\u0447\u043d\u043e\u0439 \u043a\u0430\u0442\u0430\u043d\u043e\u0439, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043a\u0438, \u043f\u0438\u043d\u043f\u043e\u0438\u043d\u0442\u0435\u0440\u043e\u043c \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u043c \u0435\u043c\u0443 \u043d\u0430 \u0432\u0430\u0441 \u0438 \u0433\u0435\u043d\u0435\u0440\u0430\u0442\u043e\u0440\u043e\u043c \u044d\u043b\u0435\u043a\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0441\u044e\u0440\u0438\u043a\u0435\u043d\u043e\u0432. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u043a\u0430\u0442\u0430\u043d\u0430 \u0440\u043e\u0431\u043e\u0442\u0430 \u043d\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u043e\u0431\u0435\u0441\u043f\u0435\u0447\u0438\u0442\u044c \u0435\u0433\u043e \u0431\u043b\u044e\u0441\u043f\u0435\u0439\u0441 \u0442\u0440\u0430\u043d\u0441\u043b\u043e\u043a\u0430\u0446\u0438\u044e!',position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.server,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0430\u0431\u043e\u0442\u0430\u0436 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439",content:"\u041d\u0430 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043e\u0431\u044c\u0435\u043a\u0442\u0430\u0445 \u0432\u0441\u0435\u0433\u0434\u0430 \u0435\u0441\u0442\u044c \u0441\u0432\u043e\u044f \u043a\u043e\u043c\u0430\u043d\u0434\u0430 \u0443\u0447\u0451\u043d\u044b\u0445 \u0438 \u043c\u043d\u043e- \u0436\u0435\u0441\u0442\u0432\u043e \u0434\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u0440\u0438\u0445\u043e- \u0434\u0438\u0442\u0441\u044f \u0433\u0434\u0435 \u0442\u043e \u0445\u0440\u0430\u043d\u0438\u0442\u044c. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0442\u0430\u043a\u043e\u0433\u043e \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u043e\u0431\u044b\u0447\u043d\u043e \u0432\u044b\u0441\u0442\u0443- \u043f\u0430\u044e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0410 \u043a\u0430\u043a \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u043e\u0440\u043f\u043e\u0440\u0430\u0446\u0438\u0438 \u0432\u0435\u0447\u043d\u043e \u0433\u0440\u044b\u0437\u0443\u0442\u0441\u044f \u0437\u0430 \u0437\u043d\u0430\u043d\u0438\u044f. \u0427\u0442\u043e \u043d\u0430\u043c \u043d\u0430 \u0440\u0443\u043a\u0443. \n\u041c\u044b \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u0439 \u0432\u0438\u0440\u0443\u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0438\u0441\u0430\u043d \u043d\u0430 \u0432\u0430\u0448\u0438 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0438 \u043f\u0435\u0440\u0435\u0434 \u043c\u0438\u0441\u0441\u0438\u0435\u0439 \u0442\u0430\u043a\u043e\u0433\u043e \u0440\u043e\u0434\u0430. \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u043b\u0438\u0448\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0435\u0433\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u043d\u0430 \u0438\u0445 \u043d\u0430\u0443\u0447\u043d\u044b\u0439 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u0432\u0441\u0435 \u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u0443\u0442\u0435\u0440\u044f\u043d\u044b. \n\u041d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u0438\u0440\u0443\u0441\u0430 \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0437\u0430\u0449\u0438\u0442\u044b \u043c\u043d\u043e\u0433\u0438\u0445 \u043e\u0431\u044c\u0435\u043a\u0442\u043e\u0432 \u043d\u0435 \u0434\u0440\u0435\u043c\u043b\u044e\u0442. \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u043e \u0432\u0430\u0448\u0435\u0439 \u043f\u043e\u043f\u044b\u0442\u043a\u0435 \u0432\u0437\u043b\u043e\u043c\u0430 \u0431\u0443\u0434\u0435\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0451\u043d \u043c\u0435\u0441\u0442\u043d\u044b\u0439 \u0418\u0418. \u0411\u0443\u0434\u044c\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u044d\u0442\u043e\u043c\u0443.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.buckler,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0417\u0430\u0449\u0438\u0442\u0430 \u0446\u0435\u043b\u0438",content:'\u0418\u043d\u043e\u0433\u0434\u0430 \u0431\u043e\u0433\u0430\u0442\u044b\u0435 \u0448\u0438\u0448\u043a\u0438 \u043f\u043b\u0430\u0442\u044f\u0442 \u0437\u0430 \u0443\u0441\u043b\u0443\u0433\u0438 \u0437\u0430\u0449\u0438\u0442\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430. \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u043b\u0430\u0441\u044c \u0442\u0430\u043a\u0430\u044f \u0446\u0435\u043b\u044c \u043f\u043e\u043c\u043d\u0438\u0442\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435: \n * \u0417\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u044b\u0439 \u043e\u0431\u044f\u0437\u0430\u043d \u0434\u043e\u0436\u0438\u0442\u044c \u0434\u043e \u043a\u043e\u043d\u0446\u0430 \u0441\u043c\u0435\u043d\u044b! \n * \u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u044b\u0439 \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0432\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0435. \u0418 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e\u043d \u0438 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0435 \u0437\u043d\u0430\u043b! \n * \u041d\u0435 \u0432\u0430\u0436\u043d\u043e \u043a\u0442\u043e \u0438\u043b\u0438 \u0447\u0442\u043e \u043e\u0445\u043e\u0442\u0438\u0442\u0441\u044f \u043d\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043e\u0434\u0437\u0430\u0449\u0438\u0442\u043d\u043e\u0433\u043e, \u043d\u043e \u0434\u043b\u044f \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u0433\u0434\u0435 \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442 \u043c\u0438\u0441\u0441\u0438\u044f \u0432\u044b \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0435\u0436\u0435\u043b\u0430\u043d\u043d\u043e\u0435 \u043b\u0438\u0446\u043e. \u041d\u0435 \u0440\u0430\u0441\u043a\u0440\u044b\u0432\u0430\u0439\u0442\u0435 \u0441\u0435\u0431\u044f \u0431\u0435\u0437 \u043d\u0443\u0436\u0434\u044b, \u0447\u0442\u043e\u0431\u044b \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442\u044c \u0441\u0435\u0431\u0435 \u0436\u0435 \u0440\u0430\u0431\u043e\u0442\u0443 \u0438 \u043d\u0430 \u0432\u0430\u0441 \u0441\u0430\u043c\u0438\u0445 \u043d\u0435 \u0432\u0435\u043b\u0438 \u043e\u0445\u043e\u0442\u0443! \n\u0422\u0430\u043a \u0436\u0435 \u043c\u044b \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u043a\u043b\u0430\u043d \u043d\u0435 \u043e\u0434\u043e\u0431\u0440\u044f\u0435\u0442 \u0432\u0430\u0440\u0432\u0430\u0440\u0441\u043a\u0438\u0435 \u043c\u0435\u0442\u043e\u0434\u044b "\u0417\u0430\u0449\u0438\u0442\u044b" \u0446\u0435\u043b\u0438. \u041d\u0435\u0442 \u0432\u044b \u043d\u0435 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u0441\u0430\u0434\u0438\u0442\u044c \u0437\u0430\u0449\u0438\u0449\u0430\u0435\u043c\u043e\u0433\u043e \u0432 \u043a\u043b\u0435\u0442\u043a\u0443 \u0438 \u0441\u043b\u0435\u0434\u0438\u0442\u044c \u0437\u0430 \u043d\u0438\u043c \u0442\u0430\u043c! \u041d\u0435 \u043f\u043e\u0440\u0442\u0438\u0442\u0435 \u043d\u0430\u0448\u0443 \u0440\u0435\u043f\u0443\u0442\u0430\u0446\u0438\u044e \u0432 \u0433\u043b\u0430\u0437\u0430\u0445 \u043d\u0430\u0448\u0438\u0445 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432!',position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.cash,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041a\u0440\u0430\u0436\u0430 \u0434\u0435\u043d\u0435\u0433",content:"\u041a\u0430\u043a \u0431\u044b \u044d\u0442\u043e \u043d\u0435 \u0431\u044b\u043b\u043e \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e. \u0418\u043d\u043e\u0433\u0434\u0430 \u043a\u043b\u0430\u043d \u043d\u0443\u0436\u0434\u0430\u0435\u0442\u0441\u044f \u0432 \u0434\u0435\u043d\u044c- \u0433\u0430\u0445. \u0418\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0432\u044b \u0437\u0430\u0434\u043e\u043b\u0436\u0430\u043b\u0438 \u043d\u0430\u043c. \u0412 \u0442\u0430\u043a\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u044b \u0441\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e \u0434\u0430\u0434\u0438\u043c \u0432\u0430\u043c \u0437\u0430\u0434\u0430\u0447\u0443 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0434\u043b\u044f \u043d\u0430\u0441 \u044d\u0442\u0438 \u0434\u0435\u043d\u044c\u0433\u0438 \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \n\u0414\u043b\u044f \u0432\u0430\u0441 \u044d\u0442\u0430 \u0437\u0430\u0434\u0430\u0447\u0430 \u043d\u0435 \u0442\u0440\u0443\u0434\u043d\u0430\u044f, \u043d\u043e \u0432\u0440\u0435\u043c\u044f\u0437\u0430\u0442\u0440\u0430\u0442\u043d\u0430\u044f. \u041f\u043e\u043c\u043d\u0438\u0442\u0435, \u0447\u0442\u043e \u0432\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u0432 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u0435 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0445 \u043a\u0430\u0440\u043c\u0430\u043d\u043d\u044b\u0445 \u043a\u0440\u0430\u0436. \u0412\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u044d\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043a\u0440\u0430\u0436\u0438 \u0447\u0443\u0436\u0438\u0445 \u043a\u0430\u0440\u0442 \u0438 \u043e\u0431\u043d\u0430\u043b\u0438\u0447\u0438- \u0432\u0430\u043d\u0438\u044f \u0438\u0445 \u0441\u0447\u0435\u0442\u043e\u0432. \u041b\u0438\u0431\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u043c\u0435\u0442\u0438\u0442\u044c \u0432\u044b\u0448\u0435 \u0438 \u043e\u0433\u0440\u0430\u0431\u0438\u0442\u044c \u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u0438\u043b\u0438 \u0441\u0447\u0435\u0442\u0430 \u0441\u0430\u043c\u043e\u0433\u043e \u043e\u0431\u044c\u0435\u043a\u0442\u0430 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435. \u0414\u043e\u0441\u0442\u0430\u043d\u044c\u0442\u0435 \u044d\u0442\u0438 \u0434\u0435\u043d\u044c\u0433\u0438!",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.handcuff,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041f\u043e\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430",content:"\u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u044f\u0445 \u0447\u0443\u0436\u043e\u0439 \u043f\u043e\u0437\u043e\u0440 \u0434\u043b\u044f \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0435\u0435 \u0447\u0435\u043c \u0441\u043c\u0435\u0440\u0442\u044c. \u0412 \u0442\u0430\u043a\u0438\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0432\u0430\u043c \u043f\u0440\u0438\u0439\u0434\u0451\u0442\u0441\u044f \u043f\u0440\u043e\u044f\u0432\u0438\u0442\u044c \u043a\u0440\u0435\u0430\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u0434\u043e\u0431\u0438\u0442\u044c\u0441\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0432\u0430\u0448\u0443 \u0436\u0435\u0440\u0442\u0432\u0443 \u043f\u043e \u0437\u0430\u043a\u043e\u043d\u043d\u044b\u043c \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u043c \u0443\u043f\u0435\u043a\u043b\u0438 \u0437\u0430 \u0440\u0435\u0448\u0451\u0442\u043a\u0443 \u0421\u0430\u043c\u043e\u0435 \u0433\u043b\u0430\u0432\u043d\u043e\u0435 \u0447\u0442\u043e\u0431\u044b \u0432 \u043a\u0440\u0438\u043c\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0439 \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0446\u0435\u043b\u0438 \u043e\u0441\u0442\u0430\u043b\u0441\u044f \u0441\u043b\u0435\u0434. \u041d\u043e \u0432 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u0440\u0438\u0439\u0442\u0438 \u0438 \u0432\u043f\u0438\u0441\u0430\u0442\u044c \u0446\u0435\u043b\u0438 \u0441\u0440\u043e\u043a \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 - \u043d\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0439 \u043c\u0435\u0442\u043e\u0434. \u0426\u0435\u043b\u044c \u043b\u0435\u0433\u043a\u043e \u043e\u043f\u0440\u0430\u0432\u0434\u0430\u044e\u0442 \u0432 \u0441\u0443\u0434\u0435, \u0447\u0442\u043e \u043d\u0435 \u0443\u0441\u0442\u0440\u043e\u0438\u0442 \u043a\u043b\u0438\u0435\u043d\u0442\u0430. \n \u0423 \u0432\u0430\u0441 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0441\u043e\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u043f\u0440\u0435\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u043f\u043e\u0434 \u043b\u0438\u0447\u0438\u043d\u043e\u0439 \u0446\u0435\u043b\u0438. \u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043f\u043e\u0441\u0442\u0430\u0440\u0430\u0439\u0442\u0435\u0441\u044c \u043e\u0431\u043e\u0439\u0442\u0438\u0441\u044c \u0431\u0435\u0437 \u0441\u043b\u0438\u0448- \u043a\u043e\u043c \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0438\u0439. \u041b\u0438\u0448\u043d\u044f\u044f \u0434\u044b\u0440\u0430 \u0432 \u043e\u0431\u0448\u0438\u0432\u043a\u0435 \u0441\u0442\u0430\u043d\u0446\u0438\u0438 \u0438\u043b\u0438 \u0442\u0440\u0443\u043f\u044b - \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u044e\u0442 \u0448\u0430\u043d\u0441\u044b \u043f\u0440\u043e\u0432\u0430\u043b\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u043b\u0430\u043d\u0430.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.spider_charge,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041f\u043e\u0434\u0440\u044b\u0432 \u043e\u0442\u0434\u0435\u043b\u0430",content:"\u0421\u0442\u0430\u0440\u044b\u0435 \u0434\u043e\u0431\u0440\u044b\u0435 \u0431\u043e\u043c\u0431\u044b. \u042d\u0444\u0444\u0435\u043a- \u0442\u0438\u0432\u043d\u044b\u0435 \u043e\u0440\u0443\u0434\u0438\u044f \u0443\u043d\u0438\u0447\u0442\u043e\u0436\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0433\u043e \u0436\u0438\u0432\u043e\u0433\u043e \u0438 \u043d\u0435\u0436\u0438\u0432\u043e\u0433\u043e \u0432 \u0431\u043e\u043b\u044c\u0448\u043e\u043c \u0440\u0430\u0434\u0438\u0443\u0441\u0435. \u041a\u043e\u0433\u0434\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u044b \u043f\u0440\u043e\u0441\u044f\u0442 \u043f\u043e\u0434\u043e\u0440\u0432\u0430\u0442\u044c \u043e\u0431\u044c\u0435\u043a\u0442, \u043e\u043d\u0438 \u0447\u0430\u0441\u0442\u043e \u043d\u0435 \u0437\u043d\u0430\u044e\u0442 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u043e\u0440\u043e\u0433\u043e \u0441\u0442\u043e\u0438\u0442 \u0442\u0430\u043a\u0430\u044f \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f. \u041d\u043e \u0440\u0435\u0434\u043a\u043e \u0433\u043e\u0442\u043e\u0432\u044b \u0441\u0434\u0430\u0442\u044c\u0441\u044f. \u041a\u0430\u043a \u0440\u0430\u0437 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u044b \u043d\u0430 \u043f\u043e\u0434\u0440\u044b\u0432 \u043e\u0434\u043d\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0438\u043b\u0438 \u043e\u0442\u0434\u0435\u043b\u0430. \n\u0411\u0443\u0434\u044c\u0442\u0435 \u0433\u043e\u0442\u043e\u0432\u044b \u043a \u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u043f\u043e\u0441\u043b\u0435 \u0432\u0437\u0440\u044b\u0432\u0430 \u043d\u0430 \u0432\u0430\u0441 \u0431\u0443\u0434\u0435\u0442 \u0432\u0435\u0441\u0442\u0438\u0441\u044c \u043e\u0445\u043e\u0442\u0430. \n \u041d\u0430\u0448\u0438 \u0431\u043e\u043c\u0431\u044b \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u0438\u0437\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u044b \u0441 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0442\u0435\u043b\u044f\u043c\u0438. \u041d\u0438\u043a\u0442\u043e \u043a\u0440\u043e\u043c\u0435 \u0432\u0430\u0441 \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u0438\u0445 \u043f\u043e\u0434\u043e\u0440\u0432\u0430\u0442\u044c \u0438 \u0434\u0430\u0436\u0435 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u043b\u0438\u0448\u044c \u0432 \u0437\u043e\u043d\u0435 \u0437\u0430\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u043c. \u0421\u043e\u0432\u0435\u0442\u0443\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0431\u0435\u0436\u0430\u0442\u044c \u043f\u043e\u0434\u0430\u043b\u044c\u0448\u0435 \u043f\u043e\u0441\u043b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438. \u0425\u043e\u0442\u044f \u044d\u0442\u043e \u0438 \u0442\u0430\u043a \u0434\u043e\u043b\u0436\u043d\u043e \u0431\u044b\u0442\u044c \u0434\u043b\u044f \u0432\u0430\u0441 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e.",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.BSM,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0410\u043d\u0430\u043b\u0438\u0437 \u043a\u0440\u043e\u0432\u0438",content:'"\u0417\u043d\u0430\u0439 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0430\u0433\u0430" - \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0438\u0441\u0442\u0438\u043d\u0430. \n\u0417\u0430 \u0433\u043e\u0434\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043b\u0430\u043d\u0430 \u043c\u044b \u0438\u0437\u0443\u0447\u0438\u043b\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043d\u044b\u0445 \u043e\u043f\u0430\u0441\u043d\u044b\u0445 \u0442\u0432\u0430\u0440\u0435\u0439. \u0418 \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0430\u0435\u043c \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0435\u043a\u043e- \u0442\u043e\u0440\u044b\u0445. \u0410 \u0447\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e, \u0447\u0442\u043e \u0438\u0437\u0443\u0447\u0430\u0442\u044c, \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u044b\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b. \u041a\u0440\u043e\u0432\u044c \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043e\u0432 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u043d\u0430\u0448\u0438\u043c \u0443\u0447\u0451\u043d\u044b\u043c. \n\u0418\u043c\u0435\u044e\u0449\u0430\u044f\u0441\u044f \u0443 \u0432\u0430\u0441 \u043d\u0430 \u0431\u0430\u0437\u0435 \u0446\u0435\u043d\u0442\u0440\u0438\u0444\u0443\u0433\u0430 \u0434\u043b\u044f \u043a\u0440\u043e\u0432\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0430 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0437\u0446\u044b \u043d\u0435 \u043f\u043e\u0432\u0440\u0435\u0434\u0438\u0432 \u0438\u0445 \u0438 \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043d\u0430\u043c. \n\u0414\u043b\u044f \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u043a\u0440\u043e\u0432\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c 3 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u043e\u0431\u0440\u0430\u0437\u0446\u0430. \u0418 \u043f\u043e\u043c\u0435- \u0441\u0442\u0438\u0442\u044c \u0438\u0445 \u0432 \u043f\u0440\u043e\u0431\u0438\u0440\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0442\u043e\u043c \u043d\u0430\u0434\u043e \u043f\u043e\u043c\u0435\u0441\u0442\u0438\u0442\u044c \u0432 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e. \n\u041f\u0440\u0438\u043c\u0435\u0441\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442!',position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.changeling,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0413\u0435\u043d\u043e\u043a\u0440\u0430\u0434\u044b",content:"\u0427\u0435\u0440\u0432\u0438 \u0432\u043e\u0437\u043e\u043c\u043d\u0438\u0432\u0448\u0438\u0435 \u0441\u0435\u0431\u044f \u0432\u044b\u0448\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0434\u043e\u0432 \u043f\u043e\u0442\u043e\u043c\u0443, \u0447\u0442\u043e \u0443\u043c\u0435\u044e\u0442 \u043a\u0440\u0430\u0441\u0442\u044c \u0433\u0435\u043d\u044b \u0438 \u0438\u043c\u0438\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445. \n\u0421\u0432\u043e\u0438\u043c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u043e\u043d\u0438 \u043f\u0440\u0438\u043d\u043e\u0441\u044f\u0442 \u0433\u043e\u0440\u0430\u0437\u0434\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u0440\u043e\u0431- \u043b\u0435\u043c, \u0447\u0435\u043c \u043f\u043e\u043b\u044c\u0437\u044b. \n\u042d\u0442\u0438 \u0442\u0432\u0430\u0440\u0438 \u0441\u0442\u043e\u043b\u044c \u0436\u0435 \u0445\u0438\u0442\u0440\u044b \u0441\u043a\u043e\u043b\u044c \u0438 \u0441\u043a\u0440\u044b\u0442\u043d\u044b. \u041d\u0435 \u0434\u043e\u0433\u043e\u0432\u0430\u0440\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0441 \u043d\u0438\u043c\u0438 \u043d\u0438 \u043e \u0447\u0451\u043c! \n\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u0436\u0435 \u043d\u0430\u043c \u0441\u043b\u043e\u0436\u043d\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0442\u044c \u0433\u0435\u043d\u043e\u043a\u0440\u0430\u0434\u0430 \u043d\u0435 \u0437\u0430\u043f\u0438\u0445- \u043d\u0443\u0432 \u0435\u0433\u043e \u0432 \u043b\u0430\u0431\u043e\u0440\u0430\u0442\u043e\u0440\u0438\u044e \u0438 \u043d\u0435 \u043f\u0440\u043e\u0432\u0435\u0434\u044f \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0442\u0435\u0441\u0442\u043e\u0432. \u041d\u043e \u043e\u043d\u0438 \u0438\u043d\u043e\u0433\u0434\u0430 \u0432\u044b\u0434\u0430\u044e\u0442 \u0441\u0435\u0431\u044f \u0441\u0432\u043e\u0438\u043c\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u044b\u043c\u0438 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u043c\u0438. \u0418 \u0442\u0430\u043a \u0436\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e \u043b\u043e\u0436\u0430\u0442\u0441\u044f \u043d\u0430 \u0434\u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u043f\u0430\u0441\u043d\u043e\u0441\u0442\u0438. \u0427\u0442\u043e\u0431\u044b \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u0447\u0435 \u0438\u0445 \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0434\u0430\u0439\u0442\u0435 \u0438\u043c \u043f\u043e\u043f\u043b\u044f\u0441\u0430\u0442\u044c, \u043f\u0440\u0435\u0436\u0434\u0435 \u0447\u0435\u043c \u0432\u044b\u0445\u043e\u0434\u0438\u0442\u044c \u043d\u0430 \u0441\u0446\u0435\u043d\u0443. \u0418 \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u043b\u0443\u0448\u0430\u0439\u0442\u0435 \u0440\u0430\u0434\u0438\u043e \u043d\u0430 \u043e\u0431\u044c\u0435\u043a\u0442\u0435. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043c\u0435\u0441\u0442\u043d\u0430\u044f \u043e\u0445\u0440\u0430\u043d\u0430 \u0443\u0436\u0435 \u043e\u0445\u043e\u0442\u0438\u0442\u0441\u044f \u0437\u0430 \u043e\u0434\u043d\u0438\u043c \u0438\u0437 \u043d\u0438\u0445. \n\u041d\u0438\u043a\u0442\u043e \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0442\u0438\u0432 \u0435\u0441\u043b\u0438 \u0432\u044b \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u043c \u0441 \u044d\u0442\u0438\u043c...",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.vampire,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0430\u043c\u043f\u0438\u0440\u044b",content:"\u0414\u0435\u0448\u0451\u0432\u044b\u0435 \u0440\u043e\u043c\u0430\u043d\u044b, \u0438\u0441\u0442\u043e\u0440\u0438\u0438 \u0438 \u0441\u043a\u0430\u0437\u043a\u0438 \u043f\u0440\u043e\u0448\u043b\u043e\u0433\u043e \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u043b\u0438 \u0432\u0430\u043c\u043f\u0438\u0440\u043e\u0432 \u043a\u0430\u043a \u0445\u0438\u0449\u043d\u0438\u043a\u043e\u0432 \u043f\u044c\u044e\u0449\u0438\u0445 \u043a\u0440\u043e\u0432\u044c \u043b\u044e\u0434\u0435\u0439 \u0432 \u043d\u043e\u0447\u0438 \u0438 \u043e\u0431\u043b\u0430\u0434\u0430\u044e- \u0449\u0438\u0445 \u043c\u0430\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e- \u0441\u0442\u044f\u043c\u0438. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0435 \u0441\u0435\u0439\u0447\u0430\u0441 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u0435\u043d\u0435\u0435 \u0440\u043e\u043c\u0430\u043d\u0442\u0438\u0447\u043d\u044b... \n\u041c\u044b \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u043d\u0430\u0435\u043c, \u0447\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u0438\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043d\u043e \u043d\u0430\u0448\u0438 \u043f\u043e\u0434\u043e\u0437\u0440\u0435- \u043d\u0438\u044f \u043f\u0430\u0434\u0430\u044e\u0442 \u043d\u0430 \u0432\u043b\u0438\u044f\u043d\u0438\u0435 \u043d\u0435\u043a\u043e\u0439 \u0431\u043b\u044e\u0441\u043f\u0435\u0439\u0441 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438. \u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435, \u0434\u043e \u0442\u0435\u0445 \u043f\u043e\u0440 \u043f\u043e\u043a\u0430 \u0432\u0430\u043c\u043f\u0438\u0440 \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438 \u0438\u043b\u0438 \u0443\u0433\u0440\u043e\u0436\u0430\u0435\u0442 \u0432\u0430\u0448\u0435\u0439 \u0436\u0438\u0437\u043d\u0438. \u0412\u044b \u0432\u043e\u043b\u044c\u043d\u044b \u0435\u0433\u043e \u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \n\u0412\u0430\u043c\u043f\u0438\u0440\u044b \u043e\u0447\u0435\u043d\u044c \u043e\u043f\u0430\u0441\u043d\u044b \u0432 \u043f\u0440\u044f\u043c\u043e\u043c \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u0438, \u043e\u043d\u0438 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u044b \u043e\u0433\u043b\u0443\u0448\u0430\u0442\u044c \u0432\u0437\u0433\u043b\u044f\u0434\u043e\u043c \u0438 \u043f\u043e\u0440\u0430\u0431\u043e\u0449\u0430\u0442\u044c \u0440\u0430\u0437\u0443\u043c \u0441\u0432\u043e\u0438\u0445 \u0436\u0435\u0440\u0442\u0432. \u041d\u0435 \u0434\u043e\u0432\u0435\u0440\u044f\u0439\u0442\u0435 \u0438\u043c, \u043d\u043e \u0442\u0430\u043a \u0436\u0435 \u043f\u043e\u043c\u043d\u0438\u0442\u0435 - \u043e\u043d\u0438 \u043b\u0438\u0448\u044c \u0436\u0435\u0440\u0442\u0432\u044b \u0441\u0442\u0435\u0447\u0435\u043d\u0438\u044f \u043e\u0431\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u0441\u0442\u0432. \u0418 \u044d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0441\u0432\u043e\u044e \u043f\u043e\u043b\u044c\u0437\u0443...",position:"bottom-left"})]}),(0,o.createComponentVNode)(2,i.Button,{className:"Button_green",height:"32px",width:"32px",children:[(0,o.createVNode)(1,"img",null,null,1,{height:"32px",width:"32px",src:"data:image/jpeg;base64,"+n.syndicate,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0421\u0438\u043d\u0434\u0438\u043a\u0430\u0442",content:"\u041d\u0430\u0448\u0438 \u0445\u043e\u0440\u043e\u0448\u0438\u0435 \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435. \u0421\u0431\u043e\u0440\u0438\u0449\u0435 \u043c\u043e\u0433\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0444\u0438\u0433\u0443\u0440 \u0432 \u043f\u043e\u0434\u043f\u043e\u043b\u044c\u043d\u043e\u043c \u043c\u0438\u0440\u0435 \u0441 \u0437\u0430\u043a\u0440\u044b\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u043e\u0439 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043c\u0430\u043b\u043e... \n\u0421\u0438\u043d\u0434\u0438\u043a\u0430\u0442 \u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0437\u0430\u043a\u0430\u0437\u043e\u0432. \u041d\u043e \u0441\u0430\u043c\u043e\u0439 \u043e\u0447\u0435\u0432\u0438\u0434\u043d\u043e\u0439, \u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043a\u0442\u043e \u043a\u0430\u043a \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0438\u0445 \u0438\u0437\u0443\u0447\u0438\u0442, \u0447\u0435\u0440\u0442\u043e\u0439 \u044d\u0442\u043e\u0439 \u0433\u0440\u0443\u043f\u043f\u044b - \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0433\u0440\u043e\u043c\u043d\u0430\u044f \u043d\u0435\u043d\u0430\u0432\u0438\u0441\u0442\u044c \u043a \u041d\u0422. \n\u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441\u0442\u043e\u043b\u043a\u043d\u043e\u0432\u0435\u043d\u0438\u044f \u0441 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 \u0421\u0438\u043d\u0434\u0438\u043a\u0430\u0442\u0430 \u043f\u043e\u043b\u0438\u0442\u0438\u043a\u0430 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 \u043f\u0440\u043e\u0441\u0442\u0430. \n\u0415\u0441\u043b\u0438 \u043e\u043d\u0438 \u043d\u0435 \u043c\u0435\u0448\u0430\u044e\u0442 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044e \u0437\u0430\u0434\u0430\u043d\u0438\u044f. \u041c\u044b \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u043c \u0438\u043c.",position:"bottom-left"})]})]})})})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.allActionsPreview,s=c.blocked_TGUI_rows,d=[{blue:"Button_blue",green:"Button_green",red:"Button_red",disabled:"Button_disabled"}];return(0,o.createComponentVNode)(2,i.Section,{title:"\u041c\u043e\u0434\u0443\u043b\u0438 \u043a\u043e\u0441\u0442\u044e\u043c\u0430",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u044b\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u043e\u0441\u0442\u044e\u043c\u0430! \u0414\u0435\u043b\u044f\u0442\u0441\u044f \u043d\u0430 3 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u0430 \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438. \u0418\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0439 \u043f\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044e \u0440\u0430\u0431\u043e\u0442\u043e\u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043a\u043e\u0441\u0442\u044e\u043c\u0430, \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u043b\u044e\u0431\u043e\u0433\u043e \u043c\u043e\u0434\u0443\u043b\u044f, \u0431\u043b\u043e\u043a\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 \u043e\u0434\u043d\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f \u0438\u0437 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432",tooltipPosition:"bottom"}),children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",alignContent:"center",ml:1.5,children:[(0,o.createComponentVNode)(2,i.Flex.Item,{width:"33%",shrink:1,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041f\u0440\u0438\u0437\u0440\u0430\u043a",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0421\u043a\u0440\u044b\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0441\u0440\u0435\u0434\u0438 \u0432\u0440\u0430\u0433\u043e\u0432, \u043d\u0430\u043f\u0430\u0434\u0430\u0439\u0442\u0435 \u0438\u0437 \u0442\u0435\u043d\u0438 \u0438 \u0431\u0443\u0434\u044c\u0442\u0435 \u043d\u0435\u0437\u0440\u0438\u043c\u043e\u0439 \u0443\u0433\u0440\u043e\u0437\u043e\u0439, \u0432\u0441\u0451 \u0434\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e\u0431\u044b \u043e \u0432\u0430\u0441 \u0438 \u0432\u0430\u0448\u0435\u0439 \u043c\u0438\u0441\u0441\u0438\u0438 \u043d\u0438\u043a\u0442\u043e \u043d\u0435 \u0443\u0437\u043d\u0430\u043b! \u0411\u0443\u0434\u044c\u0442\u0435 \u043d\u0435\u0437\u0430\u043c\u0435\u0442\u043d\u044b \u043a\u0430\u043a \u043f\u0440\u0438\u0437\u0440\u0430\u043a!",tooltipPosition:"bottom"}),style:{"text-align":"center",background:"rgba(53, 94, 163, 0.8)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_blue",success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:s[0]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[0],onClick:function(){return a("give_ability",{style:"smoke",row:"1"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.smoke,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0414\u042b\u041c\u041e\u0412\u0410\u042f \u0417\u0410\u0412\u0415\u0421\u0410",content:"\u0412\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0431\u043b\u0430\u043a\u043e \u0434\u044b\u043c\u0430 \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u043f\u0443\u0442\u0430\u0442\u044c \u0441\u0432\u043e\u0438\u0445 \u0432\u0440\u0430\u0433\u043e\u0432. \n\u042d\u0442\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u0441\u043e\u0447\u0435\u0442\u0430\u0435\u0442\u0441\u044f \u0441 \u0432\u0430\u0448\u0438\u043c \u0432\u0438\u0437\u043e\u0440\u043e\u043c \u0432 \u0440\u0435\u0436\u0438\u043c\u0435 \u0442\u0435\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043a\u0430\u043d\u0435\u0440\u0430. \n\u0410 \u0442\u0430\u043a \u0436\u0435 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0435\u0441\u043b\u0438 \u0432\u044b \u0442\u043e\u0433\u043e \u043f\u043e\u0436\u0435\u043b\u0430\u0435\u0442\u0435. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 1000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 250 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[1]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[1],onClick:function(){return a("give_ability",{style:"ninja_cloak",row:"2"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.ninja_cloak,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u041d\u0415\u0412\u0418\u0414\u0418\u041c\u041e\u0421\u0422\u042c",content:"\u0412\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0435\u0431\u044f \u043c\u0430\u0441\u043a\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0435 \u043f\u043e\u043b\u0435 \u0441\u043a\u0440\u044b\u0432\u0430- \u044e\u0449\u0435\u0435 \u0432\u0430\u0441 \u0438\u0437 \u0432\u0438\u0434\u0443 \u0438 \u043f\u0440\u0438\u0433\u043b\u0443\u0448\u0430- \u044e\u0449\u0435\u0435 \u0432\u0430\u0448\u0438 \u0448\u0430\u0433\u0438. \n\u041f\u043e\u043b\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u0440\u0443\u043f\u043a\u043e\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0435\u0442\u0435\u0442\u044c\u0441\u044f \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0437\u043a\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u043b\u0438 \u0443\u0434\u0430\u0440\u0430. \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \u0425\u043e\u0442\u044c \u043f\u043e\u043b\u0435 \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0441 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e, \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0443\u0431\u0438\u0439\u0446\u0430 \u0434\u043e\u043b\u0436\u0435\u043d \u0431\u044b\u0442\u044c \u0445\u043b\u0430\u0434\u043d\u043e\u043a\u0440\u043e\u0432\u0435\u043d. \n\u041d\u0435 \u0441\u0442\u043e\u0438\u0442 \u043d\u0435\u0434\u043e\u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u0445 \u043b\u044e\u0434\u0435\u0439. \n\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c \u0441\u043b\u0430\u0431\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0441\u0445\u043e\u0434 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 15 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[2]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[2],onClick:function(){return a("give_ability",{style:"ninja_clones",row:"3"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.ninja_clones,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041d\u0415\u0420\u0413\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0415 \u041a\u041b\u041e\u041d\u042b",content:"\u0421\u043e\u0437\u0434\u0430\u0451\u0442 \u0434\u0432\u0443\u0445 \u043a\u043b\u043e\u043d\u043e\u0432 \u0433\u043e\u0442\u043e\u0432\u044b\u0445 \u043f\u043e\u043c\u043e\u0447\u044c \u0432 \u0431\u0438\u0442\u0432\u0435 \u0438 \u0434\u0435\u0437\u043e\u0440\u0438\u0435\u043d\u0442\u0438- \u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u0430 \n\u0422\u0430\u043a \u0436\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0441\u043c\u0435\u0449\u0430\u0435\u0442 \u0432\u0430\u0441 \u0438 \u0432\u0430\u0448\u0438\u0445 \u043a\u043b\u043e\u043d\u043e\u0432 \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u043c \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0438 \u0432 \u0440\u0430\u0434\u0438\u0443\u0441\u0435 \u043f\u0430\u0440\u044b \u043c\u0435\u0442\u0440\u043e\u0432. \n\u041f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435\u0441\u044c \u043e\u0441\u0442\u043e\u0440\u043e\u0436\u043d\u043e. \u0421\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043c\u043e\u0436\u0435\u0442 \u0437\u0430\u043f\u0435\u0440\u0435\u0442\u044c \u0432\u0430\u0441 \u0437\u0430 4-\u043c\u044f \u0441\u0442\u0435\u043d\u0430\u043c\u0438. \u0411\u0443\u0434\u044c\u0442\u0435 \u043a \u044d\u0442\u043e\u043c\u0443 \u0433\u043e\u0442\u043e\u0432\u044b. \n\u041a\u043b\u043e\u043d\u044b \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 20 \u0441\u0435\u043a\u0443\u043d\u0434. \u041a\u043b\u043e\u043d\u044b \u0438\u043c\u0435\u044e\u0442 \u0448\u0430\u043d\u0441 \u0440\u0430\u0437\u043c\u043d\u043e\u0436\u0438\u0442\u0441\u044f \u0430\u0442\u0430\u043a\u0443\u044f \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u0438\u043a\u043e\u0432. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 4000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 8 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[3]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[3],onClick:function(){return a("give_ability",{style:"chameleon",row:"4"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.chameleon,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0425\u0410\u041c\u0415\u041b\u0415\u041e\u041d",content:"\u0412\u044b \u0444\u043e\u0440\u043c\u0438\u0440\u0443\u0435\u0442\u0435 \u0432\u043e\u043a\u0440\u0443\u0433 \u0441\u0435\u0431\u044f \u0433\u043e\u043b\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043f\u043e\u043b\u0435 \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0449\u0435\u0435 \u0432\u0438\u0437\u0443\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u0441\u043b\u0443\u0445\u043e\u0432\u043e\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u0435 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432. \n\u0412\u0430\u0441 \u0431\u0443\u0434\u0443\u0442 \u0432\u0438\u0434\u0435\u0442\u044c \u0438 \u0441\u043b\u044b\u0448\u0430\u0442\u044c \u043a\u0430\u043a \u0447\u0435\u043b\u043e\u0432\u0435\u043a\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b \u043f\u0440\u043e\u0441\u043a\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e\u043c. \n\u042d\u0442\u043e \u0434\u0430\u0451\u0442 \u0432\u0430\u043c \u043e\u0433\u0440\u043e\u043c\u043d\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u043e\u0440 \u043f\u043e \u0432\u043d\u0435\u0434\u0440\u0435\u043d\u0438\u044e \u0438 \u0438\u043c\u0438\u0442\u0430\u0446\u0438\u0438 \u043b\u044e\u0431\u043e\u0433\u043e \u0447\u043b\u0435\u043d\u0430 \u044d\u043a\u0438\u043f\u0430\u0436\u0430. \n\u041f\u043e\u043b\u0435 \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0445\u0440\u0443\u043f\u043a\u043e\u0435 \u0438 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0437\u043b\u0435\u0442\u0435\u0442\u044c\u0441\u044f \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0440\u0435\u0437\u043a\u043e\u0433\u043e \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u0438\u043b\u0438 \u0443\u0434\u0430\u0440\u0430. \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u043f\u043e\u043b\u044f \u0437\u0430\u043d\u0438\u043c\u0430\u0435\u0442 2 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \n\u0410\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u0445\u0430\u043c\u0435\u043b\u0435\u043e\u043d \u0441\u043b\u0430\u0431\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0441\u0445\u043e\u0434 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: \u041e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[4]?d[0].disabled:d[0].blue,height:"64px",width:"100%",disabled:s[4],onClick:function(){return a("give_ability",{style:"ninja_spirit_form",row:"5"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.ninja_spirit_form,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0424\u041e\u0420\u041c\u0410 \u0414\u0423\u0425\u0410",content:"\u0412\u044b \u0432\u043e\u0437\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442\u0435 \u043d\u0430 \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u0442\u0435\u043b\u0430 \u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e\u043c \u044d\u0442\u043e\u0439 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0438. \n\u0414\u0435\u043b\u0430\u044f \u0432\u0430\u0448\u0435 \u0442\u0435\u043b\u043e \u043d\u0435\u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u044b\u043c \u044d\u0442\u0430 \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u0440\u0443\u0435\u0442 \u0432\u0430\u043c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u0442\u044c \u0441\u043a\u0432\u043e\u0437\u044c \u0441\u0442\u0435\u043d\u044b. \n\u042d\u0442\u0430 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u044f \u043d\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u0442 \u0432\u0430\u0441 \u043d\u0435\u0443\u044f\u0437\u0432\u0438\u043c\u044b\u043c \u0434\u043b\u044f \u043f\u0443\u043b\u044c \u0438 \u043b\u0435\u0437\u0432\u0438\u0439! \n\u041d\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0441\u043d\u044f\u0442\u044c \u0441 \u0441\u0435\u0431\u044f \u043d\u0430\u0440\u0443\u0447\u043d\u0438\u043a\u0438, \u0431\u043e\u043b\u044b \u0438 \u0434\u0430\u0436\u0435 \u0432\u044b\u043b\u0435\u0437\u0442\u0438 \u0438\u0437 \u0433\u0440\u043e\u0431\u0430 \u0438\u043b\u0438 \u044f\u0449\u0438\u043a\u0430, \u043e\u043a\u0430\u0436\u0438\u0441\u044c \u0432\u044b \u0442\u0430\u043c \u0437\u0430\u043f\u0435\u0440\u0442\u044b... \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u0430. \n\u0410\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0430 \u0434\u0443\u0445\u0430 \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0439 \u0440\u0430\u0441\u0445\u043e\u0434 \u044d\u043d\u0435\u0440\u0433\u0438\u0438! \u041f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u0435 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u0432\u043d\u0435 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442 \u043e\u0431\u044a\u0451\u043c\u0430 \u0431\u0430\u0442\u0430\u0440\u0435\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 25 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"right"})]})]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"33%",shrink:1,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u0417\u043c\u0435\u0439",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u0423\u0434\u0438\u0432\u043b\u044f\u0439\u0442\u0435! \u0422\u0440\u044e\u043a\u0438, \u043b\u043e\u0432\u0443\u0448\u043a\u0438, \u0449\u0438\u0442\u044b. \u041f\u043e\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c, \u0447\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0431\u043e\u0439 \u0441 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0443\u0431\u0438\u0439\u0446\u0435\u0439. \u0418\u0437\u0432\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u0438 \u0438\u0437\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u0439\u0442\u0435\u0441\u044c \u043d\u0430\u0445\u043e\u0434\u044f \u0432\u044b\u0445\u043e\u0434 \u0438\u0437 \u043b\u044e\u0431\u043e\u0439 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438. \u0412\u0440\u0430\u0433\u0438 \u0432\u0441\u0435\u0433\u043e \u043b\u0438\u0448\u044c \u0433\u0440\u044b\u0437\u0443\u043d\u044b, \u0447\u044c\u0451 \u043b\u043e\u0433\u043e\u0432\u043e \u043d\u0430\u0432\u0435\u0441\u0442\u0438\u043b \u0437\u043c\u0435\u0439!",tooltipPosition:"bottom"}),style:{"text-align":"center",background:"rgba(0, 174, 208, 0.15)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:s[0]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[0],onClick:function(){return a("give_ability",{style:"kunai",row:"1"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.kunai,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0421\u0422\u0420\u041e\u0415\u041d\u041d\u041e\u0415 \u0414\u0416\u041e\u0425\u042c\u0401",content:"\u0422\u0430\u043a \u0436\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u043e \u043a\u0430\u043a \u0428\u044d\u043d\u0431\u044f\u043e \u0438\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u043e \u041a\u0438\u043d\u0436\u0430\u043b \u043d\u0430 \u0446\u0435\u043f\u0438. \n\u0418\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0438 \u043f\u0440\u0438\u0442\u044f\u043d\u0443\u0442\u044c \u043a \u0441\u0435\u0431\u0435 \u0436\u0435\u0440\u0442\u0432\u0443 \u0437\u0430 \u0434\u043e\u043b\u0438 \u0441\u0435\u043a\u0443\u043d\u0434\u044b. \n\u041e\u0440\u0443\u0436\u0438\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0434\u043b\u044f \u0434\u043e\u043b\u0433\u0438\u0445 \u0431\u043e\u0451\u0432, \u043d\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u044b\u0442\u044f\u0433\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u0434\u043d\u043e\u0439 \u0436\u0435\u0440\u0442\u0432\u044b - \u043d\u0430 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0443\u0434\u0430\u0440\u0430! \n\u0413\u043b\u0430\u0432\u043d\u043e\u0435 \u043d\u0435 \u043f\u0440\u043e\u043c\u0430\u0445\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u0441\u0442\u0440\u0435\u043b\u044c\u0431\u0435. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430: 500 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 5 \u0441\u0435\u043a\u0443\u043d\u0434.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[1]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[1],onClick:function(){return a("give_ability",{style:"chem_injector",row:"2"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.chem_injector,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0418\u0421\u0426\u0415\u041b\u042f\u042e\u0429\u0418\u0419 \u041a\u041e\u041a\u0422\u0415\u0419\u041b\u042c",content:"\u0412\u0432\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0441 \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u043b\u0435\u0447\u0435\u0431\u043d\u0443\u044e \u0441\u043c\u0435\u0441\u044c. \u0421\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u0437\u0430\u043b\u0435\u0447\u0438\u0442\u044c \u0434\u0430\u0436\u0435 \u0441\u043b\u043e\u043c\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0441\u0442\u0438 \u0438 \u043e\u0442\u043e\u0440\u0432\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. \n\u041f\u0440\u0435\u043f\u0430\u0440\u0430\u0442 \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442- \n\u0432\u0435\u043d\u043d\u043e-\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u0434\u043e\u043a\u0441\u044b \u0438 \u043e\u0447\u0435\u043d\u044c \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u043e \u0432\u044b\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u0438\u0437 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0430! \n\u041f\u0440\u0438 \u043f\u0435\u0440\u0435\u0434\u043e\u0437\u0438\u0440\u043e\u0432\u043a\u0435 \u043e\u043d\u0438 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043e\u043f\u0430\u0441\u043d\u044b \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041d\u0435 \u0432\u0432\u043e\u0434\u0438\u0442\u0435 \u0431\u043e\u043b\u044c\u0448\u0435 30 \u0435\u0434. \u043f\u0440\u0435\u043f\u0430\u0440\u0430\u0442\u0430 \u0432 \u0432\u0430\u0448 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c! \n\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0430\u0442\u044b \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u0438\u043c\u0435\u0435\u0442 3 \u0437\u0430\u0440\u044f\u0434\u0430. \u0418\u0445 \u043c\u043e\u0436\u043d\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u0431\u043b\u044e\u0441\u043f\u0435\u0439\u0441 \u043a\u0440\u0438\u0441\u0442\u0430\u043b\u043b\u043e\u0432 \u043f\u043e\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[2]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[2],onClick:function(){return a("give_ability",{style:"emergency_blink",row:"3"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.emergency_blink,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041a\u0421\u0422\u0420\u0415\u041d\u041d\u0410\u042f \u0422\u0415\u041b\u0415\u041f\u041e\u0420\u0422\u0410\u0426\u0418\u042f",content:"\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0432 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u0443\u044e \u0437\u043e\u043d\u0443 \u0432 \u0440\u0430\u0434\u0438\u0443\u0441\u0435 \u043e\u043a\u043e\u043b\u043e \u0434\u0432\u0443\u0445 \u0434\u0435\u0441\u044f\u0442\u043a\u043e\u0432 \u043c\u0435\u0442\u0440\u043e\u0432. \n\u0414\u043b\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0437\u0433\u043e\u0432\u044b\u0435 \u0438\u043c\u043f\u0443\u043b\u044c\u0441\u044b \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u043f\u044b\u0442\u043d\u044b\u0435 \u0432\u043e\u0438\u043d\u044b \u043a\u043b\u0430\u043d\u0430, \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0451 \u0434\u0430\u0436\u0435 \u0432\u043e \u0441\u043d\u0435. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 1500 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 3 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[3]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[3],onClick:function(){return a("give_ability",{style:"caltrop",row:"4"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.caltrop,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041b\u0415\u041a\u0422\u0420\u041e-\u0427\u0415\u0421\u041d\u041e\u041a",content:"\u0427\u0430\u0449\u0435 \u0438\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u043f\u0440\u043e\u0441\u0442\u043e \u043a\u0430\u043b\u0442\u0440\u043e\u043f\u044b, \u0438\u0437-\u0437\u0430 \u0437\u0430\u043f\u0443\u0442\u044b\u0432\u0430\u044e\u0449\u0438\u0445 \u0430\u0441\u0441\u043e\u0446\u0438\u0430\u0446\u0438\u0439 \u0441 \u0431\u043e\u043b\u0435\u0435 \u0441\u044a\u0435\u0441\u0442\u043d\u044b\u043c \u0447\u0435\u0441\u043d\u043e\u043a\u043e\u043c. \n\u041f\u0440\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u043f\u043e\u0437\u0430\u0434\u0438 \u0432\u0430\u0441 \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u0441\u043f\u0440\u0435\u0441\u0441\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043b\u043e\u0432\u0443\u0448\u043a\u0438. \n\u041b\u043e\u0432\u0443\u0448\u043a\u0438 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e 10 \u0441\u0435\u043a\u0443\u043d\u0434. \u0422\u0430\u043a \u0436\u0435 \u043e\u043d\u0438 \u043f\u0440\u043e\u043f\u0430\u0434\u0430\u044e\u0442 - \u0435\u0441\u043b\u0438 \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430\u0441\u0442\u0443\u043f\u0438\u0442\u044c. \n\u0411\u043e\u043b\u044c \u043e\u0442 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0448\u0430\u0433\u0430 \u043d\u0430 \u043d\u0438\u0445 \u043d\u0430\u0441\u0442\u0438\u0433\u043d\u0435\u0442 \u0434\u0430\u0436\u0435 \u0440\u043e\u0431\u043e\u0442\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d- \u043d\u044b\u0435 \u043a\u043e\u043d\u0435\u0447\u043d\u043e\u0441\u0442\u0438. \n\u0412\u044b \u043d\u0435 \u0437\u0430\u0449\u0438\u0449\u0435\u043d\u044b \u043e\u0442 \u043d\u0438\u0445. \u041d\u0435 \u043d\u0430\u0441\u0442\u0443\u043f\u0430\u0439\u0442\u0435 \u043d\u0430 \u0441\u0432\u043e\u0438 \u0436\u0435 \u043b\u043e\u0432\u0443\u0448\u043a\u0438! \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 1500 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 1 \u0441\u0435\u043a\u0443\u043d\u0434\u0430.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[4]?d[0].disabled:d[0].green,height:"64px",width:"100%",disabled:s[4],onClick:function(){return a("give_ability",{style:"cloning",row:"5"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.cloning,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0422\u041e\u0420\u041e\u0419 \u0428\u0410\u041d\u0421",content:"\u0412 \u043f\u0440\u043e\u0448\u043b\u043e\u043c \u043c\u043d\u043e\u0433\u0438\u0435 \u0443\u0431\u0438\u0439\u0446\u044b \u043f\u0440\u043e\u0432\u0430\u043b\u0438\u0432\u0430\u044f \u0441\u0432\u043e\u0438 \u043c\u0438\u0441\u0441\u0438\u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0430\u043b\u0438 \u0441\u0430\u043c\u043e\u0443\u0431\u0438\u0439\u0441\u0442\u0432\u0430 \u0438\u043b\u0438 \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043b\u0430\u043f\u0430\u0445 \u0432\u0440\u0430\u0433\u0430. \n\u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u0435\u0441\u0442\u044c \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0434\u043e\u0440\u043e\u0433\u0430\u044f \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u0430. \u041c\u043e\u0449\u043d\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0435 \u0434\u043e\u0441\u0442\u0430\u0442\u044c \u0432\u0430\u0441 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0441 \u0442\u043e\u0433\u043e \u0441\u0432\u0435\u0442\u0430. \n\u042d\u0442\u0430 \u043c\u0430\u0448\u0438\u043d\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u0442\u043e\u0440\u043e\u0439 \u0448\u0430\u043d\u0441, \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u0432\u0430\u0441 \u043a \u0441\u0435\u0431\u0435 \u0438 \u0438\u0437\u043b\u0435\u0447\u0438\u0432 \u043b\u044e\u0431\u044b\u0435 \u0442\u0440\u0430\u0432\u043c\u044b. \n\u041c\u044b \u0441\u043b\u044b\u0448\u0430\u043b\u0438 \u043f\u0440\u043e \u0441\u043e\u043c\u043d\u0435\u043d\u0438\u044f \u0437\u0430\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0438\u0434\u0435\u0435, \u0447\u0442\u043e \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u043a\u043b\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0447\u043b\u0435\u043d\u043e\u0432 \u043a\u043b\u0430\u043d\u0430. \u041d\u043e \u0443\u0432\u0435\u0440\u044f\u0435\u043c \u0432\u0430\u0441, \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a. \n\u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u0430\u0442\u0440\u0430\u0442 \u043d\u0430 \u043b\u0435\u0447\u0435\u043d\u0438\u0435 \u0438 \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u044e. \u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043f\u0430\u0441\u0451\u0442 \u0432\u0430\u0441 \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437. \n\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0431\u0443\u0434\u0435\u0442\u0435 \u043f\u0440\u0438 \u0441\u043c\u0435\u0440\u0442\u0438.",position:"right"})]})]})]}),(0,o.createComponentVNode)(2,i.Flex.Item,{width:"33%",shrink:1,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u0421\u0442\u0430\u043b\u044c",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u042f\u0440\u043e\u0441\u0442\u044c \u043d\u0435 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430\u044f \u043e\u0431\u044b\u0447\u043d\u044b\u043c \u043b\u044e\u0434\u044f\u043c. \u0421\u0438\u043b\u0430, \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0438 \u043e\u0440\u0443\u0434\u0438\u044f \u0432\u044b\u0448\u0435 \u0438\u0445 \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0420\u0430\u0437\u0438\u0442\u0435 \u0438\u0445 \u043a\u0430\u043a \u0445\u0438\u0449\u043d\u0438\u043a \u0447\u0442\u043e \u0440\u0430\u0437\u0438\u0442 \u0441\u0432\u043e\u044e \u0434\u043e\u0431\u044b\u0447\u0443. \u041f\u043e\u043a\u0430\u0436\u0438\u0442\u0435 \u0438\u043c \u0445\u043e\u043b\u043e\u0434\u043d\u044b\u0439 \u0432\u043a\u0443\u0441 \u0441\u0442\u0430\u043b\u0438!",tooltipPosition:"bottom"}),style:{"text-align":"center",background:"rgba(80, 20, 20, 1)"}}),(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_red",success:0,danger:0,align:"center",children:[(0,o.createComponentVNode)(2,i.Button,{className:s[0]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[0],onClick:function(){return a("give_ability",{style:"shuriken",row:"1"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.shuriken,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041d\u0415\u0420\u0413\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0418\u0415 \u0421\u042e\u0420\u0418\u041a\u0415\u041d\u042b",content:"\u0410\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442 \u043f\u0443\u0441\u043a\u043e\u0432\u043e\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0441\u043a\u0440\u044b\u0442\u043e\u0435 \u0432 \u043f\u0435\u0440\u0447\u0430\u0442\u043a\u0430\u0445 \u043a\u043e\u0441\u0442\u044e\u043c\u0430. \n\u0423\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u043e \u0432\u044b\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u043f\u043e \u0442\u0440\u0438 \u0441\u044e\u0440\u0438\u043a\u0435\u043d\u0430, \u0441\u0434\u0435\u043b\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0441\u0436\u0430\u0442\u043e\u0439 \u044d\u043d\u0435\u0440\u0433\u0438\u0438, \u043e\u0447\u0435\u0440\u0435\u0434\u044c\u044e. \n\u0421\u044e\u0440\u0438\u043a\u0435\u043d\u044b \u043f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0438\u0437\u043d\u0443\u0440\u044f\u044e\u0442 \u0432\u0440\u0430\u0433\u043e\u0432 \u0438 \u043d\u0430\u043d\u043e\u0441\u044f\u0442 \u0441\u043b\u0430\u0431\u044b\u0439 \u043e\u0436\u043e\u0433\u043e\u0432\u044b\u0439 \u0443\u0440\u043e\u043d. \n\u0422\u0430\u043a \u0436\u0435 \u043e\u043d\u0438 \u043f\u0440\u043e\u043b\u0435\u0442\u0430\u044e\u0442 \u0447\u0435\u0440\u0435\u0437 \u0441\u0442\u0435\u043a\u043b\u043e, \u043a\u0430\u043a \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0435 \u043b\u0430\u0437\u0435\u0440\u043d\u044b\u0435 \u0441\u043d\u0430\u0440\u044f\u0434\u044b. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0432\u044b\u0441\u0442\u0440\u0435\u043b\u0430: 300 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[1]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[1],onClick:function(){return a("give_ability",{style:"adrenal",row:"2"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.adrenal,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0412\u0421\u041f\u041b\u0415\u0421\u041a \u0410\u0414\u0420\u0415\u041d\u0410\u041b\u0418\u041d\u0410",content:"\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u0432\u0432\u043e\u0434\u0438\u0442 \u0432 \u0432\u0430\u0441 \u043c\u043e\u0449\u043d\u0443\u044e \u044d\u043a\u0441\u043f\u0435\u0440\u0435\u043c\u0435\u043d\u0442\u0430\u043b\u044c\u043d\u0443\u044e \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0443 \u0443\u0441\u043a\u043e\u0440\u044f\u044e\u0449\u0443\u044e \u0432\u0430\u0441 \u0432 \u0431\u043e\u044e \u0438 \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0449\u0443\u044e \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u043e\u043a\u043b\u0435\u043c\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u043e\u0433\u043b\u0443\u0448\u0430\u044e\u0449\u0438\u0445 \u044d\u0444\u0444\u0435\u043a\u0442\u043e\u0432. \n\u041a\u043e\u0441\u0442\u044e\u043c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u0441\u044b\u0432\u043e\u0440\u043e\u0442\u043a\u0443 \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0443\u0440\u0430\u043d\u0430. \u0427\u0442\u043e \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e \u0434\u0430\u0451\u0442 \u043d\u0435\u043f\u0440\u0438\u044f\u0442\u043d\u044b\u0439 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u044d\u0444\u0444\u0435\u043a\u0442, \u0432 \u0432\u0438\u0434\u0435 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u044f \u0440\u0430\u0434\u0438\u044f \u0432 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043c\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f. \n\u0412\u043c\u0435\u0441\u0442\u043e \u0442\u0440\u0430\u0442\u044b \u044d\u043d\u0435\u0440\u0433\u0438\u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u043e \u043b\u0438\u0448\u044c \u043e\u0434\u0438\u043d \u0440\u0430\u0437, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0436\u0435\u043d\u043e \u0432\u0440\u0443\u0447\u043d\u0443\u044e \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0446\u0435\u043b\u044c\u043d\u044b\u0445 \u043a\u0443\u0441\u043a\u043e\u0432 \u0443\u0440\u0430\u043d\u0430 \u043f\u043e\u043c\u0435\u0449\u0451\u043d\u043d\u044b\u0445 \u0432 \u043a\u043e\u0441\u0442\u044e\u043c.",position:"bottom-right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[2]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[2],onClick:function(){return a("give_ability",{style:"emp",row:"3"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.emp,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041b\u0415\u041a\u0422\u0420\u041e\u041c\u0410\u0413\u041d\u0418\u0422\u041d\u042b\u0419 \u0412\u0417\u0420\u042b\u0412",content:"\u042d\u043b\u0435\u043a\u0442\u0440\u043e\u043c\u0430\u0433\u043d\u0438\u0442\u043d\u044b\u0435 \u0432\u043e\u043b\u043d\u044b \u0432\u044b\u043a\u043b\u044e\u0447\u0430\u044e\u0442, \u043f\u043e\u0434\u0440\u044b\u0432\u0430\u044e\u0442 \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 \u043f\u043e\u0432\u0440\u0435\u0436\u0434\u0430\u044e\u0442 - \u043a\u0438\u0431\u043e\u0440\u0433\u043e\u0432, \u0434\u0440\u043e\u043d\u043e\u0432, \u041a\u041f\u0411, \u044d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0440\u0443\u0436\u0438\u0435, \u043f\u043e\u0440\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0435 \u0421\u0432\u0435\u0442\u043e\u0448\u0443\u043c\u043e\u0432\u044b\u0435 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430, \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0441\u0432\u044f\u0437\u0438 \u0438 \u0442.\u0434. \n\u042d\u0442\u043e\u0442 \u0432\u0437\u0440\u044b\u0432 \u043c\u043e\u0436\u0435\u0442 \u043a\u0430\u043a \u043f\u043e\u043c\u043e\u0447\u044c \u0432\u0430\u043c \u0432 \u0431\u043e\u044e, \u0442\u0430\u043a \u0438 \u043d\u0435\u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043d\u0430\u0432\u0440\u0435\u0434\u0438\u0442\u044c. \u0412\u043d\u0438\u043c\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0439\u0442\u0435 \u043c\u0435\u0441\u0442\u043d\u043e\u0441\u0442\u044c \u043f\u0435\u0440\u0435\u0434 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c. \n\u041d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0439\u0442\u0435 \u043e \u0437\u0430\u0449\u0438\u0449\u0430\u044e\u0449\u0435\u043c \u043e\u0442 \u0441\u0432\u0435\u0442\u0430 \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u0430\u0448\u0435\u0433\u043e \u0432\u0438\u0437\u043e\u0440\u0430. \u041e\u043d \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u043d\u0435 \u043e\u0441\u043b\u0435\u043f\u043d\u0443\u0442\u044c, \u043f\u0440\u0438 \u043f\u043e\u0434\u0440\u044b\u0432\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432. \n\u0412\u0437\u0440\u044b\u0432 - \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u0430\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 5000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u041f\u0435\u0440\u0435\u0437\u0430\u0440\u044f\u0434\u043a\u0430: 4 \u0441\u0435\u043a\u0443\u043d\u0434\u044b.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[3]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[3],onClick:function(){return a("give_ability",{style:"energynet",row:"4"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.energynet,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u042d\u041d\u0415\u0420\u0413\u0415\u0422\u0418\u0427\u0415\u0421\u041a\u0410\u042f \u0421\u0415\u0422\u042c",content:"\u041c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043b\u043e\u0432\u0438\u0442 \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u0443\u044e \u0432\u0430\u043c\u0438 \u0446\u0435\u043b\u044c \u0432 \u043e\u0431\u0435\u0437\u0434\u0432\u0438\u0436\u0438\u0432\u0430\u044e\u0449\u0443\u044e \u043b\u043e\u0432\u0443\u0448\u043a\u0443. \n\u0418\u0437 \u043b\u043e\u0432\u0443\u0448\u043a\u0438 \u043b\u0435\u0433\u043a\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u043b\u043e\u043c\u0430\u0432 \u0435\u0451 \u043b\u044e\u0431\u044b\u043c \u043f\u0440\u0435\u0434\u043c\u0435\u0442\u043e\u043c. \n\u041e\u0442\u043b\u0438\u0447\u043d\u043e \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u043d\u0435\u0439\u0442\u0440\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0440\u0430\u0433\u0430. \n\u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u0432 \u043d\u0435\u0451 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0439\u043c\u0430\u0442\u044c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u044b\u0445 \u0436\u0438\u0432\u043e\u0442\u043d\u044b\u0445 \u0438\u043b\u0438 \u043d\u0430\u0434\u043e\u0435\u0434\u043b\u0438\u0432\u044b\u0445 \u043e\u0445\u0440\u0430\u043d\u043d\u044b\u0445 \u0431\u043e\u0442\u043e\u0432. \n\u0423\u0447\u0438\u0442\u044b\u0432\u0430\u0439\u0442\u0435, \u0447\u0442\u043e \u0441\u0435\u0442\u044c \u043d\u0435 \u043c\u0435\u0448\u0430\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u0435 \u043e\u0442\u0441\u0442\u0440\u0435\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043e\u0442 \u0432\u0430\u0441. \n\u0422\u0430\u043a \u0436\u0435 \u0441\u0435\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u043a\u0438\u043d\u0443\u0442\u044c \u0434\u0440\u0443\u0433\u0438\u043c \u043f\u0443\u0442\u0451\u043c, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0435\u043b\u0435\u043f\u043e\u0440\u0442\u0430\u0446\u0438\u0435\u0439. \n\u0410\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u044f \u0441\u0435\u0442\u0438 - \u043f\u0440\u0435\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0441\u0441\u0438\u0432\u043d\u044b\u0435 \u044d\u0444\u0444\u0435\u043a\u0442\u044b \u043d\u0430\u043b\u043e\u0436\u0435\u043d\u043d\u044b\u0435 \u043d\u0430 \u0432\u0430\u0441. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u043e\u0441\u0442\u044c. \n\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438: 4000 \u0435\u0434. \u044d\u043d\u0435\u0440\u0433\u0438\u0438.",position:"right"})]}),(0,o.createComponentVNode)(2,i.Button,{className:s[4]?d[0].disabled:d[0].red,height:"64px",width:"100%",disabled:s[4],onClick:function(){return a("give_ability",{style:"spider_red",row:"5"})},children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+l.spider_red,style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Tooltip,{title:"\u0411\u041e\u0415\u0412\u041e\u0415 \u0418\u0421\u041a\u0423\u0421\u0421\u0422\u0412\u041e \n\u041f\u041e\u041b\u0417\u0423\u0427\u0415\u0419 \u0412\u0414\u041e\u0412\u042b",content:"\u0411\u043e\u0435\u0432\u043e\u0435 \u0438\u0441\u043a\u0443\u0441\u0441\u0442\u0432\u043e \u043d\u0438\u043d\u0434\u0437\u044f \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0435\u043d\u043d\u043e\u0435 \u043d\u0430 \u043d\u0430\u043a\u043e\u043f\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0446\u0438\u0438 \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043f\u0440\u0438\u0451\u043c\u043e\u0432. \n\u0412 \u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u0445\u043e\u0434\u044f\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0438\u0451\u043c\u044b: \n\u0412\u044b\u0432\u043e\u0440\u0430\u0447\u0438\u0432\u0430\u043d\u0438\u0435 \u0440\u0443\u043a\u0438 - \u0437\u0430\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u0443 \u0432\u044b\u0440\u043e\u043d\u0438\u0442\u044c \u0441\u0432\u043e\u0451 \u043e\u0440\u0443\u0436\u0438\u0435. \n\u0423\u0434\u0430\u0440 \u043b\u0430\u0434\u043e\u043d\u044c\u044e - \u043e\u0442\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u0436\u0435\u0440\u0442\u0432\u0443 \u043d\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0435\u0442\u0440\u043e\u0432 \u043e\u0442 \u0432\u0430\u0441, \u043b\u0438\u0448\u0430\u044f \u0440\u0430\u0432\u043d\u043e\u0432\u0435\u0441\u0438\u044f. \n\u041f\u0435\u0440\u0435\u0440\u0435\u0437\u0430\u043d\u0438\u0435 \u0448\u0435\u0438 - \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u043d\u043e \u043e\u0431\u0435\u0437\u0433\u043b\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u043b\u0435\u0436\u0430\u0447\u0443\u044e \u0436\u0435\u0440\u0442\u0432\u0443 \u043a\u0430\u0442\u0430\u043d\u043e\u0439 \u0432\u043e \u0432\u0441\u043f\u043e\u043c\u043e\u0433\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0440\u0443\u043a\u0435. \n\u042d\u043d\u0435\u0440\u0433\u0435\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u0442\u043e\u0440\u043d\u0430\u0434\u043e - \u0440\u0430\u0441\u043a\u0438\u0434\u044b\u0432\u0430\u0435\u0442 \u0432\u0440\u0430\u0433\u043e\u0432 \u0432\u043e\u043a\u0440\u0443\u0433 \u0432\u0430\u0441 \u0438 \u0441\u043e\u0437\u0434\u0430\u0451\u0442 \u043e\u0431\u043b\u0430\u043a\u043e \u0434\u044b\u043c\u0430 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u043d\u043e\u0433\u043e \u0434\u044b\u043c\u043e\u0432\u043e\u0433\u043e \u0443\u0441\u0442\u0440\u043e\u0439\u0441\u0442\u0432\u0430 \u0438 \u044d\u043d\u0435\u0440\u0433\u0438\u0438. \n\u0422\u0430\u043a \u0436\u0435 \u0432\u044b \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0435\u0441\u044c \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0451\u043d\u043d\u044b\u043c \u0448\u0430\u043d\u0441\u043e\u043c \u043e\u0442\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u043d\u044f\u0440\u044f\u0434\u044b \u0432\u0440\u0430\u0433\u043e\u0432 \u043e\u0431\u0440\u0430\u0442\u043d\u043e.",position:"right"})]})]})]})]})})},p=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,i.Section,{title:"\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0448\u0430\u0442\u0442\u043b\u043e\u043c",style:{"text-align":"center"},buttons:(0,o.createComponentVNode)(2,i.Button,{content:"?",tooltip:"\u041f\u0430\u043d\u0435\u043b\u044c \u0434\u043b\u044f \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0433\u043e \u0443\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0432\u0430\u0448\u0438\u043c \u043b\u0438\u0447\u043d\u044b\u043c \u0448\u0430\u0442\u0442\u043b\u043e\u043c. \u0422\u0430\u043a \u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0448\u0443 \u0442\u0435\u043a\u0443\u0449\u0443\u044e \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0438 \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441\u0430\u043c\u043e\u0433\u043e \u0448\u0430\u0442\u0442\u043b\u0430!",tooltipPosition:"right"}),children:(0,o.createComponentVNode)(2,i.Flex,{ml:2,children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u043e\u0437\u0438\u0446\u0438\u044f",children:l.status?l.status:(0,o.createComponentVNode)(2,i.NoticeBox,{color:"red",children:"Shuttle Missing"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0412\u0430\u0448\u0430 \u043f\u043e\u0437\u0438\u0446\u0438\u044f",children:l.player_pos}),!!l.shuttle&&(!!l.docking_ports_len&&(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041e\u0442\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0448\u0430\u0442\u0442\u043b",children:l.docking_ports.map((function(e){return(0,o.createComponentVNode)(2,i.Button,{icon:"chevron-right",content:e.name,onClick:function(){return c("move",{move:e.id})}},e.name)}))})||(0,o.createFragment)([(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"Status",color:"red",children:(0,o.createComponentVNode)(2,i.NoticeBox,{color:"red",children:"Shuttle Locked"})}),!!l.admin_controlled&&(0,o.createComponentVNode)(2,a.LabeledListItem,{label:"\u0410\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044f",children:(0,o.createComponentVNode)(2,i.Button,{icon:"exclamation-circle",content:"\u0417\u0430\u043f\u0440\u043e\u0441\u0438\u0442\u044c \u0430\u0432\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u044e",disabled:!l.status,onClick:function(){return c("request")}})})],0))]})})})};t.ShuttleConsole=p;var m=function(e,t){var n=(0,r.useBackend)(t).data,a=n.randomPercent,c=n.allActionsPreview,l=n.color_choice;return(0,o.createComponentVNode)(2,i.Section,{stretchContents:!0,children:(0,o.createComponentVNode)(2,i.ProgressBar,{color:l,value:a,minValue:0,maxValue:100,children:(0,o.createVNode)(1,"center",null,(0,o.createComponentVNode)(2,i.NoticeBox,{className:"NoticeBox_"+l,mt:1,children:[(0,o.createVNode)(1,"img",null,null,1,{height:"64px",width:"64px",src:"data:image/jpeg;base64,"+c["spider_"+l],style:{"margin-left":"-6px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createVNode)(1,"br"),"Loading ",a+"%"]}),2)})})},h=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).timer=null,n.state={lastText:"text do be there",currentDisplay:[]},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n;var a=r.prototype;return a.tick=function(){var e=this.props,t=this.state;e.allMessages===t.lastText||e.end_terminal?e.end_terminal&&(clearTimeout(this.timer),setTimeout(e.onFinished,e.finishedTimeout)):(t.currentDisplay.push(e.allMessages),t.lastText=e.allMessages)},a.componentDidMount=function(){var e=this,t=this.props.linesPerSecond,n=void 0===t?2.5:t;this.timer=setInterval((function(){return e.tick()}),1e3/n)},a.componentWillUnmount=function(){clearTimeout(this.timer)},a.render=function(){return(0,o.createComponentVNode)(2,i.Box,{m:1,children:this.state.currentDisplay.map((function(e){return(0,o.createFragment)([e,(0,o.createVNode)(1,"br")],0,e)}))})},r}(o.Component)},function(e,t,n){"use strict";t.__esModule=!0,t.StationAlertConsoleContent=t.StationAlertConsole=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.StationAlertConsole=function(){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,c)})})};var c=function(e,t){var n=(0,r.useBackend)(t).data.alarms||[],a=n.Fire||[],c=n.Atmosphere||[],l=n.Power||[];return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Fire Alarms",children:(0,o.createVNode)(1,"ul",null,[0===a.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),a.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,i.Section,{title:"Atmospherics Alarms",children:(0,o.createVNode)(1,"ul",null,[0===c.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),c.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)}),(0,o.createComponentVNode)(2,i.Section,{title:"Power Alarms",children:(0,o.createVNode)(1,"ul",null,[0===l.length&&(0,o.createVNode)(1,"li","color-good","Systems Nominal",16),l.map((function(e){return(0,o.createVNode)(1,"li","color-average",e,0,null,e)}))],0)})],4)};t.StationAlertConsoleContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.SuitStorage=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.SuitStorage=function(e,t){var n=(0,r.useBackend)(t).data.uv;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{display:"flex",className:"Layout__content--flexColumn",children:[!!n&&(0,o.createComponentVNode)(2,i.Dimmer,{backgroundColor:"black",opacity:.85,children:(0,o.createComponentVNode)(2,i.Flex,{children:(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,textAlign:"center",mb:2,children:[(0,o.createComponentVNode)(2,i.Icon,{name:"spinner",spin:1,size:4,mb:4}),(0,o.createVNode)(1,"br"),"Disinfection of contents in progress..."]})})}),(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,s)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,s=c.helmet,d=c.suit,u=c.magboots,p=c.mask,m=c.storage,h=c.open,f=c.locked;return(0,o.createComponentVNode)(2,i.Section,{title:"Stored Items",flexGrow:"1",buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:f?"Unlock":"Lock",icon:f?"unlock":"lock",disabled:h,onClick:function(){return a("toggle_lock")}}),(0,o.createComponentVNode)(2,i.Button,{content:h?"Close unit":"Open unit",icon:h?"times-circle":"expand",color:h?"red":"green",disabled:f,onClick:function(){return a("toggle_open")}})],4),children:h&&!f?(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,l,{object:s,label:"Helmet",missingText:"helmet",eject:"dispense_helmet"}),(0,o.createComponentVNode)(2,l,{object:d,label:"Suit",missingText:"suit",eject:"dispense_suit"}),(0,o.createComponentVNode)(2,l,{object:u,label:"Magboots",missingText:"magboots",eject:"dispense_magboots"}),(0,o.createComponentVNode)(2,l,{object:p,label:"Breathmask",missingText:"mask",eject:"dispense_mask"}),(0,o.createComponentVNode)(2,l,{object:m,label:"Storage",missingText:"storage item",eject:"dispense_storage"})]}):(0,o.createComponentVNode)(2,i.Flex,{height:"100%",children:(0,o.createComponentVNode)(2,i.Flex.Item,{bold:!0,grow:"1",textAlign:"center",align:"center",color:"label",children:[(0,o.createComponentVNode)(2,i.Icon,{name:f?"lock":"exclamation-circle",size:"5",mb:3}),(0,o.createVNode)(1,"br"),f?"The unit is locked.":"The unit is closed."]})})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=(n.data,e.object),l=e.label,s=e.missingText,d=e.eject;return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:l,children:(0,o.createComponentVNode)(2,i.Box,{my:.5,children:c?(0,o.createComponentVNode)(2,i.Button,{my:-1,icon:"eject",content:c,onClick:function(){return a(d)}}):(0,o.createComponentVNode)(2,i.Box,{color:"silver",bold:!0,children:["No ",s," found."]})})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data;return(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"cog",textAlign:"center",content:"Start Disinfection Cycle",disabled:c.locked,onClick:function(){return a("cook")}})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SupermatterMonitor=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(80);t.SupermatterMonitor=function(e,t){var n=(0,r.useBackend)(t);n.act;return 0===n.data.active?(0,o.createComponentVNode)(2,l):(0,o.createComponentVNode)(2,s)};var l=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:"Detected Supermatter Shards",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"sync",content:"Refresh",onClick:function(){return l("refresh")}}),children:(0,o.createComponentVNode)(2,i.Box,{m:1,children:0===s.supermatters.length?(0,o.createVNode)(1,"h3",null,"No shards detected",16):(0,o.createComponentVNode)(2,i.Table,{children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,c.TableCell,{children:"Area"}),(0,o.createComponentVNode)(2,c.TableCell,{children:"Integrity"}),(0,o.createComponentVNode)(2,c.TableCell,{children:"Details"})]}),s.supermatters.map((function(e){return(0,o.createComponentVNode)(2,c.TableRow,{children:[(0,o.createComponentVNode)(2,c.TableCell,{children:e.area_name}),(0,o.createComponentVNode)(2,c.TableCell,{children:[e.integrity,"%"]}),(0,o.createComponentVNode)(2,c.TableCell,{children:(0,o.createComponentVNode)(2,i.Button,{icon:"sign-in-alt",content:"View",onClick:function(){return l("view",{view:e.uid})}})})]},e)}))]})})})})})},s=function(e,t){var n,c,l,s=(0,r.useBackend)(t),d=s.act,u=s.data;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{title:"Crystal Status",buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"caret-square-left",content:"Back",onClick:function(){return d("back")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Core Integrity",children:(0,o.createComponentVNode)(2,i.ProgressBar,{ranges:{good:[95,Infinity],average:[80,94],bad:[-Infinity,79]},minValue:"0",maxValue:"100",value:u.SM_integrity,children:[u.SM_integrity,"%"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Relative EER",children:(0,o.createComponentVNode)(2,i.Box,{color:(l=u.SM_power,l>300?"bad":l>150?"average":"good"),children:[u.SM_power," MeV/cm3"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Temperature",children:(0,o.createComponentVNode)(2,i.Box,{color:(c=u.SM_ambienttemp,c>5e3?"bad":c>4e3?"average":"good"),children:[u.SM_ambienttemp," K"]})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Pressure",children:(0,o.createComponentVNode)(2,i.Box,{color:(n=u.SM_ambientpressure,n>1e4?"bad":n>5e3?"average":"good"),children:[u.SM_ambientpressure," kPa"]})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Gas Composition",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Oxygen",children:[u.SM_gas_O2,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Carbon Dioxide",children:[u.SM_gas_CO2,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Nitrogen",children:[u.SM_gas_N2,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Plasma",children:[u.SM_gas_PL,"%"]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Other",children:[u.SM_gas_OTHER,"%"]})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndicateComputerSimple=void 0;var o=n(0),r=n(1),i=n(2),a=(n(52),n(3));t.SyndicateComputerSimple=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data;return(0,o.createComponentVNode)(2,a.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:l.rows.map((function(e){return(0,o.createComponentVNode)(2,i.Section,{title:e.title,buttons:(0,o.createComponentVNode)(2,i.Button,{content:e.buttontitle,disabled:e.buttondisabled,tooltip:e.buttontooltip,tooltipPosition:"left",onClick:function(){return c(e.buttonact)}}),children:[e.status,!!e.bullets&&(0,o.createComponentVNode)(2,i.Box,{children:e.bullets.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:e},e)}))})]},e.title)}))})})}},function(e,t,n){"use strict";t.__esModule=!0,t.SyndieCargoConsole=void 0;var o=n(0),r=n(43),i=n(24),a=n(1),c=n(2),l=n(3),s=(n(52),n(18));t.SyndieCargoConsole=function(e,t){return(0,o.createComponentVNode)(2,l.Window,{theme:"syndicate",children:(0,o.createComponentVNode)(2,l.Window.Content,{children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,m)]})})};var d=function(e,t){var n=(0,a.useLocalState)(t,"contentsModal",null),r=n[0],i=n[1],l=(0,a.useLocalState)(t,"contentsModalTitle",null),s=l[0],d=l[1];return null!==r&&null!==s?(0,o.createComponentVNode)(2,c.Modal,{maxWidth:"75%",width:window.innerWidth+"px",maxHeight:.75*window.innerHeight+"px",mx:"auto",children:[(0,o.createComponentVNode)(2,c.Box,{width:"100%",bold:!0,children:(0,o.createVNode)(1,"h1",null,[s,(0,o.createTextVNode)(" contents:")],0)}),(0,o.createComponentVNode)(2,c.Box,{children:r.map((function(e){return(0,o.createComponentVNode)(2,c.Box,{children:["- ",e]},e)}))}),(0,o.createComponentVNode)(2,c.Box,{m:2,children:(0,o.createComponentVNode)(2,c.Button,{content:"Close",onClick:function(){i(null),d(null)}})})]}):void 0},u=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.is_public,s=void 0===l?0:l,d=i.cash,u=i.wait_time,p=i.is_cooldown,m=i.telepads_status,h=i.adminAddCash,f=m,C="",g=0,N="";return"Pads not linked!"===m?(g=0,C="Attempts to link telepads to the console.",N="Link pads"):p?p&&(N="Cooldown...",C="Pads are cooling off...",g=1,f=1!==u?m+" (ETA: "+u+" seconds)":m+" (ETA: "+u+" second)"):(g=0,C="Teleports your crates to the market. A reminder, some of the crates are directly stolen from NT trading routes. That means they can be locked. We are NOT sorry for the inconvenience",N="Teleport"),(0,o.createComponentVNode)(2,c.Section,{title:"Status",children:(0,o.createComponentVNode)(2,c.LabeledList,{children:[0===s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Money Available",children:[d,(0,o.createComponentVNode)(2,c.Button,{tooltip:"Withdraw money from the console",content:"Withdraw",onClick:function(){return r("withdraw",d)}}),(0,o.createComponentVNode)(2,c.Button,{content:h,tooltip:"Bless the players with da money!",onClick:function(){return r("add_money",d)}})]}),(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Telepads Status",children:f}),0===s&&(0,o.createComponentVNode)(2,c.LabeledList.Item,{label:"Controls",children:[(0,o.createComponentVNode)(2,c.Button,{content:N,tooltip:C,disabled:g,onClick:function(){return r("teleport")}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Syndicate Black Market Log",onClick:function(){return r("showMessages")}})]})]})})},p=function(e,t){var n=(0,a.useBackend)(t),l=n.act,d=n.data,u=d.categories,p=d.supply_packs,m=(0,a.useSharedState)(t,"category","Emergency"),h=m[0],f=m[1],C=(0,a.useSharedState)(t,"search_text",""),g=C[0],N=C[1],b=(0,a.useLocalState)(t,"contentsModal",null),V=(b[0],b[1]),v=(0,a.useLocalState)(t,"contentsModalTitle",null),x=(v[0],v[1]),y=(0,s.createSearch)(g,(function(e){return e.name})),k=(0,r.flow)([(0,i.filter)((function(e){return e.cat===u.filter((function(e){return e.name===h}))[0].category||g})),g&&(0,i.filter)(y),(0,i.sortBy)((function(e){return e.name.toLowerCase()}))])(p),w="Crate Catalogue";return g?w="Results for '"+g+"':":h&&(w="Browsing "+h),(0,o.createComponentVNode)(2,c.Section,{title:w,buttons:(0,o.createComponentVNode)(2,c.Dropdown,{width:"190px",options:u.map((function(e){return e.name})),selected:h,onSelected:function(e){return f(e)}}),children:[(0,o.createComponentVNode)(2,c.Input,{fluid:!0,placeholder:"Search for...",onInput:function(e,t){return N(t)},mb:1}),(0,o.createComponentVNode)(2,c.Box,{maxHeight:25,overflowY:"auto",overflowX:"hidden",children:(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:k.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{bold:!0,children:[e.name," (",e.cost," Credits)"]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Order 1",icon:"shopping-cart",onClick:function(){return l("order",{crate:e.ref,multiple:0})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Order Multiple",icon:"cart-plus",onClick:function(){return l("order",{crate:e.ref,multiple:1})}}),(0,o.createComponentVNode)(2,c.Button,{content:"View Contents",icon:"search",onClick:function(){V(e.contents),x(e.name)}})]})]},e.name)}))})})]})},m=function(e,t){var n=(0,a.useBackend)(t),r=n.act,i=n.data,l=i.requests,s=i.canapprove,d=i.orders;return(0,o.createComponentVNode)(2,c.Section,{title:"Details",children:(0,o.createComponentVNode)(2,c.Box,{maxHeight:15,overflowY:"auto",overflowX:"hidden",children:[(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Requests"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:l.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:[(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]}),(0,o.createComponentVNode)(2,c.Table.Cell,{textAlign:"right",pr:1,children:[(0,o.createComponentVNode)(2,c.Button,{content:"Approve",color:"green",disabled:!s,onClick:function(){return r("approve",{ordernum:e.ordernum})}}),(0,o.createComponentVNode)(2,c.Button,{content:"Deny",color:"red",onClick:function(){return r("deny",{ordernum:e.ordernum})}})]})]},e.ordernum)}))}),(0,o.createComponentVNode)(2,c.Box,{bold:!0,children:"Confirmed Orders"}),(0,o.createComponentVNode)(2,c.Table,{m:"0.5rem",children:d.map((function(e){return(0,o.createComponentVNode)(2,c.Table.Row,{children:(0,o.createComponentVNode)(2,c.Table.Cell,{children:[(0,o.createComponentVNode)(2,c.Box,{children:["- #",e.ordernum,": ",e.supply_type," for ",(0,o.createVNode)(1,"b",null,e.orderedby,0)]}),(0,o.createComponentVNode)(2,c.Box,{italic:!0,children:["Reason: ",e.comment]})]})},e.ordernum)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TTSSeedsExplorerContent=t.TTSSeedsExplorer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c={0:"\u0411\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u044b\u0435",1:"Tier I",2:"Tier II",3:"Tier III",4:"Tier IV"},l={"\u041c\u0443\u0436\u0441\u043a\u043e\u0439":{icon:"mars",color:"blue"},"\u0416\u0435\u043d\u0441\u043a\u0438\u0439":{icon:"venus",color:"purple"},"\u041b\u044e\u0431\u043e\u0439":{icon:"venus-mars",color:"white"}},s=function(e,t,n,r){return void 0===r&&(r=null),e.map((function(e){var a,c=null!=(a=e[r])?a:e;return(0,o.createComponentVNode)(2,i.Button.Checkbox,{checked:t.includes(e),content:c,onClick:function(){t.includes(e)?n(t.filter((function(t){var n;return(null!=(n=t[r])?n:t)!==e}))):n([e].concat(t))}},c)}))};t.TTSSeedsExplorer=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{className:"Layout__content--flexColumn",children:(0,o.createComponentVNode)(2,d)})})};var d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,d=n.data,u=d.providers,p=d.seeds,m=d.selected_seed,h=d.phrases,f=d.donator_level,C=p.map((function(e){return e.category})).filter((function(e,t,n){return n.indexOf(e)===t})),g=p.map((function(e){return e.gender})).filter((function(e,t,n){return n.indexOf(e)===t})),N=p.map((function(e){return e.donator_level})).filter((function(e,t,n){return n.indexOf(e)===t})).map((function(e){return c[e]})),b=(0,r.useLocalState)(t,"selectedProviders",u),V=b[0],v=b[1],x=(0,r.useLocalState)(t,"selectedGenders",g),y=x[0],k=x[1],w=(0,r.useLocalState)(t,"selectedCategories",C),_=w[0],B=w[1],S=(0,r.useLocalState)(t,"selectedDonatorLevels",N),L=S[0],A=S[1],I=(0,r.useLocalState)(t,"selectedPhrase",h[0]),E=I[0],D=I[1],T=(0,r.useLocalState)(t,"searchtext",""),F=T[0],M=T[1],P=s(u,V,v,"name"),O=s(g,y,k),R=s(C,_,B),j=s(N,L,A),U=(0,o.createComponentVNode)(2,i.Dropdown,{options:h,selected:E.replace(/(.{25})..+/,"$1..."),width:"220px",onSelected:function(e){return D(e)}}),z=(0,o.createComponentVNode)(2,i.Input,{placeholder:"\u041d\u0430\u0437\u0432\u0430\u043d\u0438\u0435...",fluid:!0,onInput:function(e,t){return M(t)}}),W=p.sort((function(e,t){var n=e.name.toLowerCase(),o=t.name.toLowerCase();return n>o?1:n0&&m!==e.name?"orange":"white",children:e.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,opacity:m===e.name?.5:.25,textAlign:"left",children:e.category}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,opacity:.5,textColor:m===e.name?"white":l[e.gender].color,textAlign:"left",children:(0,o.createComponentVNode)(2,i.Icon,{mx:1,size:1.2,name:l[e.gender].icon})}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,opacity:.5,textColor:"white",textAlign:"right",children:e.donator_level>0&&(0,o.createFragment)([c[e.donator_level],(0,o.createComponentVNode)(2,i.Icon,{ml:1,mr:2,name:"coins"})],0)})]},e.name)}));return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"\u0424\u0438\u043b\u044c\u0442\u0440\u044b",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u044b",children:P}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u043e\u043b",children:O}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438",children:R}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0423\u0440\u043e\u0432\u0435\u043d\u044c \u043f\u043e\u0434\u043f\u0438\u0441\u043a\u0438",children:j}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u0424\u0440\u0430\u0437\u0430",children:U}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"\u041f\u043e\u0438\u0441\u043a",children:z})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0413\u043e\u043b\u043e\u0441\u0430 ("+W.length+"/"+p.length+")",flexGrow:"1",children:(0,o.createComponentVNode)(2,i.Table,{children:H})}),(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.BlockQuote,{children:[(0,o.createComponentVNode)(2,i.Box,{children:"\u0414\u043b\u044f \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430 \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0441\u0442\u0443\u0449\u0438\u0445 \u0440\u0430\u0441\u0445\u043e\u0434\u043e\u0432 \u0447\u0430\u0441\u0442\u044c \u0433\u043e\u043b\u043e\u0441\u043e\u0432 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u044b\u043c\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u0430 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044c\u043d\u0443\u044e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0430."}),(0,o.createComponentVNode)(2,i.Box,{mt:2,italic:!0,children:"\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u0443\u0437\u043d\u0430\u0442\u044c \u0432 \u043d\u0430\u0448\u0435\u043c Discord-\u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435."})]})})],4)};t.TTSSeedsExplorerContent=d},function(e,t,n){"use strict";t.__esModule=!0,t.TachyonArrayContent=t.TachyonArray=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TachyonArray=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.records,u=void 0===d?[]:d,p=s.explosion_target,m=s.toxins_tech,h=s.printing;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Shift's Target",children:p}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Current Toxins Level",children:m}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Administration",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"print",content:"Print All Logs",disabled:!u.length||h,align:"center",onClick:function(){return l("print_logs")}}),(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",content:"Delete All Logs",disabled:!u.length,color:"bad",align:"center",onClick:function(){return l("delete_logs")}})]})]})}),u.length?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,i.NoticeBox,{children:"No Records"})]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.records,l=void 0===c?[]:c;return(0,o.createComponentVNode)(2,i.Section,{title:"Logged Explosions",children:(0,o.createComponentVNode)(2,i.Flex,{children:(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Time"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Epicenter"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Actual Size"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Theoretical Size"})]}),l.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.logged_time}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.epicenter}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.actual_size_message}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.theoretical_size_message}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button.Confirm,{icon:"trash",content:"Delete",color:"bad",onClick:function(){return a("delete_record",{index:e.index})}})})]},e.index)}))]})})})})};t.TachyonArrayContent=c},function(e,t,n){"use strict";t.__esModule=!0,t.Tank=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Tank=function(e,t){var n,c=(0,r.useBackend)(t),l=c.act,s=c.data;return n=s.has_mask?(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mask",children:(0,o.createComponentVNode)(2,i.Button,{icon:s.connected?"check":"times",content:s.connected?"Internals On":"Internals Off",selected:s.connected,onClick:function(){return l("internals")}})}):(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Mask",color:"red",children:"No Mask Equipped"}),(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Tank Pressure",children:(0,o.createComponentVNode)(2,i.ProgressBar,{value:s.tankPressure/1013,ranges:{good:[.35,Infinity],average:[.15,.35],bad:[-Infinity,.15]},children:s.tankPressure+" kPa"})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Release Pressure",children:[(0,o.createComponentVNode)(2,i.Button,{icon:"fast-backward",disabled:s.ReleasePressure===s.minReleasePressure,tooltip:"Min",onClick:function(){return l("pressure",{pressure:"min"})}}),(0,o.createComponentVNode)(2,i.NumberInput,{animated:!0,value:parseFloat(s.releasePressure),width:"65px",unit:"kPa",minValue:s.minReleasePressure,maxValue:s.maxReleasePressure,onChange:function(e,t){return l("pressure",{pressure:t})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"fast-forward",disabled:s.ReleasePressure===s.maxReleasePressure,tooltip:"Max",onClick:function(){return l("pressure",{pressure:"max"})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"",disabled:s.ReleasePressure===s.defaultReleasePressure,tooltip:"Reset",onClick:function(){return l("pressure",{pressure:"reset"})}})]}),n]})})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TankDispenser=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TankDispenser=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.o_tanks,d=l.p_tanks;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Dispense Oxygen Tank ("+s+")",disabled:0===s,icon:"arrow-circle-down",onClick:function(){return c("oxygen")}})}),(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Dispense Plasma Tank ("+d+")",disabled:0===d,icon:"arrow-circle-down",onClick:function(){return c("plasma")}})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsCore=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TcommsCore=function(e,t){var n=(0,r.useBackend)(t),u=(n.act,n.data.ion),p=(0,r.useLocalState)(t,"tabIndex",0),m=p[0],h=p[1];return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[1===u&&(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Tabs,{children:[(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:0===m,onClick:function(){return h(0)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"wrench"}),"Configuration"]},"ConfigPage"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:1===m,onClick:function(){return h(1)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"link"}),"Device Linkage"]},"LinkagePage"),(0,o.createComponentVNode)(2,i.Tabs.Tab,{selected:2===m,onClick:function(){return h(2)},children:[(0,o.createComponentVNode)(2,i.Icon,{name:"user-times"}),"User Filtering"]},"FilterPage")]}),function(e){switch(e){case 0:return(0,o.createComponentVNode)(2,l);case 1:return(0,o.createComponentVNode)(2,s);case 2:return(0,o.createComponentVNode)(2,d);default:return"SOMETHING WENT VERY WRONG PLEASE AHELP"}}(m)]})})};var c=function(){return(0,o.createComponentVNode)(2,i.NoticeBox,{children:"ERROR: An Ionospheric overload has occured. Please wait for the machine to reboot. This cannot be manually done."})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.active,s=c.sectors_available,d=c.nttc_toggle_jobs,u=c.nttc_toggle_job_color,p=c.nttc_toggle_name_color,m=c.nttc_toggle_command_bold,h=c.nttc_job_indicator_type,f=c.nttc_setting_language,C=c.network_id;return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,i.Button,{content:l?"On":"Off",selected:l,icon:"power-off",onClick:function(){return a("toggle_active")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Sector Coverage",children:s})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Radio Configuration",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Job Announcements",children:(0,o.createComponentVNode)(2,i.Button,{content:d?"On":"Off",selected:d,icon:"user-tag",onClick:function(){return a("nttc_toggle_jobs")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Job Departmentalisation",children:(0,o.createComponentVNode)(2,i.Button,{content:u?"On":"Off",selected:u,icon:"clipboard-list",onClick:function(){return a("nttc_toggle_job_color")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Name Departmentalisation",children:(0,o.createComponentVNode)(2,i.Button,{content:p?"On":"Off",selected:p,icon:"user-tag",onClick:function(){return a("nttc_toggle_name_color")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Command Amplification",children:(0,o.createComponentVNode)(2,i.Button,{content:m?"On":"Off",selected:m,icon:"volume-up",onClick:function(){return a("nttc_toggle_command_bold")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Advanced",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Job Announcement Format",children:(0,o.createComponentVNode)(2,i.Button,{content:h||"Unset",selected:h,icon:"pencil-alt",onClick:function(){return a("nttc_job_indicator_type")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Language Conversion",children:(0,o.createComponentVNode)(2,i.Button,{content:f||"Unset",selected:f,icon:"globe",onClick:function(){return a("nttc_setting_language")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,i.Button,{content:C||"Unset",selected:C,icon:"server",onClick:function(){return a("network_id")}})})]})}),(0,o.createComponentVNode)(2,i.Section,{title:"Maintenance",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Import Configuration",icon:"file-import",onClick:function(){return a("import")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Export Configuration",icon:"file-export",onClick:function(){return a("export")}})]})],4)},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.link_password,s=c.relay_entries;return(0,o.createComponentVNode)(2,i.Section,{title:"Device Linkage",children:[(0,o.createComponentVNode)(2,i.LabeledList,{children:(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Linkage Password",children:(0,o.createComponentVNode)(2,i.Button,{content:l||"Unset",selected:l,icon:"lock",onClick:function(){return a("change_password")}})})}),(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Status"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Unlink"})]}),s.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:1===e.status?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Online"}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Offline"})}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Unlink",icon:"unlink",onClick:function(){return a("unlink",{addr:e.addr})}})})]},e.addr)}))]})]})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.filtered_users;return(0,o.createComponentVNode)(2,i.Section,{title:"User Filtering",buttons:(0,o.createComponentVNode)(2,i.Button,{content:"Add User",icon:"user-plus",onClick:function(){return a("add_filter")}}),children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{style:{width:"90%"},children:"User"}),(0,o.createComponentVNode)(2,i.Table.Cell,{style:{width:"10%"},children:"Actions"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Remove",icon:"user-times",onClick:function(){return a("remove_filter",{user:e})}})})]},e)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.TcommsRelay=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.TcommsRelay=function(e,t){var n=(0,r.useBackend)(t),s=n.act,d=n.data,u=d.linked,p=d.active,m=d.network_id;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"Relay Configuration",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Machine Power",children:(0,o.createComponentVNode)(2,i.Button,{content:p?"On":"Off",selected:p,icon:"power-off",onClick:function(){return s("toggle_active")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Network ID",children:(0,o.createComponentVNode)(2,i.Button,{content:m||"Unset",selected:m,icon:"server",onClick:function(){return s("network_id")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Link Status",children:1===u?(0,o.createComponentVNode)(2,i.Box,{color:"green",children:"Linked"}):(0,o.createComponentVNode)(2,i.Box,{color:"red",children:"Unlinked"})})]})}),1===u?(0,o.createComponentVNode)(2,c):(0,o.createComponentVNode)(2,l)]})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data,l=c.linked_core_id,s=c.linked_core_addr,d=c.hidden_link;return(0,o.createComponentVNode)(2,i.Section,{title:"Link Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Linked Core ID",children:l}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Linked Core Address",children:s}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Hidden Link",children:(0,o.createComponentVNode)(2,i.Button,{content:d?"Yes":"No",icon:d?"eye-slash":"eye",selected:d,onClick:function(){return a("toggle_hidden_link")}})}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Unlink",children:(0,o.createComponentVNode)(2,i.Button,{content:"Unlink",icon:"unlink",color:"red",onClick:function(){return a("unlink")}})})]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act,c=n.data.cores;return(0,o.createComponentVNode)(2,i.Section,{title:"Detected Cores",children:(0,o.createComponentVNode)(2,i.Table,{m:"0.5rem",children:[(0,o.createComponentVNode)(2,i.Table.Row,{header:!0,children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network Address"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Network ID"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Sector"}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:"Link"})]}),c.map((function(e){return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.addr}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.net_id}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:e.sector}),(0,o.createComponentVNode)(2,i.Table.Cell,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Link",icon:"link",onClick:function(){return a("link",{addr:e.addr})}})})]},e.addr)}))]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Teleporter=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=n(188);t.Teleporter=function(e,t){var n=(0,r.useBackend)(t),l=n.act,s=n.data,d=s.targetsTeleport?s.targetsTeleport:{},u=s.calibrated,p=s.calibrating,m=s.powerstation,h=s.regime,f=s.teleporterhub,C=s.target,g=s.locked,N=s.accuracy;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(!m||!f)&&(0,o.createComponentVNode)(2,i.Section,{title:"Error",children:[f,!m&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:" Powerstation not linked "}),m&&!f&&(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:" Teleporter hub not linked "})]}),m&&f&&(0,o.createComponentVNode)(2,i.Section,{title:"Status",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:[(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Regime",children:[(0,o.createComponentVNode)(2,i.Button,{tooltip:"Teleport to another teleport hub. ",color:1===h?"good":null,onClick:function(){return l("setregime",{regime:1})},children:"Gate"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:"One-way teleport. ",color:0===h?"good":null,onClick:function(){return l("setregime",{regime:0})},children:"Teleporter"}),(0,o.createComponentVNode)(2,i.Button,{tooltip:"Teleport to a location stored in a GPS device. ",color:2===h?"good":null,disabled:!g,onClick:function(){return l("setregime",{regime:2})},children:"GPS"})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Teleport target",children:[0===h&&(0,o.createComponentVNode)(2,i.Dropdown,{width:"220px",selected:C,options:Object.keys(d),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:d[e].x,y:d[e].y,z:d[e].z})}}),1===h&&(0,o.createComponentVNode)(2,i.Dropdown,{width:"220px",selected:C,options:Object.keys(d),color:"None"!==C?"default":"bad",onSelected:function(e){return l("settarget",{x:d[e].x,y:d[e].y,z:d[e].z})}}),2===h&&(0,o.createComponentVNode)(2,i.Box,{children:C})]}),(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:"Calibration",children:["None"!==C&&(0,o.createComponentVNode)(2,i.Grid,{children:[(0,o.createComponentVNode)(2,c.GridColumn,{size:"2",children:p&&(0,o.createComponentVNode)(2,i.Box,{color:"average",children:"In Progress"})||(u||N>=3)&&(0,o.createComponentVNode)(2,i.Box,{color:"good",children:"Optimal"})||(0,o.createComponentVNode)(2,i.Box,{color:"bad",children:"Sub-Optimal"})}),(0,o.createComponentVNode)(2,c.GridColumn,{size:"3",children:(0,o.createComponentVNode)(2,i.Box,{"class":"ml-1",children:(0,o.createComponentVNode)(2,i.Button,{icon:"sync-alt",tooltip:"Calibrates the hub. Accidents may occur when the calibration is not optimal.",disabled:!(!u&&!p),onClick:function(){return l("calibrate")}})})})]}),"None"===C&&(0,o.createComponentVNode)(2,i.Box,{lineHeight:"21px",children:"No target set"})]})]})}),!!(g&&m&&f&&2===h)&&(0,o.createComponentVNode)(2,i.Section,{title:"GPS",children:(0,o.createComponentVNode)(2,i.Flex,{direction:"row",justify:"space-around",children:[(0,o.createComponentVNode)(2,i.Button,{content:"Upload GPS data",tooltip:"Loads the GPS data from the device.",icon:"upload",onClick:function(){return l("load")}}),(0,o.createComponentVNode)(2,i.Button,{content:"Eject",tooltip:"Ejects the GPS device",icon:"eject",onClick:function(){return l("eject")}})]})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.ThiefKit=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.ThiefKit=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.uses,d=l.possible_uses,u=l.multi_uses,p=l.kits,m=l.choosen_kits;return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,i.Section,{title:"\u041d\u0430\u0431\u043e\u0440 \u0413\u0438\u043b\u044c\u0434\u0438\u0438 \u0412\u043e\u0440\u043e\u0432:",children:(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:[(0,o.createVNode)(1,"i",null,"\u0423\u0432\u0435\u0441\u0438\u0441\u0442\u0430\u044f \u043a\u043e\u0440\u043e\u0431\u043a\u0430, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043b\u0435\u0436\u0438\u0442 \u0441\u043d\u0430\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0433\u0438\u043b\u044c\u0434\u0438\u0438 \u0432\u043e\u0440\u043e\u0432.",16),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"i",null,"\u041d\u0430\u0431\u043e\u0440 \u0432\u043e\u0440\u0430-\u0448\u0440\u0435\u0434\u0438\u043d\u0433\u0435\u0440\u0430. \u041d\u0435\u043b\u044c\u0437\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u0447\u0442\u043e \u0432 \u043d\u0451\u043c, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0437\u0430\u0433\u043b\u044f\u043d\u0435\u0448\u044c \u0432\u043d\u0443\u0442\u0440\u044c.",16),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"p",null,(0,o.createVNode)(1,"b",null,"\u041a\u0430\u043a\u043e\u0435 \u0441\u043d\u0430\u0440\u044f\u0436\u0435\u043d\u0438\u0435 \u0432 \u043d\u0451\u043c \u043b\u0435\u0436\u0438\u0442?:",16),2),(0,o.createVNode)(1,"p",null,[(0,o.createTextVNode)("\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043e \u043d\u0430\u0431\u043e\u0440\u043e\u0432:"),(0,o.createComponentVNode)(2,i.Box,{as:"span",color:s<=0?"good":s=d,onClick:function(){return c("randomKit")}}),children:(0,o.createComponentVNode)(2,i.LabeledList,{children:p&&p.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Button,{icon:"upload",content:"\u0412\u044b\u0431\u0440\u0430\u0442\u044c",disabled:e.was_taken||s>=d,onClick:function(){return c("takeKit",{item:e.type})}}),(0,o.createComponentVNode)(2,i.Button,{icon:"undo",disabled:!e.was_taken,onClick:function(){return c("undoKit",{item:e.type})}})]}),children:(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:e.desc})},e.type)}))})}),(0,o.createComponentVNode)(2,i.Section,{title:"\u0412\u044b\u0431\u0440\u0430\u043d\u043d\u044b\u0435 \u043d\u0430\u0431\u043e\u0440\u044b:",children:(0,o.createComponentVNode)(2,i.LabeledList,{children:m&&m.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{label:e.name,buttons:(0,o.createComponentVNode)(2,i.Button,{icon:"undo",content:"\u041e\u0442\u043c\u0435\u043d\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440",onClick:function(){return c("undoKit",{item:e.type})}}),children:(0,o.createComponentVNode)(2,i.Box,{italic:!0,children:" "})},e.type)}))})}),(0,o.createComponentVNode)(2,i.Section,{children:[(0,o.createComponentVNode)(2,i.Button,{content:"\u0417\u0430\u0432\u0435\u0440\u0448\u0438\u0442\u044c \u0432\u044b\u0431\u043e\u0440",color:sp}),children:(0,o.createComponentVNode)(2,l.Box,{italic:!0,children:(0,a.decodeHtmlEntities)(e.desc)})},(0,a.decodeHtmlEntities)(e.name))}))})]})]})},f=function(e,t){var n=(0,c.useBackend)(t),s=(n.act,n.data.exploitable),u=(0,c.useLocalState)(t,"selectedRecord",s[0]),p=u[0],m=u[1],h=(0,c.useLocalState)(t,"searchText",""),f=h[0],C=h[1],g=function(e,t){void 0===t&&(t="");var n=(0,a.createSearch)(t,(function(e){return e.name}));return(0,i.flow)([(0,r.filter)((function(e){return null==e?void 0:e.name})),t&&(0,r.filter)(n),(0,r.sortBy)((function(e){return e.name}))])(e)}(s,f);return(0,o.createComponentVNode)(2,l.Section,{title:"Exploitable Records",children:(0,o.createComponentVNode)(2,l.Flex,{children:[(0,o.createComponentVNode)(2,d.FlexItem,{basis:20,children:[(0,o.createComponentVNode)(2,l.Input,{fluid:!0,mb:1,placeholder:"Search Crew",onInput:function(e,t){return C(t)}}),(0,o.createComponentVNode)(2,l.Tabs,{vertical:!0,children:g.map((function(e){return(0,o.createComponentVNode)(2,l.Tabs.Tab,{selected:e===p,onClick:function(){return m(e)},children:e.name},e)}))})]}),(0,o.createComponentVNode)(2,l.Flex.Item,{grow:1,basis:0,children:(0,o.createComponentVNode)(2,l.Section,{title:"Name: "+p.name,children:[(0,o.createComponentVNode)(2,l.Box,{children:["Age: ",p.age]}),(0,o.createComponentVNode)(2,l.Box,{children:["Fingerprint: ",p.fingerprint]}),(0,o.createComponentVNode)(2,l.Box,{children:["Rank: ",p.rank]}),(0,o.createComponentVNode)(2,l.Box,{children:["Sex: ",p.sex]}),(0,o.createComponentVNode)(2,l.Box,{children:["Species: ",p.species]})]})})]})})};(0,p.modalRegisterBodyOverride)("become_contractor",(function(e,t){var n,r,i,a=(0,c.useBackend)(t).data,d=(a.contractor||{}).time_left,u=!!(null==a||null==(n=a.contractor)?void 0:n.available),m=!!(null==a||null==(r=a.contractor)?void 0:r.affordable),h=!!(null==a||null==(i=a.contractor)?void 0:i.accepted);return(0,o.createComponentVNode)(2,l.Section,{level:"2",m:"-1rem",pb:"1rem",title:(0,o.createFragment)([(0,o.createComponentVNode)(2,l.Icon,{name:"suitcase"}),(0,o.createTextVNode)("\xa0 Contracting Opportunity")],4),children:[(0,o.createComponentVNode)(2,l.Box,{mx:"0.5rem",mb:"0.5rem",children:[(0,o.createVNode)(1,"b",null,"Your achievements for the Syndicate have not gone unnoticed, agent. We have decided to give you the rare opportunity of becoming a Contractor.",16),(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"br"),"For the small price of 20 telecrystals, we will upgrade your rank to that of a Contractor, allowing you to undertake kidnapping contracts for TC and credits.",(0,o.createVNode)(1,"br"),"In addition, you will be supplied with a Contractor Kit which contains a Contractor Uplink, standard issue contractor gear and three random low cost items.",(0,o.createVNode)(1,"br"),(0,o.createVNode)(1,"br"),"More detailed instructions can be found within your kit, should you accept this offer."]}),(0,o.createComponentVNode)(2,l.Button.Confirm,{disabled:!u||h,italic:!u,bold:u,icon:u&&!h&&"check",color:"good",content:h?"Accepted":u?["Accept Offer",(0,o.createComponentVNode)(2,s.Countdown,{timeLeft:d,format:function(e,t){return" ("+t+")"}},"countdown")]:m?"Offer expired":"Insufficient TC",position:"absolute",right:"1rem",bottom:"-0.75rem",onClick:function(){return(0,p.modalAnswer)(t,e.id,1)}})]})}))},function(e,t,n){"use strict";t.__esModule=!0,t.VampireSpecMenu=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.VampireSpecMenu=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{resizable:!0,theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Flex,{justify:"space-around",children:[(0,o.createComponentVNode)(2,c),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,i.Divider,{vertical:1}),(0,o.createComponentVNode)(2,u)]})})})};var c=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Hemomancer",children:[(0,o.createVNode)(1,"h3",null,"Focuses on blood magic and the manipulation of blood around you.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Vampiric claws",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to summon a robust pair of claws that attack rapidly, drain a targets blood, and heal you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood Barrier",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to select two turfs and create a wall between them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood tendrils",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to slow everyone in a targeted 3x3 area after a short delay.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Sanguine pool",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to travel at high speeds for a short duration. Doing this leaves behind blood splatters. You can move through anything but walls and space when doing this.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Predator senses",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to sniff out anyone within the same sector as you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood eruption",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to manipulate all nearby blood splatters, in 4 tiles around you, into spikes that impale anyone stood ontop of them.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"The blood bringers rite",16),(0,o.createTextVNode)(": When toggled you will rapidly drain the blood of everyone who is nearby and use it to heal yourself slightly and remove any incapacitating effects rapidly.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Hemomancer",onClick:function(){return a("hemomancer")}})]})})},l=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Umbrae",children:[(0,o.createVNode)(1,"h3",null,"Focuses on darkness, stealth ambushing and mobility.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Cloak of darkness",16),(0,o.createTextVNode)(": Unlocked at 150 blood, when toggled, allows you to become nearly invisible and move rapidly when in dark regions. While active, burn damage is more effective against you.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow anchor",16),(0,o.createTextVNode)(": Unlocked at 250 blood, casting it will create an anchor at the cast location after a short delay. If you then cast the ability again, you are teleported back to the anchor. If you do not cast again within 2 minutes, you are forced back to the anchor. It will not teleport you between Z levels.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Shadow snare",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to summon a trap that when crossed blinds and ensares the victim. This trap is hard to see, but withers in the light.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dark passage",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to target a turf on screen, you will then teleport to that turf.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Extinguish",16),(0,o.createTextVNode)(": Unlocked at 600 blood, allows you to snuff out nearby electronic light sources and glowshrooms.")],4),(0,o.createVNode)(1,"b",null,"Shadow boxing",16),": Unlocked at 800 blood, sends out shadow clones towards a target, damaging them while you remain in range.",(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Eternal darkness",16),(0,o.createTextVNode)(": When toggled, you consume yourself in unholy darkness, only the strongest of lights will be able to see through it. It will also cause nearby creatures to freeze.")],4),(0,o.createVNode)(1,"p",null,"In addition, you also gain permament X-ray vision.",16),(0,o.createComponentVNode)(2,i.Button,{content:"Umbrae",onClick:function(){return a("umbrae")}})]})})},s=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Gargantua",children:[(0,o.createVNode)(1,"h3",null,"Focuses on tenacity and melee damage.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rejuvenate",16),(0,o.createTextVNode)(": Will heal you at an increased rate based on how much damage you have taken.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell",16),(0,o.createTextVNode)(": Unlocked at 150 blood, increases your resistance to physical damage, stuns and stamina for 30 seconds. While it is active you cannot fire guns.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Seismic stomp",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to stomp the ground to send out a shockwave, knocking people back.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood rush",16),(0,o.createTextVNode)(": Unlocked at 250 blood, gives you a short speed boost when cast.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood swell II",16),(0,o.createTextVNode)(": Unlocked at 400 blood, increases all melee damage by 10.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Overwhelming force",16),(0,o.createTextVNode)(": Unlocked at 600 blood, when toggled, if you bump into a door that you dont have access to, it will force it open. In addition, you cannot be pushed or pulled while it is active.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Demonic grasp",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to send out a demonic hand to snare someone. If you are on disarm/grab intent you will push/pull the target, respectively.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Charge",16),(0,o.createTextVNode)(": You gain the ability to charge at a target. Destroying and knocking back pretty much anything you collide with.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Gargantua",onClick:function(){return a("gargantua")}})]})})},d=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Dantalion",children:[(0,o.createVNode)(1,"h3",null,"Focuses on thralling and illusions.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Enthrall",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Thralls your target to your will, requires you to stand still. Does not work on mindshielded or already enthralled/mindslaved people.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall cap",16),(0,o.createTextVNode)(": You can only thrall a max of 1 person at a time. This can be increased at 400 blood, 600 blood and at full power to a max of 4 thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Thrall commune",16),(0,o.createTextVNode)(": Unlocked at 150 blood, Allows you to talk to your thralls, your thralls can talk back in the same way.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Subspace swap",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to swap positions with a target.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Pacify",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to pacify a target, preventing them from causing harm for 40 seconds.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Decoy",16),(0,o.createTextVNode)(": Unlocked at 400 blood, briefly turn invisible and send out an illusion to fool everyone nearby.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Rally thralls",16),(0,o.createTextVNode)(": Unlocked at 600 blood, removes all incapacitating effects from nearby thralls.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Blood bond",16),(0,o.createTextVNode)(": Unlocked at 800 blood, when cast, all nearby thralls become linked to you. If anyone in the network takes damage, it is shared equally between everyone in the network. If a thrall goes out of range, they will be removed from the network.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Mass Hysteria",16),(0,o.createTextVNode)(": Casts a powerful illusion that, blinds then make everyone nearby perceive others to looks like random animals.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Dantalion",onClick:function(){return a("dantalion")}})]})})},u=function(e,t){var n=(0,r.useBackend)(t),a=n.act;n.data.subclasses;return(0,o.createComponentVNode)(2,i.Flex.Item,{grow:1,basis:"25%",children:(0,o.createComponentVNode)(2,i.Section,{title:"Bestia",children:[(0,o.createVNode)(1,"h3",null,"Focuses on transformations and trophies harvesting.",16),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Check Trophies",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to check current trophies amount and all the passive effects they provide.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dissect",16),(0,o.createTextVNode)(": Unlocked at 150 blood, main source of gaining power, besides blood, allows you to harvest human organs, as a trophies, to passively increase your might.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Dissect Cap",16),(0,o.createTextVNode)(": You can only harvest one organ trophie at a time. This can be increased at 600 blood and at full power to a max of 3 trophies per victim.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Infected Trophy",16),(0,o.createTextVNode)(": Unlocked at 150 blood, allows you to stun enemies from the safe distance and infect them with the deadly Grave Fever.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Lunge",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to rapidly close distance to a victim or escape a dangerous situation.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Mark the Prey",16),(0,o.createTextVNode)(": Unlocked at 250 blood, allows you to mark a victim which drastically reduces their movement speed and forces them to take spontaneous actions.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Metamorphosis - Bats",16),(0,o.createTextVNode)(": Unlocked at 400 blood, allows you to shapeshift into the deadly and vicious space bats swarm.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Anabiosis",16),(0,o.createTextVNode)(": Unlocked at 600 blood, ancient technique which allows you to cure almost any wounds while sleeping in a coffin.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Summon Bats",16),(0,o.createTextVNode)(": Unlocked at 800 blood, allows you to call extraplanar space bats to aid you in combat.")],4),(0,o.createVNode)(1,"p",null,[(0,o.createVNode)(1,"b",null,"Full Power",16),(0,o.createComponentVNode)(2,i.Divider),(0,o.createVNode)(1,"b",null,"Metamorphosis - Hound",16),(0,o.createTextVNode)(": Allows you to shapeshift into the ultimate form of bluespace entity which took over your soul.")],4),(0,o.createComponentVNode)(2,i.Button,{content:"Bestia",onClick:function(){return a("bestia")}})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VampireTrophiesStatus=void 0;var o=n(0),r=n(1),i=n(2),a=n(3),c=function(e){return(Math.round(10*e)/10).toFixed(1)};t.VampireTrophiesStatus=function(e,t){return(0,o.createComponentVNode)(2,a.Window,{theme:"nologo",children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[(0,o.createComponentVNode)(2,l),(0,o.createComponentVNode)(2,s),(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,u),(0,o.createComponentVNode)(2,p),(0,o.createComponentVNode)(2,m),(0,o.createComponentVNode)(2,h),(0,o.createComponentVNode)(2,f),(0,o.createComponentVNode)(2,C),(0,o.createComponentVNode)(2,g),(0,o.createComponentVNode)(2,N)]})})};var l=function(e,t){var n=(0,r.useBackend)(t),a=(n.act,n.data),c=a.hearts,l=a.lungs,s=a.livers,d=a.kidneys,u=a.eyes,p=a.ears,m=a.trophies_max_gen,h=a.trophies_max_crit,f=a.icon_hearts,C=a.icon_lungs,g=a.icon_livers,N=a.icon_kidneys,b=a.icon_eyes,V=a.icon_ears;return(0,o.createComponentVNode)(2,i.Section,{title:"Trophies",color:"red",textAlign:"center",verticalAlign:"middle",children:[(0,o.createComponentVNode)(2,i.Box,{display:"inline-block",width:"16.6%",children:[(0,o.createComponentVNode)(2,i.Box,{as:"img",src:"data:image/jpeg;base64,"+f,verticalAlign:"middle",style:{"margin-left":"-32px","margin-right":"-48px","margin-top":"-32px","margin-bottom":"-48px",height:"128px",width:"128px","-ms-interpolation-mode":"nearest-neighbor"}}),(0,o.createComponentVNode)(2,i.Box,{bold:!0,textColor:cp;return(0,o.createComponentVNode)(2,i.Table.Row,{children:[(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,children:(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+d,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}})}),(0,o.createComponentVNode)(2,i.Table.Cell,{bold:!0,children:l.name}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Box,{color:(s<=0?"bad":s<=l.max_amount/2&&"average")||"good",children:[s," in stock"]})}),(0,o.createComponentVNode)(2,i.Table.Cell,{collapsing:!0,textAlign:"center",children:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,disabled:N,icon:g,content:C,textAlign:"left",onClick:function(){return a("vend",{inum:l.inum})}})})]})};t.Vending=function(e,t){var n,l=(0,r.useBackend)(t),s=l.act,d=l.data,u=d.user,p=d.guestNotice,m=d.userMoney,h=d.chargesMoney,f=d.product_records,C=void 0===f?[]:f,g=d.coin_records,N=void 0===g?[]:g,b=d.hidden_records,V=void 0===b?[]:b,v=d.stock,x=(d.vend_ready,d.coin_name),y=d.inserted_item_name,k=d.panel_open,w=d.speaker,_=d.imagelist;return n=[].concat(C,N),d.extended_inventory&&(n=[].concat(n,V)),n=n.filter((function(e){return!!e})),(0,o.createComponentVNode)(2,a.Window,{title:"Vending Machine",resizable:!0,children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:[!!h&&(0,o.createComponentVNode)(2,i.Section,{title:"User",children:u&&(0,o.createComponentVNode)(2,i.Box,{children:["Welcome, ",(0,o.createVNode)(1,"b",null,u.name,0),","," ",(0,o.createVNode)(1,"b",null,u.job||"Unemployed",0),"!",(0,o.createVNode)(1,"br"),"Your balance is ",(0,o.createVNode)(1,"b",null,[m,(0,o.createTextVNode)(" credits")],0),"."]})||(0,o.createComponentVNode)(2,i.Box,{color:"light-grey",children:p})}),!!x&&(0,o.createComponentVNode)(2,i.Section,{title:"Coin",buttons:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:"Remove Coin",onClick:function(){return s("remove_coin",{})}}),children:(0,o.createComponentVNode)(2,i.Box,{children:x})}),!!y&&(0,o.createComponentVNode)(2,i.Section,{title:"Item",buttons:(0,o.createComponentVNode)(2,i.Button,{fluid:!0,icon:"eject",content:"Eject Item",onClick:function(){return s("eject_item",{})}}),children:(0,o.createComponentVNode)(2,i.Box,{children:y})}),!!k&&(0,o.createComponentVNode)(2,i.Section,{title:"Maintenance",children:(0,o.createComponentVNode)(2,i.Button,{icon:w?"check":"volume-mute",selected:w,content:"Speaker",textAlign:"left",onClick:function(){return s("toggle_voice",{})}})}),(0,o.createComponentVNode)(2,i.Section,{title:"Products",children:(0,o.createComponentVNode)(2,i.Table,{children:n.map((function(e){return(0,o.createComponentVNode)(2,c,{product:e,productStock:v[e.name],productImage:_[e.path]},e.name)}))})})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VolumeMixer=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.VolumeMixer=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data.channels;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:(0,o.createComponentVNode)(2,i.Section,{height:"100%",overflow:"auto",children:l.map((function(e,t){return(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Box,{fontSize:"1.25rem",color:"label",mt:t>0&&"0.5rem",children:e.name}),(0,o.createComponentVNode)(2,i.Box,{mt:"0.5rem",children:(0,o.createComponentVNode)(2,i.Flex,{children:[(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,i.Icon,{name:"volume-off",size:"1.5",mt:"0.1rem",onClick:function(){return c("volume",{channel:e.num,volume:0})}})})}),(0,o.createComponentVNode)(2,i.Flex.Item,{grow:"1",mx:"1rem",children:(0,o.createComponentVNode)(2,i.Slider,{minValue:0,maxValue:100,stepPixelSize:3.13,value:e.volume,onChange:function(t,n){return c("volume",{channel:e.num,volume:n})}})}),(0,o.createComponentVNode)(2,i.Flex.Item,{children:(0,o.createComponentVNode)(2,i.Button,{width:"24px",color:"transparent",children:(0,o.createComponentVNode)(2,i.Icon,{name:"volume-up",size:"1.5",mt:"0.1rem",onClick:function(){return c("volume",{channel:e.num,volume:100})}})})})]})})],4,e.num)}))})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.VotePanel=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.VotePanel=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.remaining,d=l.question,u=l.choices,p=l.user_vote,m=l.counts,h=l.show_counts,f=l.show_cancel;return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{scrollable:!0,children:(0,o.createComponentVNode)(2,i.Section,{title:d,children:[(0,o.createComponentVNode)(2,i.Box,{mb:1,children:["Time remaining: ",Math.round(s/10),"s"]}),u.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:e+(h?" ("+(m[e]||0)+")":""),onClick:function(){return c("vote",{target:e})},selected:e===p})},e)})),!!f&&(0,o.createComponentVNode)(2,i.Box,{children:(0,o.createComponentVNode)(2,i.Button,{content:"Cancel",onClick:function(){return c("cancel")}})},"Cancel")]})})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Wires=void 0;var o=n(0),r=n(1),i=n(2),a=n(3);t.Wires=function(e,t){var n=(0,r.useBackend)(t),c=n.act,l=n.data,s=l.wires||[],d=l.status||[];return(0,o.createComponentVNode)(2,a.Window,{children:(0,o.createComponentVNode)(2,a.Window.Content,{children:[(0,o.createComponentVNode)(2,i.Section,{children:(0,o.createComponentVNode)(2,i.LabeledList,{children:s.map((function(e){return(0,o.createComponentVNode)(2,i.LabeledList.Item,{className:"candystripe",label:e.color_name,labelColor:e.seen_color,color:e.seen_color,buttons:(0,o.createFragment)([(0,o.createComponentVNode)(2,i.Button,{content:e.cut?"Mend":"Cut",onClick:function(){return c("cut",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:"Pulse",onClick:function(){return c("pulse",{wire:e.color})}}),(0,o.createComponentVNode)(2,i.Button,{content:e.attached?"Detach":"Attach",onClick:function(){return c("attach",{wire:e.color})}})],4),children:!!e.wire&&(0,o.createVNode)(1,"i",null,[(0,o.createTextVNode)("("),e.wire,(0,o.createTextVNode)(")")],0)},e.seen_color)}))})}),!!d.length&&(0,o.createComponentVNode)(2,i.Section,{children:d.map((function(e){return(0,o.createComponentVNode)(2,i.Box,{color:"lightgray",mt:.1,children:e},e)}))})]})})}},function(e,t,n){"use strict";t.__esModule=!0,t.Workshop=void 0;var o=n(0),r=n(18),i=n(1),a=n(2),c=n(104),l=n(3);var s=function(e,t,n){return null===e.requirements||!(e.requirements.brass>t)&&!(e.requirements.power>n)};t.Workshop=function(e,t){var n=(0,i.useBackend)(t),r=n.act,s=n.data,p=s.brass_amount,m=s.power_amount,h=s.building,f=s.buildStart,C=s.buildEnd,g=s.worldTime,N=p.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,"),b=m.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,");return(0,o.createComponentVNode)(2,l.Window,{theme:"clockwork",resizable:!0,children:(0,o.createComponentVNode)(2,l.Window.Content,{className:"Layout__content--flexColumn",children:[(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createComponentVNode)(2,d),(0,o.createComponentVNode)(2,a.Section,{title:"Materials",children:(0,o.createComponentVNode)(2,a.LabeledList,{children:[(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Brass",children:[N,(0,o.createComponentVNode)(2,a.Button,{icon:"arrow-down",height:"19px",tooltip:"Dispense Brass",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return r("dispense")}})]}),(0,o.createComponentVNode)(2,a.LabeledList.Item,{label:"Power",children:b})]})})]}),(0,o.createComponentVNode)(2,a.Section,{flexGrow:"1",children:(0,o.createComponentVNode)(2,u)}),(0,o.createComponentVNode)(2,a.Flex,{mb:"0.5rem",children:h&&(0,o.createComponentVNode)(2,a.ProgressBar.Countdown,{start:f,current:g,end:C,bold:!0,children:["Building ",h,"\xa0(",(0,o.createComponentVNode)(2,c.Countdown,{current:g,timeLeft:C-g,format:function(e,t){return t.substr(3)}}),")"]})})]})})};var d=function(e,t){var n=(0,i.useLocalState)(t,"search",""),r=(n[0],n[1]),c=(0,i.useLocalState)(t,"sort",""),l=(c[0],c[1],(0,i.useLocalState)(t,"descending",!1)),s=l[0],d=l[1];return(0,o.createComponentVNode)(2,a.Box,{mb:"0.5rem",children:(0,o.createComponentVNode)(2,a.Flex,{width:"100%",children:[(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",mr:"0.5rem",children:(0,o.createComponentVNode)(2,a.Input,{placeholder:"Search by item name..",width:"100%",onInput:function(e,t){return r(t)}})}),(0,o.createComponentVNode)(2,a.Flex.Item,{children:(0,o.createComponentVNode)(2,a.Button,{icon:s?"arrow-down":"arrow-up",height:"19px",tooltip:s?"Descending order":"Ascending order",tooltipPosition:"bottom-left",ml:"0.5rem",onClick:function(){return d(!s)}})})]})})},u=function(e,t){var n=(0,i.useBackend)(t),c=(n.act,n.data),l=c.items,d=(0,i.useLocalState)(t,"search",""),u=d[0],m=(d[1],(0,i.useLocalState)(t,"sort","Alphabetical")),h=(m[0],m[1],(0,i.useLocalState)(t,"descending",!1)),f=h[0],C=(h[1],(0,r.createSearch)(u,(function(e){return e[0]}))),g=!1,N=Object.entries(l).map((function(e,t){var n=Object.entries(e[1]).filter(C).map((function(e){return e[1].affordable=s(e[1],c.brass_amount,c.power_amount),e[1]}));if(0!==n.length)return f&&(n=n.reverse()),g=!0,(0,o.createComponentVNode)(2,p,{title:e[0],items:n},e[0])}));return(0,o.createComponentVNode)(2,a.Flex.Item,{grow:"1",overflow:"auto",children:(0,o.createComponentVNode)(2,a.Section,{children:g?N:(0,o.createComponentVNode)(2,a.Box,{color:"label",children:"No items matching your criteria was found!"})})})},p=function(e,t){var n=(0,i.useBackend)(t),c=n.act,l=n.data,d=e.title,u=e.items,p=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o=0||(r[n]=e[n]);return r}(e,["title","items"]);return(0,o.normalizeProps)((0,o.createComponentVNode)(2,a.Collapsible,Object.assign({open:!0,title:d},p,{children:u.map((function(e){return(0,o.createComponentVNode)(2,a.Box,{children:[(0,o.createVNode)(1,"img",null,null,1,{src:"data:image/jpeg;base64,"+e.image,style:{"vertical-align":"middle",width:"32px",margin:"0px","margin-left":"0px"}}),(0,o.createComponentVNode)(2,a.Button,{icon:"hammer",disabled:!s(e,l.brass_amount,l.power_amount),onClick:function(){return c("make",{cat:d,name:e.name})},children:(0,r.toTitleCase)((0,r.toTitleCase)(e.name))}),(0,o.createComponentVNode)(2,a.Box,{display:"inline-block",verticalAlign:"middle",lineHeight:"20px",style:{float:"right"},children:e.requirements&&Object.keys(e.requirements).map((function(t){return(0,r.toTitleCase)(t)+": "+e.requirements[t]})).join(", ")||(0,o.createComponentVNode)(2,a.Box,{children:"No resources required."})}),(0,o.createComponentVNode)(2,a.Box,{style:{clear:"both"}})]},e.name)}))})))}}]); \ No newline at end of file