diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index 5f74640f7e7..f8804aead4c 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -529,3 +529,5 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE // Caps for NTNet logging. Less than 10 would make logging useless anyway, more than 500 may make the log browser too laggy. Defaults to 100 unless user changes it. #define MAX_NTNET_LOGS 300 #define MIN_NTNET_LOGS 10 +//TODO Move to a pref +#define STATION_GOAL_BUDGET 1 \ No newline at end of file diff --git a/code/_globalvars/lists/objects.dm b/code/_globalvars/lists/objects.dm index b5014ec7c91..28e55d7e03f 100644 --- a/code/_globalvars/lists/objects.dm +++ b/code/_globalvars/lists/objects.dm @@ -23,5 +23,5 @@ var/global/list/apcs_list = list() //list of all Area Power Controller machi var/global/list/tracked_implants = list() //list of all current implants that are tracked to work out what sort of trek everyone is on. Sadly not on lavaworld not implemented... var/global/list/poi_list = list() //list of points of interest for observe/follow var/global/list/pinpointer_list = list() //list of all pinpointers. Used to change stuff they are pointing to all at once. -// A list of all zombie_infection organs, for any mass "animation" -var/global/list/zombie_infection_list = list() +var/global/list/zombie_infection_list = list() // A list of all zombie_infection organs, for any mass "animation" +var/global/list/meteor_list = list() // List of all meteors. \ No newline at end of file diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm index 450367ce2e7..cdc90a8bb3f 100644 --- a/code/controllers/subsystem/ticker.dm +++ b/code/controllers/subsystem/ticker.dm @@ -55,7 +55,6 @@ var/datum/subsystem/ticker/ticker var/maprotatechecked = 0 - /datum/subsystem/ticker/New() NEW_SS_GLOBAL(ticker) @@ -443,6 +442,8 @@ var/datum/subsystem/ticker/ticker for(var/i in total_antagonists) log_game("[i]s[total_antagonists[i]].") + mode.declare_station_goal_completion() + //Adds the del() log to world.log in a format condensable by the runtime condenser found in tools if(SSgarbage.didntgc.len) var/dellog = "" diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index cc7b43a6adb..09ca3b85fab 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -41,6 +41,8 @@ var/const/waittime_l = 600 var/const/waittime_h = 1800 // started at 1800 + var/list/datum/station_goal/station_goals = list() + /datum/game_mode/proc/announce() //Shows the gamemode's name and a fast description. world << "The gamemode is: [name]!" @@ -87,6 +89,7 @@ if(report) spawn (rand(waittime_l, waittime_h)) send_intercept(0) + generate_station_goals() start_state = new /datum/station_state() start_state.count(1) return 1 @@ -279,6 +282,12 @@ for(var/V in possible_modes) intercepttext += i_text.build(V) + if(station_goals.len) + intercepttext += "Special Orders for [station_name()]:" + for(var/datum/station_goal/G in station_goals) + G.on_report() + intercepttext += G.get_report() + print_command_report(intercepttext, "Central Command Status Summary") priority_announce("A summary has been copied and printed to all communications consoles.", "Enemy communication intercepted. Security level elevated.", 'sound/AI/intercept.ogg') if(security_level < SEC_LEVEL_BLUE) @@ -532,3 +541,25 @@ ticker.mode.remove_gangster(newborgie, 0, remove_bosses=1) ticker.mode.remove_hog_follower(newborgie, 0) remove_servant_of_ratvar(newborgie.current, TRUE) + + +/datum/game_mode/proc/generate_station_goals() + var/list/possible = list() + for(var/T in subtypesof(/datum/station_goal)) + var/datum/station_goal/G = T + if(config_tag in initial(G.gamemode_blacklist)) + continue + //if(num_players() < initial(G.required_crew)) + // continue + possible += T + var/goal_weights = 0 + while(possible.len && goal_weights < STATION_GOAL_BUDGET) + var/datum/station_goal/picked = pick_n_take(possible) + goal_weights += initial(picked.weight) + station_goals += new picked + + +/datum/game_mode/proc/declare_station_goal_completion() + for(var/V in station_goals) + var/datum/station_goal/G = V + G.print_result() \ No newline at end of file diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index 9fa58377691..a1272ee75da 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -118,11 +118,13 @@ get_hit() /obj/effect/meteor/Destroy() + meteor_list -= src walk(src,0) //this cancels the walk_towards() proc . = ..() /obj/effect/meteor/New() ..() + meteor_list += src if(SSaugury) SSaugury.register_doom(src, threat) SpinAnimation() diff --git a/code/modules/admin/admin_verbs.dm b/code/modules/admin/admin_verbs.dm index 3b64aa6a72c..c67f8d1c3b2 100644 --- a/code/modules/admin/admin_verbs.dm +++ b/code/modules/admin/admin_verbs.dm @@ -145,6 +145,7 @@ var/list/admin_verbs_debug = list( /client/proc/cmd_display_del_log, /client/proc/reset_latejoin_spawns, /client/proc/create_outfits, + /client/proc/modify_goals, /client/proc/debug_huds, /client/proc/map_template_load, /client/proc/map_template_upload, diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 0f88f315ee3..610ee769dc3 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -2255,3 +2255,20 @@ SD.r_code = code message_admins("[key_name_admin(usr)] has set the self-destruct \ code to \"[code]\".") + + else if(href_list["add_station_goal"]) + if(!check_rights(R_ADMIN)) + return + var/list/type_choices = typesof(/datum/station_goal) + var/picked = input("Choose goal type") in type_choices|null + if(!picked) + return + var/datum/station_goal/G = new picked() + if(picked == /datum/station_goal) + var/newname = input("Enter goal name:") as text + G.name = newname + var/description = input("Enter centcom message contents:") as message + G.report_message = description + message_admins("[key_name(usr)] created \"[G.name]\" station goal.") + ticker.mode.station_goals += G + modify_goals() diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index eadb377ea2f..1008453f85b 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1137,3 +1137,19 @@ var/list/datum/outfit/custom_outfits = list() //Admin created outfits H.regenerate_icons() #undef ON_PURRBATION + +/client/proc/modify_goals() + set category = "Debug" + set name = "Modify station goals" + + if(!check_rights(R_ADMIN)) + return + + holder.modify_goals() + +/datum/admins/proc/modify_goals() + var/dat = "" + for(var/datum/station_goal/S in ticker.mode.station_goals) + dat += "[S.name] - Announce | Remove
" + dat += "
Add New Goal" + usr << browse(dat, "window=goals;size=400x400") \ No newline at end of file diff --git a/code/modules/cargo/console.dm b/code/modules/cargo/console.dm index 761b2e15a21..ae759a49bf8 100644 --- a/code/modules/cargo/console.dm +++ b/code/modules/cargo/console.dm @@ -61,7 +61,7 @@ "name" = P.group, "packs" = list() ) - if((P.hidden && !emagged) || (P.contraband && !contraband)) + if((P.hidden && !emagged) || (P.contraband && !contraband) || (P.special && !P.special_enabled)) continue data["supplies"][P.group]["packs"] += list(list( "name" = P.name, diff --git a/code/modules/cargo/packs.dm b/code/modules/cargo/packs.dm index 444b71099cd..ab41d3cae8b 100644 --- a/code/modules/cargo/packs.dm +++ b/code/modules/cargo/packs.dm @@ -1,4 +1,4 @@ -/datum/supply_pack +datum/supply_pack var/name = "Crate" var/group = "" var/hidden = FALSE @@ -9,6 +9,8 @@ var/crate_name = "crate" var/crate_type = /obj/structure/closet/crate var/dangerous = FALSE // Should we message admins? + var/special = FALSE //Event/Station Goals/Admin enabled packs + var/special_enabled = FALSE /datum/supply_pack/proc/generate(turf/T) var/obj/structure/closet/crate/C = new crate_type(T) @@ -1532,3 +1534,58 @@ /obj/item/toy/crayon/rainbow, /obj/item/toy/crayon/rainbow) crate_name= "art supply crate" + + +/datum/supply_pack/misc/bsa + name = "Bluespace Artillery Parts" + cost = 15000 + special = TRUE + contains = list(/obj/item/weapon/circuitboard/machine/bsa/front, + /obj/item/weapon/circuitboard/machine/bsa/middle, + /obj/item/weapon/circuitboard/machine/bsa/back, + /obj/item/weapon/circuitboard/machine/computer/bsa_control + ) + crate_name= "bluespace artillery parts crate" + +/datum/supply_pack/misc/dna_vault + name = "DNA Vault Parts" + cost = 12000 + special = TRUE + contains = list( + /obj/item/weapon/circuitboard/machine/dna_vault + ) + crate_name= "dna vault parts crate" + +/datum/supply_pack/misc/dna_probes + name = "DNA Vault Samplers" + cost = 3000 + special = TRUE + contains = list(/obj/item/device/dna_probe, + /obj/item/device/dna_probe, + /obj/item/device/dna_probe, + /obj/item/device/dna_probe, + /obj/item/device/dna_probe + ) + crate_name= "dna samplers crate" + + +/datum/supply_pack/misc/shield_sat + name = "Shield Generator Satellite" + cost = 3000 + special = TRUE + contains = list( + /obj/machinery/satellite/meteor_shield, + /obj/machinery/satellite/meteor_shield, + /obj/machinery/satellite/meteor_shield + ) + crate_name= "shield sat crate" + + +/datum/supply_pack/misc/shield_sat_control + name = "Shield System Control Board" + cost = 5000 + special = TRUE + contains = list( + /obj/item/weapon/circuitboard/machine/computer/sat_control + ) + crate_name= "shield control board crate" \ No newline at end of file diff --git a/code/modules/station_goals/bsa.dm b/code/modules/station_goals/bsa.dm new file mode 100644 index 00000000000..77e69582ef0 --- /dev/null +++ b/code/modules/station_goals/bsa.dm @@ -0,0 +1,321 @@ +// Crew has to build a bluespace cannon +// Cargo orders part for high price +// Requires high amount of power +// Requires high level stock parts +/datum/station_goal/bluespace_cannon + name = "Bluespace Artillery" + +/datum/station_goal/bluespace_cannon/get_report() + return {"Our military presence is inadequate in your sector. + We need you to construct BSA-[rand(0-99)] Artillery position aboard your station. + + Base parts should be availible for shipping by your cargo shuttle. + -Nanotrasen Naval Command"} + +/datum/station_goal/bluespace_cannon/on_report() + //Unlock BSA parts + var/datum/supply_pack/misc/bsa/P = SSshuttle.supply_packs[/datum/supply_pack/misc/bsa] + P.special_enabled = TRUE + +/datum/station_goal/bluespace_cannon/check_completion() + if(..()) + return TRUE + var/obj/machinery/bsa/full/B = locate() + if(B && !B.stat) + return TRUE + return FALSE + +/obj/machinery/bsa + icon = 'icons/obj/machines/particle_accelerator.dmi' + density = 1 + anchored = 1 + +/obj/machinery/bsa/back + name = "Bluespace Artillery Generator" + desc = "Generates cannon pulse. Needs to be linked with a fusor. " + icon_state = "power_box" + +/obj/machinery/bsa/back/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/device/multitool)) + var/obj/item/device/multitool/M = W + M.buffer = src + user << "You store linkage information in [W]'s buffer." + else + return ..() + +/obj/machinery/bsa/front + name = "Bluespace Artillery Bore" + desc = "Do not stand in front of cannon during operation. Needs to be linked with a fusor." + icon_state = "emitter_center" + +/obj/machinery/bsa/front/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/device/multitool)) + var/obj/item/device/multitool/M = W + M.buffer = src + user << "You store linkage information in [W]'s buffer." + else + return ..() + +/obj/machinery/bsa/middle + name = "Bluespace Artillery Fusor" + desc = "Contents classifed by Nanotrasen Naval Command. Needs to be linked with the other BSA parts using multitool." + icon_state = "fuel_chamber" + var/obj/machinery/bsa/back/back + var/obj/machinery/bsa/front/front + +/obj/machinery/bsa/middle/attackby(obj/item/weapon/W, mob/user, params) + if(istype(W, /obj/item/device/multitool)) + var/obj/item/device/multitool/M = W + if(M.buffer) + if(istype(M.buffer,/obj/machinery/bsa/back)) + back = M.buffer + M.buffer = null + user << "You link [src] with [back]." + else if(istype(M.buffer,/obj/machinery/bsa/front)) + front = M.buffer + M.buffer = null + user << "You link [src] with [front]." + else + return ..() + +/obj/machinery/bsa/middle/proc/check_completion() + if(!front || !back) + return "No linked parts detected!" + if(front.y != y || back.y != y || !(front.x > x && back.x < x || front.x < x && back.x > x) || front.z != z || back.z != z) + return "Parts misaligned!" + if(!has_space()) + return "Not enough free space!" + +/obj/machinery/bsa/middle/proc/has_space() + var/cannon_dir = get_cannon_direction() + var/x_min + var/x_max + switch(cannon_dir) + if(EAST) + x_min = x - 4 //replace with defines later + x_max = x + 6 + if(WEST) + x_min = x + 4 + x_max = x - 6 + + for(var/turf/T in block(locate(x_min,y-1,z),locate(x_max,y+1,z))) + if(T.density || istype(T, /turf/open/space)) + return FALSE + return TRUE + +/obj/machinery/bsa/middle/proc/get_cannon_direction() + if(front.x > x && back.x < x) + return EAST + else if(front.x < x && back.x > x) + return WEST + + +/obj/machinery/bsa/full + name = "Bluespace Artillery" + desc = "Long range bluespace artillery." + icon = 'icons/obj/lavaland/cannon.dmi' + icon_state = "orbital_cannon1" + unsecuring_tool = null + var/static/image/top_layer = null + var/ex_power = 3 + var/power_used_per_shot = 2000000 //enough to kil standard apc - todo : make this use wires instead and scale explosion power with it + pixel_y = -32 + pixel_x = -192 + bound_width = 352 + bound_x = -192 + appearance_flags = NONE //Removes default TILE_BOUND + +/obj/machinery/bsa/full/proc/get_front_turf() + switch(dir) + if(WEST) + return locate(x - 6,y,z) + if(EAST) + return locate(x + 4,y,z) + return get_turf(src) + +/obj/machinery/bsa/full/proc/get_back_turf() + switch(dir) + if(WEST) + return locate(x + 4,y,z) + if(EAST) + return locate(x - 6,y,z) + return get_turf(src) + +/obj/machinery/bsa/full/proc/get_target_turf() + switch(dir) + if(WEST) + return locate(1,y,z) + if(EAST) + return locate(world.maxx,y,z) + return get_turf(src) + +/obj/machinery/bsa/full/New(loc,cannon_direction = WEST) + ..() + switch(cannon_direction) + if(WEST) + dir = WEST + pixel_x = -192 + top_layer = image("icons/obj/lavaland/orbital_cannon.dmi", "top_west") + top_layer.layer = ABOVE_MOB_LAYER + icon_state = "cannon_west" + if(EAST) + dir = EAST + top_layer = image("icons/obj/lavaland/orbital_cannon.dmi", "top_east") + top_layer.layer = ABOVE_MOB_LAYER + icon_state = "cannon_east" + add_overlay(top_layer) + +/obj/machinery/bsa/full/proc/fire() + var/turf/point = get_front_turf() + for(var/turf/T in getline(get_step(point,dir),get_target_turf())) + T.ex_act(1) + point.Beam(get_target_turf(),icon_state="bsa_beam",icon='icons/effects/beam.dmi',time=50,maxdistance = world.maxx) //ZZZAP + + +/obj/structure/filler + name = "big machinery part" + density = 1 + anchored = 1 + invisibility = INVISIBILITY_ABSTRACT + var/obj/machinery/parent + +/obj/structure/filler/ex_act() + return + +/obj/item/weapon/circuitboard/machine/bsa/back + name = "circuit board (Bluespace Artillery Generator)" + build_path = /obj/machinery/bsa/back + origin_tech = "engineering=2;combat=2;bluespace=2" //No freebies! + req_components = list( + /obj/item/weapon/stock_parts/capacitor/quadratic = 5, + /obj/item/stack/cable_coil = 2) + +/obj/item/weapon/circuitboard/machine/bsa/middle + name = "circuit board (Bluespace Artillery Fusor)" + build_path = /obj/machinery/bsa/middle + origin_tech = "engineering=2;combat=2;bluespace=2" + req_components = list( + /obj/item/weapon/ore/bluespace_crystal = 20, + /obj/item/stack/cable_coil = 2) + +/obj/item/weapon/circuitboard/machine/bsa/front + name = "circuit board (Bluespace Artillery Bore)" + build_path = /obj/machinery/bsa/front + origin_tech = "engineering=2;combat=2;bluespace=2" + req_components = list( + /obj/item/weapon/stock_parts/manipulator/femto = 5, + /obj/item/stack/cable_coil = 2) + +/obj/item/weapon/circuitboard/machine/computer/bsa_control + name = "circuit board (Bluespace Artillery Controls)" + build_path = /obj/machinery/computer/bsa_control + origin_tech = "engineering=2;combat=2;bluespace=2" + +/obj/machinery/computer/bsa_control + name = "Bluespace Artillery Control" + var/obj/machinery/bsa/full/cannon + var/ready = FALSE + var/notice + var/target + use_power = 0 + circuit = /obj/machinery/computer/bsa_control + icon = 'icons/obj/machines/particle_accelerator.dmi' + icon_state = "control_boxp" + var/area_aim = FALSE //should also show areas for targeting + +/obj/machinery/computer/bsa_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \ + datum/tgui/master_ui = null, datum/ui_state/state = physical_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "bsa", name, 400, 305, master_ui, state) + ui.open() + +/obj/machinery/computer/bsa_control/ui_data() + var/list/data = list() + data["ready"] = ready + data["connected"] = cannon + data["notice"] = notice + if(target) + data["target"] = get_target_name() + return data + +/obj/machinery/computer/bsa_control/ui_act(action, params) + if(..()) + return + switch(action) + if("build") + cannon = deploy() + . = TRUE + if("fire") + fire(usr) + . = TRUE + if("recalibrate") + calibrate(usr) + . = TRUE + update_icon() + +/obj/machinery/computer/bsa_control/proc/calibrate(mob/user) + var/list/gps_locators = list() + for(var/obj/item/device/gps/G in GPS_list) //nulls on the list somehow + gps_locators[G.gpstag] = G + + var/list/options = gps_locators + if(area_aim) + options += teleportlocs + var/V = input(user,"Select target", "Select target",null) in options|null + target = options[V] + + +/obj/machinery/computer/bsa_control/proc/get_target_name() + if(istype(target,/area)) + var/area/A = target + return A.name + else if(istype(target,/obj/item/device/gps)) + var/obj/item/device/gps/G = target + return G.gpstag + +/obj/machinery/computer/bsa_control/proc/get_impact_turf() + if(istype(target,/area)) + return pick(get_area_turfs(target)) + else if(istype(target,/obj/item/device/gps)) + return get_turf(target) + +/obj/machinery/computer/bsa_control/proc/fire(mob/user) + if(cannon.stat) + notice = "Cannon unpowered!" + return + notice = null + cannon.use_power(cannon.power_used_per_shot) + cannon.fire() + ready = FALSE + var/turf/bullseye = get_impact_turf() + message_admins("[key_name_admin(usr)] has launched an artillery strike.") + explosion(bullseye,cannon.ex_power,cannon.ex_power*2,cannon.ex_power*4) + addtimer(src,"ready_cannon",600) + +/obj/machinery/computer/bsa_control/proc/ready_cannon() + ready = TRUE + +/obj/machinery/computer/bsa_control/proc/deploy(force=FALSE) + var/obj/machinery/bsa/full/prebuilt = locate() in range(7) //In case of adminspawn + if(prebuilt) + ready = TRUE + return prebuilt + + var/obj/machinery/bsa/middle/centerpiece = locate() in range(7) + if(!centerpiece) + notice = "No BSA parts detected nearby." + return null + notice = centerpiece.check_completion() + if(notice) + return null + //Totally nanite construction system not an immersion breaking spawning + var/datum/effect_system/smoke_spread/s = new + s.set_up(4, 1, get_turf(centerpiece), 0) + s.start() + var/obj/machinery/bsa/full/cannon = new(get_turf(centerpiece),cannon_direction=centerpiece.get_cannon_direction()) + qdel(centerpiece.front) + qdel(centerpiece.back) + qdel(centerpiece) + ready = TRUE + return cannon diff --git a/code/modules/station_goals/dna_vault.dm b/code/modules/station_goals/dna_vault.dm new file mode 100644 index 00000000000..6de3312238f --- /dev/null +++ b/code/modules/station_goals/dna_vault.dm @@ -0,0 +1,276 @@ +//Crew has to create dna vault +// Cargo can order DNA samplers + DNA vault boards +// DNA vault requires x animals ,y plants, z human dna +// DNA vaults require high tier stock parts and cold +// After completion each crewmember can receive single upgrade chosen out of 2 for the mob. +#define VAULT_TOXIN "Toxin Adaptation" +#define VAULT_NOBREATH "Lung Enhancement" +#define VAULT_FIREPROOF "Thermal Regulation" +#define VAULT_STUNTIME "Neural Repathing" +#define VAULT_ARMOUR "Bone Reinforcment" + +/datum/station_goal/dna_vault + name = "DNA Vault" + var/animal_count + var/human_count + var/plant_count + +/datum/station_goal/dna_vault/New() + ..() + animal_count = rand(15,20) //might be too few given ~15 roundstart stationside ones + human_count = rand(round(0.75 * ticker.totalPlayersReady) , ticker.totalPlayersReady) // 75%+ roundstart population. + var/non_standard_plants = non_standard_plants_count() + plant_count = rand(round(0.7 * non_standard_plants),round(0.9 * non_standard_plants)) + +/datum/station_goal/dna_vault/proc/non_standard_plants_count() + . = 0 + for(var/T in subtypesof(/obj/item/seeds)) //put a cache if it's used anywhere else + var/obj/item/seeds/S = T + if(initial(S.rarity) > 0) + .++ + +/datum/station_goal/dna_vault/get_report() + return {"Our long term prediction systems say there's 99% chance of system-wide cataclysm in near future. + We need you to construct DNA Vault aboard your station. + + DNA Vault needs to contain samples of: + [animal_count] unique animal data + [plant_count] unique non-standard plant data + [human_count] unique sapient humanoid DNA data + + Base vault parts should be availible for shipping by your cargo shuttle."} + + +/datum/station_goal/dna_vault/on_report() + var/datum/supply_pack/P = SSshuttle.supply_packs[/datum/supply_pack/misc/dna_vault] + P.special_enabled = TRUE + + P = SSshuttle.supply_packs[/datum/supply_pack/misc/dna_probes] + P.special_enabled = TRUE + +/datum/station_goal/dna_vault/check_completion() + if(..()) + return TRUE + for(var/obj/machinery/dna_vault/V in machines) + if(V.animals.len >= animal_count && V.plants.len >= plant_count && V.dna >= human_count) + return TRUE + return FALSE + + +/obj/item/device/dna_probe + name = "DNA Sampler" + desc = "Can be used to take chemical and genetic samples of pretty much anything." + icon = 'icons/obj/syringe.dmi' + item_state = "hypo" + icon_state = "hypo" + flags = NOBLUDGEON + var/list/animals = list() + var/list/plants = list() + var/list/dna = list() + +/obj/item/device/dna_probe/proc/clear_data() + animals = list() + plants = list() + dna = list() + +var/list/non_simple_animals = typecacheof(list(/mob/living/carbon/monkey,/mob/living/carbon/alien)) + +/obj/item/device/dna_probe/afterattack(atom/target, mob/user, proximity) + ..() + if(!proximity || !target) + return + //tray plants + if(istype(target,/obj/machinery/hydroponics)) + var/obj/machinery/hydroponics/H = target + if(!H.myseed) + return + if(!H.harvest)// So it's bit harder. + user << "Plants needs to be ready to harvest to perform full data scan." //Because space dna is actually magic + return + if(plants[H.myseed.type]) + user << "Plant data already present in local storage." + return + plants[H.myseed.type] = 1 + user << "Plant data added to local storage." + + //animals + if(isanimal(target) || is_type_in_typecache(target,non_simple_animals)) + if(isanimal(target)) + var/mob/living/simple_animal/A = target + if(!A.healable)//simple approximation of being animal not a robot or similar + user << "No compatibile DNA detected" + return + if(animals[target.type]) + user << "Animal data already present in local storage." + return + animals[target.type] = 1 + user << "Animal data added to local storage." + + //humans + if(ishuman(target)) + var/mob/living/carbon/human/H = target + if(dna[H.dna.uni_identity]) + user << "Humanoid data already present in local storage." + return + dna[H.dna.uni_identity] = 1 + user << "Humanoid data added to local storage." + + +/obj/item/weapon/circuitboard/machine/dna_vault + name = "circuit board (DNA Vault)" + build_path = /obj/machinery/dna_vault + origin_tech = "engineering=2;combat=2;bluespace=2" //No freebies! + req_components = list( + /obj/item/weapon/stock_parts/capacitor/quadratic = 5, + /obj/item/stack/cable_coil = 2) + +/obj/machinery/dna_vault + name = "DNA Vault" + desc = "Break glass in case of apocalypse." + icon = 'icons/obj/machines/dna_vault.dmi' + icon_state = "vault" + density = 1 + anchored = 1 + idle_power_usage = 5000 + pixel_x = -32 + pixel_y = -64 + luminosity = 1 + + //High defaults so it's not completed automatically if there's no station goal + var/animals_max = 100 + var/plants_max = 100 + var/dna_max = 100 + var/list/animals = list() + var/list/plants = list() + var/list/dna = list() + + var/completed = FALSE + var/list/power_lottery = list() + + var/list/obj/structure/fillers = list() + +/obj/machinery/dna_vault/New() + //TODO: Replace this,bsa and gravgen with some big machinery datum + var/list/occupied = list() + for(var/direct in list(EAST,WEST,SOUTHEAST,SOUTHWEST)) + occupied += get_step(src,direct) + occupied += locate(x+1,y-2,z) + occupied += locate(x-1,y-2,z) + + for(var/T in occupied) + var/obj/structure/filler/F = new(T) + F.parent = src + fillers += F + + if(ticker.mode) + for(var/datum/station_goal/dna_vault/G in ticker.mode.station_goals) + animals_max = G.animal_count + plants_max = G.plant_count + dna_max = G.human_count + break + +/obj/machinery/dna_vault/Destroy() + for(var/V in fillers) + var/obj/structure/filler/filler = V + filler.parent = null + qdel(filler) + . = ..() + + +/obj/machinery/dna_vault/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, datum/tgui/master_ui = null, datum/ui_state/state = physical_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + roll_powers(user) + ui = new(user, src, ui_key, "dna_vault", name, 350, 400, master_ui, state) + ui.open() + + +/obj/machinery/dna_vault/proc/roll_powers(mob/user) + if(user in power_lottery) + return + var/list/L = list() + var/list/possible_powers = list(VAULT_TOXIN,VAULT_NOBREATH,VAULT_FIREPROOF,VAULT_STUNTIME,VAULT_ARMOUR) + L += pick_n_take(possible_powers) + L += pick_n_take(possible_powers) + power_lottery[user] = L + +/obj/machinery/dna_vault/ui_data(mob/user) //TODO Make it % bars maybe + var/list/data = list() + data["plants"] = plants.len + data["plants_max"] = plants_max + data["animals"] = animals.len + data["animals_max"] = animals_max + data["dna"] = dna.len + data["dna_max"] = dna_max + data["completed"] = completed + data["used"] = TRUE + data["choiceA"] = "" + data["choiceB"] = "" + if(user && completed) + var/list/L = power_lottery[user] + if(L && L.len) + data["used"] = FALSE + data["choiceA"] = L[1] + data["choiceB"] = L[2] + return data + +/obj/machinery/dna_vault/ui_act(action, params) + if(..()) + return + switch(action) + if("gene") + upgrade(usr,params["choice"]) + . = TRUE + +/obj/machinery/dna_vault/proc/check_goal() + if(plants.len >= plants_max && animals.len >= animals_max && dna.len >= dna_max) + completed = TRUE + + +/obj/machinery/dna_vault/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/device/dna_probe)) + var/obj/item/device/dna_probe/P = I + var/uploaded = 0 + for(var/plant in P.plants) + if(!plants[plant]) + uploaded++ + plants[plant] = 1 + for(var/animal in P.animals) + if(!animals[animal]) + uploaded++ + animals[animal] = 1 + for(var/ui in P.dna) + if(!dna[ui]) + uploaded++ + dna[ui] = 1 + check_goal() + user << "[uploaded] new datapoints uploaded." + else + return ..() + + + +/obj/machinery/dna_vault/proc/upgrade(mob/living/carbon/human/H,upgrade_type) + if(!(upgrade_type in power_lottery[H])) + return + var/datum/species/S = H.dna.species + switch(upgrade_type) + if(VAULT_TOXIN) + H << "You feel resistant to airborne toxins." + S.tox_breath_dam_min = 0 + S.tox_breath_dam_max = 0 + S.specflags |= VIRUSIMMUNE + if(VAULT_NOBREATH) + H << "Your lungs feel great." + S.specflags |= NOBREATH + if(VAULT_FIREPROOF) + H << "Your feel fireproof." + S.burnmod = 0.5 + S.heatmod = 0 + if(VAULT_STUNTIME) + H << "Nothing can keep you down for long." + S.stunmod = 0.5 + if(VAULT_ARMOUR) + H << "Your feel tough." + S.armor = 30 + power_lottery[H] = list() \ No newline at end of file diff --git a/code/modules/station_goals/shield.dm b/code/modules/station_goals/shield.dm new file mode 100644 index 00000000000..357cc426e15 --- /dev/null +++ b/code/modules/station_goals/shield.dm @@ -0,0 +1,181 @@ +//Station Shield +// A chain of satellites encircles the station +// Satellites be actived to generate a shield that will block unorganic matter from passing it. +/datum/station_goal/station_shield + name = "Station Shield" + var/coverage_goal = 500 + +/datum/station_goal/station_shield/get_report() + return {"The station is located in a zone full of space debris. + We have a prototype shielding system you will deploy to reduce collision related accidents. + + You can order the satellites and control systems through cargo shuttle. + "} + + +/datum/station_goal/station_shield/on_report() + //Unlock + var/datum/supply_pack/P = SSshuttle.supply_packs[/datum/supply_pack/misc/shield_sat] + P.special_enabled = TRUE + + P = SSshuttle.supply_packs[/datum/supply_pack/misc/shield_sat_control] + P.special_enabled = TRUE + +/datum/station_goal/station_shield/check_completion() + if(..()) + return TRUE + if(get_coverage() >= coverage_goal) + return TRUE + return FALSE + +/datum/station_goal/proc/get_coverage() + var/list/coverage = list() + for(var/obj/machinery/satellite/meteor_shield/A in machines) + if(!A.active || A.z != ZLEVEL_STATION) + continue + coverage |= view(A.kill_range,A) + return coverage.len + +/obj/item/weapon/circuitboard/machine/computer/sat_control + name = "circuit board (Satellite Network Control)" + build_path = /obj/machinery/computer/sat_control + origin_tech = "engineering=3" + +/obj/machinery/computer/sat_control + name = "Satellite control" + desc = "Used to control the satellite network." + circuit = /obj/item/weapon/circuitboard/machine/computer/sat_control + var/notice + +/obj/machinery/computer/sat_control/ui_interact(mob/user, ui_key = "main", datum/tgui/ui = null, force_open = 0, \ + datum/tgui/master_ui = null, datum/ui_state/state = physical_state) + ui = SStgui.try_update_ui(user, src, ui_key, ui, force_open) + if(!ui) + ui = new(user, src, ui_key, "sat_control", name, 400, 305, master_ui, state) + ui.open() + +/obj/machinery/computer/sat_control/ui_act(action, params) + if(..()) + return + switch(action) + if("toggle") + toggle(text2num(params["id"])) + . = TRUE + +/obj/machinery/computer/sat_control/proc/toggle(id) + for(var/obj/machinery/satellite/S in machines) + if(S.id == id && S.z == z) + S.toggle() + +/obj/machinery/computer/sat_control/ui_data() + var/list/data = list() + + data["satellites"] = list() + for(var/obj/machinery/satellite/S in machines) + data["satellites"] += list(list( + "id" = S.id, + "active" = S.active, + "mode" = S.mode + )) + data["notice"] = notice + + + var/datum/station_goal/station_shield/G = locate() in ticker.mode.station_goals + if(G) + data["meteor_shield"] = 1 + data["meteor_shield_coverage"] = G.get_coverage() + data["meteor_shield_coverage_max"] = G.coverage_goal + return data + + +/obj/machinery/satellite + name = "Defunct Satellite" + desc = "" + icon = 'icons/obj/machines/satellite.dmi' + icon_state = "sat_inactive" + var/mode = "NTPROBEV0.8" + var/active = FALSE + density = 1 + var/static/gid = 0 + var/id = 0 + +/obj/machinery/satellite/New() + ..() + id = gid++ + +/obj/machinery/satellite/interact(mob/user) + toggle(user) + +/obj/machinery/satellite/proc/toggle(mob/user) + if(!active && !isinspace()) + if(user) + user << "You can only active the [src] in space." + return FALSE + if(user) + user << "You [active ? "deactivate": "activate"] the [src]" + active = !active + if(active) + animate(src, pixel_y = 2, time = 10, loop = -1) + anchored = 1 + else + animate(src, pixel_y = 0, time = 10) + anchored = 0 + update_icon() + +/obj/machinery/satellite/update_icon() + icon_state = active ? "sat_active" : "sat_inactive" + +/obj/machinery/satellite/attackby(obj/item/I, mob/user, params) + if(istype(I, /obj/item/device/multitool)) + user << "// NTSAT-[id] // Mode : [active ? "PRIMARY" : "STANDBY"] //[emagged ? "DEBUG_MODE //" : ""]" + else + return ..() + +/obj/machinery/satellite/meteor_shield + name = "Meteor Shield Satellite" + desc = "Meteor Point Defense Satellite" + mode = "M-SHIELD" + var/kill_range = 10 + +/obj/machinery/satellite/meteor_shield/proc/space_los(meteor) + for(var/turf/T in getline(src,meteor)) + if(!istype(T, /turf/open/space)) + return FALSE + return TRUE + +/obj/machinery/satellite/meteor_shield/process() + if(!active) + return + for(var/obj/effect/meteor/M in meteor_list) + if(M.z != z) + continue + if(get_dist(M,src) > kill_range) + continue + if(!emagged && space_los(M)) + Beam(get_turf(M),time=5,maxdistance=kill_range) + qdel(M) + +/obj/machinery/satellite/meteor_shield/toggle(user) + if(!..(user)) + return FALSE + if(emagged) + if(active) + change_meteor_chance(2) + else + change_meteor_chance(0.5) + +/obj/machinery/satellite/meteor_shield/proc/change_meteor_chance(mod) + var/datum/round_event_control/E = locate(/datum/round_event_control/meteor_wave) in SSevent.control + if(E) + E.weight *= mod + +/obj/machinery/satellite/meteor_shield/Destroy() + . = ..() + if(active && emagged) + change_meteor_chance(0.5) + +/obj/machinery/satellite/meteor_shield/emag_act() + if(!emagged) + emagged = 1 + if(active) + change_meteor_chance(2) diff --git a/code/modules/station_goals/station_goal.dm b/code/modules/station_goals/station_goal.dm new file mode 100644 index 00000000000..daf6ee7dd1f --- /dev/null +++ b/code/modules/station_goals/station_goal.dm @@ -0,0 +1,64 @@ +//TODO +// Admin button to override with your own +// Sabotage objective for tators +// Multiple goals with less impact but more department focused + +/datum/station_goal + var/name = "Generic Goal" + var/weight = 1 //In case of multiple goals later. + var/required_crew = 10 + var/list/gamemode_blacklist = list() + var/completed = FALSE + var/report_message = "Complete this goal." + +/datum/station_goal/proc/send_report() + priority_announce("Priority Nanotrasen directive received. Project \"[name]\" details inbound.", "Incoming Priority Message", 'sound/AI/commandreport.ogg') + print_command_report(get_report(),"Nanotrasen Directive [pick(phonetic_alphabet)] \Roman[rand(1,50)]") + on_report() + +/datum/station_goal/proc/on_report() + //Additional unlocks/changes go here + return + +/datum/station_goal/proc/get_report() + return report_message + +/datum/station_goal/proc/check_completion() + return completed + +/datum/station_goal/proc/print_result() + if(check_completion()) + world << "Station Goal : [name] : Completed!" + else + world << "Station Goal : [name] : Failed!" + +/datum/station_goal/Destroy() + ticker.mode.station_goals -= src + . = ..() + +/datum/station_goal/Topic(href, href_list) + ..() + + if(!check_rights(R_ADMIN)) + return + + if(href_list["announce"]) + on_report() + send_report() + else if(href_list["remove"]) + qdel(src) + +/* +//Crew has to create alien intelligence detector +// Requires a lot of minerals +// Dish requires a lot of power +// Needs five? AI's for decoding purposes +/datum/station_goal/seti + name = "SETI Project" + +//Crew Sweep +//Blood samples and special scans of amount of people on roundstart manifest. +//Should keep sec busy. +//Maybe after completion you'll get some ling detecting gear or some station wide DNA scan ? + +*/ \ No newline at end of file diff --git a/icons/effects/beam.dmi b/icons/effects/beam.dmi index 7434915c0eb..d41b9403fa2 100644 Binary files a/icons/effects/beam.dmi and b/icons/effects/beam.dmi differ diff --git a/icons/obj/lavaland/cannon.dmi b/icons/obj/lavaland/cannon.dmi new file mode 100644 index 00000000000..82efad1bc5e Binary files /dev/null and b/icons/obj/lavaland/cannon.dmi differ diff --git a/icons/obj/machines/dna_vault.dmi b/icons/obj/machines/dna_vault.dmi new file mode 100644 index 00000000000..35503336d42 Binary files /dev/null and b/icons/obj/machines/dna_vault.dmi differ diff --git a/icons/obj/machines/satellite.dmi b/icons/obj/machines/satellite.dmi new file mode 100644 index 00000000000..efe3dade763 Binary files /dev/null and b/icons/obj/machines/satellite.dmi differ diff --git a/tgstation.dme b/tgstation.dme index 649225dd5bd..ef6de0d8c5e 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -1818,6 +1818,10 @@ #include "code\modules\spells\spell_types\trigger.dm" #include "code\modules\spells\spell_types\turf_teleport.dm" #include "code\modules\spells\spell_types\wizard.dm" +#include "code\modules\station_goals\bsa.dm" +#include "code\modules\station_goals\dna_vault.dm" +#include "code\modules\station_goals\shield.dm" +#include "code\modules\station_goals\station_goal.dm" #include "code\modules\stock_market\articles.dm" #include "code\modules\stock_market\computer.dm" #include "code\modules\stock_market\events.dm" diff --git a/tgui/assets/tgui.js b/tgui/assets/tgui.js index 47ef698d7f9..ec8b0ce7eed 100644 --- a/tgui/assets/tgui.js +++ b/tgui/assets/tgui.js @@ -1,15 +1,16 @@ -require=function t(e,n,a){function r(o,s){if(!n[o]){if(!e[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var p=Error("Cannot find module '"+o+"'");throw p.code="MODULE_NOT_FOUND",p}var c=n[o]={exports:{}};e[o][0].call(c.exports,function(t){var n=e[o][1][t];return r(n?n:t)},c,c.exports,t,e,n,a)}return n[o].exports}for(var i="function"==typeof require&&require,o=0;o2?p[2]:void 0,l=Math.min((void 0===c?o:r(c,o))-u,o-s),f=1;for(s>u&&u+l>s&&(f=-1,u+=l-1,s+=l-1);l-- >0;)u in n?n[s]=n[u]:delete n[s],s+=f,u+=f;return n}},{76:76,79:79,80:80}],6:[function(t,e,n){"use strict";var a=t(80),r=t(76),i=t(79);e.exports=[].fill||function(t){for(var e=a(this),n=i(e.length),o=arguments,s=o.length,u=r(s>1?o[1]:void 0,n),p=s>2?o[2]:void 0,c=void 0===p?n:r(p,n);c>u;)e[u++]=t;return e}},{76:76,79:79,80:80}],7:[function(t,e,n){var a=t(78),r=t(79),i=t(76);e.exports=function(t){return function(e,n,o){var s,u=a(e),p=r(u.length),c=i(o,p);if(t&&n!=n){for(;p>c;)if(s=u[c++],s!=s)return!0}else for(;p>c;c++)if((t||c in u)&&u[c]===n)return t||c;return!t&&-1}}},{76:76,78:78,79:79}],8:[function(t,e,n){var a=t(17),r=t(34),i=t(80),o=t(79),s=t(9);e.exports=function(t){var e=1==t,n=2==t,u=3==t,p=4==t,c=6==t,l=5==t||c;return function(f,d,h){for(var m,v,g=i(f),b=r(g),y=a(d,h,3),_=o(b.length),x=0,w=e?s(f,_):n?s(f,0):void 0;_>x;x++)if((l||x in b)&&(m=b[x],v=y(m,x,g),t))if(e)w[x]=v;else if(v)switch(t){case 3:return!0;case 5:return m;case 6:return x;case 2:w.push(m)}else if(p)return!1;return c?-1:u||p?p:w}}},{17:17,34:34,79:79,80:80,9:9}],9:[function(t,e,n){var a=t(38),r=t(36),i=t(83)("species");e.exports=function(t,e){var n;return r(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!r(n.prototype)||(n=void 0),a(n)&&(n=n[i],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},{36:36,38:38,83:83}],10:[function(t,e,n){var a=t(11),r=t(83)("toStringTag"),i="Arguments"==a(function(){return arguments}());e.exports=function(t){var e,n,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=(e=Object(t))[r])?n:i?a(e):"Object"==(o=a(e))&&"function"==typeof e.callee?"Arguments":o}},{11:11,83:83}],11:[function(t,e,n){var a={}.toString;e.exports=function(t){return a.call(t).slice(8,-1)}},{}],12:[function(t,e,n){"use strict";var a=t(46),r=t(31),i=t(60),o=t(17),s=t(69),u=t(18),p=t(27),c=t(42),l=t(44),f=t(82)("id"),d=t(30),h=t(38),m=t(65),v=t(19),g=Object.isExtensible||h,b=v?"_s":"size",y=0,_=function(t,e){if(!h(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!d(t,f)){if(!g(t))return"F";if(!e)return"E";r(t,f,++y)}return"O"+t[f]},x=function(t,e){var n,a=_(e);if("F"!==a)return t._i[a];for(n=t._f;n;n=n.n)if(n.k==e)return n};e.exports={getConstructor:function(t,e,n,r){var c=t(function(t,i){s(t,c,e),t._i=a.create(null),t._f=void 0,t._l=void 0,t[b]=0,void 0!=i&&p(i,n,t[r],t)});return i(c.prototype,{clear:function(){for(var t=this,e=t._i,n=t._f;n;n=n.n)n.r=!0,n.p&&(n.p=n.p.n=void 0),delete e[n.i];t._f=t._l=void 0,t[b]=0},"delete":function(t){var e=this,n=x(e,t);if(n){var a=n.n,r=n.p;delete e._i[n.i],n.r=!0,r&&(r.n=a),a&&(a.p=r),e._f==n&&(e._f=a),e._l==n&&(e._l=r),e[b]--}return!!n},forEach:function(t){for(var e,n=o(t,arguments.length>1?arguments[1]:void 0,3);e=e?e.n:this._f;)for(n(e.v,e.k,this);e&&e.r;)e=e.p},has:function(t){return!!x(this,t)}}),v&&a.setDesc(c.prototype,"size",{get:function(){return u(this[b])}}),c},def:function(t,e,n){var a,r,i=x(t,e);return i?i.v=n:(t._l=i={i:r=_(e,!0),k:e,v:n,p:a=t._l,n:void 0,r:!1},t._f||(t._f=i),a&&(a.n=i),t[b]++,"F"!==r&&(t._i[r]=i)),t},getEntry:x,setStrong:function(t,e,n){c(t,e,function(t,e){this._t=t,this._k=e,this._l=void 0},function(){for(var t=this,e=t._k,n=t._l;n&&n.r;)n=n.p;return t._t&&(t._l=n=n?n.n:t._t._f)?"keys"==e?l(0,n.k):"values"==e?l(0,n.v):l(0,[n.k,n.v]):(t._t=void 0,l(1))},n?"entries":"values",!n,!0),m(e)}}},{17:17,18:18,19:19,27:27,30:30,31:31,38:38,42:42,44:44,46:46,60:60,65:65,69:69,82:82}],13:[function(t,e,n){var a=t(27),r=t(10);e.exports=function(t){return function(){if(r(this)!=t)throw TypeError(t+"#toJSON isn't generic");var e=[];return a(this,!1,e.push,e),e}}},{10:10,27:27}],14:[function(t,e,n){"use strict";var a=t(31),r=t(60),i=t(4),o=t(38),s=t(69),u=t(27),p=t(8),c=t(30),l=t(82)("weak"),f=Object.isExtensible||o,d=p(5),h=p(6),m=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},b=function(t,e){return d(t.a,function(t){return t[0]===e})};g.prototype={get:function(t){var e=b(this,t);return e?e[1]:void 0},has:function(t){return!!b(this,t)},set:function(t,e){var n=b(this,t);n?n[1]=e:this.a.push([t,e])},"delete":function(t){var e=h(this.a,function(e){return e[0]===t});return~e&&this.a.splice(e,1),!!~e}},e.exports={getConstructor:function(t,e,n,a){var i=t(function(t,r){s(t,i,e),t._i=m++,t._l=void 0,void 0!=r&&u(r,n,t[a],t)});return r(i.prototype,{"delete":function(t){return o(t)?f(t)?c(t,l)&&c(t[l],this._i)&&delete t[l][this._i]:v(this)["delete"](t):!1},has:function(t){return o(t)?f(t)?c(t,l)&&c(t[l],this._i):v(this).has(t):!1}}),i},def:function(t,e,n){return f(i(e))?(c(e,l)||a(e,l,{}),e[l][t._i]=n):v(t).set(e,n),t},frozenStore:v,WEAK:l}},{27:27,30:30,31:31,38:38,4:4,60:60,69:69,8:8,82:82}],15:[function(t,e,n){"use strict";var a=t(29),r=t(22),i=t(61),o=t(60),s=t(27),u=t(69),p=t(38),c=t(24),l=t(43),f=t(66);e.exports=function(t,e,n,d,h,m){var v=a[t],g=v,b=h?"set":"add",y=g&&g.prototype,_={},x=function(t){var e=y[t];i(y,t,"delete"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"has"==t?function(t){return m&&!p(t)?!1:e.call(this,0===t?0:t)}:"get"==t?function(t){return m&&!p(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof g&&(m||y.forEach&&!c(function(){(new g).entries().next()}))){var w,k=new g,P=k[b](m?{}:-0,1)!=k,E=c(function(){k.has(1)}),C=l(function(t){new g(t)});C||(g=e(function(e,n){u(e,g,t);var a=new v;return void 0!=n&&s(n,h,a[b],a),a}),g.prototype=y,y.constructor=g),m||k.forEach(function(t,e){w=1/e===-(1/0)}),(E||w)&&(x("delete"),x("has"),h&&x("get")),(w||P)&&x(b),m&&y.clear&&delete y.clear}else g=d.getConstructor(e,t,h,b),o(g.prototype,n);return f(g,t),_[t]=g,r(r.G+r.W+r.F*(g!=v),_),m||d.setStrong(g,t,h),g}},{22:22,24:24,27:27,29:29,38:38,43:43,60:60,61:61,66:66,69:69}],16:[function(t,e,n){var a=e.exports={version:"1.2.6"};"number"==typeof __e&&(__e=a)},{}],17:[function(t,e,n){var a=t(2);e.exports=function(t,e,n){if(a(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,a){return t.call(e,n,a)};case 3:return function(n,a,r){return t.call(e,n,a,r)}}return function(){return t.apply(e,arguments)}}},{2:2}],18:[function(t,e,n){e.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},{}],19:[function(t,e,n){e.exports=!t(24)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},{24:24}],20:[function(t,e,n){var a=t(38),r=t(29).document,i=a(r)&&a(r.createElement);e.exports=function(t){return i?r.createElement(t):{}}},{29:29,38:38}],21:[function(t,e,n){var a=t(46);e.exports=function(t){var e=a.getKeys(t),n=a.getSymbols;if(n)for(var r,i=n(t),o=a.isEnum,s=0;i.length>s;)o.call(t,r=i[s++])&&e.push(r);return e}},{46:46}],22:[function(t,e,n){var a=t(29),r=t(16),i=t(31),o=t(61),s=t(17),u="prototype",p=function(t,e,n){var c,l,f,d,h=t&p.F,m=t&p.G,v=t&p.S,g=t&p.P,b=t&p.B,y=m?a:v?a[e]||(a[e]={}):(a[e]||{})[u],_=m?r:r[e]||(r[e]={}),x=_[u]||(_[u]={});m&&(n=e);for(c in n)l=!h&&y&&c in y,f=(l?y:n)[c],d=b&&l?s(f,a):g&&"function"==typeof f?s(Function.call,f):f,y&&!l&&o(y,c,f),_[c]!=f&&i(_,c,d),g&&x[c]!=f&&(x[c]=f)};a.core=r,p.F=1,p.G=2,p.S=4,p.P=8,p.B=16,p.W=32,e.exports=p},{16:16,17:17,29:29,31:31,61:61}],23:[function(t,e,n){var a=t(83)("match");e.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[a]=!1,!"/./"[t](e)}catch(r){}}return!0}},{83:83}],24:[function(t,e,n){e.exports=function(t){try{return!!t()}catch(e){return!0}}},{}],25:[function(t,e,n){"use strict";var a=t(31),r=t(61),i=t(24),o=t(18),s=t(83);e.exports=function(t,e,n){var u=s(t),p=""[t];i(function(){var e={};return e[u]=function(){return 7},7!=""[t](e)})&&(r(String.prototype,t,n(o,u,p)),a(RegExp.prototype,u,2==e?function(t,e){return p.call(t,this,e)}:function(t){return p.call(t,this)}))}},{18:18,24:24,31:31,61:61,83:83}],26:[function(t,e,n){"use strict";var a=t(4);e.exports=function(){var t=a(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},{4:4}],27:[function(t,e,n){var a=t(17),r=t(40),i=t(35),o=t(4),s=t(79),u=t(84);e.exports=function(t,e,n,p){var c,l,f,d=u(t),h=a(n,p,e?2:1),m=0;if("function"!=typeof d)throw TypeError(t+" is not iterable!");if(i(d))for(c=s(t.length);c>m;m++)e?h(o(l=t[m])[0],l[1]):h(t[m]);else for(f=d.call(t);!(l=f.next()).done;)r(f,h,l.value,e)}},{17:17,35:35,4:4,40:40,79:79,84:84}],28:[function(t,e,n){var a=t(78),r=t(46).getNames,i={}.toString,o="object"==typeof window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return r(t)}catch(e){return o.slice()}};e.exports.get=function(t){return o&&"[object Window]"==i.call(t)?s(t):r(a(t))}},{46:46,78:78}],29:[function(t,e,n){var a=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=a)},{}],30:[function(t,e,n){var a={}.hasOwnProperty;e.exports=function(t,e){return a.call(t,e)}},{}],31:[function(t,e,n){var a=t(46),r=t(59);e.exports=t(19)?function(t,e,n){return a.setDesc(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},{19:19,46:46,59:59}],32:[function(t,e,n){e.exports=t(29).document&&document.documentElement},{29:29}],33:[function(t,e,n){e.exports=function(t,e,n){var a=void 0===n;switch(e.length){case 0:return a?t():t.call(n);case 1:return a?t(e[0]):t.call(n,e[0]);case 2:return a?t(e[0],e[1]):t.call(n,e[0],e[1]);case 3:return a?t(e[0],e[1],e[2]):t.call(n,e[0],e[1],e[2]);case 4:return a?t(e[0],e[1],e[2],e[3]):t.call(n,e[0],e[1],e[2],e[3])}return t.apply(n,e)}},{}],34:[function(t,e,n){var a=t(11);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==a(t)?t.split(""):Object(t)}},{11:11}],35:[function(t,e,n){var a=t(45),r=t(83)("iterator"),i=Array.prototype;e.exports=function(t){return void 0!==t&&(a.Array===t||i[r]===t)}},{45:45,83:83}],36:[function(t,e,n){var a=t(11);e.exports=Array.isArray||function(t){return"Array"==a(t)}},{11:11}],37:[function(t,e,n){var a=t(38),r=Math.floor;e.exports=function(t){return!a(t)&&isFinite(t)&&r(t)===t}},{38:38}],38:[function(t,e,n){e.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},{}],39:[function(t,e,n){var a=t(38),r=t(11),i=t(83)("match");e.exports=function(t){var e;return a(t)&&(void 0!==(e=t[i])?!!e:"RegExp"==r(t))}},{11:11,38:38,83:83}],40:[function(t,e,n){var a=t(4);e.exports=function(t,e,n,r){try{return r?e(a(n)[0],n[1]):e(n)}catch(i){var o=t["return"];throw void 0!==o&&a(o.call(t)),i}}},{4:4}],41:[function(t,e,n){"use strict";var a=t(46),r=t(59),i=t(66),o={};t(31)(o,t(83)("iterator"),function(){return this}),e.exports=function(t,e,n){t.prototype=a.create(o,{next:r(1,n)}),i(t,e+" Iterator")}},{31:31,46:46,59:59,66:66,83:83}],42:[function(t,e,n){"use strict";var a=t(48),r=t(22),i=t(61),o=t(31),s=t(30),u=t(45),p=t(41),c=t(66),l=t(46).getProto,f=t(83)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",m="keys",v="values",g=function(){return this};e.exports=function(t,e,n,b,y,_,x){p(n,e,b);var w,k,P=function(t){if(!d&&t in A)return A[t];switch(t){case m:return function(){return new n(this,t)};case v:return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",C=y==v,S=!1,A=t.prototype,O=A[f]||A[h]||y&&A[y],T=O||P(y);if(O){var M=l(T.call(new t));c(M,E,!0),!a&&s(A,h)&&o(M,f,g),C&&O.name!==v&&(S=!0,T=function(){return O.call(this)})}if(a&&!x||!d&&!S&&A[f]||o(A,f,T),u[e]=T,u[E]=g,y)if(w={values:C?T:P(v),keys:_?T:P(m),entries:C?P("entries"):T},x)for(k in w)k in A||i(A,k,w[k]);else r(r.P+r.F*(d||S),e,w);return w}},{22:22,30:30,31:31,41:41,45:45,46:46,48:48,61:61,66:66,83:83}],43:[function(t,e,n){var a=t(83)("iterator"),r=!1;try{var i=[7][a]();i["return"]=function(){r=!0},Array.from(i,function(){throw 2})}catch(o){}e.exports=function(t,e){if(!e&&!r)return!1;var n=!1;try{var i=[7],o=i[a]();o.next=function(){n=!0},i[a]=function(){return o},t(i)}catch(s){}return n}},{83:83}],44:[function(t,e,n){e.exports=function(t,e){return{value:e,done:!!t}}},{}],45:[function(t,e,n){e.exports={}},{}],46:[function(t,e,n){var a=Object;e.exports={create:a.create,getProto:a.getPrototypeOf,isEnum:{}.propertyIsEnumerable,getDesc:a.getOwnPropertyDescriptor,setDesc:a.defineProperty,setDescs:a.defineProperties,getKeys:a.keys,getNames:a.getOwnPropertyNames,getSymbols:a.getOwnPropertySymbols,each:[].forEach}},{}],47:[function(t,e,n){var a=t(46),r=t(78);e.exports=function(t,e){for(var n,i=r(t),o=a.getKeys(i),s=o.length,u=0;s>u;)if(i[n=o[u++]]===e)return n}},{46:46,78:78}],48:[function(t,e,n){e.exports=!1},{}],49:[function(t,e,n){e.exports=Math.expm1||function(t){return 0==(t=+t)?t:t>-1e-6&&1e-6>t?t+t*t/2:Math.exp(t)-1}},{}],50:[function(t,e,n){e.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&1e-8>t?t-t*t/2:Math.log(1+t)}},{}],51:[function(t,e,n){e.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:0>t?-1:1}},{}],52:[function(t,e,n){var a,r,i,o=t(29),s=t(75).set,u=o.MutationObserver||o.WebKitMutationObserver,p=o.process,c=o.Promise,l="process"==t(11)(p),f=function(){var t,e,n;for(l&&(t=p.domain)&&(p.domain=null,t.exit());a;)e=a.domain,n=a.fn,e&&e.enter(),n(),e&&e.exit(),a=a.next;r=void 0,t&&t.enter()};if(l)i=function(){p.nextTick(f)};else if(u){var d=1,h=document.createTextNode("");new u(f).observe(h,{characterData:!0}),i=function(){h.data=d=-d}}else i=c&&c.resolve?function(){c.resolve().then(f)}:function(){s.call(o,f)};e.exports=function(t){var e={fn:t,next:void 0,domain:l&&p.domain};r&&(r.next=e),a||(a=e,i()),r=e}},{11:11,29:29,75:75}],53:[function(t,e,n){var a=t(46),r=t(80),i=t(34);e.exports=t(24)(function(){var t=Object.assign,e={},n={},a=Symbol(),r="abcdefghijklmnopqrst";return e[a]=7,r.split("").forEach(function(t){n[t]=t}),7!=t({},e)[a]||Object.keys(t({},n)).join("")!=r})?function(t,e){for(var n=r(t),o=arguments,s=o.length,u=1,p=a.getKeys,c=a.getSymbols,l=a.isEnum;s>u;)for(var f,d=i(o[u++]),h=c?p(d).concat(c(d)):p(d),m=h.length,v=0;m>v;)l.call(d,f=h[v++])&&(n[f]=d[f]);return n}:Object.assign},{24:24,34:34,46:46,80:80}],54:[function(t,e,n){var a=t(22),r=t(16),i=t(24);e.exports=function(t,e){var n=(r.Object||{})[t]||Object[t],o={};o[t]=e(n),a(a.S+a.F*i(function(){n(1)}),"Object",o)}},{16:16,22:22,24:24}],55:[function(t,e,n){var a=t(46),r=t(78),i=a.isEnum;e.exports=function(t){return function(e){for(var n,o=r(e),s=a.getKeys(o),u=s.length,p=0,c=[];u>p;)i.call(o,n=s[p++])&&c.push(t?[n,o[n]]:o[n]);return c}}},{46:46,78:78}],56:[function(t,e,n){var a=t(46),r=t(4),i=t(29).Reflect;e.exports=i&&i.ownKeys||function(t){var e=a.getNames(r(t)),n=a.getSymbols;return n?e.concat(n(t)):e}},{29:29,4:4,46:46}],57:[function(t,e,n){"use strict";var a=t(58),r=t(33),i=t(2);e.exports=function(){for(var t=i(this),e=arguments.length,n=Array(e),o=0,s=a._,u=!1;e>o;)(n[o]=arguments[o++])===s&&(u=!0);return function(){var a,i=this,o=arguments,p=o.length,c=0,l=0;if(!u&&!p)return r(t,n,i);if(a=n.slice(),u)for(;e>c;c++)a[c]===s&&(a[c]=o[l++]);for(;p>l;)a.push(o[l++]);return r(t,a,i)}}},{2:2,33:33,58:58}],58:[function(t,e,n){e.exports=t(29)},{29:29}],59:[function(t,e,n){e.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},{}],60:[function(t,e,n){var a=t(61);e.exports=function(t,e){for(var n in e)a(t,n,e[n]);return t}},{61:61}],61:[function(t,e,n){var a=t(29),r=t(31),i=t(82)("src"),o="toString",s=Function[o],u=(""+s).split(o);t(16).inspectSource=function(t){return s.call(t)},(e.exports=function(t,e,n,o){"function"==typeof n&&(n.hasOwnProperty(i)||r(n,i,t[e]?""+t[e]:u.join(e+"")),n.hasOwnProperty("name")||r(n,"name",e)),t===a?t[e]=n:(o||delete t[e],r(t,e,n))})(Function.prototype,o,function(){return"function"==typeof this&&this[i]||s.call(this)})},{16:16,29:29,31:31,82:82}],62:[function(t,e,n){e.exports=function(t,e){var n=e===Object(e)?function(t){return e[t]}:e;return function(e){return(e+"").replace(t,n)}}},{}],63:[function(t,e,n){e.exports=Object.is||function(t,e){return t===e?0!==t||1/t===1/e:t!=t&&e!=e}},{}],64:[function(t,e,n){var a=t(46).getDesc,r=t(38),i=t(4),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};e.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(e,n,r){try{r=t(17)(Function.call,a(Object.prototype,"__proto__").set,2),r(e,[]),n=!(e instanceof Array)}catch(i){n=!0}return function(t,e){return o(t,e),n?t.__proto__=e:r(t,e),t}}({},!1):void 0),check:o}},{17:17,38:38,4:4,46:46}],65:[function(t,e,n){"use strict";var a=t(29),r=t(46),i=t(19),o=t(83)("species");e.exports=function(t){var e=a[t];i&&e&&!e[o]&&r.setDesc(e,o,{configurable:!0,get:function(){return this}})}},{19:19,29:29,46:46,83:83}],66:[function(t,e,n){var a=t(46).setDesc,r=t(30),i=t(83)("toStringTag");e.exports=function(t,e,n){t&&!r(t=n?t:t.prototype,i)&&a(t,i,{configurable:!0,value:e})}},{30:30,46:46,83:83}],67:[function(t,e,n){var a=t(29),r="__core-js_shared__",i=a[r]||(a[r]={});e.exports=function(t){return i[t]||(i[t]={})}},{29:29}],68:[function(t,e,n){var a=t(4),r=t(2),i=t(83)("species");e.exports=function(t,e){var n,o=a(t).constructor;return void 0===o||void 0==(n=a(o)[i])?e:r(n)}},{2:2,4:4,83:83}],69:[function(t,e,n){e.exports=function(t,e,n){if(!(t instanceof e))throw TypeError(n+": use the 'new' operator!");return t}},{}],70:[function(t,e,n){var a=t(77),r=t(18);e.exports=function(t){return function(e,n){var i,o,s=r(e)+"",u=a(n),p=s.length;return 0>u||u>=p?t?"":void 0:(i=s.charCodeAt(u),55296>i||i>56319||u+1===p||(o=s.charCodeAt(u+1))<56320||o>57343?t?s.charAt(u):i:t?s.slice(u,u+2):(i-55296<<10)+(o-56320)+65536)}}},{18:18,77:77}],71:[function(t,e,n){var a=t(39),r=t(18);e.exports=function(t,e,n){if(a(e))throw TypeError("String#"+n+" doesn't accept regex!");return r(t)+""}},{18:18,39:39}],72:[function(t,e,n){var a=t(79),r=t(73),i=t(18);e.exports=function(t,e,n,o){var s=i(t)+"",u=s.length,p=void 0===n?" ":n+"",c=a(e);if(u>=c)return s;""==p&&(p=" ");var l=c-u,f=r.call(p,Math.ceil(l/p.length));return f.length>l&&(f=f.slice(0,l)),o?f+s:s+f}},{18:18,73:73,79:79}],73:[function(t,e,n){"use strict";var a=t(77),r=t(18);e.exports=function(t){var e=r(this)+"",n="",i=a(t);if(0>i||i==1/0)throw RangeError("Count can't be negative");for(;i>0;(i>>>=1)&&(e+=e))1&i&&(n+=e);return n}},{18:18,77:77}],74:[function(t,e,n){var a=t(22),r=t(18),i=t(24),o=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff",s="["+o+"]",u="​…",p=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),l=function(t,e){var n={};n[t]=e(f),a(a.P+a.F*i(function(){return!!o[t]()||u[t]()!=u}),"String",n)},f=l.trim=function(t,e){return t=r(t)+"",1&e&&(t=t.replace(p,"")),2&e&&(t=t.replace(c,"")),t};e.exports=l},{18:18,22:22,24:24}],75:[function(t,e,n){var a,r,i,o=t(17),s=t(33),u=t(32),p=t(20),c=t(29),l=c.process,f=c.setImmediate,d=c.clearImmediate,h=c.MessageChannel,m=0,v={},g="onreadystatechange",b=function(){var t=+this;if(v.hasOwnProperty(t)){var e=v[t];delete v[t],e()}},y=function(t){b.call(t.data)};f&&d||(f=function(t){for(var e=[],n=1;arguments.length>n;)e.push(arguments[n++]);return v[++m]=function(){s("function"==typeof t?t:Function(t),e)},a(m),m},d=function(t){delete v[t]},"process"==t(11)(l)?a=function(t){l.nextTick(o(b,t,1))}:h?(r=new h,i=r.port2,r.port1.onmessage=y,a=o(i.postMessage,i,1)):c.addEventListener&&"function"==typeof postMessage&&!c.importScripts?(a=function(t){c.postMessage(t+"","*")},c.addEventListener("message",y,!1)):a=g in p("script")?function(t){u.appendChild(p("script"))[g]=function(){u.removeChild(this),b.call(t)}}:function(t){setTimeout(o(b,t,1),0)}),e.exports={set:f,clear:d}},{11:11,17:17,20:20,29:29,32:32,33:33}],76:[function(t,e,n){var a=t(77),r=Math.max,i=Math.min;e.exports=function(t,e){return t=a(t),0>t?r(t+e,0):i(t,e)}},{77:77}],77:[function(t,e,n){var a=Math.ceil,r=Math.floor;e.exports=function(t){return isNaN(t=+t)?0:(t>0?r:a)(t)}},{}],78:[function(t,e,n){var a=t(34),r=t(18);e.exports=function(t){return a(r(t))}},{18:18,34:34}],79:[function(t,e,n){var a=t(77),r=Math.min;e.exports=function(t){return t>0?r(a(t),9007199254740991):0}},{77:77}],80:[function(t,e,n){var a=t(18);e.exports=function(t){return Object(a(t))}},{18:18}],81:[function(t,e,n){var a=t(38);e.exports=function(t,e){if(!a(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!a(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!a(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},{38:38}],82:[function(t,e,n){var a=0,r=Math.random();e.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++a+r).toString(36))}},{}],83:[function(t,e,n){var a=t(67)("wks"),r=t(82),i=t(29).Symbol;e.exports=function(t){return a[t]||(a[t]=i&&i[t]||(i||r)("Symbol."+t))}},{29:29,67:67,82:82}],84:[function(t,e,n){var a=t(10),r=t(83)("iterator"),i=t(45);e.exports=t(16).getIteratorMethod=function(t){return void 0!=t?t[r]||t["@@iterator"]||i[a(t)]:void 0}},{10:10,16:16,45:45,83:83}],85:[function(t,e,n){"use strict";var a,r=t(46),i=t(22),o=t(19),s=t(59),u=t(32),p=t(20),c=t(30),l=t(11),f=t(33),d=t(24),h=t(4),m=t(2),v=t(38),g=t(80),b=t(78),y=t(77),_=t(76),x=t(79),w=t(34),k=t(82)("__proto__"),P=t(8),E=t(7)(!1),C=Object.prototype,S=Array.prototype,A=S.slice,O=S.join,T=r.setDesc,M=r.getDesc,R=r.setDescs,j={};o||(a=!d(function(){return 7!=T(p("div"),"a",{get:function(){return 7}}).a}),r.setDesc=function(t,e,n){if(a)try{return T(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(h(t)[e]=n.value),t},r.getDesc=function(t,e){if(a)try{return M(t,e)}catch(n){}return c(t,e)?s(!C.propertyIsEnumerable.call(t,e),t[e]):void 0},r.setDescs=R=function(t,e){h(t);for(var n,a=r.getKeys(e),i=a.length,o=0;i>o;)r.setDesc(t,n=a[o++],e[n]);return t}),i(i.S+i.F*!o,"Object",{getOwnPropertyDescriptor:r.getDesc,defineProperty:r.setDesc,defineProperties:R});var L="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(","),N=L.concat("length","prototype"),F=L.length,D=function(){var t,e=p("iframe"),n=F,a=">";for(e.style.display="none",u.appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("