diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 79083339ae34..e711d1a72069 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -288,10 +288,10 @@ Usage of this system is mandatory for any `Topic()` calls, and will produce erro ```dm //Bad -"Link!" +"Link!" //Good -"Link!" +"Link!" ``` ### Use `var/name` format when declaring variables diff --git a/.gitignore b/.gitignore index e020ce07f19f..de2fcefe7bb2 100644 --- a/.gitignore +++ b/.gitignore @@ -69,5 +69,8 @@ $RECYCLE.BIN # Linux libs /*.so +# VIM swap files. +*.swp + # SS220 EDIT sound/tts_cache/* diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_althland_excavation.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_althland_excavation.dmm index 1505811a8c4e..1e3b9a3be133 100644 --- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_althland_excavation.dmm +++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_althland_excavation.dmm @@ -797,6 +797,9 @@ /obj/effect/turf_decal/delivery/white, /turf/simulated/floor/plating/airless, /area/ruin/unpowered/althland_excavation) +"oh" = ( +/turf/simulated/mineral/volcanic/lava_land_surface, +/area/lavaland/surface/outdoors) "or" = ( /obj/structure/railing/corner{ dir = 8 @@ -1271,6 +1274,9 @@ nitrogen = 0 }, /area/lavaland/surface/outdoors) +"Mm" = ( +/turf/simulated/floor/plating/asteroid/basalt/lava_land_surface, +/area/lavaland/surface/outdoors) "MT" = ( /obj/structure/grille/broken, /obj/effect/decal/cleanable/glass, @@ -1564,6 +1570,19 @@ /area/ruin/unpowered/althland_excavation) (1,1,1) = {" +oh +oh +oh +oh +oh +oh +oh +oh +oh +Mm +Mm +Mm +Mm Ei Ei Ei @@ -1575,6 +1594,25 @@ Ei Ei Ei Ei +Mm +Mm +oh +oh +oh +oh +"} +(2,1,1) = {" +oh +oh +oh +oh +Mm +Mm +Mm +Mm +Mm +Mm +Mm TN TN TN @@ -1591,17 +1629,17 @@ Ei Ei Ei Ei -Ei -Ei -Ei +oh +oh +oh "} -(2,1,1) = {" -Ei -Ei -Ei -Ei -Ei -Ei +(3,1,1) = {" +oh +oh +Mm +Mm +Mm +Mm TN TN TN @@ -1624,14 +1662,14 @@ Ei Ei Ei Ei -Ei -Ei +oh +oh "} -(3,1,1) = {" -Ei -Ei -Ei -Ei +(4,1,1) = {" +oh +Mm +Mm +Mm TN TN TN @@ -1656,13 +1694,13 @@ TN TN Ei Ei -Ei -Ei +Mm +Mm "} -(4,1,1) = {" -Ei -Ei -Ei +(5,1,1) = {" +oh +Mm +Mm TN sp aU @@ -1689,11 +1727,11 @@ TN TN Ei Ei -Ei +Mm "} -(5,1,1) = {" -Ei -Ei +(6,1,1) = {" +Mm +Mm TN TN Ri @@ -1723,9 +1761,9 @@ bm Ei Ei "} -(6,1,1) = {" -Ei -Ei +(7,1,1) = {" +Mm +Mm TN PL BZ @@ -1755,8 +1793,8 @@ bm Ei Ei "} -(7,1,1) = {" -Ei +(8,1,1) = {" +Mm TN TN pE @@ -1787,8 +1825,8 @@ Ei Ei Ei "} -(8,1,1) = {" -Ei +(9,1,1) = {" +Mm TN sp bC @@ -1819,8 +1857,8 @@ aB Ei Ei "} -(9,1,1) = {" -Ei +(10,1,1) = {" +Mm TN TN TN @@ -1851,8 +1889,8 @@ Ei bm Ei "} -(10,1,1) = {" -Ei +(11,1,1) = {" +Mm TN ct Pe @@ -1883,8 +1921,8 @@ Ei bm Ei "} -(11,1,1) = {" -Ei +(12,1,1) = {" +Mm TN pC yb @@ -1915,7 +1953,7 @@ Ei TN Ei "} -(12,1,1) = {" +(13,1,1) = {" Ei TN TN @@ -1945,9 +1983,9 @@ Ei Ei Ei TN -Ei +Mm "} -(13,1,1) = {" +(14,1,1) = {" Ei TN aU @@ -1977,9 +2015,9 @@ XS Ei Ei TN -Ei +Mm "} -(14,1,1) = {" +(15,1,1) = {" Ei TN Yz @@ -2009,9 +2047,9 @@ Ei Ei Ei TN -Ei +Mm "} -(15,1,1) = {" +(16,1,1) = {" Ei TN TN @@ -2041,9 +2079,9 @@ Ei BW aB TN -Ei +Mm "} -(16,1,1) = {" +(17,1,1) = {" Ei TN Ei @@ -2073,9 +2111,9 @@ mK uG BW TN -Ei +Mm "} -(17,1,1) = {" +(18,1,1) = {" Ei bm Ei @@ -2105,9 +2143,9 @@ BW LK PM TN -Ei +Mm "} -(18,1,1) = {" +(19,1,1) = {" Ei bm Ei @@ -2137,9 +2175,9 @@ aB BW KU TN -Ei +Mm "} -(19,1,1) = {" +(20,1,1) = {" Ei TN Ei @@ -2169,9 +2207,9 @@ aB aB uG TN -Ei +Mm "} -(20,1,1) = {" +(21,1,1) = {" Ei TN TN @@ -2201,9 +2239,9 @@ aB aB aB TN -Ei +Mm "} -(21,1,1) = {" +(22,1,1) = {" Ei TN ao @@ -2233,9 +2271,9 @@ BW TJ BW TN -Ei +Mm "} -(22,1,1) = {" +(23,1,1) = {" Ei TN at @@ -2265,9 +2303,9 @@ mh mK uG TN -Ei +Mm "} -(23,1,1) = {" +(24,1,1) = {" Ei TN aG @@ -2297,10 +2335,10 @@ mh mh Gc TN -Ei +Mm "} -(24,1,1) = {" -Ei +(25,1,1) = {" +Mm TN TN bU @@ -2329,11 +2367,11 @@ gg bN TN TN -Ei +Mm "} -(25,1,1) = {" -Ei -Ei +(26,1,1) = {" +Mm +Mm TN az DS @@ -2360,12 +2398,12 @@ jL Nv jS TN -Ei -Ei +Mm +Mm "} -(26,1,1) = {" -Ei -Ei +(27,1,1) = {" +oh +Mm TN TN ap @@ -2392,13 +2430,13 @@ bL YE TN TN -Ei -Ei +Mm +Mm "} -(27,1,1) = {" -Ei -Ei -Ei +(28,1,1) = {" +oh +Mm +Mm TN TN iA @@ -2423,15 +2461,15 @@ kh aE TN TN -Ei -Ei -Ei +Mm +Mm +oh "} -(28,1,1) = {" -Ei -Ei -Ei -Ei +(29,1,1) = {" +oh +Mm +Mm +Mm TN TN TN @@ -2454,18 +2492,18 @@ TN TN TN TN -Ei -Ei -Ei -Ei +Mm +Mm +oh +oh "} -(29,1,1) = {" -Ei -Ei -Ei -Ei -Ei -Ei +(30,1,1) = {" +oh +oh +Mm +Mm +Mm +Mm TN TN TN @@ -2484,25 +2522,25 @@ TN TN TN TN -Ei -Ei -Ei -Ei -Ei -Ei +Mm +Mm +Mm +oh +oh +oh "} -(30,1,1) = {" -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei +(31,1,1) = {" +oh +oh +oh +Mm +Mm +Mm +Mm +Mm +Mm +Mm +Mm TN TN TN @@ -2512,14 +2550,14 @@ TN TN TN TN -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei -Ei +Mm +Mm +Mm +Mm +Mm +oh +oh +oh +oh +oh "} diff --git a/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm b/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm index 6a22394fcae0..067579f3be83 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/meatpackers.dmm @@ -1277,10 +1277,6 @@ icon_state = "0-2" }, /obj/structure/cable, -/obj/structure/cable{ - d2 = 2; - icon_state = "0-2" - }, /turf/simulated/floor/plating, /area/ruin/unpowered/BMPship/Aft) "eg" = ( @@ -1602,7 +1598,6 @@ outputting = 0 }, /obj/structure/cable, -/obj/structure/cable, /turf/simulated/floor/plating, /area/ruin/unpowered/BMPship/Aft) "fb" = ( diff --git a/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm b/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm index b491af4be5c1..6ba4f2256a0f 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/oldstation.dmm @@ -1330,6 +1330,7 @@ }, /obj/effect/decal/cleanable/dirt, /obj/effect/decal/cleanable/dirt, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel, /area/ruin/ancientstation/hydroponics) "dT" = ( @@ -4192,6 +4193,7 @@ /obj/item/reagent_containers/spray/weedspray, /obj/item/reagent_containers/spray/pestspray, /obj/item/reagent_containers/spray/cleaner, +/obj/item/reagent_containers/glass/bottle/nutrient/mut, /turf/simulated/floor/plating, /area/ruin/ancientstation) "kh" = ( diff --git a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm index 89dd8083a442..9cca10a32392 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/onehalf.dmm @@ -1136,20 +1136,6 @@ /obj/item/storage/firstaid, /turf/simulated/floor/plasteel, /area/ruin/space/onehalf/abandonedbridge) -"df" = ( -/obj/structure/lattice, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, -/turf/template_noop, -/area/space/nearstation) "dg" = ( /obj/structure/girder/reinforced, /obj/item/stack/sheet/plasteel, @@ -1190,26 +1176,6 @@ /obj/effect/spawner/window/reinforced/grilled, /turf/simulated/floor/plating, /area/ruin/space/onehalf/abandonedbridge) -"dm" = ( -/obj/structure/cable{ - d1 = 4; - d2 = 8; - icon_state = "4-8"; - tag = "" - }, -/obj/structure/cable{ - d1 = 4; - d2 = 8; - icon_state = "4-8"; - tag = "" - }, -/obj/machinery/door/poddoor/preopen{ - id_tag = "onehalf bridge"; - name = "bridge blast door" - }, -/obj/effect/spawner/window/reinforced/grilled, -/turf/simulated/floor/plating, -/area/ruin/space/onehalf/abandonedbridge) "dn" = ( /obj/effect/spawner/window/reinforced/grilled, /obj/structure/cable{ @@ -1796,7 +1762,7 @@ Ab cr cW ch -dm +dl ac aa "} @@ -1905,7 +1871,7 @@ ai ai ai cZ -df +ai ai af aa diff --git a/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm b/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm index c0a150801e61..f6febf659647 100644 --- a/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm +++ b/_maps/map_files/RandomRuins/SpaceRuins/ussp.dmm @@ -3010,20 +3010,6 @@ }, /turf/simulated/floor/plasteel/grimy, /area/ruin/space/derelict/crew_quarters) -"hp" = ( -/obj/machinery/power/solar, -/obj/structure/cable{ - d2 = 4; - icon_state = "0-4" - }, -/obj/structure/cable{ - d2 = 4; - icon_state = "0-4" - }, -/turf/simulated/floor/plasteel/airless{ - icon_state = "solarpanel" - }, -/area/ruin/space/derelict/solar_control) "hq" = ( /obj/item/stack/ore/uranium, /turf/template_noop, @@ -7502,7 +7488,6 @@ "sp" = ( /obj/machinery/power/solar/fake, /obj/structure/cable, -/obj/structure/cable, /turf/simulated/floor/plasteel/airless{ icon_state = "solarpanel" }, @@ -7537,7 +7522,6 @@ /turf/template_noop, /area/ruin/space/derelict/solar_control) "st" = ( -/obj/structure/cable, /obj/machinery/power/tracker, /obj/structure/cable, /turf/simulated/floor/plasteel/airless{ @@ -7575,6 +7559,13 @@ }, /turf/simulated/wall/mineral/titanium/nodecon/nodiagonal, /area/ruin/space/derelict/arrival) +"NK" = ( +/obj/structure/cable{ + d2 = 8; + icon_state = "0-8" + }, +/turf/template_noop, +/area/template_noop) "Oh" = ( /obj/effect/spawner/airlock/w_to_e{ req_access_txt = 0 @@ -14166,7 +14157,7 @@ ac ac ac ac -ac +NK ac ac ac @@ -14356,18 +14347,18 @@ ac ac ac ac -hp -hp -hp -hp -hp +hs +hs +hs +hs +hs ac jO ac jO ag hs -hp +hs hs hs hs diff --git a/_maps/map_files/generic/Lavaland.dmm b/_maps/map_files/generic/Lavaland.dmm index 9769e9b96be6..03e670f9f511 100644 --- a/_maps/map_files/generic/Lavaland.dmm +++ b/_maps/map_files/generic/Lavaland.dmm @@ -788,11 +788,6 @@ }, /area/mine/laborcamp/security) "cz" = ( -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/structure/cable{ d1 = 1; d2 = 2; diff --git a/_maps/map_files/stations/boxstation.dmm b/_maps/map_files/stations/boxstation.dmm index ee9f6ef44eb3..57c028ebbfc1 100644 --- a/_maps/map_files/stations/boxstation.dmm +++ b/_maps/map_files/stations/boxstation.dmm @@ -17393,6 +17393,7 @@ name = "south bump"; pixel_y = -24 }, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel{ dir = 4; icon_state = "green" @@ -17627,6 +17628,7 @@ /obj/machinery/light{ dir = 4 }, +/obj/item/reagent_containers/glass/bottle/nutrient/mut, /turf/simulated/floor/plasteel{ dir = 4; icon_state = "green" @@ -83589,6 +83591,7 @@ /obj/item/shovel/spade, /obj/item/shovel/spade, /obj/item/plant_analyzer, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/grass, /area/station/security/permabrig) "sGj" = ( diff --git a/_maps/map_files/stations/cerestation.dmm b/_maps/map_files/stations/cerestation.dmm index 9350ae3cd1f3..2a03e9c68b61 100644 --- a/_maps/map_files/stations/cerestation.dmm +++ b/_maps/map_files/stations/cerestation.dmm @@ -7908,6 +7908,7 @@ /obj/item/reagent_containers/glass/bottle/nutrient/ez, /obj/item/reagent_containers/spray/pestspray, /obj/item/reagent_containers/spray/plantbgone, +/obj/item/reagent_containers/glass/bottle/nutrient/mut, /turf/simulated/floor/grass/jungle, /area/station/hallway/secondary/garden) "aYc" = ( @@ -7917,6 +7918,7 @@ /obj/item/reagent_containers/glass/bucket, /obj/item/storage/bag/plants/portaseeder, /obj/item/reagent_containers/glass/bucket, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/grass/jungle, /area/station/hallway/secondary/garden) "aYd" = ( @@ -43324,6 +43326,7 @@ /obj/item/plant_analyzer, /obj/item/cultivator, /obj/item/reagent_containers/spray/plantbgone, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel{ dir = 4; icon_state = "green" diff --git a/_maps/map_files/stations/deltastation.dmm b/_maps/map_files/stations/deltastation.dmm index 271ea9bf8c8b..548b6ba2425d 100644 --- a/_maps/map_files/stations/deltastation.dmm +++ b/_maps/map_files/stations/deltastation.dmm @@ -9366,6 +9366,7 @@ /obj/structure/cable, /obj/effect/decal/cleanable/dirt, /obj/effect/turf_decal/delivery/hollow, +/obj/item/reagent_containers/glass/bottle/nutrient/mut, /turf/simulated/floor/plasteel, /area/station/maintenance/abandoned_garden) "aHr" = ( @@ -9676,6 +9677,7 @@ "aIl" = ( /obj/item/reagent_containers/glass/bottle/nutrient/ez, /obj/item/reagent_containers/glass/bottle/nutrient/ez, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel{ icon_state = "red" }, @@ -61698,13 +61700,21 @@ /turf/simulated/floor/plasteel, /area/station/hallway/primary/aft/south) "dHO" = ( +/obj/effect/spawner/window/reinforced/grilled, +/obj/structure/cable{ + d1 = 2; + d2 = 8; + icon_state = "2-8" + }, /obj/structure/cable{ d1 = 1; - d2 = 2; - icon_state = "1-2" + d2 = 8; + icon_state = "1-8" + }, +/obj/structure/cable{ + d2 = 8; + icon_state = "0-8" }, -/obj/structure/cable, -/obj/effect/spawner/window/reinforced/grilled, /turf/simulated/floor/plating, /area/station/hallway/secondary/exit) "dHQ" = ( @@ -63938,16 +63948,6 @@ /obj/item/crowbar/red, /turf/simulated/floor/plasteel/dark, /area/station/maintenance/apmaint) -"dSB" = ( -/obj/machinery/atmospherics/unary/portables_connector{ - dir = 8 - }, -/obj/machinery/atmospherics/portable/canister/air, -/obj/effect/turf_decal/stripes/line{ - dir = 10 - }, -/turf/simulated/floor/plasteel, -/area/station/hallway/secondary/exit) "dSD" = ( /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 4 @@ -66421,6 +66421,16 @@ /obj/effect/decal/cleanable/dirt, /turf/simulated/wall, /area/station/legal/lawoffice) +"evE" = ( +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2" + }, +/obj/structure/cable, +/obj/effect/spawner/window/reinforced/grilled, +/turf/simulated/floor/plating, +/area/station/hallway/secondary/exit) "evX" = ( /obj/structure/cable, /obj/effect/spawner/window/reinforced/grilled, @@ -66555,6 +66565,22 @@ icon_state = "yellowcorner" }, /area/station/hallway/primary/port/east) +"ezr" = ( +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 6 + }, +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/obj/structure/cable{ + d1 = 2; + d2 = 4; + icon_state = "2-4" + }, +/turf/simulated/floor/plasteel/white, +/area/station/medical/virology) "ezR" = ( /obj/effect/decal/cleanable/dirt, /turf/simulated/floor/plasteel{ @@ -71015,6 +71041,16 @@ }, /turf/simulated/floor/plating, /area/station/command/office/rd) +"hli" = ( +/obj/machinery/atmospherics/unary/portables_connector{ + dir = 8 + }, +/obj/machinery/atmospherics/portable/canister/air, +/obj/effect/turf_decal/stripes/line{ + dir = 10 + }, +/turf/simulated/floor/plasteel, +/area/station/hallway/secondary/exit) "hly" = ( /obj/structure/table/wood, /turf/simulated/floor/plasteel/dark, @@ -73732,6 +73768,10 @@ icon_state = "bar" }, /area/station/service/kitchen) +"iVe" = ( +/obj/effect/spawner/airlock, +/turf/simulated/wall, +/area/station/service/chapel/office) "iVg" = ( /obj/machinery/economy/atm/directional/west, /turf/simulated/floor/plasteel{ @@ -75552,15 +75592,6 @@ icon_state = "whiteblue" }, /area/station/medical/storage) -"kdg" = ( -/obj/structure/sign/vacuum{ - pixel_x = -32 - }, -/obj/effect/turf_decal/stripes/line{ - dir = 8 - }, -/turf/simulated/floor/plasteel, -/area/station/hallway/secondary/exit) "kdm" = ( /obj/machinery/power/apc/critical/directional/north, /obj/machinery/firealarm{ @@ -75661,6 +75692,15 @@ }, /turf/simulated/floor/plasteel/dark, /area/station/medical/morgue) +"kfC" = ( +/obj/structure/sign/vacuum{ + pixel_x = -32 + }, +/obj/effect/turf_decal/stripes/line{ + dir = 8 + }, +/turf/simulated/floor/plasteel, +/area/station/hallway/secondary/exit) "kfT" = ( /obj/structure/cable{ d2 = 4; @@ -82346,22 +82386,6 @@ icon_state = "red" }, /area/station/security/permabrig) -"ogR" = ( -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 6 - }, -/obj/structure/cable{ - d1 = 4; - d2 = 8; - icon_state = "4-8" - }, -/obj/structure/cable{ - d1 = 2; - d2 = 4; - icon_state = "2-4" - }, -/turf/simulated/floor/plasteel/white, -/area/station/medical/virology) "ogX" = ( /obj/machinery/camera{ c_tag = "Experimentation Lab Office"; @@ -91308,6 +91332,21 @@ }, /turf/simulated/floor/plasteel, /area/station/science/research) +"tjT" = ( +/obj/item/radio/intercom{ + name = "west bump"; + pixel_x = -28 + }, +/obj/machinery/newscaster{ + dir = 1; + name = "south bump"; + pixel_y = -28 + }, +/obj/effect/turf_decal/stripes/line{ + dir = 10 + }, +/turf/simulated/floor/plasteel, +/area/station/hallway/secondary/exit) "tkb" = ( /obj/machinery/atmospherics/pipe/simple/hidden/supply{ dir = 6 @@ -91840,24 +91879,6 @@ icon_state = "yellowcorner" }, /area/station/hallway/primary/port/west) -"tEp" = ( -/obj/effect/spawner/window/reinforced/grilled, -/obj/structure/cable{ - d1 = 2; - d2 = 8; - icon_state = "2-8" - }, -/obj/structure/cable{ - d1 = 1; - d2 = 8; - icon_state = "1-8" - }, -/obj/structure/cable{ - d2 = 8; - icon_state = "0-8" - }, -/turf/simulated/floor/plating, -/area/station/hallway/secondary/exit) "tEw" = ( /obj/structure/showcase{ density = 0; @@ -92355,21 +92376,6 @@ /obj/effect/spawner/window/reinforced/grilled, /turf/simulated/floor/plating, /area/station/security/prison/cell_block) -"tSp" = ( -/obj/item/radio/intercom{ - name = "west bump"; - pixel_x = -28 - }, -/obj/machinery/newscaster{ - dir = 1; - name = "south bump"; - pixel_y = -28 - }, -/obj/effect/turf_decal/stripes/line{ - dir = 10 - }, -/turf/simulated/floor/plasteel, -/area/station/hallway/secondary/exit) "tSt" = ( /obj/structure/table, /obj/item/reagent_containers/drinks/drinkingglass{ @@ -93009,10 +93015,6 @@ icon_state = "darkred" }, /area/station/security/processing) -"uil" = ( -/obj/effect/spawner/airlock, -/turf/simulated/wall, -/area/station/service/chapel/office) "uit" = ( /obj/machinery/atmospherics/unary/vent_pump{ dir = 4; @@ -136691,7 +136693,7 @@ dIx dIx dIx dIx -uil +iVe abj aaa aaa @@ -137202,7 +137204,7 @@ dPM dkq dSs dSP -dSB +hli dIH dIH dIH @@ -137460,8 +137462,8 @@ dNa dXJ dKo dUj -kdg -tSp +kfC +tjT dIH abj aaa @@ -140531,9 +140533,9 @@ pIY kuJ kpd kpd -tEp -dHO dHO +evE +evE tJT dKQ jpk @@ -149016,7 +149018,7 @@ dGw dGw hGZ qgr -ogR +ezr wWW qfH sRk diff --git a/_maps/map_files/stations/metastation.dmm b/_maps/map_files/stations/metastation.dmm index 05463f4ee2d4..1d78a0d6871b 100644 --- a/_maps/map_files/stations/metastation.dmm +++ b/_maps/map_files/stations/metastation.dmm @@ -22737,6 +22737,7 @@ }, /obj/item/reagent_containers/glass/bottle/nutrient/ez, /obj/item/reagent_containers/spray/plantbgone, +/obj/item/reagent_containers/glass/bottle/nutrient/mut, /turf/simulated/floor/plasteel, /area/station/hallway/secondary/garden) "bBN" = ( @@ -23451,17 +23452,6 @@ icon_state = "neutral" }, /area/station/hallway/secondary/garden) -"bDJ" = ( -/obj/structure/table, -/obj/item/hatchet, -/obj/item/crowbar, -/obj/item/plant_analyzer, -/obj/item/reagent_containers/glass/bucket, -/obj/item/cultivator, -/obj/item/paper/hydroponics, -/obj/machinery/alarm/directional/east, -/turf/simulated/floor/plasteel, -/area/station/hallway/secondary/garden) "bDL" = ( /obj/structure/cable{ d1 = 1; @@ -35222,15 +35212,6 @@ "cvo" = ( /turf/simulated/wall/r_wall, /area/station/maintenance/medmaint) -"cvu" = ( -/obj/machinery/alarm/directional/north, -/obj/structure/window/reinforced{ - dir = 4 - }, -/obj/structure/flora/ausbushes/fernybush, -/obj/structure/flora/ausbushes/ppflowers, -/turf/simulated/floor/grass/no_creep, -/area/station/science/research) "cvw" = ( /obj/structure/disposalpipe/segment, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, @@ -38062,16 +38043,11 @@ /turf/simulated/floor/plasteel, /area/station/hallway/secondary/exit) "cGz" = ( -/obj/structure/extinguisher_cabinet{ - name = "west bump"; - pixel_x = -27 - }, -/obj/structure/window/reinforced{ - dir = 4 +/obj/machinery/economy/vending/scidrobe, +/turf/simulated/floor/plasteel{ + dir = 4; + icon_state = "whitepurplecorner" }, -/obj/structure/flora/ausbushes/fernybush, -/obj/structure/flora/ausbushes/ppflowers, -/turf/simulated/floor/grass/no_creep, /area/station/science/research) "cGA" = ( /obj/structure/chair/comfy/black{ @@ -45501,6 +45477,7 @@ name = "processing tint control"; pixel_x = -6; pixel_y = 24; + range = 4; req_access_txt = "63" }, /obj/machinery/light_switch{ @@ -47558,25 +47535,6 @@ }, /turf/simulated/floor/engine, /area/station/science/test_chamber) -"eIe" = ( -/obj/machinery/firealarm{ - dir = 4; - name = "east bump"; - pixel_x = 24 - }, -/obj/structure/disposalpipe/segment, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, -/turf/simulated/floor/plasteel{ - dir = 8; - icon_state = "whitepurple" - }, -/area/station/science/research) "eIj" = ( /obj/structure/table/wood, /obj/item/folder/blue, @@ -55721,6 +55679,18 @@ }, /turf/simulated/floor/plating, /area/station/security/brig) +"hUK" = ( +/obj/structure/table, +/obj/item/hatchet, +/obj/item/crowbar, +/obj/item/plant_analyzer, +/obj/item/reagent_containers/glass/bucket, +/obj/item/cultivator, +/obj/item/paper/hydroponics, +/obj/item/storage/bag/plants/seed_sorting_tray, +/obj/machinery/alarm/directional/east, +/turf/simulated/floor/plasteel, +/area/station/hallway/secondary/garden) "hVa" = ( /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /turf/simulated/floor/plasteel, @@ -65264,23 +65234,6 @@ icon_state = "dark" }, /area/station/security/storage) -"lTc" = ( -/obj/machinery/light{ - dir = 4 - }, -/obj/structure/disposalpipe/segment, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, -/obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, -/turf/simulated/floor/plasteel{ - dir = 8; - icon_state = "whitepurple" - }, -/area/station/science/research) "lTB" = ( /obj/item/clothing/gloves/color/latex, /obj/structure/rack, @@ -66569,6 +66522,17 @@ /obj/machinery/atmospherics/pipe/simple/hidden/purple, /turf/simulated/floor/engine, /area/station/science/test_chamber) +"myX" = ( +/obj/machinery/light{ + dir = 4 + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/flora/ausbushes/ppflowers, +/obj/structure/flora/ausbushes/fullgrass, +/turf/simulated/floor/grass/no_creep, +/area/station/science/research) "myY" = ( /obj/machinery/atmospherics/pipe/manifold/hidden/supply, /turf/simulated/floor/plasteel, @@ -73158,6 +73122,31 @@ /obj/effect/spawner/random_spawners/oil_maybe, /turf/simulated/floor/plasteel, /area/station/maintenance/fsmaint) +"pmd" = ( +/obj/structure/disposalpipe/segment{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ + dir = 4 + }, +/obj/machinery/atmospherics/pipe/simple/hidden/supply{ + dir = 4 + }, +/obj/structure/cable{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/obj/machinery/newscaster{ + dir = 1; + name = "south bump"; + pixel_y = -28 + }, +/turf/simulated/floor/plasteel{ + dir = 1; + icon_state = "whitepurple" + }, +/area/station/science/research) "pmE" = ( /obj/machinery/atmospherics/pipe/simple/visible/yellow{ dir = 4 @@ -73855,7 +73844,7 @@ "pCf" = ( /obj/machinery/hologram/holopad, /turf/simulated/floor/plasteel{ - dir = 4; + dir = 5; icon_state = "whitepurple" }, /area/station/science/research) @@ -77202,14 +77191,6 @@ }, /turf/simulated/floor/plasteel, /area/station/hallway/primary/central/north) -"qXr" = ( -/obj/structure/window/reinforced{ - dir = 4 - }, -/obj/structure/flora/ausbushes/fernybush, -/obj/structure/flora/ausbushes/ppflowers, -/turf/simulated/floor/grass/no_creep, -/area/station/science/research) "qXK" = ( /obj/machinery/atmospherics/pipe/simple/visible/yellow, /turf/simulated/floor/plasteel{ @@ -82271,8 +82252,10 @@ }, /area/station/supply/office) "taP" = ( -/obj/machinery/status_display{ - pixel_x = -32 +/obj/machinery/firealarm{ + dir = 8; + name = "west bump"; + pixel_x = -24 }, /turf/simulated/floor/plasteel{ dir = 4; @@ -82916,10 +82899,10 @@ /turf/simulated/floor/plating, /area/station/maintenance/apmaint) "tnN" = ( -/obj/item/kirbyplants/plant24, /obj/machinery/camera{ c_tag = "Science Hallway - Research"; - network = list("Research","SS13") + network = list("Research","SS13"); + dir = 9 }, /obj/structure/disposalpipe/segment{ dir = 2; @@ -82936,6 +82919,10 @@ d2 = 8; icon_state = "2-8" }, +/obj/structure/extinguisher_cabinet{ + name = "north bump"; + pixel_y = 30 + }, /turf/simulated/floor/plasteel{ dir = 8; icon_state = "whitepurplecorner" @@ -85368,6 +85355,16 @@ icon_state = "dark" }, /area/station/medical/surgery/observation) +"uxo" = ( +/obj/machinery/status_display{ + layer = 4; + pixel_y = 32 + }, +/obj/item/kirbyplants/plant24, +/turf/simulated/floor/plasteel{ + icon_state = "whitepurplecorner" + }, +/area/station/science/research) "uxy" = ( /obj/machinery/atmospherics/binary/pump{ dir = 0; @@ -85659,6 +85656,7 @@ name = "north bump"; pixel_y = 24 }, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel{ dir = 5; icon_state = "green" @@ -88949,11 +88947,6 @@ /turf/simulated/floor/grass/no_creep, /area/station/security/permabrig) "waj" = ( -/obj/machinery/newscaster{ - dir = 8; - name = "east bump"; - pixel_x = 28 - }, /obj/structure/disposalpipe/segment, /obj/machinery/atmospherics/pipe/manifold/hidden/scrubbers{ dir = 4 @@ -89524,7 +89517,7 @@ icon_state = "1-4" }, /turf/simulated/floor/plasteel{ - icon_state = "whitepurplecorner" + icon_state = "whitepurple" }, /area/station/science/research) "woK" = ( @@ -89994,6 +89987,17 @@ icon_state = "white" }, /area/station/science/xenobiology) +"wzb" = ( +/obj/structure/window/reinforced{ + dir = 1 + }, +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/flora/ausbushes/fernybush, +/obj/structure/flora/ausbushes/ppflowers, +/turf/simulated/floor/grass/no_creep, +/area/station/science/research) "wzx" = ( /obj/machinery/atmospherics/pipe/simple/hidden/cyan{ dir = 5 @@ -90752,9 +90756,6 @@ /turf/simulated/floor/plating, /area/station/maintenance/fsmaint) "wTJ" = ( -/obj/machinery/light{ - dir = 1 - }, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 4 }, @@ -90766,6 +90767,9 @@ d2 = 8; icon_state = "4-8" }, +/obj/machinery/light{ + dir = 1 + }, /turf/simulated/floor/plasteel{ icon_state = "whitepurple" }, @@ -93440,6 +93444,14 @@ icon_state = "yellow" }, /area/station/engineering/break_room) +"xYS" = ( +/obj/structure/window/reinforced{ + dir = 8 + }, +/obj/structure/flora/ausbushes/fernybush, +/obj/structure/flora/ausbushes/ppflowers, +/turf/simulated/floor/grass/no_creep, +/area/station/science/research) "xZa" = ( /obj/structure/plasticflaps{ opacity = 1 @@ -111884,7 +111896,7 @@ cdT cdT cdT cdT -bDJ +hUK bBK iWb uiO @@ -123734,8 +123746,8 @@ cic fHG fpM cfw -cvu -qXr +uxo +qnt cGz cJp qcw @@ -123992,7 +124004,7 @@ bUy fPC uVF wos -qnt +cwR pCf taP pnh @@ -124508,8 +124520,8 @@ cvl wTJ cwR wIT -eIe -lTc +cOZ +cOZ waj des fWN @@ -124765,9 +124777,9 @@ bWe mfG cwR cxP -lAX -lAX -lAX +wzb +myX +xYS lAX cfw gTS @@ -125021,10 +125033,10 @@ cut soO nry cwR -cxP -eZW -lJA -rfD +pmd +lAX +lAX +lAX lAX uws bGl @@ -125280,8 +125292,8 @@ tnN lGC gcy eZW -keQ -keQ +lJA +rfD lAX gEt bGl diff --git a/_maps/map_files220/generic/centcomm.dmm b/_maps/map_files220/generic/centcomm.dmm index 2f1c97b030e7..53e627e5e73a 100644 --- a/_maps/map_files220/generic/centcomm.dmm +++ b/_maps/map_files220/generic/centcomm.dmm @@ -30095,7 +30095,7 @@ /turf/simulated/floor/carpet/black, /area/centcom/ss220/general) "uRC" = ( -/obj/machinery/chem_dispenser/botanical/upgraded, +/obj/machinery/chem_dispenser/upgraded, /turf/simulated/floor/wood/fancy/oak, /area/centcom/ss220/evac) "uRG" = ( diff --git a/_maps/map_files220/stations/boxstation.dmm b/_maps/map_files220/stations/boxstation.dmm index 31adba32f197..979a34eca967 100644 --- a/_maps/map_files220/stations/boxstation.dmm +++ b/_maps/map_files220/stations/boxstation.dmm @@ -14847,6 +14847,9 @@ /obj/item/plant_analyzer, /obj/item/radio/intercom/directional/east, /obj/machinery/light_switch/south, +/obj/item/storage/bag/plants/seed_sorting_tray{ + pixel_y = 20 + }, /turf/simulated/floor/plasteel{ dir = 4; icon_state = "green" @@ -15042,6 +15045,10 @@ pixel_x = -4 }, /obj/machinery/light/directional/east, +/obj/item/reagent_containers/glass/bottle/nutrient/mut{ + pixel_x = 1; + pixel_y = 6 + }, /turf/simulated/floor/plasteel{ dir = 4; icon_state = "green" @@ -71680,7 +71687,7 @@ /area/station/medical/chemistry) "nnj" = ( /obj/effect/turf_decal/delivery/green, -/obj/machinery/chem_dispenser/botanical, +/obj/machinery/chem_dispenser, /turf/simulated/floor/plasteel{ icon_state = "dark" }, @@ -86588,6 +86595,7 @@ /obj/item/shovel/spade, /obj/item/shovel/spade, /obj/item/plant_analyzer, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/grass, /area/station/security/permabrig) "sFQ" = ( diff --git a/_maps/map_files220/stations/deltastation.dmm b/_maps/map_files220/stations/deltastation.dmm index f5e69e94ec4a..b2d45d24c6c4 100644 --- a/_maps/map_files220/stations/deltastation.dmm +++ b/_maps/map_files220/stations/deltastation.dmm @@ -23725,11 +23725,6 @@ pixel_y = -25; name = "custom placement" }, -/obj/structure/cable{ - d1 = 1; - d2 = 8; - icon_state = "1-8" - }, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ dir = 9 }, @@ -54828,11 +54823,6 @@ /obj/effect/mapping_helpers/airlock/welded, /obj/machinery/door/airlock/psych, /obj/effect/mapping_helpers/airlock/autoname, -/obj/structure/cable{ - d1 = 4; - d2 = 8; - icon_state = "4-8" - }, /obj/effect/mapping_helpers/airlock/access/any/medical/psychology, /turf/simulated/floor/wood/oak, /area/station/medical/patients_rooms) @@ -60706,11 +60696,6 @@ icon_state = "0-2" }, /obj/structure/disposalpipe/segment, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /turf/simulated/floor/plating, /area/station/security/permabrig) "hWP" = ( @@ -61985,11 +61970,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /obj/structure/disposalpipe/segment, /obj/machinery/door/firedoor, -/obj/structure/cable{ - d1 = 1; - d2 = 4; - icon_state = "1-4" - }, /obj/structure/disposalpipe/segment, /obj/structure/cable{ d1 = 1; @@ -80334,11 +80314,6 @@ }, /area/station/science/genetics) "obO" = ( -/obj/structure/cable{ - d1 = 2; - d2 = 8; - icon_state = "2-8" - }, /obj/machinery/atmospherics/pipe/manifold/hidden{ dir = 1 }, @@ -86456,7 +86431,7 @@ /area/station/hallway/secondary/exit) "pYO" = ( /obj/effect/turf_decal/delivery, -/obj/machinery/chem_dispenser/botanical, +/obj/machinery/chem_dispenser, /obj/machinery/requests_console{ department = "Hydroponics"; departmentType = 2; @@ -96139,11 +96114,6 @@ /obj/machinery/atmospherics/pipe/simple/hidden/supply, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /obj/machinery/door/firedoor, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/machinery/door/airlock/bathroom{ id = "toilet2"; id_tag = "toilet2" @@ -98093,10 +98063,23 @@ "tGh" = ( /obj/effect/turf_decal/delivery/hollow, /obj/structure/table, -/obj/item/reagent_containers/spray/plantbgone, -/obj/item/reagent_containers/spray/plantbgone, -/obj/item/reagent_containers/spray/plantbgone, /obj/machinery/firealarm/directional/east, +/obj/item/reagent_containers/glass/bottle/nutrient/mut{ + pixel_x = -4; + pixel_y = 2 + }, +/obj/item/reagent_containers/spray/plantbgone{ + pixel_y = 10; + pixel_x = 6 + }, +/obj/item/reagent_containers/spray/plantbgone{ + pixel_x = 6; + pixel_y = 4 + }, +/obj/item/reagent_containers/spray/plantbgone{ + pixel_x = 6; + pixel_y = -2 + }, /turf/simulated/floor/plasteel/dark, /area/station/service/hydroponics) "tGN" = ( @@ -102910,6 +102893,7 @@ d2 = 8; icon_state = "1-8" }, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel, /area/station/security/permabrig) "vhM" = ( @@ -106599,11 +106583,6 @@ icon_state = "1-2" }, /obj/structure/disposalpipe/segment, -/obj/structure/cable{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/effect/mapping_helpers/airlock/access/any/security/general, /turf/simulated/floor/plasteel, /area/station/maintenance/dormitory_maintenance) diff --git a/_maps/map_files220/stations/metastation.dmm b/_maps/map_files220/stations/metastation.dmm index 449ea4aaefdf..20bc7dbd29e1 100644 --- a/_maps/map_files220/stations/metastation.dmm +++ b/_maps/map_files220/stations/metastation.dmm @@ -7204,11 +7204,6 @@ /turf/simulated/floor/plasteel, /area/station/supply/miningdock) "aKg" = ( -/obj/structure/cable/yellow{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/machinery/door/firedoor, /obj/machinery/door/airlock/public/glass, /obj/effect/mapping_helpers/airlock/autoname, @@ -18872,11 +18867,6 @@ /area/station/security/permabrig) "bsb" = ( /obj/item/folder/white, -/obj/structure/cable/yellow{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/machinery/light/directional/west, /obj/structure/cable/yellow{ d1 = 1; @@ -22208,6 +22198,11 @@ }, /obj/item/reagent_containers/glass/bottle/nutrient/ez, /obj/item/reagent_containers/spray/plantbgone, +/obj/item/storage/bag/plants/seed_sorting_tray, +/obj/item/reagent_containers/glass/bottle/nutrient/mut{ + pixel_x = -4; + pixel_y = 2 + }, /turf/simulated/floor/plasteel, /area/station/hallway/secondary/garden) "bBN" = ( @@ -29911,7 +29906,7 @@ "cbP" = ( /obj/effect/turf_decal/delivery/hollow, /obj/effect/decal/cleanable/dirt, -/obj/machinery/chem_dispenser/botanical, +/obj/machinery/chem_dispenser, /turf/simulated/floor/plasteel{ dir = 5; icon_state = "greenblue" @@ -45543,13 +45538,14 @@ /obj/machinery/camera{ c_tag = "Brig Prisoner Processing" }, +/obj/machinery/light_switch/north{ + pixel_x = 6 + }, /obj/machinery/button/windowtint/north{ id = "Processing"; pixel_x = -6; - req_access_txt = "63" - }, -/obj/machinery/light_switch/north{ - pixel_x = 6 + req_access_txt = "63"; + range = 4 }, /turf/simulated/floor/plasteel{ dir = 1; @@ -48018,11 +48014,6 @@ /obj/effect/turf_decal/delivery, /obj/machinery/atmospherics/pipe/simple/hidden/scrubbers, /obj/machinery/atmospherics/pipe/simple/hidden/supply, -/obj/structure/cable/yellow{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/structure/cable/yellow{ d1 = 1; d2 = 2; @@ -67193,11 +67184,6 @@ /turf/simulated/floor/plating, /area/station/maintenance/xenobio_south) "nDu" = ( -/obj/structure/cable/yellow{ - d1 = 1; - d2 = 2; - icon_state = "1-2" - }, /obj/machinery/firealarm/directional/west, /obj/structure/cable/yellow{ d1 = 1; @@ -70826,11 +70812,6 @@ }, /area/station/medical/medbay) "pAO" = ( -/obj/structure/cable/yellow{ - d1 = 4; - d2 = 8; - icon_state = "4-8" - }, /obj/machinery/door/airlock/maintenance, /obj/effect/mapping_helpers/airlock/autoname, /obj/machinery/atmospherics/pipe/simple/hidden/cyan{ @@ -81356,6 +81337,7 @@ /obj/item/plant_analyzer, /obj/machinery/atmospherics/unary/vent_scrubber/on, /obj/machinery/light_switch/north, +/obj/item/storage/bag/plants/seed_sorting_tray, /turf/simulated/floor/plasteel{ dir = 5; icon_state = "green" @@ -88118,28 +88100,6 @@ /obj/item/radio/intercom/directional/south, /turf/simulated/floor/plasteel, /area/station/security/brig) -"xVd" = ( -/obj/structure/cable/yellow{ - d1 = 4; - d2 = 8; - icon_state = "4-8" - }, -/obj/structure/cable/yellow{ - d1 = 4; - d2 = 8; - icon_state = "4-8" - }, -/obj/machinery/atmospherics/pipe/simple/hidden/supply{ - dir = 4 - }, -/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers{ - dir = 4 - }, -/obj/structure/disposalpipe/segment{ - dir = 4 - }, -/turf/simulated/floor/plasteel, -/area/station/hallway/primary/starboard) "xVB" = ( /obj/structure/kitchenspike_frame, /obj/effect/decal/cleanable/blood/old, @@ -128118,7 +128078,7 @@ bhU aGX bam bnr -xVd +boY lDD aoG bSG diff --git a/code/__DEFINES/admin_defines.dm b/code/__DEFINES/admin_defines.dm index 86805b43bc5a..1856a55e010a 100644 --- a/code/__DEFINES/admin_defines.dm +++ b/code/__DEFINES/admin_defines.dm @@ -46,26 +46,26 @@ #define R_HOST ((1<<18)-1) //17 bit bitmask, update me if we ever add more admin permissions. Sum of all permissions to allow easy setting. -#define ADMIN_QUE(user,display) "[display]" -#define ADMIN_FLW(user,display) "[display]" -#define ADMIN_PP(user,display) "[display]" -#define ADMIN_VV(atom,display) "[display]" -#define ADMIN_SM(user,display) "[display]" -#define ADMIN_TP(user,display) "[display]" -#define ADMIN_ALERT(user, display) "[display]" -#define ADMIN_BSA(user,display) "[display]" -#define ADMIN_CENTCOM_REPLY(user,display) "[display]" -#define ADMIN_SYNDICATE_REPLY(user,display) "[display]" -#define ADMIN_SC(user,display) "[display]" +#define ADMIN_QUE(user,display) "[display]" +#define ADMIN_FLW(user,display) "[display]" +#define ADMIN_PP(user,display) "[display]" +#define ADMIN_VV(atom,display) "[display]" +#define ADMIN_SM(user,display) "[display]" +#define ADMIN_TP(user,display) "[display]" +#define ADMIN_ALERT(user, display) "[display]" +#define ADMIN_BSA(user,display) "[display]" +#define ADMIN_CENTCOM_REPLY(user,display) "[display]" +#define ADMIN_SYNDICATE_REPLY(user,display) "[display]" +#define ADMIN_SC(user,display) "[display]" #define ADMIN_LOOKUP(user) "[key_name_admin(user)]([ADMIN_QUE(user,"?")])" #define ADMIN_LOOKUPFLW(user) "[key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")])" #define ADMIN_FULLMONTY(user) "[key_name_admin(user)] ([ADMIN_QUE(user,"?")]) ([ADMIN_PP(user,"PP")]) ([ADMIN_VV(user,"VV")]) ([ADMIN_SM(user,"SM")]) ([ADMIN_FLW(user,"FLW")]) ([ADMIN_TP(user,"TP")])" -#define ADMIN_JMP(src) "(JMP)" +#define ADMIN_JMP(src) "(JMP)" #define COORD(src) "[src ? "([src.x],[src.y],[src.z])" : "nonexistent location"]" #define AREACOORD(src) "[src ? "[get_area_name(src, TRUE)] [COORD(src)]" : "nonexistent location" ]" #define ADMIN_COORDJMP(src) "[src ? "[COORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" #define ADMIN_VERBOSEJMP(src) "[src ? "[AREACOORD(src)] [ADMIN_JMP(src)]" : "nonexistent location"]" -#define ADMIN_SHOWDETAILS(mask, content) "[mask]" +#define ADMIN_SHOWDETAILS(mask, content) "[mask]" /// Note text for suppressed CID warning #define CIDWARNING_SUPPRESSED_NOTETEXT "CID COUNT WARNING DISABLED - Delete this note to re-enable" diff --git a/code/__DEFINES/dcs/signals.dm b/code/__DEFINES/dcs/signals.dm index 58ac3dc04fa0..05150f925529 100644 --- a/code/__DEFINES/dcs/signals.dm +++ b/code/__DEFINES/dcs/signals.dm @@ -1041,3 +1041,6 @@ ///from of mob/MouseDrop(): (/atom/over, /mob/user) #define COMSIG_DO_MOB_STRIP "do_mob_strip" + +// Sent when a mob spawner is attacked directly or via projectile. +#define COMSIG_SPAWNER_SET_TARGET "spawner_set_target" diff --git a/code/__DEFINES/misc_defines.dm b/code/__DEFINES/misc_defines.dm index d55ff8931d95..47d29be3c7e2 100644 --- a/code/__DEFINES/misc_defines.dm +++ b/code/__DEFINES/misc_defines.dm @@ -52,6 +52,9 @@ #define PRINTER_FONT "Times New Roman" #define SIGNFONT "Times New Roman" +/// Emoji icon set +#define EMOJI_SET 'icons/ui_icons/emoji.dmi' + //some arbitrary defines to be used by self-pruning global lists. (see master_controller) #define PROCESS_KILL 26 //Used to trigger removal from a processing list @@ -185,8 +188,8 @@ #define SHOES_LAYER 28 #define GLOVES_LAYER 27 #define EARS_LAYER 26 -#define SUIT_LAYER 25 -#define BELT_LAYER 24 //Possible make this an overlay of somethign required to wear a belt? +#define BELT_LAYER 25 //Possible make this an overlay of something required to wear a belt? +#define SUIT_LAYER 24 #define SUIT_STORE_LAYER 23 #define BACK_LAYER 22 #define HEAD_ACCESSORY_LAYER 21 diff --git a/code/__HELPERS/lists.dm b/code/__HELPERS/lists.dm index 5dc4df15beac..7a90a0543e5f 100644 --- a/code/__HELPERS/lists.dm +++ b/code/__HELPERS/lists.dm @@ -80,7 +80,7 @@ //Returns a list in plain english as a string /proc/english_list(list/input, nothing_text = "nothing", and_text = " and ", comma_text = ", ", final_comma_text = "" ) - var/total = input.len + var/total = length(input) if(!total) return "[nothing_text]" else if(total == 1) diff --git a/code/__HELPERS/mob_helpers.dm b/code/__HELPERS/mob_helpers.dm index 8054554c4119..654e404f47e9 100644 --- a/code/__HELPERS/mob_helpers.dm +++ b/code/__HELPERS/mob_helpers.dm @@ -310,8 +310,8 @@ var/area/A if(isatom(MT) && !QDELETED(MT)) A = get_area(MT) - else - A = get_area(user) + else + A = get_area(user) if(A && A.hide_attacklogs) loglevel = ATKLOG_ALL else if(istype(MT)) @@ -556,7 +556,7 @@ GLOBAL_LIST_EMPTY(do_after_once_tracker) to_chat(user, "Name = [M.name]; Real_name = [M.real_name]; Mind_name = [M.mind?"[M.mind.name]":""]; Key = [M.key];") to_chat(user, "Location = [location_description];") to_chat(user, "[special_role_description]") - to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_TP(M,"TP")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")])") + to_chat(user, "(PM) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_TP(M,"TP")]) ([ADMIN_SM(M,"SM")]) ([ADMIN_FLW(M,"FLW")])") // Gets the first mob contained in an atom, and warns the user if there's not exactly one /proc/get_mob_in_atom_with_warning(atom/A, mob/user = usr) diff --git a/code/__HELPERS/text.dm b/code/__HELPERS/text.dm index f2d4cc4a0aa0..68320b724522 100644 --- a/code/__HELPERS/text.dm +++ b/code/__HELPERS/text.dm @@ -468,6 +468,8 @@ text = replacetext(text, "\[/i\]", "") text = replacetext(text, "\[u\]", "") text = replacetext(text, "\[/u\]", "") + text = replacetext(text, "\[s\]", "") + text = replacetext(text, "\[/s\]", "") if(findtext(text, "\[signfont\]") || findtext(text, "\[/signfont\]")) // Make sure the text is there before giving off an error if(check_rights(R_EVENT)) text = replacetext(text, "\[signfont\]", "") diff --git a/code/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 30c72d110a78..49d666e63101 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1252,7 +1252,7 @@ Standard way to write links -Sayu /proc/topic_link(datum/D, arglist, content) if(islist(arglist)) arglist = list2params(arglist) - return "[content]" + return "[content]" diff --git a/code/_globalvars/lists/misc_lists.dm b/code/_globalvars/lists/misc_lists.dm index b4ac32d640cf..f12c6a8271fc 100644 --- a/code/_globalvars/lists/misc_lists.dm +++ b/code/_globalvars/lists/misc_lists.dm @@ -67,3 +67,6 @@ GLOBAL_LIST_EMPTY(looping_sounds) /// List of possible crits from things tipping over GLOBAL_LIST_EMPTY(tilt_crits) + +/// Stores a list of the cached seed icons. Used in the seed extractor and the gene modder +GLOBAL_LIST_EMPTY(seeds_cached_base64_icons) diff --git a/code/controllers/subsystem/SSdbcore.dm b/code/controllers/subsystem/SSdbcore.dm index 03d147e9aaca..9299f8371065 100644 --- a/code/controllers/subsystem/SSdbcore.dm +++ b/code/controllers/subsystem/SSdbcore.dm @@ -463,7 +463,7 @@ SUBSYSTEM_DEF(dbcore) // Just tells the admins if a query timed out, and asks if the server hung to help error reporting /datum/db_query/proc/slow_query_check() - message_admins("HEY! A database query timed out. Did the server just hang? \[YES\]|\[NO\]") + message_admins("HEY! A database query timed out. Did the server just hang? \[YES\]|\[NO\]") /** diff --git a/code/controllers/subsystem/SSdebugview.dm b/code/controllers/subsystem/SSdebugview.dm index bfb8a8857c87..4d4547f5dd78 100644 --- a/code/controllers/subsystem/SSdebugview.dm +++ b/code/controllers/subsystem/SSdebugview.dm @@ -87,7 +87,7 @@ SUBSYSTEM_DEF(debugview) if((SS.flags & SS_NO_FIRE) || !SS.can_fire) continue - html += "[SS.state_colour()]\[[SS.state_letter()]][SS.ss_id]\t[round(SS.cost, 1)]ms | [round(SS.tick_usage, 1)]% [SS.get_stat_details() ? "| [SS.get_stat_details()] " : ""]| VV Edit" + html += "[SS.state_colour()]\[[SS.state_letter()]][SS.ss_id]\t[round(SS.cost, 1)]ms | [round(SS.tick_usage, 1)]% [SS.get_stat_details() ? "| [SS.get_stat_details()] " : ""]| VV Edit" popup.set_content(html.Join("
")) popup.open(FALSE) diff --git a/code/controllers/subsystem/SSevents.dm b/code/controllers/subsystem/SSevents.dm index bd01160067cb..af184bc45c5b 100644 --- a/code/controllers/subsystem/SSevents.dm +++ b/code/controllers/subsystem/SSevents.dm @@ -101,11 +101,11 @@ SUBSYSTEM_DEF(events) to_chat(world, message) /datum/controller/subsystem/events/proc/GetInteractWindow() - var/html = "Refresh" + var/html = "Refresh" if(selected_event_container) var/event_time = max(0, selected_event_container.next_event_time - world.time) - html += "Back
" + html += "Back
" html += "Time till start: [round(event_time / 600, 0.1)]
" html += "
" html += "

Available [GLOB.severity_to_string[selected_event_container.severity]] Events (queued & running events will not be displayed)

" @@ -114,13 +114,13 @@ SUBSYSTEM_DEF(events) for(var/datum/event_meta/EM in selected_event_container.available_events) html += "" html += "[EM.name]" - html += "[EM.weight]" + html += "[EM.weight]" html += "[EM.min_weight]" html += "[EM.max_weight == INFINITY ? "No max" : EM.max_weight]" - html += "[EM.one_shot]" - html += "[EM.enabled]" + html += "[EM.one_shot]" + html += "[EM.enabled]" html += "[EM.get_weight(number_active_with_role())]" - html += "Remove" + html += "Remove" html += "" html += "" html += "
" @@ -130,16 +130,16 @@ SUBSYSTEM_DEF(events) html += "" html += "NameTypeWeightOneShot" html += "" - html += "[new_event.name ? new_event.name : "Enter Event"]" - html += "[new_event.event_type ? new_event.event_type : "Select Type"]" - html += "[new_event.weight ? new_event.weight : 0]" - html += "[new_event.one_shot]" + html += "[new_event.name ? new_event.name : "Enter Event"]" + html += "[new_event.event_type ? new_event.event_type : "Select Type"]" + html += "[new_event.weight ? new_event.weight : 0]" + html += "[new_event.one_shot]" html += "" html += "" - html += "Add
" + html += "Add
" html += "" else - html += "Round End Report: [report_at_round_end ? "On": "Off"]
" + html += "Round End Report: [report_at_round_end ? "On": "Off"]
" html += "
" html += "

Event Start

" @@ -153,16 +153,16 @@ SUBSYSTEM_DEF(events) html += "[station_time_timestamp("hh:mm:ss", max(EC.next_event_time, world.time))]" html += "[round(next_event_at / 600, 0.1)]" html += "" - html += "--" - html += "-" - html += "+" - html += "++" + html += "--" + html += "-" + html += "+" + html += "++" html += "" html += "" - html += "[EC.delayed ? "Resume" : "Pause"]" + html += "[EC.delayed ? "Resume" : "Pause"]" html += "" html += "" - html += "[EC.delay_modifier]" + html += "[EC.delay_modifier]" html += "" html += "" html += "" @@ -177,9 +177,9 @@ SUBSYSTEM_DEF(events) var/datum/event_meta/EM = EC.next_event html += "" html += "[GLOB.severity_to_string[severity]]" - html += "[EM ? EM.name : "Random"]" - html += "View" - html += "Clear" + html += "[EM ? EM.name : "Random"]" + html += "View" + html += "Clear" html += "" html += "" html += "
" @@ -201,7 +201,7 @@ SUBSYSTEM_DEF(events) html += "[EM.name]" html += "[no_end ? "N/A" : station_time_timestamp("hh:mm:ss", ends_at)]" html += "[no_end ? "N/A" : ends_in]" - html += "Stop" + html += "Stop" html += "" html += "" html += "" diff --git a/code/controllers/subsystem/SSghost_spawns.dm b/code/controllers/subsystem/SSghost_spawns.dm index 80e275ce9a1c..815268c3b349 100644 --- a/code/controllers/subsystem/SSghost_spawns.dm +++ b/code/controllers/subsystem/SSghost_spawns.dm @@ -130,8 +130,8 @@ SUBSYSTEM_DEF(ghost_spawns) // Chat message var/act_jump = "" if(isatom(source)) - act_jump = "\[Teleport]" - var/act_signup = "\[Sign Up]" + act_jump = "\[Teleport]" + var/act_signup = "\[Sign Up]" to_chat(M, "Now looking for candidates [role ? "to play as \an [role_cleanname || get_roletext(role)]" : "\"[question]\""]. [act_jump] [act_signup] [reason ? "\nReason: [sanitize(reason)]" : ""]") // Start processing it so it updates visually the timer diff --git a/code/controllers/subsystem/SSticker.dm b/code/controllers/subsystem/SSticker.dm index 2c86a5833e26..2ef15314417a 100644 --- a/code/controllers/subsystem/SSticker.dm +++ b/code/controllers/subsystem/SSticker.dm @@ -784,7 +784,7 @@ SUBSYSTEM_DEF(ticker) AR.handle_data(load_queries[ckey]) save_queries[ckey] = AR.get_save_query() - log_text += "- [ckey]: [AR.infraction_count]" + log_text += "- [ckey]: [AR.infraction_count]" log_text += "Investigation advised if there are a high number of infractions" diff --git a/code/controllers/subsystem/tickets/tickets.dm b/code/controllers/subsystem/tickets/tickets.dm index bb6c762cf0e4..444ca63d0633 100644 --- a/code/controllers/subsystem/tickets/tickets.dm +++ b/code/controllers/subsystem/tickets/tickets.dm @@ -157,10 +157,10 @@ SUBSYSTEM_DEF(tickets) L += "[ticket_help_type]: [key_and_name][one_line ? " " : "
"]
" if(M) L += "([ADMIN_QUE(M,"?")]) ([ADMIN_PP(M,"PP")]) ([ADMIN_VV(M,"VV")]) ([ADMIN_TP(M,"TP")]) ([ADMIN_SM(M,"SM")]) ([admin_jump_link(M)])" - L += "(TICKET) " - L += "[isAI(M) ? "(CL)" : ""] (TAKE) " - L += "(RESOLVE) (AUTO) " - L += "(CONVERT) : [one_line ? " " : "

"][msg]
" + L += "(TICKET) " + L += "[isAI(M) ? "(CL)" : ""] (TAKE) " + L += "(RESOLVE) (AUTO) " + L += "(CONVERT) : [one_line ? " " : "

"][msg]
" return L.Join() //Open a new ticket and populate details then add to the list of open tickets @@ -491,7 +491,7 @@ UI STUFF dat += "" dat += "

[ticket_system_name]

" - dat +="Refresh
Open TicketsResolved TicketsClosed Tickets" + dat +="Refresh
Open TicketsResolved TicketsClosed Tickets" if(tab == TICKET_OPEN) dat += "

Open Tickets

" dat += "" @@ -500,7 +500,7 @@ UI STUFF for(var/T in allTickets) ticket = T if(ticket.ticketState == TICKET_OPEN || ticket.ticketState == TICKET_STALE) - dat += "" + dat += "" else continue else if(tab == TICKET_RESOLVED) @@ -508,7 +508,7 @@ UI STUFF for(var/T in allTickets) ticket = T if(ticket.ticketState == TICKET_RESOLVED) - dat += "" + dat += "" else continue else if(tab == TICKET_CLOSED) @@ -516,16 +516,16 @@ UI STUFF for(var/T in allTickets) ticket = T if(ticket.ticketState == TICKET_CLOSED) - dat += "" + dat += "" else continue dat += "
ResolveDetails
#[ticket.ticketNum] ([ticket.ingame_time_opened]) [ticket.ticketState == TICKET_STALE ? "STALE" : ""]
[makeUrlMessage(ticket, one_line = TRUE)]
ResolveDetails
#[ticket.ticketNum] ([ticket.ingame_time_opened]) [ticket.ticketState == TICKET_STALE ? "STALE" : ""]
[makeUrlMessage(ticket, one_line = TRUE)]
ResolveDetails
#[ticket.ticketNum] ([ticket.ingame_time_opened])
[makeUrlMessage(ticket, one_line = TRUE)]
ResolveDetails
#[ticket.ticketNum] ([ticket.ingame_time_opened])
[makeUrlMessage(ticket, one_line = TRUE)]
ResolveDetails
#[ticket.ticketNum] ([ticket.ingame_time_opened])
[makeUrlMessage(ticket, one_line = TRUE)]
ResolveDetails
#[ticket.ticketNum] ([ticket.ingame_time_opened])
[makeUrlMessage(ticket, one_line = TRUE)]
" dat += "

Resolve All

" if(ticket_system_name == "Mentor Tickets") - dat += "Resolve All Open Mentor Tickets" + dat += "Resolve All Open Mentor Tickets" else - dat += "Resolve All Open Admin Tickets" + dat += "Resolve All Open Admin Tickets" return dat @@ -542,7 +542,7 @@ UI STUFF var/dat = "

[ticket_system_name]

" - dat +="Show AllRefresh" + dat +="Show AllRefresh" dat += "

Ticket #[T.ticketNum]

" @@ -557,12 +557,12 @@ UI STUFF dat += "[TR.to_string()]" dat += "

" - dat += "Re-Open[check_rights(rights_needed, 0) ? "Auto": ""]Resolve

" + dat += "Re-Open[check_rights(rights_needed, 0) ? "Auto": ""]Resolve

" if(!T.staffAssigned) - dat += "No staff member assigned to this [ticket_name] - Take Ticket
" + dat += "No staff member assigned to this [ticket_name] - Take Ticket
" else - dat += "[T.staffAssigned] is assigned to this Ticket. - Take Ticket - Unassign Ticket
" + dat += "[T.staffAssigned] is assigned to this Ticket. - Take Ticket - Unassign Ticket
" if(T.lastStaffResponse) dat += "Last Staff response Response: [T.lastStaffResponse] at [T.lastResponseTime]" @@ -571,8 +571,8 @@ UI STUFF dat += "

" - dat += "Close Ticket" - dat += "Convert Ticket" + dat += "Close Ticket" + dat += "Convert Ticket" var/datum/browser/popup = new(user, "[ticket_system_name]detail", "[ticket_system_name] #[T.ticketNum]", 1000, 600) popup.set_content(dat) diff --git a/code/datums/components/spawner.dm b/code/datums/components/spawner.dm index 1de01df226c1..9780db16407b 100644 --- a/code/datums/components/spawner.dm +++ b/code/datums/components/spawner.dm @@ -7,6 +7,7 @@ var/spawn_text = "emerges from" var/list/faction = list("mining") + COOLDOWN_DECLARE(last_rally) /datum/component/spawner/Initialize(_mob_types, _spawn_time, _faction, _spawn_text, _max_mobs) @@ -22,6 +23,7 @@ max_mobs=_max_mobs RegisterSignal(parent, list(COMSIG_PARENT_QDELETING), PROC_REF(stop_spawning)) + RegisterSignal(parent, COMSIG_SPAWNER_SET_TARGET, PROC_REF(rally_spawned_mobs)) START_PROCESSING(SSprocessing, src) /datum/component/spawner/process() @@ -49,3 +51,15 @@ L.nest = src L.faction = src.faction P.visible_message("[L] [spawn_text] [P].") + +/datum/component/spawner/proc/rally_spawned_mobs(parent, mob/living/target) + SIGNAL_HANDLER // COMSIG_SPAWNER_SET_TARGET + + if(!(COOLDOWN_FINISHED(src, last_rally) && length(spawned_mobs))) + return + + // start the cooldown first, because a rallied mob might fire on + // ourselves while this is happening, causing confusion + COOLDOWN_START(src, last_rally, 30 SECONDS) + for(var/mob/living/simple_animal/hostile/rallied as anything in spawned_mobs) + INVOKE_ASYNC(rallied, TYPE_PROC_REF(/mob/living/simple_animal/hostile, aggro_fast), target) diff --git a/code/datums/datumvars.dm b/code/datums/datumvars.dm index 7e53e967d10c..5483b5a4c21b 100644 --- a/code/datums/datumvars.dm +++ b/code/datums/datumvars.dm @@ -141,25 +141,25 @@ var/atom/A = D if(isliving(A)) var/mob/living/L = A - atomsnowflake += "[L]" + atomsnowflake += "[L]" if(L.dir) - atomsnowflake += "
<< [dir2text(L.dir)] >>" + atomsnowflake += "
<< [dir2text(L.dir)] >>" atomsnowflake += {" -
[L.ckey ? L.ckey : "No ckey"] / [L.real_name ? L.real_name : "No real name"] +
[L.ckey ? L.ckey : "No ckey"] / [L.real_name ? L.real_name : "No real name"]
- BRUTE:[L.getBruteLoss()] - FIRE:[L.getFireLoss()] - TOXIN:[L.getToxLoss()] - OXY:[L.getOxyLoss()] - CLONE:[L.getCloneLoss()] - BRAIN:[L.getBrainLoss()] - STAMINA:[L.getStaminaLoss()] + BRUTE:[L.getBruteLoss()] + FIRE:[L.getFireLoss()] + TOXIN:[L.getToxLoss()] + OXY:[L.getOxyLoss()] + CLONE:[L.getCloneLoss()] + BRAIN:[L.getBrainLoss()] + STAMINA:[L.getStaminaLoss()] "} else - atomsnowflake += "[A]" + atomsnowflake += "[A]" if(A.dir) - atomsnowflake += "
<< [dir2text(A.dir)] >>" + atomsnowflake += "
<< [dir2text(A.dir)] >>" else atomsnowflake += "[D]" @@ -409,7 +409,7 @@
- Refresh + Refresh
\ \
" if(!linkless) - output = navbar + output += navbar if(target_ckey) var/target_sql_ckey = ckey(target_ckey) var/datum/db_query/query_get_notes = SSdbcore.NewQuery({" @@ -200,7 +201,7 @@ return output += "

Notes of [target_ckey]

" if(!linkless) - output += "
\[Add Note\]
" + output += "
\[Add Note\]
" output += ruler while(query_get_notes.NextRow()) var/id = query_get_notes.item[1] @@ -219,15 +220,15 @@ output += "" if(!linkless) - output += " \[Remove Note\] [automated ? "\[Automated Note\]" : "\[Edit Note\]"]" + output += " \[Remove Note\] [automated ? "\[Automated Note\]" : "\[Edit Note\]"]" if(last_editor) - output += " Last edit by [last_editor] (Click here to see edit log)" + output += " Last edit by [last_editor] (Click here to see edit log)" output += "
[replacetext(notetext, "\n", "
")]
" qdel(query_get_notes) else if(index) var/index_ckey var/search - output += "
\[Add Note\]
" + output += "
\[Add Note\]
" output += ruler switch(index) if(1) @@ -246,12 +247,12 @@ message_admins("[usr.ckey] has started a note search with the following regex: [search] | CPU usage may be higher.") while(query_list_notes.NextRow()) index_ckey = query_list_notes.item[1] - output += "[index_ckey]
" + output += "[index_ckey]
" CHECK_TICK qdel(query_list_notes) message_admins("The note search started by [usr.ckey] has completed. CPU should return to normal.") else - output += "
\[Add Note\]
" + output += "
\[Add Note\]
" output += ruler - usr << browse(output, "window=show_notes;size=900x500") + usr << browse(output.Join(""), "window=show_notes;size=900x500") diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index e5d5910e6a6f..26ea18914701 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -457,17 +457,17 @@ //Regular jobs //Command (Blue) jobs += "" - jobs += "" + jobs += "" for(var/jobPos in GLOB.command_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 6) //So things dont get squiiiiished! @@ -478,17 +478,17 @@ //Security (Red) counter = 0 jobs += "
Command Positions
Command Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.security_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -499,17 +499,17 @@ //Engineering (Yellow) counter = 0 jobs += "
Security Positions
Security Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.engineering_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -520,17 +520,17 @@ //Medical (White) counter = 0 jobs += "
Engineering Positions
Engineering Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.medical_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -541,17 +541,17 @@ //Science (Purple) counter = 0 jobs += "
Medical Positions
Medical Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.science_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -562,17 +562,17 @@ //Service (Grey) counter = 0 jobs += "
Science Positions
Science Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.service_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -583,17 +583,17 @@ //Supply (Brown) counter = 0 jobs += "
Service Positions
Service Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.supply_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -604,17 +604,17 @@ //Non-Human (Green) counter = 0 jobs += "
Supply Positions
Supply Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]
" - jobs += "" + jobs += "" for(var/jobPos in GLOB.nonhuman_positions) if(!jobPos) continue var/datum/job/job = SSjobs.GetJob(jobPos) if(!job) continue if(jobban_isbanned(M, job.title)) - jobs += "" + jobs += "" counter++ else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -623,29 +623,29 @@ //Drone if(jobban_isbanned(M, "Drone")) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" //pAI if(jobban_isbanned(M, "pAI")) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" jobs += "
Non-human Positions
Non-human Positions
[replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")][replacetext(job.title, " ", " ")]DroneDroneDroneDronepAIpAIpAIpAI
" //Antagonist (Orange) var/isbanned_dept = jobban_isbanned(M, "Syndicate") jobs += "" - jobs += "" + jobs += "" counter = 0 for(var/role in GLOB.antag_roles) if(jobban_isbanned(M, role) || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -660,9 +660,9 @@ counter = 0 for(var/role in GLOB.other_roles) if(jobban_isbanned(M, role) || isbanned_dept) - jobs += "" + jobs += "" else - jobs += "" + jobs += "" counter++ if(counter >= 5) //So things dont get squiiiiished! @@ -671,7 +671,7 @@ jobs += "
Antagonist Positions
Antagonist Positions
[replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")][replacetext(role, " ", " ")]
" body = "[jobs]" - dat = "[header][body]" + dat = "[header][body]" usr << browse(dat, "window=jobban2;size=800x490") return @@ -887,7 +887,7 @@ return if(query_noteedits.NextRow()) var/edit_log = query_noteedits.item[1] - usr << browse(edit_log,"window=noteedits") + usr << browse("[edit_log]","window=noteedits") qdel(query_noteedits) else if(href_list["newban"]) @@ -991,7 +991,7 @@ return if(query_watchedits.NextRow()) var/edit_log = query_watchedits.item[1] - usr << browse(edit_log,"window=watchedits") + usr << browse("[edit_log]","window=watchedits") qdel(query_watchedits) else if(href_list["mute"]) @@ -1013,11 +1013,11 @@ if(SSticker && SSticker.mode) return alert(usr, "The game has already started.", null, null, null, null) - var/dat = {"What mode do you wish to play?
"} + var/dat = {"What mode do you wish to play?
"} for(var/mode in GLOB.configuration.gamemode.gamemodes) - dat += {"[GLOB.configuration.gamemode.gamemode_names[mode]]
"} - dat += {"Secret
"} - dat += {"Random
"} + dat += {"[GLOB.configuration.gamemode.gamemode_names[mode]]
"} + dat += {"Secret
"} + dat += {"Random
"} dat += {"Now: [GLOB.master_mode]"} usr << browse(dat, "window=c_mode") @@ -1028,10 +1028,10 @@ return alert(usr, "The game has already started.", null, null, null, null) if(GLOB.master_mode != "secret") return alert(usr, "The game mode has to be secret!", null, null, null, null) - var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} + var/dat = {"What game mode do you want to force secret to be? Use this if you want to change the game mode, but want the players to believe it's secret. This will only work if the current game mode is secret.
"} for(var/mode in GLOB.configuration.gamemode.gamemodes) - dat += {"[GLOB.configuration.gamemode.gamemode_names[mode]]
"} - dat += {"Random (default)
"} + dat += {"[GLOB.configuration.gamemode.gamemode_names[mode]]
"} + dat += {"Random (default)
"} dat += {"Now: [GLOB.secret_force_mode]"} usr << browse(dat, "window=f_secret") @@ -2371,12 +2371,12 @@ else if(istype(fax, /obj/item/paper_bundle)) //having multiple people turning pages on a paper_bundle can cause issues //open a browse window listing the contents instead - var/data = "" + var/data = "" var/obj/item/paper_bundle/B = fax for(var/page = 1, page <= B.amount + 1, page++) var/obj/pageobj = B.contents[page] - data += "Page [page] - [pageobj.name]
" + data += "Page [page] - [pageobj.name]
" usr << browse(data, "window=PaperBundle[B.UID()]") else @@ -2551,10 +2551,10 @@ to_chat(sender, "Your headset pings, notifying you that a reply to your fax has arrived.") if(sender) log_admin("[key_name(src.owner)] replied to a fax message from [key_name(sender)]: [input]") - message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (VIEW).", 1) + message_admins("[key_name_admin(src.owner)] replied to a fax message from [key_name_admin(sender)] (VIEW).", 1) else log_admin("[key_name(src.owner)] sent a fax message to [destination]: [input]") - message_admins("[key_name_admin(src.owner)] sent a fax message to [destination] (VIEW).", 1) + message_admins("[key_name_admin(src.owner)] sent a fax message to [destination] (VIEW).", 1) return else if(href_list["refreshfaxpanel"]) @@ -2790,7 +2790,7 @@ return if(query_memoedits.NextRow()) var/edit_log = query_memoedits.item[1] - usr << browse(edit_log,"window=memoeditlist") + usr << browse("[edit_log]","window=memoeditlist") qdel(query_memoedits) else if(href_list["secretsfun"]) diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm index c920a38ba552..204385167c73 100644 --- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm +++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm @@ -103,7 +103,7 @@ var/text = "" for(var/o in objs) var/datum/t = o - text += "\ref[t]" + text += "\ref[t]" if(istype(t, /atom)) var/atom/a = t diff --git a/code/modules/admin/verbs/adminpm.dm b/code/modules/admin/verbs/adminpm.dm index cf562a6c90b0..c55322a17c1a 100644 --- a/code/modules/admin/verbs/adminpm.dm +++ b/code/modules/admin/verbs/adminpm.dm @@ -120,7 +120,7 @@ var/datum/controller/subsystem/tickets/tickets_system // We treat PMs as mentorhelps if we were explicitly so, or if neither // party is an admin. - if(type == "Mentorhelp" || !(check_rights(R_ADMIN|R_MOD, 0, C.mob) || check_rights(R_ADMIN|R_MOD, 0, src.mob))) + if(type == "Mentorhelp" || !(check_rights(R_ADMIN|R_MOD, 0, C.mob) || check_rights(R_ADMIN|R_MOD, 0, mob))) send_span = "mentorhelp" recieve_span = "mentorhelp" message_type = MESSAGE_TYPE_MENTORPM @@ -166,23 +166,33 @@ adminhelp(reply) //sender has left, adminhelp instead return - var/ping_link = check_rights(R_ADMIN, 0, mob) ? "(PING)" : "" - var/window_link = "(WINDOW)" - var/alert_link = check_rights(R_ADMIN, FALSE, mob) ? "(ALERT)" : "" + var/ping_link = check_rights(R_ADMIN, 0, mob) ? "(PING)" : "" + var/ticket_link + var/alert_link = check_rights(R_ADMIN, FALSE, mob) ? "(ALERT)" : "" if(ticket_id != -1) if(message_type == MESSAGE_TYPE_MENTORPM) - window_link = "(TICKET)" + ticket_link = "(TICKET)" else - window_link = "(TICKET)" + ticket_link = "(TICKET)" var/emoji_msg = "[msg]" - recieve_message = "[type] from-[recieve_pm_type] [C.holder ? key_name(src, TRUE, type, ticket_id = ticket_id) : key_name_hidden(src, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg][C.holder ? "
[ping_link] [window_link] [alert_link]" : ""]
" + var/recieve_window_link = "(WINDOW)" + if(message_type == MESSAGE_TYPE_MENTORPM && check_rights(R_ADMIN|R_MENTOR, 0, C.mob)) + recieve_window_link = ticket_link + else if(message_type == MESSAGE_TYPE_ADMINPM && check_rights(R_ADMIN, 0, C.mob)) + recieve_window_link = ticket_link + recieve_message = "[type] from-[recieve_pm_type] [C.holder ? key_name(src, TRUE, type, ticket_id = ticket_id) : key_name_hidden(src, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg][C.holder ? "
[ping_link] [recieve_window_link] [alert_link]" : ""]
" if(message_type == MESSAGE_TYPE_MENTORPM) recieve_message = chat_box_mhelp(recieve_message) else recieve_message = chat_box_ahelp(recieve_message) to_chat(C, recieve_message) - var/send_message = "[send_pm_type][type] to-[holder ? key_name(C, TRUE, type, ticket_id = ticket_id) : key_name_hidden(C, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg]

[ping_link] [window_link] [alert_link]" + var/send_window_link = "(WINDOW)" + if(message_type == MESSAGE_TYPE_MENTORPM && check_rights(R_ADMIN|R_MENTOR, 0, mob)) + send_window_link = ticket_link + else if(message_type == MESSAGE_TYPE_ADMINPM && check_rights(R_ADMIN, 0, mob)) + send_window_link = ticket_link + var/send_message = "[send_pm_type][type] to-[holder ? key_name(C, TRUE, type, ticket_id = ticket_id) : key_name_hidden(C, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg]

[ping_link] [send_window_link] [alert_link]" if(message_type == MESSAGE_TYPE_MENTORPM) send_message = chat_box_mhelp(send_message) else @@ -191,9 +201,9 @@ var/third_party_message if(message_type == MESSAGE_TYPE_MENTORPM) - third_party_message = chat_box_mhelp("[type]: [key_name(src, TRUE, type, ticket_id = ticket_id)]->[key_name(C, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg]
[ping_link] [window_link] [alert_link]
") + third_party_message = chat_box_mhelp("[type]: [key_name(src, TRUE, type, ticket_id = ticket_id)]->[key_name(C, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg]
[ping_link] [ticket_link] [alert_link]
") else - third_party_message = chat_box_ahelp("[type]: [key_name(src, TRUE, type, ticket_id = ticket_id)]->[key_name(C, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg]
[ping_link] [window_link] [alert_link]
") + third_party_message = chat_box_ahelp("[type]: [key_name(src, TRUE, type, ticket_id = ticket_id)]->[key_name(C, TRUE, type, ticket_id = ticket_id)]:

[emoji_msg]
[ping_link] [ticket_link] [alert_link]
") //play the recieving admin the adminhelp sound (if they have them enabled) //non-admins always hear the sound, as they cannot toggle it @@ -287,6 +297,7 @@ target.pm_tracker.show_ui(target.mob) /datum/pm_tracker + var/ckey var/current_title = "" var/open = FALSE var/list/datum/pm_convo/pms = list() @@ -294,6 +305,9 @@ var/window_id = "pms_window" var/forced = FALSE +/datum/pm_tracker/New(ckey_in) + ckey = ckey_in + /datum/pm_convo var/list/messages = list() var/archived = FALSE @@ -326,14 +340,18 @@ show_ui(user) /datum/pm_tracker/proc/show_ui(mob/user) + // Please do not open someone else's PMs, that makes them not very private. + if(user.ckey != ckey) + return + var/dat = "" // If it was forced open, make them use a special close button that alerts admins to closure if(forced) - dat += "" + dat += "" - dat += "Refresh" - dat += "[show_archived ? "Hide" : "Show"] Archived" + dat += "Refresh" + dat += "[show_archived ? "Hide" : "Show"] Archived" dat += "
" for(var/title in pms) if(pms[title].archived && !show_archived) @@ -345,7 +363,7 @@ class = "linkOn" else if(!pms[title].read) label = "*[label]" - dat += "[label]" + dat += "[label]" var/datum/pm_convo/convo = pms[current_title] var/datum/browser/popup = new(user, window_id, "Messages", 1000, 600, src) @@ -375,10 +393,10 @@ dat += "[current_title] is typing" dat += "
" dat += "" - dat += "Reply" - dat += "[convo.archived ? "Unarchive" : "Archive"]" + dat += "Reply" + dat += "[convo.archived ? "Unarchive" : "Archive"]" if(check_rights(R_ADMIN, FALSE, user)) - dat += "Ping" + dat += "Ping" popup.set_content(dat) popup.open() diff --git a/code/modules/admin/verbs/adminsay.dm b/code/modules/admin/verbs/adminsay.dm index a970f55675f2..663a6b7eacb3 100644 --- a/code/modules/admin/verbs/adminsay.dm +++ b/code/modules/admin/verbs/adminsay.dm @@ -1,10 +1,12 @@ /client/proc/cmd_admin_say(msg as text) set name = "Asay" //Gave this shit a shorter name so you only have to time out "asay" rather than "admin say" to use it --NeoFite set hidden = 1 - if(!check_rights(R_ADMIN)) return + if(!check_rights(R_ADMIN)) + return - msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) - if(!msg) return + msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)) + if(!msg) + return var/datum/asays/asay = new(usr.ckey, usr.client.holder.rank, msg, world.timeofday) GLOB.asays += asay @@ -60,7 +62,7 @@ else if(!check_rights(R_ADMIN|R_MOD)) // Catch any other non-admins trying to use this proc return - msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN)) + msg = emoji_parse(copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)) log_mentorsay(msg, src) mob.create_log(OOC_LOG, "MSAY: [msg]") diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm index c824a9ca400b..85cdf1ffc3e6 100644 --- a/code/modules/admin/verbs/debug.dm +++ b/code/modules/admin/verbs/debug.dm @@ -914,6 +914,21 @@ GLOBAL_PROTECT(AdminProcCallSpamPrevention) GLOB.error_cache.showTo(usr) +/client/proc/allow_browser_inspect() + set category = "Debug" + set name = "Allow Browser Inspect" + set desc = "Allow browser debugging via inspect" + + if(!check_rights(R_MAINTAINER) || !isclient(src)) + return + + if(byond_version < 516) + to_chat(src, "You can only use this on 516!") + return + + to_chat(src, "You can now right click to use inspect on browsers.") + winset(src, "", "browser-options=find,devtools") + /client/proc/visualise_active_turfs() set category = "Debug" set name = "Visualise Active Turfs" diff --git a/code/modules/admin/verbs/map_template_loadverb.dm b/code/modules/admin/verbs/map_template_loadverb.dm index 0dc3dfc17912..80d46e18550d 100644 --- a/code/modules/admin/verbs/map_template_loadverb.dm +++ b/code/modules/admin/verbs/map_template_loadverb.dm @@ -26,9 +26,9 @@ usr.client.images += preview if(alert(usr,"Confirm location.","Template Confirm","Yes","No") == "Yes") var/timer = start_watch() - message_admins("[key_name_admin(usr)] has started to place the map template ([template.name]) at (JMP)") + message_admins("[key_name_admin(usr)] has started to place the map template ([template.name]) at (JMP)") if(template.load(T, centered = TRUE)) - message_admins("[key_name_admin(usr)] has placed a map template ([template.name]) at (JMP). Took [stop_watch(timer)]s.") + message_admins("[key_name_admin(usr)] has placed a map template ([template.name]) at (JMP). Took [stop_watch(timer)]s.") else to_chat(usr, "Failed to place map") usr.client.images -= preview diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm index e9801ac73f96..72f5de0b056e 100644 --- a/code/modules/admin/verbs/one_click_antag.dm +++ b/code/modules/admin/verbs/one_click_antag.dm @@ -13,13 +13,13 @@ /datum/admins/proc/one_click_antag() var/dat = {"One-click Antagonist
- Make Traitors
- Make Changelings
- Make Revolutionaries
- Make Cult
- Make Wizard (Requires Ghosts)
- Make Vampires
- Make Abductor Team (Requires Ghosts)
+ Make Traitors
+ Make Changelings
+ Make Revolutionaries
+ Make Cult
+ Make Wizard (Requires Ghosts)
+ Make Vampires
+ Make Abductor Team (Requires Ghosts)
"} usr << browse(dat, "window=oneclickantag;size=400x400") return diff --git a/code/modules/admin/verbs/playsound.dm b/code/modules/admin/verbs/playsound.dm index 97ee1b1167a2..f9d83d26ede4 100644 --- a/code/modules/admin/verbs/playsound.dm +++ b/code/modules/admin/verbs/playsound.dm @@ -43,7 +43,7 @@ GLOBAL_LIST_EMPTY(sounds_cache) uploaded_sound.volume = 100 * M.client.prefs.get_channel_volume(CHANNEL_ADMIN) var/this_uid = M.client.UID() - to_chat(M, "[ckey] played [S] (SILENCE) (ALWAYS SILENCE THIS ADMIN)") + to_chat(M, "[ckey] played [S] (SILENCE) (ALWAYS SILENCE THIS ADMIN)") SEND_SOUND(M, uploaded_sound) SSblackbox.record_feedback("tally", "admin_verb", 1, "Play Global Sound") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! diff --git a/code/modules/admin/verbs/pray.dm b/code/modules/admin/verbs/pray.dm index 6385a515fdf0..f791d97fa99f 100644 --- a/code/modules/admin/verbs/pray.dm +++ b/code/modules/admin/verbs/pray.dm @@ -30,7 +30,7 @@ deity = GET_CULT_DATA(entity_name, "Cult God") log_say("(PRAYER) [msg]", usr) - msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""][mind && HAS_MIND_TRAIT(usr, TRAIT_HOLY) ? " (blessings: [mind.num_blessed])" : ""]: [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_TP(src,"TP")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) ([ADMIN_SC(src,"SC")]) (BLESS) (SMITE): [msg]" + msg = "[bicon(cross)][prayer_type][deity ? " (to [deity])" : ""][mind && HAS_MIND_TRAIT(usr, TRAIT_HOLY) ? " (blessings: [mind.num_blessed])" : ""]: [key_name(src, 1)] ([ADMIN_QUE(src,"?")]) ([ADMIN_PP(src,"PP")]) ([ADMIN_VV(src,"VV")]) ([ADMIN_TP(src,"TP")]) ([ADMIN_SM(src,"SM")]) ([admin_jump_link(src)]) ([ADMIN_SC(src,"SC")]) (BLESS) (SMITE): [msg]" for(var/client/X in GLOB.admins) if(check_rights(R_EVENT,0,X.mob)) @@ -67,7 +67,7 @@ "sender_uid" = Sender.UID(), "message" = html_decode(msg))) GLOB.ert_request_messages.Insert(1, insert_this) // insert it to the top of the list - msg = "ERT REQUEST: [key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) (RESPOND): [msg]" + msg = "ERT REQUEST: [key_name(Sender, 1)] ([ADMIN_PP(Sender,"PP")]) ([ADMIN_VV(Sender,"VV")]) ([ADMIN_TP(Sender,"TP")]) ([ADMIN_SM(Sender,"SM")]) ([admin_jump_link(Sender)]) ([ADMIN_BSA(Sender,"BSA")]) (RESPOND): [msg]" if(repeat_warning) msg += "
WARNING: ERT request has gone 5 minutes with no reply!" for(var/client/X in GLOB.admins) diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index e14ecac59107..c339776b37ff 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -1042,9 +1042,9 @@ Traitors and the like can also be revived with the previous role mostly intact. msg += "[key_string][H.real_name][job_string][mins_ssd][role_string][obj_string]" msg += "[get_area(H)][ADMIN_PP(H,"PP")]" if(istype(H.loc, /obj/machinery/cryopod)) - msg += "De-Spawn" + msg += "De-Spawn" else - msg += "Cryo" + msg += "Cryo" msg += "" msg += "
" @@ -1082,9 +1082,9 @@ Traitors and the like can also be revived with the previous role mostly intact. msg += "[key_string][H.real_name][job_string][mins_afk][role_string][obj_string]" msg += "[get_area(H)][ADMIN_PP(H,"PP")]" if(istype(H.loc, /obj/machinery/cryopod)) - msg += "De-Spawn" + msg += "De-Spawn" else - msg += "Cryo" + msg += "Cryo" msg += "" msg += "" src << browse(msg, "window=Player_ssd_afk_check;size=600x300") @@ -1147,16 +1147,16 @@ Traitors and the like can also be revived with the previous role mostly intact. to_chat(usr, "This verb can only be used if the round has started.") return - var/list/dat = list() + var/list/dat = list("") for(var/datum/station_goal/S in SSticker.mode.station_goals) - dat += "[S.name][S.completed ? " (C)" : ""] - Announce | Remove" + dat += "[S.name][S.completed ? " (C)" : ""] - Announce | Remove" dat += "" - dat += "Add New Goal" + dat += "Add New Goal" dat += "" dat += "Secondary goals" for(var/datum/station_goal/secondary/SG in SSticker.mode.secondary_goals) - dat += "[SG.admin_desc][SG.completed ? " (C)" : ""] for [SG.requester_name || SG.department] - Announce | Remove | Mark complete | Reset progress" - dat += "Add New Secondary Goal" + dat += "[SG.admin_desc][SG.completed ? " (C)" : ""] for [SG.requester_name || SG.department] - Announce | Remove | Mark complete | Reset progress" + dat += "Add New Secondary Goal" usr << browse(dat.Join("
"), "window=goals;size=400x400") diff --git a/code/modules/admin/verbs/serialization.dm b/code/modules/admin/verbs/serialization.dm index c60a072b6f72..5e6e16937880 100644 --- a/code/modules/admin/verbs/serialization.dm +++ b/code/modules/admin/verbs/serialization.dm @@ -125,7 +125,7 @@ var/list/rows = list() rows += "" for(var/slotname in slots) - rows += "" + rows += "" rows += "
SlotActions
[slotname]Spawn  Delete
[slotname]Spawn  Delete
" diff --git a/code/modules/admin/watchlist.dm b/code/modules/admin/watchlist.dm index 6b98a6050cfa..6e03603ed5d4 100644 --- a/code/modules/admin/watchlist.dm +++ b/code/modules/admin/watchlist.dm @@ -116,11 +116,11 @@ if(!check_rights(R_ADMIN)) return var/output - output += "
\ + output += "\ \ \
" - output += "\[Clear Search\] \[Add Ckey\]" + output += "\[Clear Search\] \[Add Ckey\]" output += "
" if(search) search = "^[search]" @@ -139,9 +139,9 @@ var/adminckey = query_watchlist.item[3] var/timestamp = query_watchlist.item[4] var/last_editor = query_watchlist.item[5] - output += "[ckey] | Added by [adminckey] on [timestamp] \[Remove\] \[Edit Reason\]" + output += "[ckey] | Added by [adminckey] on [timestamp] \[Remove\] \[Edit Reason\]" if(last_editor) - output += " Last edit by [last_editor] (Click here to see edit log)" + output += " Last edit by [last_editor] (Click here to see edit log)" output += "
[reason]
" usr << browse(output, "window=watchwin;size=900x500") qdel(query_watchlist) diff --git a/code/modules/antagonists/_common/antag_team.dm b/code/modules/antagonists/_common/antag_team.dm index ba35e1de1eb6..fe75cb79d864 100644 --- a/code/modules/antagonists/_common/antag_team.dm +++ b/code/modules/antagonists/_common/antag_team.dm @@ -358,27 +358,27 @@ GLOBAL_LIST_EMPTY(antagonist_teams) /datum/team/proc/get_admin_html() var/list/content = list() content += "

[name] - [type]

" - content += "Rename Team" - content += "Delete Team" - content += "OOC Message Team" + content += "Rename Team" + content += "Delete Team" + content += "OOC Message Team" content += ADMIN_VV(src, "View Variables") for(var/command in get_admin_commands()) // src is UID() so it points to `/datum/team/Topic` instead of `/datum/admins/Topic`. - content += "[command]" + content += "[command]" content += "

Objectives:
    " for(var/datum/objective/O as anything in objective_holder.get_objectives()) if(!istype(O)) stack_trace("Non-objective found in [type]'s objective_holder.get_objectives()") continue - content += "
  1. [O.explanation_text] - Remove
  2. " - content += "
Add Objective
" + content += "
  • [O.explanation_text] - Remove
  • " + content += "Add Objective
    " if(objective_holder.has_objectives()) - content += "Announce Objectives to All Members

    " + content += "Announce Objectives to All Members

    " content += "Members:
      " for(var/datum/mind/M as anything in members) - content += "
    1. [M.name] - Show Player Panel" - content += "Remove Member
    2. " - content += "
    Add Member" + content += "
  • [M.name] - Show Player Panel" + content += "Remove Member
  • " + content += "Add Member" return content /** @@ -406,12 +406,12 @@ GLOBAL_LIST_EMPTY(antagonist_teams) var/list/content = list() if(!length(GLOB.antagonist_teams)) content += "There are currently no antag teams.
    " - content += "Create new Team" - content += "Reload Menu
    " + content += "Create new Team" + content += "Reload Menu
    " if(length(GLOB.antagonist_teams) > 1) var/index = 1 for(var/datum/team/T as anything in GLOB.antagonist_teams) - content += "[T.name]" + content += "[T.name]" index++ else team_switch_tab_index = 1 diff --git a/code/modules/antagonists/cult/team_cult.dm b/code/modules/antagonists/cult/team_cult.dm index 8f21d8569613..fcc26a00dc02 100644 --- a/code/modules/antagonists/cult/team_cult.dm +++ b/code/modules/antagonists/cult/team_cult.dm @@ -556,13 +556,13 @@ content += "
    Sacrifice required for summoning: [sacrifices_required]
    " if(obj_summon) content += "
    Summoning locations: [english_list(obj_summon.summon_spots)]" - content += "
    Reroll summoning locations" + content += "
    Reroll summoning locations" else content += "
    Summoning locations: None, Cult has not yet reached the summoning stage." content += "
    " if(cult_status == NARSIE_DEMANDS_SACRIFICE) - content += "
    Modify amount of sacrifices required" - content += "
    Reroll sacrifice target" + content += "
    Modify amount of sacrifices required" + content += "
    Reroll sacrifice target" else content += "
    Cannot modify amount of sacrifices required (Summon available!)" content += "
    Cannot reroll sacrifice target (Summon available!)" diff --git a/code/modules/arcade/mob_hunt/battle_computer.dm b/code/modules/arcade/mob_hunt/battle_computer.dm index e3acd026c33d..228686fa951c 100644 --- a/code/modules/arcade/mob_hunt/battle_computer.dm +++ b/code/modules/arcade/mob_hunt/battle_computer.dm @@ -135,7 +135,7 @@ dat += "" if(ready && SSmob_hunt.battle_turn) //offer the surrender option if they are in a battle (ready), but don't have a card loaded dat += "" - dat += "Surrender!" + dat += "Surrender!" dat += "" else dat += "" @@ -165,21 +165,21 @@ dat += "
    " dat += "" if(mob_info.cur_health) - dat += "" + dat += "" else dat += "" - dat += "" + dat += "" dat += "" dat += "
    Attack!Attack!Incapacitated!Recall!Recall!
    " dat += "" dat += "" if(!ready) dat += "" - dat += "Battle!" + dat += "Battle!" dat += "" if(ready && !SSmob_hunt.battle_turn) dat += "" - dat += "Cancel Battle!" + dat += "Cancel Battle!" dat += "" dat += "" diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index 238e3ec310a0..f3315c480e47 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -135,12 +135,12 @@ if(!secured) return user.set_machine(src) var/dat = {"Infrared Laser - Status: [on ? "On" : "Off"]
    - Visibility: [visible ? "Visible" : "Invisible"]
    - Current Direction: [capitalize(dir2text(dir))]
    + Status: [on ? "On" : "Off"]
    + Visibility: [visible ? "Visible" : "Invisible"]
    + Current Direction: [capitalize(dir2text(dir))]
    -

    Refresh -

    Close"} +

    Refresh +

    Close"} var/datum/browser/popup = new(user, "infra", name, 400, 400) popup.set_content(dat) popup.open(0) diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index c21a7c3b7f44..761ad620d994 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -103,10 +103,10 @@ return FALSE var/second = time % 60 var/minute = (time - second) / 60 - var/dat = "Proximity Sensor\n[timing ? "Arming" : "Not Arming"] [minute]:[second]\n- - + +\n" - dat += "
    [scanning?"Armed":"Unarmed"] (Movement sensor active when armed!)" - dat += "

    Refresh" - dat += "

    Close" + var/dat = "Proximity Sensor\n[timing ? "Arming" : "Not Arming"] [minute]:[second]\n- - + +\n" + dat += "
    [scanning?"Armed":"Unarmed"] (Movement sensor active when armed!)" + dat += "

    Refresh" + dat += "

    Close" var/datum/browser/popup = new(user, "prox", name, 400, 400) popup.set_content(dat) popup.open(0) diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 8e9893050df3..aa38ddd7a992 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -78,16 +78,16 @@ var/dat = {"

    Timing Unit

    - [minute]:[second] [timing?"Stop":"Start"] Reset
    - Repeat: [repeat?"On":"Off"]
    + [minute]:[second] [timing?"Stop":"Start"] Reset
    + Repeat: [repeat?"On":"Off"]
    Timer set for - - - [set_minute]:[set_second] + + + - - [set_minute]:[set_second] + +


    - Refresh + Refresh

    - Close"} + Close"} var/datum/browser/popup = new(user, "timer", name, 400, 400) popup.set_content(dat) popup.open(0) diff --git a/code/modules/asset_cache/asset_cache_client.dm b/code/modules/asset_cache/asset_cache_client.dm index 03b8e3c58890..60f4d57b7f9a 100644 --- a/code/modules/asset_cache/asset_cache_client.dm +++ b/code/modules/asset_cache/asset_cache_client.dm @@ -34,7 +34,7 @@ var/job = ++last_asset_job var/t = 0 var/timeout_time = timeout - src << browse({""}, "window=asset_cache_browser&file=asset_cache_send_verify.htm") + src << browse({""}, "window=asset_cache_browser&file=asset_cache_send_verify.htm") while(!completed_asset_jobs["[job]"] && t < timeout_time) // Reception is handled in Topic() stoplag(1) // Lock up the caller until this is received. diff --git a/code/modules/asset_cache/asset_list.dm b/code/modules/asset_cache/asset_list.dm index 4674bf24ce64..ead4accd8363 100644 --- a/code/modules/asset_cache/asset_list.dm +++ b/code/modules/asset_cache/asset_list.dm @@ -240,7 +240,7 @@ GLOBAL_LIST_EMPTY(asset_datums) for(var/icon_state_name in icon_states(I)) for(var/direction in directions) - var/prefix2 = length(directions) ? "[dir2text(direction)]-" : "" + var/prefix2 = length(directions) > 1 ? "[dir2text(direction)]-" : "" Insert("[prefix][prefix2][icon_state_name]", I, icon_state=icon_state_name, dir=direction) /datum/asset/spritesheet/proc/css_tag() diff --git a/code/modules/asset_cache/assets/asset_emoji.dm b/code/modules/asset_cache/assets/asset_emoji.dm new file mode 100644 index 000000000000..2693de77a011 --- /dev/null +++ b/code/modules/asset_cache/assets/asset_emoji.dm @@ -0,0 +1,5 @@ +/datum/asset/spritesheet/emoji + name = "emoji" + +/datum/asset/spritesheet/emoji/create_spritesheets() + InsertAll("emoji", EMOJI_SET) diff --git a/code/modules/asset_cache/assets/asset_safe.dm b/code/modules/asset_cache/assets/asset_safe.dm index 007226cf952c..882dae800f6d 100644 --- a/code/modules/asset_cache/assets/asset_safe.dm +++ b/code/modules/asset_cache/assets/asset_safe.dm @@ -1,5 +1,5 @@ /datum/asset/simple/safe keep_local_name = TRUE assets = list( - "safe_dial.png" = 'icons/safe_dial.png' + "safe_dial.png" = 'icons/ui_icons/safe_dial.png' ) diff --git a/code/modules/atmospherics/machinery/other/area_atmos_computer.dm b/code/modules/atmospherics/machinery/other/area_atmos_computer.dm index 92a7167e6c33..df28f79e02f1 100644 --- a/code/modules/atmospherics/machinery/other/area_atmos_computer.dm +++ b/code/modules/atmospherics/machinery/other/area_atmos_computer.dm @@ -71,13 +71,13 @@

    Area Air Control

    [status]
    - Scan + Scan "} for(var/obj/machinery/atmospherics/portable/scrubber/huge/scrubber in connectedscrubbers) dat += {" - + "} dat += {" diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 7680d85aa8d7..bc6864831024 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -383,12 +383,12 @@ GLOBAL_DATUM_INIT(canister_icon_container, /datum/canister_icons, new()) logmsg = "Valve was opened by [key_name(ui.user)], starting a transfer into the air.
    " if(air_contents.toxins > 0) - message_admins("[key_name_admin(ui.user)] opened a canister that contains plasma in [get_area(src)]! (JMP)") + message_admins("[key_name_admin(ui.user)] opened a canister that contains plasma in [get_area(src)]! (JMP)") log_admin("[key_name(ui.user)] opened a canister that contains plasma at [get_area(src)]: [x], [y], [z]") ui.user.create_log(MISC_LOG, "has opened a canister of plasma") if(air_contents.sleeping_agent > 0) - message_admins("[key_name_admin(ui.user)] opened a canister that contains N2O in [get_area(src)]! (JMP)") + message_admins("[key_name_admin(ui.user)] opened a canister that contains N2O in [get_area(src)]! (JMP)") log_admin("[key_name(ui.user)] opened a canister that contains N2O at [get_area(src)]: [x], [y], [z]") ui.user.create_log(MISC_LOG, "has opened a canister of N2O") diff --git a/code/modules/client/client_defines.dm b/code/modules/client/client_defines.dm index 31edadc979f1..aa06fa2055cb 100644 --- a/code/modules/client/client_defines.dm +++ b/code/modules/client/client_defines.dm @@ -11,7 +11,7 @@ var/last_message = "" //contains the last message sent by this client - used to protect against copy-paste spamming. var/last_message_count = 0 //contains a number of how many times a message identical to last_message was sent. var/last_message_time = 0 //holds the last time (based on world.time) a message was sent - var/datum/pm_tracker/pm_tracker = new() + var/datum/pm_tracker/pm_tracker ///////// //OTHER// diff --git a/code/modules/client/client_procs.dm b/code/modules/client/client_procs.dm index d2412ed6d547..6330afcfa705 100644 --- a/code/modules/client/client_procs.dm +++ b/code/modules/client/client_procs.dm @@ -262,7 +262,10 @@ stat_panel = new(src, "statbrowser") stat_panel.subscribe(src, PROC_REF(on_stat_panel_message)) - tgui_panel = new(src, "browseroutput") + // Create a PM tracker bound to this ckey. + pm_tracker = new(ckey) + + tgui_panel = new(src, "chat_panel") tgui_say = new(src, "tgui_say") TopicData = null //Prevent calls to client.Topic from connect @@ -683,7 +686,7 @@ if(living_hours < 20) return - to_chat(src, "You have no verified forum account. VERIFY FORUM ACCOUNT") + to_chat(src, "You have no verified forum account. VERIFY FORUM ACCOUNT") /client/proc/create_oauth_token() var/datum/db_query/query_find_token = SSdbcore.NewQuery("SELECT token FROM oauth_tokens WHERE ckey=:ckey limit 1", list( @@ -905,7 +908,7 @@ var/url = winget(src, null, "url") //special javascript to make them reconnect under a new window. - src << browse("\ + src << browse("\ byond://[url]?token=[token]\ \ " + html += "" html += "
    [scrubber.name]Turn On Turn OffTurn On Turn Off
    " else html += "" - html += "" + html += "" html += "" html += "
    " // Table within a table for alignment, also allows you to easily add more colomns. html += "" var/index = -1 @@ -2037,7 +2037,7 @@ html += "" dat += "" dat += "" @@ -567,11 +566,11 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/disp_key = key if(override_keys) disp_key = "[disp_key]" - keys_buttons += "[disp_key] " + keys_buttons += "[disp_key] " dat += "" dat += "" - dat += "" : ""]" - dat += "" + dat += "" : ""]" + dat += "" if(KB.category == KB_CATEGORY_EMOTE_CUSTOM) var/datum/keybinding/custom/custom_emote_keybind = kb if(custom_emote_keybind.donor_exclusive && !(user.client.donator_level || user.client.holder || unlock_content)) @@ -587,8 +586,8 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "" else dat += "" - dat += "" - dat += "" + dat += "" + dat += "" dat += "" dat += "" dat += "" @@ -598,10 +597,10 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "
    " if(!IsGuestKey(user.key)) - dat += "Undo - " - dat += "Save Setup - " + dat += "Undo - " + dat += "Save Setup - " - dat += "Reset Setup" + dat += "Reset Setup" dat += "
    " var/datum/browser/popup = new(user, "preferences", "
    Character Setup
    ", 820, 770) @@ -622,7 +621,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts name = "Character [i]" if(i == default_slot) name = "[name]" - dat += "[name]
    " + dat += "[name]
    " dat += "
    " dat += "Close
    " diff --git a/code/modules/emoji/emoji_parse.dm b/code/modules/emoji/emoji_parse.dm new file mode 100644 index 000000000000..6dc56b195514 --- /dev/null +++ b/code/modules/emoji/emoji_parse.dm @@ -0,0 +1,32 @@ +/// Turns :ai: into an emoji in text. +/proc/emoji_parse(text) + if(!text) + return text + . = text + var/static/list/emojis = icon_states(icon(EMOJI_SET)) + var/parsed = "" + var/pos = 1 + var/search = 0 + var/emoji = "" + while(TRUE) + search = findtext(text, ":", pos) + parsed += copytext(text, pos, search) + if(search) + pos = search + search = findtext(text, ":", pos + length(text[pos])) + if(search) + emoji = lowertext(copytext(text, pos + length(text[pos]), search)) + var/datum/asset/spritesheet/sheet = get_asset_datum(/datum/asset/spritesheet/emoji) + var/tag = sheet.icon_tag("emoji-[emoji]") + if(tag) + parsed += tag + pos = search + length(text[pos]) + else + parsed += copytext(text, pos, search) + pos = search + emoji = "" + continue + else + parsed += copytext(text, pos, search) + break + return parsed diff --git a/code/modules/emoji/emojipedia.dm b/code/modules/emoji/emojipedia.dm new file mode 100644 index 000000000000..62fb05a8eb5f --- /dev/null +++ b/code/modules/emoji/emojipedia.dm @@ -0,0 +1,37 @@ +/client/verb/emojipedia() + set name = "Emojipedia" + set category = "OOC" + set desc = "Literally an emojipedia, a list of all the emoji available for OOC use." + + var/datum/ui_module/emojipedia/emojipedia = new() + emojipedia.ui_interact(usr) + +/datum/ui_module/emojipedia + name = "Emojipedia" + /// Store the list of potential emojis here. + var/static/list/emoji_list = icon_states(icon(EMOJI_SET)) + +/datum/ui_module/emojipedia/ui_state(mob/user) + return GLOB.always_state + +/datum/ui_module/emojipedia/ui_interact(mob/user, datum/tgui/ui) + ui = SStgui.try_update_ui(user, src, ui) + if(!ui) + ui = new(user, src, "Emojipedia", name) + ui.autoupdate = FALSE + ui.open() + +/datum/ui_module/emojipedia/ui_static_data(mob_user) + var/list/data = list() + + for(var/emoji in emoji_list) + data["emoji_list"] += list(list( + "name" = emoji, + )) + + return data + +/datum/ui_module/emojipedia/ui_assets(mob/user) + return list( + get_asset_datum(/datum/asset/spritesheet/emoji), + ) diff --git a/code/modules/error_handler/error_viewer.dm b/code/modules/error_handler/error_viewer.dm index 63dd60a8b806..1585cc6d3d8f 100644 --- a/code/modules/error_handler/error_viewer.dm +++ b/code/modules/error_handler/error_viewer.dm @@ -71,7 +71,7 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache) back_to_param = ";viewruntime_backto=[back_to.UID()]" if(linear) back_to_param += ";viewruntime_linear=1" - return "[html_encode(linktext)]" + return "[html_encode(linktext)]" /datum/ErrorViewer/ErrorCache var/list/errors = list() @@ -184,24 +184,24 @@ GLOBAL_DATUM(error_cache, /datum/ErrorViewer/ErrorCache) html += "
    [html_encode(name)]
    [desc]
    " if(srcRef) - html += "
    src: VV" + html += "
    src: VV" if(ispath(srcType, /mob)) - html += " PP" - html += " Follow" + html += " PP" + html += " Follow" if(istype(srcLoc)) - html += "
    src.loc: VV" - html += " JMP" + html += "
    src.loc: VV" + html += " JMP" if(usrRef) - html += "
    usr: VV" - html += " PP" - html += " Follow" + html += "
    usr: VV" + html += " PP" + html += " Follow" if(istype(usrLoc)) - html += "
    usr.loc: VV" - html += " JMP" + html += "
    usr.loc: VV" + html += " JMP" browseTo(user, html) diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 9c7169df52b1..62b4840f32b8 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -40,7 +40,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 move_delay = delay if(notify) notify_ghosts("\A [src] is inbound!", - enter_link="(Click to follow)", + enter_link="(Click to follow)", source = src, action = NOTIFY_FOLLOW) GLOB.poi_list |= src if(end?.z == z_original) diff --git a/code/modules/food_and_drinks/drinks/bottler/bottler.dm b/code/modules/food_and_drinks/drinks/bottler/bottler.dm index 7ab904ef7186..4baba043cf16 100644 --- a/code/modules/food_and_drinks/drinks/bottler/bottler.dm +++ b/code/modules/food_and_drinks/drinks/bottler/bottler.dm @@ -315,15 +315,15 @@ dat += "" dat += "" if(containers["glass bottle"]) - dat += "" + dat += "" else dat += "" if(containers["plastic bottle"]) - dat += "" + dat += "" else dat += "" if(containers["metal can"]) - dat += "" + dat += "" else dat += "" dat += "" @@ -343,7 +343,7 @@ dat += "" if(slots[1] && slots[2] && slots[3]) - dat += "" + dat += "" else dat += "" dat += "" @@ -351,10 +351,10 @@ dat += "" for(var/i = 1, i <= slots.len, i++) if(slots[i]) - dat += "" + dat += "" else dat += "" - dat += "" + dat += "" dat += "" dat += "
    " var/rank if(job.alt_titles) - rank = "[GetPlayerAltTitle(job)]" + rank = "[GetPlayerAltTitle(job)]" else rank = job.title lastJob = job @@ -2095,9 +2095,9 @@ prefLowerLevel = 1 - html += "" + html += "" - // HTML += "" + // HTML += "" if(job.title == "Assistant") // Assistant is special if(job_support_low & JOB_ASSISTANT) @@ -2128,14 +2128,14 @@ switch(alternate_option) if(GET_RANDOM_JOB) - html += "

    Get random job if preferences unavailable

    " + html += "

    Get random job if preferences unavailable

    " if(BE_ASSISTANT) - html += "

    Be an assistant if preferences unavailable

    " + html += "

    Be an assistant if preferences unavailable

    " if(RETURN_TO_LOBBY) - html += "

    Return to lobby if preferences unavailable

    " + html += "

    Return to lobby if preferences unavailable

    " - html += "
    Reset
    " - html += "

    Learn About Job Selection
    " + html += "
    Reset
    " + html += "

    Learn About Job Selection
    " html += "" user << browse(null, "window=preferences") diff --git a/code/modules/client/preference/link_processing.dm b/code/modules/client/preference/link_processing.dm index 24a817462819..8e51a49e39f9 100644 --- a/code/modules/client/preference/link_processing.dm +++ b/code/modules/client/preference/link_processing.dm @@ -865,15 +865,17 @@ organ = "kidneys" var/new_state = tgui_input_list(user, "What state do you wish the organ to be in?", "[organ_name]", list("Normal", "Cybernetic")) - if(!new_state) return - + if(!new_state) + return switch(new_state) if("Normal") active_character.organ_data[organ] = null if("Cybernetic") active_character.organ_data[organ] = "cybernetic" if("cyborg_brain_type") - var/brain_type = tgui_input_list(user, "What type of brain would you like to have as a cyborg?", "Cyborg Brain Type", GLOB.borg_brain_choices) + var/brain_type = tgui_input_list(user, "What type of brain would you like to have as a cyborg?", "Cyborg Brain Type", GLOB.borg_brain_choices, active_character.cyborg_brain_type) + if(!(brain_type in GLOB.borg_brain_choices)) + return active_character.cyborg_brain_type = brain_type if("clientfps") var/version_message diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index 929826a87625..4ce3b3b1a79f 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -162,11 +162,11 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts var/list/dat = list() dat += "
    " - dat += "Character Settings" - dat += "Game Preferences" - dat += "Antagonists" - dat += "Loadout" - dat += "Key Bindings" + dat += "Character Settings" + dat += "Game Preferences" + dat += "Antagonists" + dat += "Loadout" + dat += "Key Bindings" dat += "
    " dat += "
    " @@ -181,9 +181,9 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "
    " dat += "
    " dat += "Name: " - dat += "[active_character.real_name]" - dat += "(Randomize)" - dat += "(Always Randomize)
    " + dat += "[active_character.real_name]" + dat += "(Randomize)" + dat += "(Always Randomize)
    " dat += "
    " dat += "
    " dat += "Slot [default_slot][active_character.from_db ? "" : " (empty)"]
    " @@ -195,21 +195,21 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "
    " dat += "
    " dat += "

    Identity

    " - dat += "Gender: [active_character.gender == MALE ? "Male" : (active_character.gender == FEMALE ? "Female" : "Genderless")]" + dat += "Gender: [active_character.gender == MALE ? "Male" : (active_character.gender == FEMALE ? "Female" : "Genderless")]" dat += "
    " - dat += "Age: [active_character.age]
    " - dat += "Body: (®)
    " - dat += "Species: [active_character.species]
    " + dat += "Age: [active_character.age]
    " + dat += "Body: (®)
    " + dat += "Species: [active_character.species]
    " if(active_character.species == "Vox") // Purge these bastards - dat += "N2 Tank: [active_character.speciesprefs ? "Large N2 Tank" : "Specialized N2 Tank"]
    " + dat += "N2 Tank: [active_character.speciesprefs ? "Large N2 Tank" : "Specialized N2 Tank"]
    " if(active_character.species == "Plasmaman") - dat += "Plasma Tank: [active_character.speciesprefs ? "Large Plasma Tank" : "Specialized Plasma Tank"]
    " + dat += "Plasma Tank: [active_character.speciesprefs ? "Large Plasma Tank" : "Specialized Plasma Tank"]
    " if(active_character.species == "Grey") dat += "Wingdings: Set in disabilities
    " - dat += "Voice Translator: [active_character.speciesprefs ? "Yes" : "No"]
    " - dat += "Secondary Language: [active_character.language]
    " + dat += "Voice Translator: [active_character.speciesprefs ? "Yes" : "No"]
    " + dat += "Secondary Language: [active_character.language]
    " if(S.autohiss_basic_map) - dat += "Auto-accent: [active_character.autohiss_mode == AUTOHISS_FULL ? "Full" : (active_character.autohiss_mode == AUTOHISS_BASIC ? "Basic" : "Off")]
    " + dat += "Auto-accent: [active_character.autohiss_mode == AUTOHISS_FULL ? "Full" : (active_character.autohiss_mode == AUTOHISS_BASIC ? "Basic" : "Off")]
    " if(NO_BLOOD in S.species_traits) // unique blood type for species with no_blood/unique_blood active_character.b_type = "None" else @@ -218,13 +218,14 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts else if(active_character.b_type == "None" || active_character.b_type == "Slime Jelly") active_character.b_type = pick(4;"O-", 36;"O+", 3;"A-", 28;"A+", 1;"B-", 20;"B+", 1;"AB-", 5;"AB+") - dat += "Blood Type: [active_character.b_type]
    " + dat += "Blood Type: [active_character.b_type]
    " if(S.bodyflags & (HAS_SKIN_TONE|HAS_ICON_SKIN_TONE)) - dat += "Skin Tone: [S.bodyflags & HAS_ICON_SKIN_TONE ? "[active_character.s_tone]" : "[-active_character.s_tone + 35]/220"]
    " - dat += "Disabilities: \[Set\]
    " - dat += "Nanotrasen Relation: [active_character.nanotrasen_relation]
    " - dat += "Physique: [active_character.physique]
    " - dat += "Height: [active_character.height]
    " + dat += "Skin Tone: [S.bodyflags & HAS_ICON_SKIN_TONE ? "[active_character.s_tone]" : "[-active_character.s_tone + 35]/220"]
    " + dat += "Disabilities: \[Set\]
    " + dat += "Nanotrasen Relation: [active_character.nanotrasen_relation]
    " + dat += "Physique: [active_character.physique]
    " + dat += "Height: [active_character.height]
    " + dat += "Cyborg Brain Type: [active_character.cyborg_brain_type]
    " dat += "Set Flavor Text
    " if(length(active_character.flavor_text) <= 40) if(!length(active_character.flavor_text)) @@ -240,46 +241,46 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(active_character.species == "Unathi") headaccessoryname = "Horns: " dat += "[headaccessoryname]" - dat += "[active_character.ha_style] " - dat += "Color [color_square(active_character.hacc_colour)]
    " + dat += "[active_character.ha_style] " + dat += "Color [color_square(active_character.hacc_colour)]
    " if(S.bodyflags & HAS_HEAD_MARKINGS) //Species with head markings. dat += "Head Markings: " - dat += "[active_character.m_styles["head"]]" - dat += "Color [color_square(active_character.m_colours["head"])]
    " + dat += "[active_character.m_styles["head"]]" + dat += "Color [color_square(active_character.m_colours["head"])]
    " if(S.bodyflags & HAS_BODY_MARKINGS) //Species with body markings/tattoos. dat += "Body Markings: " - dat += "[active_character.m_styles["body"]]" - dat += "Color [color_square(active_character.m_colours["body"])]
    " + dat += "[active_character.m_styles["body"]]" + dat += "Color [color_square(active_character.m_colours["body"])]
    " if(S.bodyflags & HAS_TAIL_MARKINGS) //Species with tail markings. dat += "Tail Markings: " - dat += "[active_character.m_styles["tail"]]" - dat += "Color [color_square(active_character.m_colours["tail"])]
    " + dat += "[active_character.m_styles["tail"]]" + dat += "Color [color_square(active_character.m_colours["tail"])]
    " if(!(S.bodyflags & BALD)) dat += "Hair: " - dat += "[active_character.h_style]" - dat += "Color [color_square(active_character.h_colour)]" + dat += "[active_character.h_style]" + dat += "Color [color_square(active_character.h_colour)]" var/datum/sprite_accessory/temp_hair_style = GLOB.hair_styles_public_list[active_character.h_style] if(temp_hair_style && temp_hair_style.secondary_theme && !temp_hair_style.no_sec_colour) - dat += " Color #2 [color_square(active_character.h_sec_colour)]" + dat += " Color #2 [color_square(active_character.h_sec_colour)]" // Hair gradient dat += "
    " dat += "- Gradient:" - dat += " [active_character.h_grad_style]" - dat += " Color [color_square(active_character.h_grad_colour)]" - dat += " [active_character.h_grad_alpha]" + dat += " [active_character.h_grad_style]" + dat += " Color [color_square(active_character.h_grad_colour)]" + dat += " [active_character.h_grad_alpha]" dat += "
    " - dat += "- Gradient Offset: [active_character.h_grad_offset_x],[active_character.h_grad_offset_y]" + dat += "- Gradient Offset: [active_character.h_grad_offset_x],[active_character.h_grad_offset_y]" dat += "
    " else active_character.h_style = "Bald" if(!(S.bodyflags & SHAVED)) dat += "Facial Hair: " - dat += "[active_character.f_style ? "[active_character.f_style]" : "Shaved"]" - dat += "Color [color_square(active_character.f_colour)]" + dat += "[active_character.f_style ? "[active_character.f_style]" : "Shaved"]" + dat += "Color [color_square(active_character.f_colour)]" var/datum/sprite_accessory/temp_facial_hair_style = GLOB.facial_hair_styles_list[active_character.f_style] if(temp_facial_hair_style && temp_facial_hair_style.secondary_theme && !temp_facial_hair_style.no_sec_colour) - dat += " Color #2 [color_square(active_character.f_sec_colour)]" + dat += " Color #2 [color_square(active_character.f_sec_colour)]" dat += "
    " else active_character.f_style = "Shaved" @@ -287,19 +288,19 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(!(S.bodyflags & ALL_RPARTS)) dat += "Eyes: " - dat += "Color [color_square(active_character.e_colour)]
    " + dat += "Color [color_square(active_character.e_colour)]
    " if((S.bodyflags & HAS_SKIN_COLOR) || ((S.bodyflags & HAS_BODYACC_COLOR) && GLOB.body_accessory_by_species[active_character.species]) || check_rights(R_ADMIN, 0, user)) //admins can always fuck with this, because they are admins dat += "Body Color: " - dat += "Color [color_square(active_character.s_colour)]
    " + dat += "Color [color_square(active_character.s_colour)]
    " if(GLOB.body_accessory_by_species[active_character.species] || check_rights(R_ADMIN, 0, user)) dat += "Body Accessory: " - dat += "[active_character.body_accessory ? "[active_character.body_accessory]" : "None"]
    " + dat += "[active_character.body_accessory ? "[active_character.body_accessory]" : "None"]
    " dat += "
    " dat += "

    Occupation Choices

    " - dat += "Set Occupation Preferences
    " + dat += "Set Occupation Preferences
    " if(jobban_isbanned(user, ROLEBAN_RECORDS)) dat += "You are banned from using character records.
    " else @@ -309,17 +310,17 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(GLOB.configuration.tts.tts_enabled) dat += {"

    Text-to-Speech

    - Выбор голоса: Эксплорер TTS голосов
    + Выбор голоса: Эксплорер TTS голосов
    "} // SS220 ADDITION END dat += "

    Limbs

    " if(S.bodyflags & HAS_ALT_HEADS) //Species with alt heads. dat += "Alternate Head: " - dat += "[active_character.alt_head]
    " - dat += "Limbs and Parts: Adjust
    " + dat += "[active_character.alt_head]
    " + dat += "Limbs and Parts: Adjust
    " if(active_character.species != "Slime People" && active_character.species != "Machine") - dat += "Internal Organs: Adjust
    " + dat += "Internal Organs: Adjust
    " //display limbs below var/ind = 0 @@ -381,16 +382,14 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(!ind) dat += "\[...\]
    " else dat += "
    " - dat += "

    Cyborg Brain Type

    " - dat += "[active_character.cyborg_brain_type]
    " dat += "

    Clothing

    " if(S.clothing_flags & HAS_UNDERWEAR) - dat += "Underwear: [active_character.underwear]
    " + dat += "Underwear: [active_character.underwear]
    " if(S.clothing_flags & HAS_UNDERSHIRT) - dat += "Undershirt: [active_character.undershirt]
    " + dat += "Undershirt: [active_character.undershirt]
    " if(S.clothing_flags & HAS_SOCKS) - dat += "Socks: [active_character.socks]
    " - dat += "Backpack Type: [active_character.backbag]
    " + dat += "Socks: [active_character.socks]
    " + dat += "Backpack Type: [active_character.backbag]
    " var/datum/species/myspecies = GLOB.all_species[active_character.species] if(!isnull(myspecies)) @@ -403,28 +402,28 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts // LEFT SIDE OF THE PAGE dat += "
    " dat += "

    General Settings

    " - dat += "2FA Setup: [_2fastatus_to_text()]
    " + dat += "2FA Setup: [_2fastatus_to_text()]
    " if(user.client.holder) - dat += "Adminhelp sound: [(sound & SOUND_ADMINHELP)?"On":"Off"]
    " - dat += "AFK Cryoing: [(toggles2 & PREFTOGGLE_2_AFKWATCH) ? "Yes" : "No"]
    " - dat += "Ambient Occlusion: [toggles & PREFTOGGLE_AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]
    " - dat += "Attack Animations: [(toggles2 & PREFTOGGLE_2_ITEMATTACK) ? "Yes" : "No"]
    " + dat += "Adminhelp sound: [(sound & SOUND_ADMINHELP)?"On":"Off"]
    " + dat += "AFK Cryoing: [(toggles2 & PREFTOGGLE_2_AFKWATCH) ? "Yes" : "No"]
    " + dat += "Ambient Occlusion: [toggles & PREFTOGGLE_AMBIENT_OCCLUSION ? "Enabled" : "Disabled"]
    " + dat += "Attack Animations: [(toggles2 & PREFTOGGLE_2_ITEMATTACK) ? "Yes" : "No"]
    " if(unlock_content) - dat += "BYOND Membership Publicity: [(toggles & PREFTOGGLE_MEMBER_PUBLIC) ? "Public" : "Hidden"]
    " - dat += "CKEY Anonymity: [toggles2 & PREFTOGGLE_2_ANON ? "Anonymous" : "Not Anonymous"]
    " - dat += "Colourblind Mode: [colourblind_mode]
    " + dat += "BYOND Membership Publicity: [(toggles & PREFTOGGLE_MEMBER_PUBLIC) ? "Public" : "Hidden"]
    " + dat += "CKEY Anonymity: [toggles2 & PREFTOGGLE_2_ANON ? "Anonymous" : "Not Anonymous"]
    " + dat += "Colourblind Mode: [colourblind_mode]
    " if(user.client.donator_level > 0) - dat += "Donator Publicity: [(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]
    " - dat += "FPS: [clientfps]
    " - dat += "Ghost Ears: [(toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
    " - dat += "Ghost Radio: [(toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
    " - dat += "Ghost Sight: [(toggles & PREFTOGGLE_CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
    " - dat += "Ghost PDA: [(toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]
    " + dat += "Donator Publicity: [(toggles & PREFTOGGLE_DONATOR_PUBLIC) ? "Public" : "Hidden"]
    " + dat += "FPS: [clientfps]
    " + dat += "Ghost Ears: [(toggles & PREFTOGGLE_CHAT_GHOSTEARS) ? "All Speech" : "Nearest Creatures"]
    " + dat += "Ghost Radio: [(toggles & PREFTOGGLE_CHAT_GHOSTRADIO) ? "All Chatter" : "Nearest Speakers"]
    " + dat += "Ghost Sight: [(toggles & PREFTOGGLE_CHAT_GHOSTSIGHT) ? "All Emotes" : "Nearest Creatures"]
    " + dat += "Ghost PDA: [(toggles & PREFTOGGLE_CHAT_GHOSTPDA) ? "All PDA Messages" : "No PDA Messages"]
    " if(check_rights(R_EVENT,0)) // SS220 Addition - dat += "OOC Color:     Change
    " + dat += "OOC Color:     Change
    " if(GLOB.configuration.general.allow_character_metadata) - dat += "OOC Notes: Edit
    " - dat += "Parallax (Fancy Space): " + dat += "OOC Notes: Edit
    " + dat += "Parallax (Fancy Space): " switch(parallax) if(PARALLAX_LOW) dat += "Low" @@ -437,29 +436,29 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts else dat += "High" dat += "
    " - dat += "Parallax in darkness: [toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS ? "Enabled" : "Disabled"]
    " - dat += "Play Admin MIDIs: [(sound & SOUND_MIDI) ? "Yes" : "No"]
    " - dat += "Play Lobby Music: [(sound & SOUND_LOBBY) ? "Yes" : "No"]
    " - dat += "Randomized Character Slot: [toggles2 & PREFTOGGLE_2_RANDOMSLOT ? "Yes" : "No"]
    " - dat += "View Range: [viewrange]
    " - dat += "Window Flashing: [(toggles2 & PREFTOGGLE_2_WINDOWFLASHING) ? "Yes" : "No"]
    " - dat += "Modsuit Activation Method: [(toggles2 & PREFTOGGLE_2_MOD_ACTIVATION_METHOD) ? "Middle Click" : "Alt Click"]
    " + dat += "Parallax in darkness: [toggles2 & PREFTOGGLE_2_PARALLAX_IN_DARKNESS ? "Enabled" : "Disabled"]
    " + dat += "Play Admin MIDIs: [(sound & SOUND_MIDI) ? "Yes" : "No"]
    " + dat += "Play Lobby Music: [(sound & SOUND_LOBBY) ? "Yes" : "No"]
    " + dat += "Randomized Character Slot: [toggles2 & PREFTOGGLE_2_RANDOMSLOT ? "Yes" : "No"]
    " + dat += "View Range: [viewrange]
    " + dat += "Window Flashing: [(toggles2 & PREFTOGGLE_2_WINDOWFLASHING) ? "Yes" : "No"]
    " + dat += "Modsuit Activation Method: [(toggles2 & PREFTOGGLE_2_MOD_ACTIVATION_METHOD) ? "Middle Click" : "Alt Click"]
    " // RIGHT SIDE OF THE PAGE dat += "
    " dat += "

    Interface Settings

    " - dat += "Set screentip mode: [(screentip_mode == 0) ? "Disabled" : "[screentip_mode]px"]
    " - dat += "Screentip color:     Change
    " - dat += "Thought Bubble when pointing: [(toggles2 & PREFTOGGLE_2_THOUGHT_BUBBLE) ? "Yes" : "No"]
    " + dat += "Set screentip mode: [(screentip_mode == 0) ? "Disabled" : "[screentip_mode]px"]
    " + dat += "Screentip color:     Change
    " + dat += "Thought Bubble when pointing: [(toggles2 & PREFTOGGLE_2_THOUGHT_BUBBLE) ? "Yes" : "No"]
    " dat += "Custom UI settings:
    " - dat += " - Alpha (transparency): [UI_style_alpha]
    " - dat += " - Color: [UI_style_color]    
    " - dat += " - UI Style: [UI_style]
    " + dat += " - Alpha (transparency): [UI_style_alpha]
    " + dat += " - Color: [UI_style_color]    
    " + dat += " - UI Style: [UI_style]
    " dat += "TGUI settings:
    " - dat += " - Fancy TGUI: [(toggles2 & PREFTOGGLE_2_FANCYUI) ? "Yes" : "No"]
    " - dat += " - TGUI Input: [(toggles2 & PREFTOGGLE_2_DISABLE_TGUI_INPUT) ? "No" : "Yes"]
    " - dat += " - TGUI Input - Large Buttons: [(toggles2 & PREFTOGGLE_2_LARGE_INPUT_BUTTONS) ? "Yes" : "No"]
    " - dat += " - TGUI Input - Swap Buttons: [(toggles2 & PREFTOGGLE_2_SWAP_INPUT_BUTTONS) ? "Yes" : "No"]
    " - dat += " - TGUI Say Theme: [(toggles2 & PREFTOGGLE_2_ENABLE_TGUI_SAY_LIGHT_MODE) ? "Light" : "Dark"]
    " + dat += " - Fancy TGUI: [(toggles2 & PREFTOGGLE_2_FANCYUI) ? "Yes" : "No"]
    " + dat += " - TGUI Input: [(toggles2 & PREFTOGGLE_2_DISABLE_TGUI_INPUT) ? "No" : "Yes"]
    " + dat += " - TGUI Input - Large Buttons: [(toggles2 & PREFTOGGLE_2_LARGE_INPUT_BUTTONS) ? "Yes" : "No"]
    " + dat += " - TGUI Input - Swap Buttons: [(toggles2 & PREFTOGGLE_2_SWAP_INPUT_BUTTONS) ? "Yes" : "No"]
    " + dat += " - TGUI Say Theme: [(toggles2 & PREFTOGGLE_2_ENABLE_TGUI_SAY_LIGHT_MODE) ? "Light" : "Dark"]
    " dat += "
    " if(TAB_ANTAG) // Antagonist's Preferences @@ -483,7 +482,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts dat += "Be [capitalize(i)]: \[ERROR]
    " else var/is_special = (i in src.be_special) - dat += "Be [capitalize(i)]:[(is_special) ? "Yes" : "No"]
    " + dat += "Be [capitalize(i)]:[(is_special) ? "Yes" : "No"]
    " dat += "
    " if(TAB_GEAR) @@ -493,7 +492,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(total_cost < max_gear_slots) fcolor = "#E67300" dat += "" - dat += "" + dat += "" dat += "" var/datum/loadout_category/LC = GLOB.loadout_categories[gear_tab] @@ -518,7 +517,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(G.donator_tier > user.client.donator_level) dat += "" else - dat += "" + dat += "" dat += "" dat += "
    [total_cost]/[max_gear_slots] loadout points spent. \[Clear Loadout\]
    [total_cost]/[max_gear_slots] loadout points spent. \[Clear Loadout\]
    " var/firstcat = 1 @@ -505,7 +504,7 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(category == gear_tab) dat += " [category] " else - dat += " [category] " + dat += " [category] " dat += "
    [G.display_name]
    [G.display_name]
    [G.display_name][G.cost]" if(G.allowed_roles) dat += "Restrictions: " @@ -529,14 +528,14 @@ GLOBAL_LIST_INIT(special_role_times, list( //minimum age (in days) for accounts if(ticked) . += "
    " for(var/datum/gear_tweak/tweak in G.gear_tweaks) - . += " [tweak.get_contents(active_character.get_tweak_metadata(G, tweak))]" + . += " [tweak.get_contents(active_character.get_tweak_metadata(G, tweak))]" . += "
    " if(TAB_KEYS) dat += "
    All Key Bindings: " - dat += "Reset to Default " - dat += "Clear
    " + dat += "Reset to Default " + dat += "Clear
    " dat += "

    Please note, some keybinds are overridden by other categories.
    Ensure you bind all of them, or the specific one you want.
    [KB.name][keys_buttons][(length(keys) < 5) ? "+Reset to Default Clear[keys_buttons][(length(keys) < 5) ? "+Reset to Default Clear[custom_emote_keybind.default_emote_text]\"[active_character.real_name] [emote_text]\"Change TextReset to DefaultChange TextReset to Default


    DispenseDispenseOut of stockDispenseDispenseOut of stockDispenseDispenseOut of stock
    Tray EmptyProcess IngredientsProcess IngredientsInsufficient Ingredients
    EjectEjectN/AEject AllEject All
    " dat += "
    " diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 98416362cac7..2b5cbddde4a5 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -381,7 +381,7 @@ active = TRUE var/turf/bombturf = get_turf(src) var/area/bombarea = get_area(bombturf) - message_admins("[key_name(user)][ADMIN_QUE(user,"?")] has primed a [name] for detonation at [bombarea] (JMP).") + message_admins("[key_name(user)][ADMIN_QUE(user,"?")] has primed a [name] for detonation at [bombarea] (JMP).") log_game("[key_name(user)] has primed a [name] for detonation at [bombarea] ([bombturf.x],[bombturf.y],[bombturf.z]).") to_chat(user, "You light [src] on fire.") diff --git a/code/modules/food_and_drinks/food/foods/meat.dm b/code/modules/food_and_drinks/food/foods/meat.dm index 5cc637ba2d66..783cbdd7f418 100644 --- a/code/modules/food_and_drinks/food/foods/meat.dm +++ b/code/modules/food_and_drinks/food/foods/meat.dm @@ -124,7 +124,7 @@ icon_state = "bearmeat" filling_color = "#DB0000" bitesize = 3 - list_reagents = list("protein" = 12, "morphine" = 5, "vitamin" = 2) + list_reagents = list("protein" = 12, "morphine" = 3, "vitamin" = 2) tastes = list("meat" = 1, "salmon" = 1) /obj/item/food/snacks/monstermeat/xenomeat diff --git a/code/modules/food_and_drinks/food/foods/misc_food.dm b/code/modules/food_and_drinks/food/foods/misc_food.dm index d9189b03aa36..a65b1bcf3fa3 100644 --- a/code/modules/food_and_drinks/food/foods/misc_food.dm +++ b/code/modules/food_and_drinks/food/foods/misc_food.dm @@ -59,7 +59,7 @@ icon_state = "tofurkey" filling_color = "#FFFEE0" bitesize = 3 - list_reagents = list("nutriment" = 12, "ether" = 3) + list_reagents = list("nutriment" = 12) tastes = list("tofu" = 1) goal_difficulty = FOOD_GOAL_NORMAL diff --git a/code/modules/food_and_drinks/food/foods/pizza.dm b/code/modules/food_and_drinks/food/foods/pizza.dm index 5be3ad588fd8..d2bda7925fbc 100644 --- a/code/modules/food_and_drinks/food/foods/pizza.dm +++ b/code/modules/food_and_drinks/food/foods/pizza.dm @@ -485,7 +485,7 @@ timer = new_timer SECONDS icon_state = "pizzabox1" to_chat(user, "You set the timer to [timer / 10] before activating the payload and closing [src].") - message_admins("[key_name_admin(usr)] has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") + message_admins("[key_name_admin(usr)] has set a timer on a pizza bomb to [timer/10] seconds at (JMP).") log_game("[key_name(usr)] has set the timer on a pizza bomb to [timer / 10] seconds ([loc.x],[loc.y],[loc.z]).") investigate_log("[key_name(usr)] has armed a [name] for detonation at ([loc.x],[loc.y],[loc.z])", INVESTIGATE_BOMB) add_attack_logs(user, src, "has armed for detonation", ATKLOG_FEW) @@ -502,7 +502,7 @@ if(HAS_TRAIT(src, TRAIT_CMAGGED)) atom_say("Pizza time!") playsound(src, 'sound/voice/pizza_time.ogg', 50, FALSE) ///Sound effect made by BlackDog - message_admins("[key_name_admin(usr)] has triggered a pizza bomb armed by [key_name_admin(armer)] at (JMP).") + message_admins("[key_name_admin(usr)] has triggered a pizza bomb armed by [key_name_admin(armer)] at (JMP).") log_game("[key_name(usr)] has triggered a pizza bomb armed by [key_name(armer)] ([loc.x],[loc.y],[loc.z]).") investigate_log("[key_name(usr)] has opened a [name] for detonation at ([loc.x],[loc.y],[loc.z])", INVESTIGATE_BOMB) add_attack_logs(user, src, "has opened for detonation", ATKLOG_FEW) @@ -517,7 +517,7 @@ return atom_say("Enjoy the pizza!") visible_message("[src] violently explodes!") - message_admins("A pizza bomb set by [key_name_admin(armer)] and opened by [key_name_admin(opener)] has detonated at (JMP).") + message_admins("A pizza bomb set by [key_name_admin(armer)] and opened by [key_name_admin(opener)] has detonated at (JMP).") log_game("Pizza bomb set by [key_name(armer)] and opened by [key_name(opener)]) detonated at ([loc.x],[loc.y],[loc.z]).") explosion(loc, 1, 2, 4, flame_range = 2) //Identical to a minibomb armer = null diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index d4e386b18da3..8ad20838c4e3 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -219,7 +219,7 @@ /obj/machinery/gibber/proc/startgibbing(mob/user, UserOverride=0) if(!istype(user) && !UserOverride) - log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (JMP)") + log_debug("Some shit just went down with the gibber at X[x], Y[y], Z[z] with an invalid user. (JMP)") return if(UserOverride) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 437e0658e614..54adeea94e9f 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -191,15 +191,15 @@ if(reagents.total_volume <= 500) dat += "
    " dat += "Add fillings:
    " - dat += "Soda
    " - dat += "Alcohol
    " + dat += "Soda
    " + dat += "Alcohol
    " dat += "Finish With:
    " - dat += "Cream
    " - dat += "Vanilla
    " + dat += "Cream
    " + dat += "Vanilla
    " dat += "Dispense in:
    " - dat += "Chocolate Cone
    " - dat += "Cone
    " - dat += "Waffle Cone
    " + dat += "Chocolate Cone
    " + dat += "Cone
    " + dat += "Waffle Cone
    " dat += "" return dat @@ -213,20 +213,20 @@ dat += "The container has:
    " for(var/datum/reagent/G in R.reagent_list) dat += "[G.volume] unit(s) of [G.name] | " - dat += "(5) " - dat += "(10) " - dat += "(15) " - dat += "(All)" + dat += "(5) " + dat += "(10) " + dat += "(15) " + dat += "(All)" dat += "
    " else if(container == 2) dat += "
    The Cream-Master has:
    " if(reagents.total_volume) for(var/datum/reagent/N in reagents.reagent_list) dat += "[N.volume] unit(s) of [N.name] | " - dat += "(5) " - dat += "(10) " - dat += "(15) " - dat += "(All)" + dat += "(5) " + dat += "(10) " + dat += "(15) " + dat += "(All)" dat += "
    " else dat += "
    SOMEONE ENTERED AN INVALID REAGENT CONTAINER; QUICK, BUG REPORT!
    " @@ -241,11 +241,11 @@ dat += "No container is loaded into the machine, external transfer offline.
    " dat += show_reagents(2) dat += show_toppings() - dat += "Close" + dat += "Close" else var/obj/item/reagent_containers/glass/A = beaker var/datum/reagents/R = A.reagents - dat += "Eject container and end transfer.
    " + dat += "Eject container and end transfer.
    " if(!R.total_volume) dat += "Container is empty.

    " else diff --git a/code/modules/food_and_drinks/recipes/recipes_grill.dm b/code/modules/food_and_drinks/recipes/recipes_grill.dm index a126d5964d2f..e0a1569f330e 100644 --- a/code/modules/food_and_drinks/recipes/recipes_grill.dm +++ b/code/modules/food_and_drinks/recipes/recipes_grill.dm @@ -92,6 +92,7 @@ /datum/recipe/grill/fishfingers/make_food(obj/container) var/obj/item/food/snacks/fishfingers/being_cooked = ..() being_cooked.reagents.del_reagent("egg") + being_cooked.reagents.del_reagent("carpotoxin") return being_cooked /datum/recipe/grill/cutlet @@ -159,6 +160,11 @@ ) result = /obj/item/food/snacks/picoss_kabob +/datum/recipe/grill/picoss_kabob/make_food(obj/container) + var/obj/item/food/snacks/picoss_kabob/being_cooked = ..() + being_cooked.reagents.del_reagent("carpotoxin") + return being_cooked + /datum/recipe/grill/sushi_Tamago reagents = list("sake" = 5) items = list( diff --git a/code/modules/food_and_drinks/recipes/recipes_microwave.dm b/code/modules/food_and_drinks/recipes/recipes_microwave.dm index d7001eecb0e8..ccbb8df2ea31 100644 --- a/code/modules/food_and_drinks/recipes/recipes_microwave.dm +++ b/code/modules/food_and_drinks/recipes/recipes_microwave.dm @@ -126,6 +126,11 @@ ) result = /obj/item/food/snacks/fishburger +/datum/recipe/microwave/fishburger/make_food(obj/container) + var/obj/item/food/snacks/fishburger/being_cooked = ..() + being_cooked.reagents.del_reagent("carpotoxin") + return being_cooked + /datum/recipe/microwave/tofuburger items = list( /obj/item/food/snacks/bun, @@ -300,6 +305,11 @@ ) result = /obj/item/food/snacks/cubancarp +/datum/recipe/microwave/cubancarp/make_food(obj/container) + var/obj/item/food/snacks/cubancarp/being_cooked = ..() + being_cooked.reagents.del_reagent("carpotoxin") + return being_cooked + /datum/recipe/microwave/popcorn items = list( /obj/item/food/snacks/grown/corn @@ -425,6 +435,11 @@ ) result = /obj/item/food/snacks/fishandchips +/datum/recipe/microwave/fishandchips/make_food(obj/container) + var/obj/item/food/snacks/fishandchips/being_cooked = ..() + being_cooked.reagents.del_reagent("carpotoxin") + return being_cooked + /datum/recipe/microwave/sandwich items = list( /obj/item/food/snacks/meatsteak, @@ -1396,6 +1411,11 @@ ) result = /obj/item/food/snacks/boiledspiderleg +/datum/recipe/microwave/boiledspiderleg/make_food(obj/container) + var/obj/item/food/snacks/boiledspiderleg/being_cooked = ..() + being_cooked.reagents.del_reagent("toxin") + return being_cooked + /datum/recipe/microwave/spidereggsham reagents = list("sodiumchloride" = 1) items = list( @@ -1404,6 +1424,11 @@ ) result = /obj/item/food/snacks/spidereggsham +/datum/recipe/microwave/spidereggsham/make_food(obj/container) + var/obj/item/food/snacks/spidereggsham/being_cooked = ..() + being_cooked.reagents.del_reagent("toxin") + return being_cooked + /datum/recipe/microwave/sashimi reagents = list("soysauce" = 5) items = list( @@ -1412,6 +1437,12 @@ ) result = /obj/item/food/snacks/sashimi +/datum/recipe/microwave/sashimi/make_food(obj/container) + var/obj/item/food/snacks/sashimi/being_cooked = ..() + being_cooked.reagents.del_reagent("carpotoxin") + being_cooked.reagents.del_reagent("toxin") + return being_cooked + /datum/recipe/microwave/mashedtaters reagents = list("gravy" = 5) items = list( diff --git a/code/modules/games/cards.dm b/code/modules/games/cards.dm index ad5e29ab1602..59c2ad084bbf 100644 --- a/code/modules/games/cards.dm +++ b/code/modules/games/cards.dm @@ -50,10 +50,16 @@ /obj/item/deck/Initialize(mapload) . = ..() + build_decks() + update_icon(UPDATE_ICON_STATE) + +/obj/item/deck/proc/build_decks() + if(length(cards)) + // prevent building decks more than once + return for(var/deck in 1 to deck_size) build_deck() deck_total = length(cards) - update_icon(UPDATE_ICON_STATE) /obj/item/deck/proc/build_deck() return @@ -227,8 +233,10 @@ var/mob/living/user = usr if(cooldown < world.time - 1 SECONDS) cards = shuffle(cards) - user.visible_message("[user] shuffles [src].") - playsound(user, 'sound/items/cardshuffle.ogg', 50, 1) + + if(user) + user.visible_message("[user] shuffles [src].") + playsound(user, 'sound/items/cardshuffle.ogg', 50, TRUE) cooldown = world.time @@ -349,9 +357,9 @@ /obj/item/cardhand/interact(mob/user) var/dat = "You have:
    " for(var/t in cards) - dat += "The [t]
    " + dat += "The [t]
    " dat += "Which card will you remove next?
    " - dat += "Turn the hand over" + dat += "Turn the hand over" var/datum/browser/popup = new(user, "cardhand", "Hand of Cards", 400, 240) popup.set_content(dat) popup.open() diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 24a936cbb3c1..ef4e15963d4a 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -29,6 +29,13 @@ var/list/product_list = list() /// The [/datum/design]'s categories which can be produced by this machine and can be uploaded via a disk. var/static/list/categories = list("Food", "Botany Chemicals", "Organic Materials", "Leather and Cloth") + var/static/list/acceptable_items = typecacheof(list( + /obj/item/seeds, + /obj/item/unsorted_seeds, + /obj/item/food/snacks/grown, + /obj/item/grown, + /obj/item/food/snacks/grown/ash_flora, + /obj/item/food/snacks/honeycomb)) /obj/machinery/biogenerator/Initialize(mapload) . = ..() @@ -127,11 +134,12 @@ return var/obj/item/storage/bag/plants/PB = O - for(var/obj/item/food/snacks/grown/G in PB.contents) + for(var/obj/item/P in PB.contents) + // No need to filter here, because plant bags should have the same list of acceptable items we do. if(length(stored_plants) >= max_storable_plants) break - PB.remove_from_storage(G, src) - stored_plants += G + PB.remove_from_storage(P, src) + stored_plants += P if(length(stored_plants) < max_storable_plants) to_chat(user, "You empty [PB] into [src].") @@ -141,7 +149,7 @@ SStgui.update_uis(src) return TRUE - else if(istype(O, /obj/item/food/snacks/grown)) + else if(is_type_in_typecache(O, acceptable_items)) if(length(stored_plants) >= max_storable_plants) to_chat(user, "[src] can't hold any more plants!") return @@ -266,15 +274,17 @@ update_icon(UPDATE_ICON_STATE) var/plants_processed = length(stored_plants) + var/new_biomass = 0 for(var/obj/plant as anything in stored_plants) - var/plant_biomass = plant.reagents.get_reagent_amount("nutriment") + plant.reagents.get_reagent_amount("plantmatter") - biomass += max(plant_biomass, 0.1) * 10 * productivity + var/plant_biomass = plant.reagents?.get_reagent_amount("nutriment") + plant.reagents?.get_reagent_amount("plantmatter") + new_biomass += max(plant_biomass, 0.1) qdel(plant) + biomass += new_biomass * 10 * productivity stored_plants.Cut() - playsound(loc, 'sound/machines/blender.ogg', 50, 1) + playsound(loc, 'sound/machines/blender.ogg', 50, TRUE) use_power(plants_processed * 150) - addtimer(CALLBACK(src, PROC_REF(end_processing)), (plants_processed * 5) / productivity) + addtimer(CALLBACK(src, PROC_REF(end_processing)), min(20 SECONDS, new_biomass)) /obj/machinery/biogenerator/proc/end_processing() processing = FALSE @@ -340,7 +350,7 @@ for(var/R in D.make_reagents) container.reagents.add_reagent(R, D.make_reagents[R] * amount) - // Creating all other items, such as monkey cubes or nutriment bottles. + // Creating all other items, such as monkey cubes or nutrient bottles. else if(!check_cost(D, amount)) return diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 7d10426d9ed5..2965904de884 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -21,6 +21,7 @@ var/max_endurance = 10 // IMPT: ALSO AFFECTS LIFESPAN var/min_weed_chance = 67 var/min_weed_rate = 10 + var/seeds_for_bulk_core = 5 /obj/machinery/plantgenes/Initialize(mapload) . = ..() @@ -73,14 +74,32 @@ min_weed_rate = FLOOR(10-weed_rate_mod, 1) // 7,5,2,0 Clamps at 0 and 10 You want this low min_weed_chance = 67-(ML.rating*16) // 48,35,19,3 Clamps at 0 and 67 You want this low + var/total_rating = 0 + for(var/obj/item/stock_parts/S in component_parts) + total_rating += S.rating + + switch(clamp(total_rating, 1, 12)) + if(1 to 3) + seeds_for_bulk_core = 5 + if(4 to 6) + seeds_for_bulk_core = 4 + if(7 to 9) + seeds_for_bulk_core = 3 + if(10 to 11) + seeds_for_bulk_core = 2 + else + seeds_for_bulk_core = 1 + for(var/obj/item/circuitboard/plantgenes/vaultcheck in component_parts) if(istype(vaultcheck, /obj/item/circuitboard/plantgenes/vault)) // TRAIT_DUMB BOTANY TUTS + total_rating = 12 max_potency = 100 max_yield = 10 min_production = 1 max_endurance = 100 min_weed_chance = 0 min_weed_rate = 0 + seeds_for_bulk_core = 1 /obj/machinery/plantgenes/update_icon_state() if((stat & (BROKEN|NOPOWER))) @@ -108,6 +127,9 @@ if(istype(I, /obj/item/seeds)) add_seed(I, user) + else if(istype(I, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [I] first!") + return ..() else if(istype(I, /obj/item/disk/plantgene)) add_disk(I, user) else @@ -167,8 +189,12 @@ data["seed"] = list() if(seed) + var/icon/base64icon = GLOB.seeds_cached_base64_icons["[initial(seed.icon)][initial(seed.icon_state)]"] + if(!base64icon) + base64icon = icon2base64(icon(initial(seed.icon), initial(seed.icon_state), SOUTH, 1)) + GLOB.seeds_cached_base64_icons["[initial(seed.icon)][initial(seed.icon_state)]"] = base64icon data["seed"] = list( - "image" = "[icon2base64(icon(initial(seed.icon), initial(seed.icon_state), SOUTH, 1))]", + "image" = "[base64icon]", "name" = seed.name, "variant" = seed.variant ) @@ -201,9 +227,7 @@ data["disk"] = list() if(disk) - var/disk_name = "Empty Disk" - if(disk.gene) - disk_name = disk.gene.get_name() + var/disk_name = disk.ui_name if(disk.read_only) disk_name = "[disk_name] (Read Only)" var/can_insert = FALSE @@ -213,7 +237,8 @@ "name" = disk_name, "can_insert" = can_insert, "can_extract" = !disk.read_only, - "is_core" = istype(disk?.gene, /datum/plant_gene/core) + "is_core" = istype(disk?.gene, /datum/plant_gene/core), + "is_bulk_core" = disk?.is_bulk_core && (disk.seeds_needed <= disk.seeds_scanned) ) data["modal"] = ui_modal_data(src) @@ -262,12 +287,22 @@ seed.variant_prompt(user, src) // uses the default byond prompt, but it works + if("bulk_extract_core") + var/dat = "Are you sure you want to extract all core genes from the [seed]? The sample will be destroyed in the process!" + var/prev_seeds = 0 + if(disk.is_bulk_core && disk.core_matches(seed)) + prev_seeds = disk.seeds_scanned + if(seeds_for_bulk_core > prev_seeds + 1) + var/remaining = seeds_for_bulk_core - prev_seeds - 1 + dat += " This device needs [seeds_for_bulk_core] samples to produce a usable core gene disk. You will need [remaining] more sample[ remaining > 1 ? "s" : ""] with identical core genes." + + ui_modal_boolean(src, action, dat, yes_text = "Extract", no_text = "Cancel", delegate = PROC_REF(bulk_extract_core)) + if("extract") var/dat = "Are you sure you want to extract [target.get_name()] gene from the [seed]? The sample will be destroyed in process!" if(istype(target, /datum/plant_gene/core)) var/datum/plant_gene/core/core_gene = target var/genemod_var = core_gene.get_genemod_variable(src) // polymorphism my beloved - if((core_gene.use_max && core_gene.value < genemod_var) || (!core_gene.use_max && core_gene.value > genemod_var)) var/gene_name = lowertext(core_gene.name) dat += " This device's extraction capabilities are currently limited to [genemod_var] [gene_name]. \ @@ -275,6 +310,9 @@ ui_modal_boolean(src, action, dat, yes_text = "Extract", no_text = "Cancel", delegate = PROC_REF(gene_extract)) + if("bulk_replace_core") + ui_modal_boolean(src, action, "Are you sure you want to replace ALL core genes of the [seed]?" , yes_text = "Replace", no_text = "Cancel", delegate = PROC_REF(bulk_replace_core)) + if("replace") ui_modal_boolean(src, action, "Are you sure you want to replace [target.get_name()] gene with [disk.gene.get_name()]?", yes_text = "Replace", no_text = "Cancel", delegate = PROC_REF(gene_replace)) @@ -282,7 +320,7 @@ ui_modal_boolean(src, action, "Are you sure you want to remove [target.get_name()] gene from the [seed]" , yes_text = "Remove", no_text = "Cancel", delegate = PROC_REF(gene_remove)) if("insert") - if(!istype(disk.gene, /datum/plant_gene/core) && disk.gene.can_add(seed)) + if(!istype(disk.gene, /datum/plant_gene/core) && !disk.is_bulk_core && disk.gene.can_add(seed)) seed.genes += disk.gene.Copy() if(istype(disk.gene, /datum/plant_gene/reagent)) seed.reagents_from_genes() @@ -304,6 +342,7 @@ /obj/machinery/plantgenes/proc/gene_extract() if(!disk || disk.read_only) return + disk.is_bulk_core = FALSE disk.gene = target.Copy() if(istype(disk.gene, /datum/plant_gene/core)) var/datum/plant_gene/core/core_gene = disk.gene @@ -320,7 +359,7 @@ target = null /obj/machinery/plantgenes/proc/gene_replace() - if(!disk?.gene) + if(!disk?.gene || disk.is_bulk_core) return if(!istype(target, /datum/plant_gene/core)) return @@ -334,6 +373,43 @@ update_genes() target = null +/obj/machinery/plantgenes/proc/bulk_extract_core() + if(!disk || disk.read_only) + return + disk.seeds_needed = seeds_for_bulk_core + if(disk.core_matches(seed)) + disk.seeds_scanned += 1 + else + disk.seeds_scanned = 1 + disk.is_bulk_core = TRUE + disk.gene = null + disk.core_genes = list() + for(var/datum/plant_gene/core/gene in core_genes) + var/datum/plant_gene/core/C = gene.Copy() + disk.core_genes += C + + disk.update_name() + QDEL_NULL(seed) + update_icon(UPDATE_OVERLAYS) + update_genes() + target = null + +/obj/machinery/plantgenes/proc/bulk_replace_core() + if(!disk?.is_bulk_core) + return + if(disk.seeds_scanned < disk.seeds_needed) + return + for(var/datum/plant_gene/gene in seed.genes) + if(istype(gene, /datum/plant_gene/core)) + seed.genes -= gene + for(var/datum/plant_gene/core/gene in disk.core_genes) + var/datum/plant_gene/core/C = gene.Copy() + seed.genes += C + C.apply_stat(seed) + repaint_seed() + update_genes() + target = null + /obj/machinery/plantgenes/proc/insert_seed(obj/item/seeds/S) if(!istype(S) || seed) return @@ -382,9 +458,18 @@ desc = "A disk for storing plant genetic data." icon_state = "datadisk_hydro" materials = list(MAT_METAL=30, MAT_GLASS=10) - var/datum/plant_gene/gene + var/ui_name = "Empty Disk" + var/is_bulk_core = FALSE var/read_only = 0 //Well, it's still a floppy disk + // For single genes + var/datum/plant_gene/gene + + // For bulk core genes + var/list/core_genes = list() + var/seeds_scanned = 0 + var/seeds_needed = 5 + /obj/item/disk/plantgene/New() ..() update_icon(UPDATE_OVERLAYS) @@ -402,11 +487,41 @@ . = ..() if(HAS_TRAIT(src, TRAIT_CMAGGED)) name = "nuclear authentication disk" + ui_name = "nuclear authentication disk?" return - if(gene) - name = "[gene.get_name()] (Plant Data Disk)" + if(!is_bulk_core && gene) + name = "[gene.get_name()] (plant data disk)" + ui_name = "[gene.get_name()]" + else if(is_bulk_core) + name = "" + if(seeds_scanned < seeds_needed) + name += "[round(seeds_scanned/seeds_needed*100,1)]% of " + name += "Core gene set " + ui_name = "Core " + for(var/i in 1 to length(core_genes)) + if(i > 1) + name += "/" + ui_name += "/" + var/datum/plant_gene/core/core_gene = core_genes[i] + name += "[core_gene.value]" + ui_name += "[core_gene.value]" + + name += " (plant data disk)" + + if(seeds_scanned < seeds_needed) + ui_name += " ([round(seeds_scanned / seeds_needed * 100, 1)]%)" else name = "plant data disk" + ui_name = "Empty Disk" + +/obj/item/disk/plantgene/proc/core_matches(obj/item/seeds/seed) + if(!is_bulk_core) + return FALSE + for(var/datum/plant_gene/core/gene in core_genes) + var/datum/plant_gene/core/seed_gene = seed.get_gene(gene.type) + if(gene.value != seed_gene.value) + return FALSE + return TRUE /obj/item/disk/plantgene/update_desc() . = ..() diff --git a/code/modules/hydroponics/grown.dm b/code/modules/hydroponics/grown.dm index eb3b7576058e..ffa0bb3e4c06 100644 --- a/code/modules/hydroponics/grown.dm +++ b/code/modules/hydroponics/grown.dm @@ -6,7 +6,10 @@ // Base type. Subtypes are found in /grown dir. /obj/item/food/snacks/grown icon = 'icons/obj/hydroponics/harvest.dmi' - var/obj/item/seeds/seed = null // type path, gets converted to item on New(). It's safe to assume it's always a seed item. + /// The seed of this plant. Starts as a type path, gets converted to an item on New() + var/obj/item/seeds/seed = null + /// The unsorted seed of this plant, if any. Used by the seed extractor. + var/obj/item/unsorted_seeds/unsorted_seed = null var/plantname = "" var/bitesize_mod = 0 // If set, bitesize = 1 + round(reagents.total_volume / bitesize_mod) var/splat_type = /obj/effect/decal/cleanable/plant_smudge @@ -18,17 +21,20 @@ resistance_flags = FLAMMABLE origin_tech = "biotech=1" -/obj/item/food/snacks/grown/Initialize(mapload, obj/item/seeds/new_seed = null) +/obj/item/food/snacks/grown/Initialize(mapload, obj/new_seed = null) . = ..() if(!tastes) tastes = list("[name]" = 1) - if(new_seed) - seed = new_seed.Copy() - else if(ispath(seed)) - // This is for adminspawn or map-placed growns. They get the default stats of their seed type. - seed = new seed() - seed.adjust_potency(50-seed.potency) + if(istype(new_seed, /obj/item/seeds)) + var/obj/item/seeds/S = new_seed + seed = S.Copy() + else if(istype(new_seed, /obj/item/unsorted_seeds)) + var/obj/item/unsorted_seeds/S = new_seed + unsorted_seed = S.Copy() + seed = S.seed_data.original_seed.Copy() + else if(seed) + seed = new seed pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) @@ -92,19 +98,7 @@ return ..() if(istype(O, /obj/item/plant_analyzer)) - var/msg = "This is \a [src].\n" - if(seed) - msg += seed.get_analyzer_text() - var/reag_txt = "" - if(seed) - for(var/reagent_id in seed.reagents_add) - var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id] - var/amt = reagents.get_reagent_amount(reagent_id) - reag_txt += "\n- [R.name]: [amt]" - - if(reag_txt) - msg += reag_txt - to_chat(user, msg) + send_plant_details(user) else if(seed) for(var/datum/plant_gene/trait/T in seed.genes) @@ -217,3 +211,24 @@ if(seed.get_gene(/datum/plant_gene/trait/glow/shadow)) return set_light(0) + +/obj/item/food/snacks/grown/proc/send_plant_details(mob/user) + var/msg = "This is \a [src].\n" + if(seed) + msg += seed.get_analyzer_text() + var/reag_txt = "" + if(seed) + for(var/reagent_id in seed.reagents_add) + var/datum/reagent/R = GLOB.chemical_reagents_list[reagent_id] + var/amt = reagents.get_reagent_amount(reagent_id) + reag_txt += "\n- [R.name]: [amt]" + + if(reag_txt) + msg += reag_txt + to_chat(user, msg) + +/obj/item/food/snacks/grown/attack_ghost(mob/dead/observer/user) + if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the toggle plant analyzer var. + return + if(user.plant_analyzer) + send_plant_details(user) diff --git a/code/modules/hydroponics/grown/cereals.dm b/code/modules/hydroponics/grown/cereals.dm index 3ed266947518..e5342e999858 100644 --- a/code/modules/hydroponics/grown/cereals.dm +++ b/code/modules/hydroponics/grown/cereals.dm @@ -8,7 +8,7 @@ product = /obj/item/food/snacks/grown/wheat production = 1 yield = 4 - potency = 15 + potency = 30 icon_dead = "wheat-dead" mutatelist = list(/obj/item/seeds/wheat/oat, /obj/item/seeds/wheat/meat) reagents_add = list("plantmatter" = 0.04) diff --git a/code/modules/hydroponics/grown/kudzu.dm b/code/modules/hydroponics/grown/kudzu.dm index 1f08ff6b3473..415e06f5dc99 100644 --- a/code/modules/hydroponics/grown/kudzu.dm +++ b/code/modules/hydroponics/grown/kudzu.dm @@ -30,7 +30,7 @@ if(isspaceturf(user.loc)) return var/turf/T = get_turf(src) - message_admins("Kudzu planted by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) at ([T.x],[T.y],[T.z] - (JMP))",0,1) + message_admins("Kudzu planted by [key_name_admin(user)]([ADMIN_QUE(user,"?")]) ([ADMIN_FLW(user,"FLW")]) at ([T.x],[T.y],[T.z] - (JMP))",0,1) investigate_log("was planted by [key_name(user)] at ([T.x],[T.y],[T.z])","kudzu") new /obj/structure/spacevine_controller(user.loc, mutations, potency, production) user.drop_item() diff --git a/code/modules/hydroponics/grown/misc_seeds.dm b/code/modules/hydroponics/grown/misc_seeds.dm index fc7c90e4fc92..459a81d3a2e5 100644 --- a/code/modules/hydroponics/grown/misc_seeds.dm +++ b/code/modules/hydroponics/grown/misc_seeds.dm @@ -17,15 +17,13 @@ /obj/item/seeds/starthistle/harvest(mob/user) var/obj/machinery/hydroponics/parent = loc - var/seed_count = yield - if(prob(getYield() * 20)) - seed_count++ - var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc - for(var/i in 1 to seed_count) - var/obj/item/seeds/starthistle/harvestseeds = Copy() - harvestseeds.forceMove(output_loc) + var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc + var/seed_count = getYield() + for(var/i in 1 to seed_count) + var/obj/item/seeds/starthistle/harvestseeds = Copy() + harvestseeds.forceMove(output_loc) - parent.update_tray() + parent.update_tray(user, seed_count) // Lettuce /obj/item/seeds/lettuce @@ -196,7 +194,7 @@ /obj/item/food/snacks/grown/cherry_bomb/attack_self(mob/living/user) var/area/A = get_area(user) user.visible_message("[user] plucks the stem from [src]!", "You pluck the stem from [src], which begins to hiss loudly!") - message_admins("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x], [user.y], [user.z]) (JMP)") + message_admins("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x], [user.y], [user.z]) (JMP)") log_game("[user] ([user.key ? user.key : "no key"]) primed a cherry bomb for detonation at [A] ([user.x],[user.y],[user.z]).") if(iscarbon(user)) var/mob/living/carbon/C = user diff --git a/code/modules/hydroponics/grown/replicapod.dm b/code/modules/hydroponics/grown/replicapod.dm index c1e4a337c1dc..68a5da7883c4 100644 --- a/code/modules/hydroponics/grown/replicapod.dm +++ b/code/modules/hydroponics/grown/replicapod.dm @@ -103,4 +103,4 @@ var/obj/item/seeds/replicapod/harvestseeds = src.Copy() harvestseeds.forceMove(output_loc) - parent.update_tray() + parent.update_tray(user, 1) diff --git a/code/modules/hydroponics/growninedible.dm b/code/modules/hydroponics/growninedible.dm index 820cf7420c88..28ba82a3be78 100644 --- a/code/modules/hydroponics/growninedible.dm +++ b/code/modules/hydroponics/growninedible.dm @@ -7,18 +7,24 @@ name = "grown_weapon" icon = 'icons/obj/hydroponics/harvest.dmi' resistance_flags = FLAMMABLE - var/obj/item/seeds/seed // type path, gets converted to item on New(). It's safe to assume it's always a seed item. + /// The seed of this plant. Starts as a type path, gets converted to an item on New() + var/obj/item/seeds/seed = null + /// The unsorted seed of this plant, if any. Used by the seed extractor. + var/obj/item/unsorted_seeds/unsorted_seed = null /obj/item/grown/Initialize(mapload, obj/item/seeds/new_seed) . = ..() create_reagents(50) - if(new_seed) - seed = new_seed.Copy() - else if(ispath(seed)) - // This is for adminspawn or map-placed growns. They get the default stats of their seed type. - seed = new seed() - seed.adjust_potency(50-seed.potency) + if(istype(new_seed, /obj/item/seeds)) + var/obj/item/seeds/S = new_seed + seed = S.Copy() + else if(istype(new_seed, /obj/item/unsorted_seeds)) + var/obj/item/unsorted_seeds/S = new_seed + unsorted_seed = S.Copy() + seed = S.seed_data.original_seed.Copy() + else if(seed) + seed = new seed pixel_x = rand(-5, 5) pixel_y = rand(-5, 5) @@ -39,12 +45,7 @@ /obj/item/grown/attackby(obj/item/O, mob/user, params) ..() if(istype(O, /obj/item/plant_analyzer)) - var/msg = "This is \a [src]\n" - if(seed) - msg += seed.get_analyzer_text() - msg += "" - to_chat(usr, msg) - return + send_plant_details(user) /obj/item/grown/proc/add_juice() if(reagents) @@ -69,3 +70,17 @@ if(seed.get_gene(/datum/plant_gene/trait/glow/shadow)) return set_light(0) + +/obj/item/grown/proc/send_plant_details(mob/user) + var/msg = "This is \a [src]\n" + if(seed) + msg += seed.get_analyzer_text() + msg += "" + to_chat(usr, msg) + return + +/obj/item/grown/attack_ghost(mob/dead/observer/user) + if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the toggle plant analyzer var. + return + if(user.plant_analyzer) + send_plant_details(user) diff --git a/code/modules/hydroponics/hydroitemdefines.dm b/code/modules/hydroponics/hydroitemdefines.dm index bdd766b0d2fd..5b7a1977e654 100644 --- a/code/modules/hydroponics/hydroitemdefines.dm +++ b/code/modules/hydroponics/hydroitemdefines.dm @@ -1,7 +1,7 @@ // Plant analyzer /obj/item/plant_analyzer name = "plant analyzer" - desc = "A scanner used to evaluate a plant's various areas of growth." + desc = "A versatile scanner for analyzing plants, plant produce, and seeds. Can be used on a bag holding unsorted seeds to quickly and thorougly sort them into usable packs." icon = 'icons/obj/device.dmi' icon_state = "hydro" item_state = "analyzer" @@ -10,6 +10,24 @@ origin_tech = "magnets=2;biotech=2" materials = list(MAT_METAL = 210, MAT_GLASS = 40) +/obj/item/plant_analyzer/pre_attack(atom/target, mob/user, params) + if(!istype(target, /obj/item)) + return ..() + + var/found_unsorted_seeds = FALSE + var/depth = 0 + for(var/obj/item/unsorted_seeds/unsorted in target) + found_unsorted_seeds = TRUE + if(!use_tool(target, user, 0.5 SECONDS)) + break + depth++ + unsorted.sort(depth) + + if(found_unsorted_seeds) + return FALSE + return ..() + + // ************************************* // Hydroponics Tools // ************************************* @@ -288,24 +306,30 @@ /obj/item/reagent_containers/glass/bottle/nutrient/ez name = "jug of E-Z-Nutrient" - desc = "Contains a fertilizer that causes mild mutations with each harvest." + desc = "Contains a basic fertilizer with no special traits." icon = 'icons/obj/chemical.dmi' icon_state = "plastic_jug_ez" - list_reagents = list("eznutriment" = 80) + list_reagents = list("eznutrient" = 80) + +/obj/item/reagent_containers/glass/bottle/nutrient/mut + name = "jug of Mutrient" + desc = "Contains a fertilizer that causes mild mutations with each harvest." + icon_state = "plastic_jug_mut" + list_reagents = list("mutrient" = 80) /obj/item/reagent_containers/glass/bottle/nutrient/l4z name = "jug of Left 4 Zed" desc = "Contains a fertilizer that limits plant yields to no more than one and causes significant mutations in plants." icon = 'icons/obj/chemical.dmi' icon_state = "plastic_jug_l4z" - list_reagents = list("left4zednutriment" = 80) + list_reagents = list("left4zednutrient" = 80) /obj/item/reagent_containers/glass/bottle/nutrient/rh name = "jug of Robust Harvest" desc = "Contains a fertilizer that increases the yield of a plant by 30% while causing no mutations." icon = 'icons/obj/chemical.dmi' icon_state = "plastic_jug_rh" - list_reagents = list("robustharvestnutriment" = 80) + list_reagents = list("robustharvestnutrient" = 80) /obj/item/reagent_containers/glass/bottle/nutrient/empty icon = 'icons/obj/chemical.dmi' diff --git a/code/modules/hydroponics/hydroponics_tray.dm b/code/modules/hydroponics/hydroponics_tray.dm index e0c32d738088..c6ef764b2dcc 100644 --- a/code/modules/hydroponics/hydroponics_tray.dm +++ b/code/modules/hydroponics/hydroponics_tray.dm @@ -5,33 +5,75 @@ density = TRUE anchored = TRUE pixel_y = 8 - var/waterlevel = 100 //The amount of water in the tray (max 100) - var/maxwater = 100 //The maximum amount of water in the tray - var/nutrilevel = 10 //The amount of nutrient in the tray (max 10) - var/maxnutri = 10 //The maximum nutrient of water in the tray - var/pestlevel = 0 //The amount of pests in the tray (max 10) - var/weedlevel = 0 //The amount of weeds in the tray (max 10) - var/yieldmod = 1 //Nutriment's effect on yield - var/mutmod = 1 //Nutriment's effect on mutations - var/toxic = 0 //Toxicity in the tray? - var/age = 0 //Current age - var/dead = FALSE //Is it dead? - var/plant_health //Its health - var/lastproduce = 0 //Last time it was harvested - var/lastcycle = 0 //Used for timing of cycles. - var/cycledelay = 200 //About 10 seconds / cycle - var/harvest = FALSE //Ready to harvest? - var/obj/item/seeds/myseed = null //The currently planted seed + /// The amount of water in the tray (max 100) + var/waterlevel = 100 + /// The maximum amount of water in the tray + var/maxwater = 100 + /// The amount of nutrient in the tray (max 10) + var/nutrilevel = 10 + /// The maximum nutrient of water in the tray + var/maxnutri = 10 + /// The amount of pests in the tray (max 10) + var/pestlevel = 0 + /// The amount of weeds in the tray (max 10) + var/weedlevel = 0 + /// Nutrient in use + var/datum/reagent/plantnutrient/nutrient = /datum/reagent/plantnutrient/eznutrient + /// Nutrient's effect on yield + var/yieldmod = 1 + /// The amount of mutagens (UM or radioactives) in the tray. + var/mutagen = 0 + /// The maximum amount of mutagen in the tray. + var/max_mutagen = 15 + /// Has the tray been hit by a mutation beam this harvest? + var/mut_beamed = FALSE + /// Has the tray been hit by a yield-increasing beam this harvest? + var/yield_beamed = FALSE + /// The typepath of the chemical (if any) the tray has been doped with to bias its mutations. + var/datum/reagent/doping_chem = null + /// Toxicity in the tray + var/toxic = 0 + /// Current age + var/age = 0 + /// Is it dead? + var/dead = FALSE + /// Its health + var/plant_health + /// Last time it was harvested + var/lastproduce = 0 + /// Used for timing of cycles. + var/lastcycle = 0 + /// Amount of time per plant cycle + var/cycledelay = 20 SECONDS + /// Ready to harvest? + var/harvest = FALSE + /// The currently planted seed + var/obj/item/seeds/myseed = null var/rating = 1 var/wrenchable = TRUE var/lid_closed = FALSE - var/recent_bee_visit = FALSE //Have we been visited by a bee recently, so bees dont overpollinate one plant - var/using_irrigation = FALSE //If the tray is connected to other trays via irrigation hoses - var/self_sufficiency_req = 20 //Required total dose to make a self-sufficient hydro tray. 1:1 with earthsblood. + /// Have we been visited by a bee recently, so bees dont overpollinate one plant + var/recent_bee_visit = FALSE + /// If the tray is connected to other trays via irrigation hoses + var/using_irrigation = FALSE + /// Required total dose to make a self-sufficient hydro tray. 1:1 with earthsblood. + var/self_sufficiency_req = 20 var/self_sufficiency_progress = 0 - var/self_sustaining = FALSE //If the tray generates nutrients and water on its own + /// If the tray generates nutrients and water on its own + var/self_sustaining = FALSE hud_possible = list (PLANT_NUTRIENT_HUD, PLANT_WATER_HUD, PLANT_STATUS_HUD, PLANT_HEALTH_HUD, PLANT_TOXIN_HUD, PLANT_PEST_HUD, PLANT_WEED_HUD) + /// Maps doping chemicals to their affected stats. + var/static/doping_effects = list( + /datum/reagent/saltpetre = list("potency"), + /datum/reagent/ammonia = list("yield"), + /datum/reagent/diethylamine = list("production speed"), + /datum/reagent/medicine/cryoxadone = list("endurance"), + /datum/reagent/medicine/omnizine = list("lifespan"), + /datum/reagent/medicine/salglu_solution = list("weed rate", "weed count")) + /// What do we call the mutagen tank? + var/mutagen_tank_name = "Mutagen tank" + /obj/machinery/hydroponics/Initialize(mapload) . = ..() var/datum/atom_hud/data/hydroponic/hydro_hud = GLOB.huds[DATA_HUD_HYDROPONIC] @@ -128,9 +170,11 @@ if(!myseed) return ..() if(istype(Proj ,/obj/item/projectile/energy/floramut)) - mutate() + mut_beamed = TRUE + return ..() else if(istype(Proj ,/obj/item/projectile/energy/florayield)) - return myseed.bullet_act(Proj) + yield_beamed = TRUE + return ..() else return ..() @@ -141,6 +185,11 @@ myseed.forceMove(src) if(self_sustaining) + // Always use Earthsblood (which is really just EZ with a fake moustache) for self-sustaining trays. + // Want more mutations or increased yield? Take care of your trays. + yieldmod = 1 + nutrient = /datum/reagent/plantnutrient/eznutrient + adjustNutri(1) adjustWater(rand(3,5)) adjustWeeds(-2) @@ -178,6 +227,12 @@ if(lightAmt < 4) adjustHealth(-2 / rating) +//Weed overtaking//////////////////////////////////////////////////////// + if(weedlevel >= 10 && prob(50)) // At this point the plant is kind of fucked. Weeds can overtake the plant spot. + if(!myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !myseed.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) // If a normal plant + weedinvasion() + needs_update = 1 + //Water////////////////////////////////////////////////////////////////// // Drink random amount of water adjustWater(-rand(1,6) / rating) @@ -228,7 +283,6 @@ // Harvest code if(age > myseed.production && (age - lastproduce) >= myseed.production && (!harvest && !dead)) - nutrimentMutation() if(myseed && myseed.yield != -1) // Unharvestable shouldn't be harvested harvest = TRUE plant_hud_set_status() @@ -237,40 +291,15 @@ if(prob(5)) // On each tick, there's a 5 percent chance the pest population will increase adjustPests(1 / rating) else + if(weedlevel >= 10 && prob(50)) + weedinvasion() // Weed invasion into empty tray + needs_update = 1 if(waterlevel > 10 && nutrilevel > 0 && prob(10)) // If there's no plant, the percentage chance is 10% adjustWeeds(1 / rating) - - // Weeeeeeeeeeeeeeedddssss - if(weedlevel >= 10 && prob(50)) // At this point the plant is kind of fucked. Weeds can overtake the plant spot. - if(myseed) - if(!myseed.get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !myseed.get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) // If a normal plant - weedinvasion() - else - weedinvasion() // Weed invasion into empty tray - needs_update = 1 if(needs_update) update_state() return -/obj/machinery/hydroponics/proc/nutrimentMutation() - if(mutmod == 0) - return - if(mutmod == 1) - if(prob(80)) //80% - mutate() - else if(prob(75)) //15% - hardmutate() - return - if(mutmod == 2) - if(prob(50)) //50% - mutate() - else if(prob(50)) //25% - hardmutate() - else if(prob(50)) //12.5% - mutatespecie() - return - return - /obj/machinery/hydroponics/proc/update_state() //Refreshes the icon and sets the luminosity if(self_sustaining) @@ -371,28 +400,34 @@ /obj/machinery/hydroponics/proc/weedinvasion() // If a weed growth is sufficient, this happens. dead = FALSE var/oldPlantName + var/kudzu = FALSE if(myseed) // In case there's nothing in the tray beforehand + if(istype(myseed, /obj/item/seeds/soya)) + kudzu = TRUE oldPlantName = myseed.plantname QDEL_NULL(myseed) else oldPlantName = "[name]" - switch(rand(1,18)) // randomly pick predominative weed - if(16 to 18) - myseed = new /obj/item/seeds/reishi(src) - if(14 to 15) - myseed = new /obj/item/seeds/nettle(src) - if(12 to 13) - myseed = new /obj/item/seeds/harebell(src) - if(10 to 11) - myseed = new /obj/item/seeds/amanita(src) - if(8 to 9) - myseed = new /obj/item/seeds/chanter(src) - if(6 to 7) - myseed = new /obj/item/seeds/tower(src) - if(4 to 5) - myseed = new /obj/item/seeds/plump(src) - else - myseed = new /obj/item/seeds/starthistle(src) + if(kudzu) + myseed = new /obj/item/seeds/kudzu(src) + else + switch(rand(1,18)) // randomly pick predominative weed + if(16 to 18) + myseed = new /obj/item/seeds/reishi(src) + if(14 to 15) + myseed = new /obj/item/seeds/nettle(src) + if(12 to 13) + myseed = new /obj/item/seeds/harebell(src) + if(10 to 11) + myseed = new /obj/item/seeds/amanita(src) + if(8 to 9) + myseed = new /obj/item/seeds/chanter(src) + if(6 to 7) + myseed = new /obj/item/seeds/tower(src) + if(4 to 5) + myseed = new /obj/item/seeds/plump(src) + else + myseed = new /obj/item/seeds/starthistle(src) age = 0 plant_health = myseed.endurance lastcycle = world.time @@ -400,45 +435,20 @@ adjustWeeds(-10) // Reset adjustPests(-10) // Reset update_state() + mut_beamed = FALSE + yield_beamed = FALSE plant_hud_set_health() plant_hud_set_status() - visible_message("The [oldPlantName] is overtaken by some [myseed.plantname]!") - - -/obj/machinery/hydroponics/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0) // Mutates the current seed - if(!myseed) - return - myseed.mutate(lifemut, endmut, productmut, yieldmut, potmut, wrmut, wcmut, traitmut) - -/obj/machinery/hydroponics/proc/hardmutate() - mutate(4, 10, 2, 4, 50, 4, 10, 3) - - -/obj/machinery/hydroponics/proc/mutatespecie() // Mutagent produced a new plant! - if(!myseed || dead) - return - - var/oldPlantName = myseed.plantname - if(myseed.mutatelist.len > 0) - var/mutantseed = pick(myseed.mutatelist) - QDEL_NULL(myseed) - myseed = new mutantseed + if(kudzu) + visible_message("The [oldPlantName] cross-breeds with weeds and mutates into [myseed.plantname]!") else - return - - hardmutate() - age = 0 - plant_health = myseed.endurance - lastcycle = world.time - harvest = FALSE - plant_hud_set_health() - plant_hud_set_status() - adjustWeeds(-10) // Reset + visible_message("The [oldPlantName] is overtaken by some [myseed.plantname]!") - sleep(5) // Wait a while - update_state() - visible_message("[oldPlantName] suddenly mutates into [myseed.plantname]!") +/obj/machinery/hydroponics/proc/get_mutation_level() + return nutrient.mutation_level + mutagen + (mut_beamed ? 5 : 0) +/obj/machinery/hydroponics/proc/get_mutation_focus() + return doping_effects[doping_chem] /obj/machinery/hydroponics/proc/mutateweed() // If the weeds gets the mutagent instead. Mind you, this pretty much destroys the old plant if(weedlevel > 5) @@ -446,11 +456,13 @@ var/newWeed = pick(/obj/item/seeds/liberty, /obj/item/seeds/angel, /obj/item/seeds/nettle/death, /obj/item/seeds/kudzu) myseed = new newWeed dead = FALSE - hardmutate() + myseed.mutate(20) age = 0 plant_health = myseed.endurance lastcycle = world.time harvest = FALSE + mut_beamed = FALSE + yield_beamed = FALSE plant_hud_set_health() plant_hud_set_status() adjustWeeds(-10) // Reset @@ -469,6 +481,8 @@ if(!dead) update_state() dead = TRUE + mut_beamed = FALSE + yield_beamed = FALSE plant_hud_set_health() plant_hud_set_status() @@ -489,32 +503,16 @@ if(myseed) myseed.on_chem_reaction(reagents) //In case seeds have some special interactions with special chems, currently only used by vines - // Requires 5 mutagen to possibly change species.// Poor man's mutagen. - if(reagents.has_reagent("mutagen", 5) || reagents.has_reagent("radium", 10) || reagents.has_reagent("uranium", 10)) - switch(rand(100)) - if(91 to 100) - adjustHealth(-10) - to_chat(user, "The plant shrivels and burns.") - if(81 to 90) - mutatespecie() - if(66 to 80) - hardmutate() - if(41 to 65) - mutate() - if(21 to 41) - to_chat(user, "The plants don't seem to react...") - if(11 to 20) - mutateweed() - if(1 to 10) - mutatepest(user) - else - to_chat(user, "Nothing happens...") - - // 2 or 1 units is enough to change the yield and other stats.// Can change the yield and other stats, but requires more than mutagen - else if(reagents.has_reagent("mutagen", 2) || reagents.has_reagent("radium", 5) || reagents.has_reagent("uranium", 5)) - hardmutate() - else if(reagents.has_reagent("mutagen", 1) || reagents.has_reagent("radium", 2) || reagents.has_reagent("uranium", 2)) - mutate() + // Radioactives and mutagen contribute to the mutation level of the tray. + if(reagents.has_reagent("mutagen") || reagents.has_reagent("radium") || reagents.has_reagent("uranium")) + if(mutagen < max_mutagen) + mutagen += reagents.get_reagent_amount("uranium") + mutagen += reagents.get_reagent_amount("radium") + mutagen += reagents.get_reagent_amount("mutagen") + to_chat(user, "You think the plants in [src] will mutate more now.") + mutagen = min(max_mutagen, mutagen) + if(mutagen == max_mutagen) + to_chat(user, "That seems like enough mutating chemicals.") // After handling the mutating, we now handle the damage from adding crude radioactives... if(reagents.has_reagent("uranium", 1)) @@ -524,21 +522,26 @@ adjustHealth(-round(reagents.get_reagent_amount("radium") * 1)) adjustToxic(round(reagents.get_reagent_amount("radium") * 3)) // Radium is harsher (OOC: also easier to produce) - // Nutriments - if(reagents.has_reagent("eznutriment", 1)) + // Nutrients + if(reagents.has_reagent("eznutrient", 1)) + nutrient = /datum/reagent/plantnutrient/eznutrient yieldmod = 1 - mutmod = 1 - adjustNutri(round(reagents.get_reagent_amount("eznutriment") * 1)) + adjustNutri(round(reagents.get_reagent_amount("eznutrient") * 1)) - if(reagents.has_reagent("left4zednutriment", 1)) + if(reagents.has_reagent("mutrient", 1)) + nutrient = /datum/reagent/plantnutrient/mut + yieldmod = 1 + adjustNutri(round(reagents.get_reagent_amount("mutrient") * 1)) + + if(reagents.has_reagent("left4zednutrient", 1)) + nutrient = /datum/reagent/plantnutrient/left4zednutrient yieldmod = 0 - mutmod = 2 - adjustNutri(round(reagents.get_reagent_amount("left4zednutriment") * 1)) + adjustNutri(round(reagents.get_reagent_amount("left4zednutrient") * 1)) - if(reagents.has_reagent("robustharvestnutriment", 1)) + if(reagents.has_reagent("robustharvestnutrient", 1)) + nutrient = /datum/reagent/plantnutrient/robustharvestnutrient yieldmod = 1.3 - mutmod = 0 - adjustNutri(round(reagents.get_reagent_amount("robustharvestnutriment") *1 )) + adjustNutri(round(reagents.get_reagent_amount("robustharvestnutrient") *1 )) //Fish Water is both an excellent fertilizer and waters @@ -557,6 +560,9 @@ // Antitoxin binds shit pretty well. So the tox goes significantly down if(reagents.has_reagent("charcoal", 1)) adjustToxic(-round(reagents.get_reagent_amount("charcoal") * 2)) + if(doping_chem) + to_chat(user, "The charcoal soaks up and neutralizes \the [initial(doping_chem.name)].") + doping_chem = null // BRO, YOU JUST WENT ON FULL STUPID. if(reagents.has_reagent("toxin", 1)) @@ -657,21 +663,33 @@ if(reagents.has_reagent("cryoxadone", 1)) adjustHealth(round(reagents.get_reagent_amount("cryoxadone") * 3)) adjustToxic(-round(reagents.get_reagent_amount("cryoxadone") * 3)) + replace_doping(/datum/reagent/medicine/cryoxadone, user) - // Ammonia is bad ass. + // Healing + if(reagents.has_reagent("omnizine", 1)) + adjustHealth(round(reagents.get_reagent_amount("omnizine") * 3)) + adjustToxic(-round(reagents.get_reagent_amount("omnizine") * 3)) + replace_doping(/datum/reagent/medicine/omnizine, user) + + // Mild healing + if(reagents.has_reagent("salglu_solution", 1)) + adjustHealth(round(reagents.get_reagent_amount("salglu_solution") * 0.1)) + adjustToxic(-round(reagents.get_reagent_amount("salglu_solution") * 0.1)) + replace_doping(/datum/reagent/medicine/salglu_solution, user) + + // Ammonia heals and feeds plants if(reagents.has_reagent("ammonia", 1)) adjustHealth(round(reagents.get_reagent_amount("ammonia") * 0.5)) adjustNutri(round(reagents.get_reagent_amount("ammonia") * 1)) - if(myseed) - myseed.adjust_yield(round(reagents.get_reagent_amount("ammonia") * 0.01)) + replace_doping(/datum/reagent/ammonia, user) - // Saltpetre is used for gardening IRL, to simplify highly, it speeds up growth and strengthens plants + // Saltpetre is used for gardening IRL, but for us, it's just another + // way to heal plants if(reagents.has_reagent("saltpetre", 1)) var/salt = reagents.get_reagent_amount("saltpetre") adjustHealth(round(salt * 0.25)) - if(myseed) - myseed.adjust_production(-round(salt/100)-prob(salt%100)) - myseed.adjust_potency(round(salt*0.50)) + replace_doping(/datum/reagent/saltpetre, user) + // Ash is also used IRL in gardening, as a fertilizer enhancer and weed killer if(reagents.has_reagent("ash", 1)) adjustHealth(round(reagents.get_reagent_amount("ash") * 0.25)) @@ -682,9 +700,8 @@ if(reagents.has_reagent("diethylamine", 1)) adjustHealth(round(reagents.get_reagent_amount("diethylamine") * 1)) adjustNutri(round(reagents.get_reagent_amount("diethylamine") * 2)) - if(myseed) - myseed.adjust_yield(round(reagents.get_reagent_amount("diethylamine") * 0.02)) adjustPests(-rand(1,2)) + replace_doping(/datum/reagent/diethylamine, user) // Compost, effectively if(reagents.has_reagent("nutriment", 1)) @@ -709,6 +726,16 @@ if(reagents.has_reagent("lazarus_reagent", 1)) spawnplant() + // Begone, mutagen! + if(reagents.has_reagent("potass_iodide", 1)) + if(mutagen) + to_chat(user, "The potassium iodide neutralizes the mutating agents in [src].") + mutagen = 0 + if(reagents.has_reagent("pen_acid", 1)) + if(mutagen) + to_chat(user, "The pentetic acid neutralizes the mutating agents in [src].") + mutagen = 0 + // The best stuff there is. For testing/debugging. if(reagents.has_reagent("adminordrazine", 1)) adjustWater(round(reagents.get_reagent_amount("adminordrazine") * 1)) @@ -716,18 +743,26 @@ adjustNutri(round(reagents.get_reagent_amount("adminordrazine") * 1)) adjustPests(-rand(1,5)) adjustWeeds(-rand(1,5)) - if(reagents.has_reagent("adminordrazine", 5)) - switch(rand(100)) - if(66 to 100) - mutatespecie() - if(33 to 65) - mutateweed() - if(1 to 32) - mutatepest(user) - else - to_chat(user, "Nothing happens...") reagents.clear_reagents() +/obj/machinery/hydroponics/proc/replace_doping(datum/reagent/new_chem, mob/user) + if(new_chem == doping_chem) + to_chat(user, "[src] already contains [initial(new_chem.name)], adding more won't help.") + return + var/list/message = list() + message += "You add [initial(new_chem.name)] to [src]" + if(doping_chem) + message += ", replacing \the [initial(doping_chem.name)]." + else + message += "." + if(get_mutation_level()) + message += " This should have interesting effects on the plant's seeds." + else + message += " You don't think this will help without a source of mutations." + message += "" + to_chat(user, message.Join("")) + doping_chem = new_chem + /obj/machinery/hydroponics/attackby(obj/item/O, mob/user, params) //Called when mob user "attacks" it with object O if(istype(O, /obj/item/reagent_containers)) // Syringe stuff (and other reagent containers now too) @@ -781,6 +816,10 @@ add_compost(O, user, transfer, message) return TRUE + else if(istype(O, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [O] first!") + return ..() + else if(istype(O, /obj/item/seeds) && !istype(O, /obj/item/seeds/sample)) if(!myseed) if(istype(O, /obj/item/seeds/kudzu)) @@ -800,19 +839,7 @@ to_chat(user, "[src] already has seeds in it!") else if(istype(O, /obj/item/plant_analyzer)) - if(myseed) - to_chat(user, "*** [myseed.plantname] ***") //Carn: now reports the plants growing, not the seeds. - to_chat(user, "- Plant Age: [age]") - var/list/text_string = myseed.get_analyzer_text() - if(text_string) - to_chat(user, text_string) - else - to_chat(user, "No plant found.") - to_chat(user, "- Weed level: [weedlevel] / 10") - to_chat(user, "- Pest level: [pestlevel] / 10") - to_chat(user, "- Toxicity level: [toxic] / 100") - to_chat(user, "- Water level: [waterlevel] / [maxwater]") - to_chat(user, "- Nutrition level: [nutrilevel] / [maxnutri]") + send_plant_details(user) else if(istype(O, /obj/item/cultivator)) if(weedlevel > 0) @@ -847,6 +874,8 @@ harvest = FALSE //To make sure they can't just put in another seed and insta-harvest it qdel(myseed) myseed = null + mut_beamed = FALSE + yield_beamed = FALSE plant_hud_set_health() plant_hud_set_status() adjustWeeds(-10) //Has a side effect of cleaning up those nasty weeds @@ -895,18 +924,21 @@ else examine(user) -/obj/machinery/hydroponics/proc/update_tray(mob/user = usr) +/obj/machinery/hydroponics/proc/update_tray(mob/user = usr, harvested = 0) harvest = FALSE lastproduce = age if(istype(myseed,/obj/item/seeds/replicapod)) to_chat(user, "You harvest from the [myseed.plantname].") - else if(myseed.getYield() <= 0) + else if(harvested <= 0) to_chat(user, "You fail to harvest anything useful!") else - to_chat(user, "You harvest [myseed.getYield()] items from the [myseed.plantname].") + to_chat(user, "You harvest [harvested] items from the [myseed.plantname].") if(!myseed.get_gene(/datum/plant_gene/trait/repeated_harvest)) QDEL_NULL(myseed) dead = FALSE + mutagen = max(0, mutagen - 1) + mut_beamed = FALSE + yield_beamed = FALSE plant_hud_set_status() plant_hud_set_health() update_state() @@ -984,6 +1016,7 @@ density = FALSE power_state = NO_POWER_USE wrenchable = FALSE + mutagen_tank_name = "Mutagen pool" /obj/machinery/hydroponics/soil/update_icon_state() return // Has no hoses @@ -1021,3 +1054,49 @@ if(reagent_source) // If the source wasn't composted and destroyed reagent_source.update_icon() + + +/obj/machinery/hydroponics/proc/send_plant_details(mob/user) + if(myseed) + to_chat(user, "*** [myseed.plantname] ***") + to_chat(user, "- Plant Age: [age]") + var/next_harvest = (age <= myseed.maturation ? myseed.maturation : lastproduce) + myseed.production + to_chat(user, "- Next Harvest At: [next_harvest]") + var/list/text_string = myseed.get_analyzer_text() + if(text_string) + to_chat(user, text_string) + else + to_chat(user, "No plant found.") + to_chat(user, "- Weed level: [weedlevel] / 10") + to_chat(user, "- Pest level: [pestlevel] / 10") + to_chat(user, "- Toxicity level: [toxic] / 100") + to_chat(user, "- Water level: [waterlevel] / [maxwater]") + to_chat(user, "- Nutrition level: [nutrilevel] / [maxnutri]") + if(self_sustaining) + to_chat(user, "  Nutrient: Earthsblood
      This [src.name] has been treated with Earthsblood and constantly produces its own fertilizer. Like E-Z-Nutrient, Earthsblood fertilizer has no particular attributes, it just keeps plants fed.
    ") + else + to_chat(user, "  Nutrient: [initial(nutrient.name)]
      [initial(nutrient.description)]
    ") + to_chat(user, "- [mutagen_tank_name]: [mutagen] / [max_mutagen]") + + var/can_mutate_species = myseed && length(myseed.mutatelist) + var/mutation_level = get_mutation_level() + var/mutation_comment = "" + if(mutation_level >= 30 && can_mutate_species) + mutation_comment = " (will change species)" + else if(mutation_level > 20 && can_mutate_species) + mutation_comment = " (may add traits or change species)" + else if(mutation_level > 20) + mutation_comment = " (may add traits)" + else if(mutation_level > 10 && can_mutate_species) + mutation_comment = " (may change species)" + to_chat(user, "- Mutation level: [get_mutation_level()][mutation_comment]") + + to_chat(user, "- Doping chemical: [doping_chem ? initial(doping_chem.name) : "None"]") + if(doping_chem) + to_chat(user, "  Causes mutations to be focused on [english_list(doping_effects[doping_chem])].") + +/obj/machinery/hydroponics/attack_ghost(mob/dead/observer/user) + if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the toggle plant analyzer var. + return + if(user.plant_analyzer) + send_plant_details(user) diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 07616d4ae69c..a2710f815b24 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -3,45 +3,45 @@ ///Max Cap of the amount of seed we let players dispense at once #define MAX_DISPENSE_SEEDS 25 -///This proc could probably be scoped better, also it's logic is cursed and hard to understand -/proc/seedify(obj/item/O, t_max, obj/machinery/seed_extractor/extractor, mob/living/user) - var/t_amount = 0 - if(t_max == -1) - if(extractor) - t_max = rand(1,4) * extractor.seed_multiplier - else - t_max = rand(1,4) - - var/seedloc = O.loc +/// Convert a grown object into seeds. +/proc/seedify(obj/item/source_item, seed_count, obj/machinery/seed_extractor/extractor, mob/living/user) + var/output_loc = source_item.loc if(extractor) - seedloc = extractor.loc + output_loc = extractor.loc - if(istype(O, /obj/item/food/snacks/grown)) - var/obj/item/food/snacks/grown/F = O - if(F.seed) - if(user && !user.drop_item()) //couldn't drop the item - return - while(t_amount < t_max) - var/obj/item/seeds/t_prod = F.seed.Copy() - t_prod.forceMove(seedloc) - t_amount++ - qdel(O) - return TRUE - - else if(istype(O, /obj/item/grown)) - var/obj/item/grown/F = O //someone should really abstract this into its own proc - if(F.seed) - if(user && !user.drop_item()) - return - while(t_amount < t_max) - var/obj/item/seeds/t_prod = F.seed.Copy() - t_prod.forceMove(seedloc) - t_amount++ - qdel(O) - return TRUE + var/original_seed = null + if(istype(source_item, /obj/item/food/snacks/grown)) + var/obj/item/food/snacks/grown/F = source_item + original_seed = F.unsorted_seed || F.seed + else if(istype(source_item, /obj/item/grown)) + var/obj/item/grown/F = source_item + original_seed = F.unsorted_seed || F.seed - return FALSE + if(!original_seed) + return FALSE + if(user && !user.unEquip(source_item, silent = TRUE)) //couldn't drop the item + return FALSE + + if(seed_count == -1) + if(istype(original_seed, /obj/item/unsorted_seeds)) + seed_count = 1 + else + seed_count = rand(1,4) + if(extractor) + seed_count *= extractor.seed_multiplier + + for(var/i in 1 to seed_count) + var/obj/item/new_seed + if(istype(original_seed, /obj/item/seeds)) + var/obj/item/seeds/S = original_seed + new_seed = S.Copy() + else if(istype(original_seed, /obj/item/unsorted_seeds)) + var/obj/item/unsorted_seeds/S = original_seed + new_seed = S.Copy() + new_seed.forceMove(output_loc) + qdel(source_item) + return TRUE /obj/machinery/seed_extractor name = "seed extractor" @@ -88,7 +88,7 @@ if(istype(O, /obj/item/storage/bag/plants)) var/obj/item/storage/P = O var/loaded = 0 - for(var/obj/item/seeds/G in P.contents) + for(var/obj/item/seeds/G in P) if(length(contents) >= max_seeds) break loaded++ @@ -97,21 +97,35 @@ if(loaded) to_chat(user, "You transfer [loaded] seeds from [O] into [src].") else - to_chat(user, "There are no seeds in [O].") + var/seedable = 0 + for(var/obj/item/food/snacks/grown/ignored in P) + seedable++ + for(var/obj/item/grown/ignored in P) + seedable++ + if(!seedable) + to_chat(user, "There are no seeds or plants in [O].") + return + to_chat(user, "You dump the plants in [O] into [src].") + if(!O.use_tool(src, user, min(5, seedable/2) SECONDS)) + return + for(var/thing in P) + seedify(thing,-1, src, user) return - else if(seedify(O,-1, src, user)) - to_chat(user, "You extract some seeds.") - return + else if(istype(O, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [O] first!") + return ..() else if(istype(O,/obj/item/seeds)) if(add_seed(O, user)) to_chat(user, "You add [O] to [name].") updateUsrDialog() return + else if(seedify(O,-1, src, user)) + to_chat(user, "You extract some seeds.") + return else if(user.a_intent != INTENT_HARM) to_chat(user, "You can't extract any seeds from \the [O.name]!") - else - return ..() + return ..() /obj/machinery/seed_extractor/attack_ai(mob/user) ui_interact(user) @@ -134,10 +148,17 @@ /obj/machinery/seed_extractor/ui_data(mob/user) var/list/data = list() + data["icons"] = list() + data["seeds"] = list() for(var/datum/seed_pile/O in piles) var/obj/item/I = O.path + var/icon/base64icon = GLOB.seeds_cached_base64_icons["[initial(I.icon)][initial(I.icon_state)]"] + if(!base64icon) + base64icon = icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1)) + GLOB.seeds_cached_base64_icons["[initial(I.icon)][initial(I.icon_state)]"] = base64icon + data["icons"]["[initial(I.icon)][initial(I.icon_state)]"] = base64icon var/list/seed_info = list( - "image" = "[icon2base64(icon(initial(I.icon), initial(I.icon_state), SOUTH, 1))]", + "image" = "[initial(I.icon)][initial(I.icon_state)]", "id" = O.id, "name" = O.name, "variant" = O.variant, @@ -149,9 +170,8 @@ "potency" = O.potency, "amount" = O.amount, ) - data["stored_seeds"] += list(seed_info) + data["seeds"] += list(seed_info) - data["vend_amount"] = vend_amount return data /obj/machinery/seed_extractor/ui_act(action, list/params, datum/tgui/ui, datum/ui_state/state) @@ -160,7 +180,7 @@ . = FALSE switch(action) if("vend") - vend_seed(params["seedid"], params["seedvariant"], vend_amount) + vend_seed(params["seed_id"], params["seed_variant"], params["vend_amount"]) add_fingerprint(usr) . = TRUE if("set_vend_amount") diff --git a/code/modules/hydroponics/seeds.dm b/code/modules/hydroponics/seeds.dm index 2544e159bbb5..8bdba0b43e2a 100644 --- a/code/modules/hydroponics/seeds.dm +++ b/code/modules/hydroponics/seeds.dm @@ -38,10 +38,30 @@ /// If weed chance passes, this many weeds sprout during growth var/weed_rate = 1 + /// The size of a small mutation for each stat. + var/static/list/stat_mutation_sizes = list( + "potency" = 20, + "yield" = 1, + "production speed" = 1, + "endurance" = 20, + "lifespan" = 20, + "weed rate" = 1, + "weed chance" = 20) + + /// Whether each stat is better at smaller values. + var/static/list/stat_better_if_small = list( + "potency" = FALSE, + "yield" = FALSE, + "production speed" = TRUE, + "endurance" = FALSE, + "lifespan" = FALSE, + "weed rate" = TRUE, + "weed chance" = TRUE) + /obj/item/seeds/New(loc, nogenes = 0) ..() - pixel_x = rand(-8, 8) - pixel_y = rand(-8, 8) + pixel_x = rand(-6, 6) + pixel_y = rand(-6, 6) if(!icon_grow) icon_grow = "[species]-grow" @@ -103,17 +123,50 @@ for(var/datum/plant_gene/reagent/R in genes) reagents_add[R.reagent_id] = R.rate -/obj/item/seeds/proc/mutate(lifemut = 2, endmut = 5, productmut = 1, yieldmut = 2, potmut = 25, wrmut = 2, wcmut = 5, traitmut = 0) - adjust_lifespan(rand(-lifemut,lifemut)) - adjust_endurance(rand(-endmut,endmut)) - adjust_production(rand(-productmut,productmut)) - adjust_yield(rand(-yieldmut,yieldmut)) - adjust_potency(rand(-potmut,potmut)) - adjust_weed_rate(rand(-wrmut, wrmut)) - adjust_weed_chance(rand(-wcmut, wcmut)) - if(prob(traitmut)) +/obj/item/seeds/proc/mutate(level, focus = list()) + for(var/stat in stat_mutation_sizes) + if(stat in focus) + mutate_stat(stat, level * 2, stat_mutation_sizes[stat]) + else if(length(focus)) + mutate_stat(stat, level / 2, stat_mutation_sizes[stat]) + else + mutate_stat(stat, level, stat_mutation_sizes[stat]) + if(prob(level - 40)) add_random_traits(1, 1) +/obj/item/seeds/proc/mutate_stat(stat, level, mutation_size) + if(level <= 0 || prob(50)) + return + + var/mod = 0 + while(level > 10) + mod += rand(0, mutation_size) + level -= 10 + if(level > 0 && prob(level * 10)) + mod += rand(0, mutation_size) + + if(prob(50)) + mod = -mod + + adjust_by_name(stat, mod) + +/obj/item/seeds/proc/adjust_by_name(stat, mod) + switch(stat) + if("potency") + adjust_potency(mod) + if("yield") + adjust_yield(mod) + if("production speed") + adjust_production(mod) + if("endurance") + adjust_endurance(mod) + if("lifespan") + adjust_lifespan(mod) + if("weed rate") + adjust_weed_rate(mod) + if("weed chance") + adjust_weed_chance(mod) + /obj/item/seeds/bullet_act(obj/item/projectile/Proj) // Works with the Somatoray to modify plant variables. if(istype(Proj, /obj/item/projectile/energy/florayield)) var/rating = 1 @@ -132,30 +185,43 @@ /obj/item/seeds/proc/getYield() var/return_yield = yield - var/obj/machinery/hydroponics/parent = loc if(istype(loc, /obj/machinery/hydroponics)) + var/obj/machinery/hydroponics/parent = loc if(parent.yieldmod == 0) return_yield = min(return_yield, 1) // 1 if above zero, 0 otherwise else return_yield *= (parent.yieldmod) + if(parent.yield_beamed) + return_yield += rand(1,3) return CEILING(return_yield, 1) // No decimal plants, please +/obj/item/seeds/proc/get_mutated_seed(obj/machinery/hydroponics/tray) + var/mutation_level = tray?.get_mutation_level() + if(!mutation_level) + return src + + return new /obj/item/unsorted_seeds(src, mutation_level, tray.get_mutation_focus()) + /obj/item/seeds/proc/harvest(mob/user = usr) - var/obj/machinery/hydroponics/parent = loc // For ease of access - var/output_loc = parent.Adjacent(user) ? user.loc : parent.loc // Needed for TK + var/obj/machinery/hydroponics/tray = loc + var/output_loc = tray.Adjacent(user) ? user.loc : tray.loc // Needed for TK + + var/mutated_seed = get_mutated_seed(tray) + var/product_name - for(var/i in 1 to getYield()) - var/obj/item/produce = new product(output_loc, src) + var/product_count = getYield() + for(var/i in 1 to product_count) + var/obj/item/produce = new product(output_loc, mutated_seed) if(!produce) return product_name = produce.name - if(getYield()) - SSblackbox.record_feedback("tally", "food_harvested", getYield(), product_name) + if(product_count) + SSblackbox.record_feedback("tally", "food_harvested", product_count, product_name) - parent.update_tray() + tray.update_tray(user, product_count) /obj/item/seeds/proc/prepare_result(obj/item/T) if(!T.reagents) @@ -179,7 +245,7 @@ /// Setter procs /// /obj/item/seeds/proc/adjust_yield(adjustamt) if(yield != -1) // Unharvestable shouldn't suddenly turn harvestable - yield = clamp(yield + adjustamt, 0, 5) + yield = clamp(yield + adjustamt, 0, 10) if(yield <= 0 && get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) yield = 1 // Mushrooms always have a minimum yield of 1. @@ -276,37 +342,44 @@ C.value = weed_chance -/obj/item/seeds/proc/get_analyzer_text() // In case seeds have something special to tell to the analyzer +/obj/item/seeds/proc/get_analyzer_text(show_detail = TRUE) // In case seeds have something special to tell to the analyzer var/list/text = list() - if(!get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && !get_gene(/datum/plant_gene/trait/plant_type/alien_properties)) - text += "- Plant type: Normal plant\n" - if(get_gene(/datum/plant_gene/trait/plant_type/weed_hardy)) - text += "- Plant type: Weed. Can grow in nutrient-poor soil.\n" - if(get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) - text += "- Plant type: Mushroom. Can grow in dry soil.\n" - if(get_gene(/datum/plant_gene/trait/plant_type/alien_properties)) - text += "- Plant type: UNKNOWN \n" + if(show_detail) + if(!get_gene(/datum/plant_gene/trait/plant_type/weed_hardy) && !get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism) && !get_gene(/datum/plant_gene/trait/plant_type/alien_properties)) + text += "- Plant type: Normal plant" + if(get_gene(/datum/plant_gene/trait/plant_type/weed_hardy)) + text += "- Plant type: Weed. Can grow in nutrient-poor soil." + if(get_gene(/datum/plant_gene/trait/plant_type/fungal_metabolism)) + text += "- Plant type: Mushroom. Can grow in dry soil." + if(get_gene(/datum/plant_gene/trait/plant_type/alien_properties)) + text += "- Plant type: UNKNOWN " if(potency != -1) - text += "- Potency: [potency]\n" + text += "- Potency: [potency]" if(yield != -1) - text += "- Yield: [yield]\n" - text += "- Maturation speed: [maturation]\n" + var/obj/machinery/hydroponics/tray = loc + if(istype(tray) && tray.yield_beamed) + text += "- Yield: [yield] (+1-3 from somatoray)" + else + text += "- Yield: [yield]" + text += "- Maturation speed: [maturation]" if(yield != -1) - text += "- Production speed: [production]\n" - text += "- Endurance: [endurance]\n" - text += "- Lifespan: [lifespan]\n" - text += "- Weed Growth Rate: [weed_rate]\n" - text += "- Weed Vulnerability: [weed_chance]\n" + text += "- Production speed: [production]" + text += "- Endurance: [endurance]" + text += "- Lifespan: [lifespan]" + text += "- Weed Growth Rate: [weed_rate]" + text += "- Weed Vulnerability: [weed_chance]" + if(!show_detail) + return text.Join("
    ") if(rarity) - text += "- Species Discovery Value: [rarity]\n" + text += "- Species Discovery Value: [rarity]" var/all_traits = "" for(var/datum/plant_gene/trait/traits in genes) if(istype(traits, /datum/plant_gene/trait/plant_type)) continue all_traits += " [traits.get_name()]" - text += "- Plant Traits:[all_traits]\n" + text += "- Plant Traits:[all_traits]" - return text.Join("") + return text.Join("
    ") /obj/item/seeds/proc/on_chem_reaction(datum/reagents/S) // In case seeds have some special interaction with special chems return @@ -418,3 +491,178 @@ genes += P else qdel(P) + +/obj/item/seeds/attack_ghost(mob/dead/observer/user) + if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the toggle plant analyzer var. + return + if(user.plant_analyzer) + to_chat(user, get_analyzer_text()) + +/obj/item/seeds/openTip() + var/datum/atom_hud/hydrohud = GLOB.huds[DATA_HUD_HYDROPONIC] + if(usr in hydrohud.hudusers) + return // Suppress the default tooltip. + return ..() + +/obj/item/seeds/MouseEntered(location, control, params) + . = ..() + var/datum/atom_hud/hydrohud = GLOB.huds[DATA_HUD_HYDROPONIC] + if(usr in hydrohud.hudusers) + openToolTip(usr, src, params, title = name, content = get_analyzer_text(FALSE)) + +/obj/item/seeds/should_stack_with(obj/item/O) + if(!..()) + return FALSE + var/obj/item/seeds/other = O + if(potency != other.potency) + return FALSE + if(yield != other.yield) + return FALSE + if(production != other.production) + return FALSE + if(endurance != other.endurance) + return FALSE + if(lifespan != other.lifespan) + return FALSE + if(weed_rate != other.weed_rate) + return FALSE + if(weed_chance != other.weed_chance) + return FALSE + return TRUE + +/datum/unsorted_seed + var/obj/item/seeds/original_seed + var/mutation_level + var/list/mutation_focus + +/datum/unsorted_seed/New(obj/item/seeds/original_seed_in, mutation_level_in, list/mutation_focus_in) + ..() + original_seed = original_seed_in + mutation_level = mutation_level_in + mutation_focus = mutation_focus_in + +/datum/unsorted_seed/Destroy() + original_seed = null + mutation_focus = null + return ..() + +/datum/unsorted_seed/proc/transform(obj/item/unsorted_seeds/unsorted_seed, sort_depth = 1) + var/seed_mutation_level = mutation_level + var/species_mutation_chance = 0 + switch(sort_depth) + if(0 to 4) + // Default mutation level. + species_mutation_chance = (mutation_level - 20) * 10 + if(5 to 8) + seed_mutation_level *= 1.5 + species_mutation_chance = (mutation_level - 15) * 10 + else + seed_mutation_level *= 2 + species_mutation_chance = (mutation_level - 10) * 10 + + var/obj/item/seeds/mutant + if(prob(species_mutation_chance) && length(original_seed.mutatelist)) + var/mutant_type = pick(original_seed.mutatelist) + mutant = new mutant_type + mutant.mutate(seed_mutation_level) + else + mutant = original_seed.Copy() + mutant.mutate(seed_mutation_level, mutation_focus) + + if(istype(unsorted_seed.loc, /mob)) + var/mob/M = unsorted_seed.loc + M.drop_item() + M.put_in_active_hand(mutant) + if(istype(unsorted_seed.loc, /obj/item/storage)) + var/obj/item/storage/S = unsorted_seed.loc + S.remove_from_storage(unsorted_seed) + S.handle_item_insertion(mutant, usr, TRUE) + qdel(unsorted_seed) + +/obj/item/unsorted_seeds + icon = 'icons/obj/hydroponics/seeds.dmi' + icon_state = "seed" // Unknown plant seed - these shouldn't exist in-game. + w_class = WEIGHT_CLASS_TINY + resistance_flags = FLAMMABLE + + var/datum/unsorted_seed/seed_data + +/obj/item/unsorted_seeds/New(obj/item/seeds/template, mutation_level, list/mutation_focus, seed_data_in = null) + ..() + template = template.Copy() + pixel_x = rand(-6, 6) + pixel_y = rand(-6, 6) + if(seed_data_in) + seed_data = seed_data_in + else + seed_data = new(template, mutation_level, mutation_focus) + name = "unsorted [template.name]" + icon_state = template.icon_state + // The grammar looks odd here because template.name is "pack of Xes". + desc = "A [template.name] that have mutated and need to be sorted out before use. The best method is to use a plant analyzer on a bag full of unsorted seed packs. If you don't have a plant analyzer, you can place unsorted seeds into a sorting tray and use it in hand, or even use them directly in hand. The more you sort at once, the stronger the mutations you'll discover." + +/obj/item/unsorted_seeds/Destroy() + seed_data = null + return ..() + +/obj/item/unsorted_seeds/proc/Copy() + return new /obj/item/unsorted_seeds(seed_data.original_seed, seed_data.mutation_level, seed_data.mutation_focus, seed_data) + +/obj/item/unsorted_seeds/proc/sort(depth = 1) + seed_data.transform(src, depth) + +/obj/item/unsorted_seeds/attack_self(mob/user) + user.visible_message("[user] crudely sorts through [src] by hand.", "You crudely sort through [src] by hand. This would be easier and more effective with some sort of tool.") + if(do_after(user, 3 SECONDS, TRUE, src, must_be_held = TRUE)) + sort() + +/obj/item/unsorted_seeds/attackby(obj/item/O, mob/user, params) + if(istype(O, /obj/item/plant_analyzer)) + to_chat(user, "This is \a [src].") + var/text = get_analyzer_text() + if(text) + to_chat(user, "[text]") + + return + if(is_pen(O)) + to_chat(user, "Sort it first.") + return + ..() // Fallthrough to item/attackby() so that bags can pick seeds up + +/obj/item/unsorted_seeds/proc/get_analyzer_text(show_detail = TRUE) + var/list/output = list() + output += seed_data.original_seed.get_analyzer_text(show_detail) + output += "- Mutation level: [seed_data.mutation_level]" + output += "- Mutation focus: [english_list(seed_data.mutation_focus, "None.")]" + output += "Data may change after sorting." + return output.Join("
    ") + +/obj/item/unsorted_seeds/attack_ghost(mob/dead/observer/user) + if(!istype(user)) // Make sure user is actually an observer. Revenents also use attack_ghost, but do not have the toggle plant analyzer var. + return + if(user.plant_analyzer) + to_chat(user, get_analyzer_text()) + +/obj/item/unsorted_seeds/openTip() + var/datum/atom_hud/hydrohud = GLOB.huds[DATA_HUD_HYDROPONIC] + if(usr in hydrohud.hudusers) + return // Suppress the default tooltip. + return ..() + +/obj/item/unsorted_seeds/MouseEntered(location, control, params) + . = ..() + var/datum/atom_hud/hydrohud = GLOB.huds[DATA_HUD_HYDROPONIC] + if(usr in hydrohud.hudusers) + openToolTip(usr, src, params, title = name, content = get_analyzer_text(FALSE)) + +/obj/item/unsorted_seeds/should_stack_with(obj/item/O) + if(!..()) + return FALSE + var/obj/item/unsorted_seeds/other = O + if(!seed_data.original_seed.should_stack_with(other.seed_data.original_seed)) + return FALSE + if(seed_data.mutation_level != other.seed_data.mutation_level) + return FALSE + if(length(seed_data.mutation_focus) != length(other.seed_data.mutation_focus)) + return FALSE + return length(seed_data.mutation_focus - other.seed_data.mutation_focus) == 0 diff --git a/code/modules/library/book.dm b/code/modules/library/book.dm index ec525e0a1db9..5fb95c5811d4 100644 --- a/code/modules/library/book.dm +++ b/code/modules/library/book.dm @@ -165,9 +165,9 @@ var/header_right = "
    " if(length(pages)) //No need to have page switching buttons if there's no pages if(current_page < length(pages)) - header_right = "

    " + header_right = "

    " if(current_page) - header_left = "" + header_left = "" dat += header_left + header_right //Now we're going to display the header buttons + the current page selected, if it's page 0, we display the cover_page instead diff --git a/code/modules/library/library_admin.dm b/code/modules/library/library_admin.dm index dc22de9e33e7..3d82c2772178 100644 --- a/code/modules/library/library_admin.dm +++ b/code/modules/library/library_admin.dm @@ -172,9 +172,9 @@ var/header_right = "
    " if(length(view_book.content)) //No need to have page switching buttons if there's no pages if(view_book_page < length(view_book.content)) - header_right = "

    " + header_right = "

    " if(view_book_page) - header_left = "" + header_left = "" dat += header_left + header_right //Now we're going to display the header buttons + the current page selected, if it's page 0, we display the cover_page instead diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm index 25b563aa096a..49f7bbec1f1a 100644 --- a/code/modules/mining/equipment/survival_pod.dm +++ b/code/modules/mining/equipment/survival_pod.dm @@ -69,7 +69,7 @@ var/turf/T = deploy_location if(!is_mining_level(T.z))//only report capsules away from the mining/lavaland level - message_admins("[key_name_admin(usr)] ([ADMIN_QUE(usr,"?")]) ([ADMIN_FLW(usr,"FLW")]) activated a bluespace capsule away from the mining level! (JMP)") + message_admins("[key_name_admin(usr)] ([ADMIN_QUE(usr,"?")]) ([ADMIN_FLW(usr,"FLW")]) activated a bluespace capsule away from the mining level! (JMP)") log_admin("[key_name(usr)] activated a bluespace capsule away from the mining level at [T.x], [T.y], [T.z]") template.load(deploy_location, centered = TRUE) new /obj/effect/particle_effect/smoke(get_turf(src)) diff --git a/code/modules/mining/lavaland/loot/ashdragon_loot.dm b/code/modules/mining/lavaland/loot/ashdragon_loot.dm index 594db13d7aff..7c82ec854ab6 100644 --- a/code/modules/mining/lavaland/loot/ashdragon_loot.dm +++ b/code/modules/mining/lavaland/loot/ashdragon_loot.dm @@ -77,7 +77,7 @@ return to_chat(user, "You call out for aid, attempting to summon spirits to your side.") - notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!", enter_link="(Click to help)", source = user, action = NOTIFY_FOLLOW) + notify_ghosts("[user] is raising [user.p_their()] [src], calling for your help!", enter_link="(Click to help)", source = user, action = NOTIFY_FOLLOW) summon_cooldown = world.time + 600 @@ -300,7 +300,7 @@ timer = world.time + create_delay + 1 if(do_after(user, create_delay, target = T)) user.visible_message("[user] turns \the [T] into [transform_string]!") - message_admins("[key_name_admin(user)] fired the lava staff at [get_area(target)] (JMP).") + message_admins("[key_name_admin(user)] fired the lava staff at [get_area(target)] (JMP).") log_game("[key_name(user)] fired the lava staff at [get_area(target)] ([T.x], [T.y], [T.z]).") T.TerraformTurf(turf_type, keep_icon = FALSE) timer = world.time + create_cooldown diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index fb45849581f2..44423056c453 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -217,7 +217,7 @@ /obj/machinery/anomalous_crystal/helpers/ActivationReaction(mob/user, method) if(..() && !ready_to_deploy) ready_to_deploy = 1 - notify_ghosts("An anomalous crystal has been activated in [get_area(src)]! This crystal can always be used by ghosts hereafter.", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK) + notify_ghosts("An anomalous crystal has been activated in [get_area(src)]! This crystal can always be used by ghosts hereafter.", enter_link = "(Click to enter)", source = src, action = NOTIFY_ATTACK) GLOB.poi_list |= src // ghosts should actually know they can join as a lightgeist /obj/machinery/anomalous_crystal/helpers/attack_ghost(mob/dead/observer/user) diff --git a/code/modules/mining/lavaland/loot/hierophant_loot.dm b/code/modules/mining/lavaland/loot/hierophant_loot.dm index 4ac1ef7d13a8..5cbdee950721 100644 --- a/code/modules/mining/lavaland/loot/hierophant_loot.dm +++ b/code/modules/mining/lavaland/loot/hierophant_loot.dm @@ -16,6 +16,7 @@ attack_verb = list("clubbed", "beat", "pummeled") hitsound = 'sound/weapons/sonic_jackhammer.ogg' actions_types = list(/datum/action/item_action/vortex_recall, /datum/action/item_action/toggle_unfriendly_fire) + resistance_flags = LAVA_PROOF | FIRE_PROOF var/cooldown_time = 20 //how long the cooldown between non-melee ranged attacks is var/chaser_cooldown = 81 //how long the cooldown between firing chasers at mobs is var/chaser_timer = 0 //what our current chaser cooldown is diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 40736a57b2e9..6f9a0885d28d 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -138,7 +138,7 @@ if(selected_material == mat_id) dat += " Smelting" else - dat += " Not Smelting " + dat += " Not Smelting " dat += "
    " dat += "

    " @@ -150,16 +150,16 @@ if(selected_alloy == D.id) dat += " Smelting" else - dat += " Not Smelting " + dat += " Not Smelting " dat += "
    " dat += "

    " //On or off dat += "Machine is currently " if(on) - dat += "On " + dat += "On " else - dat += "Off " + dat += "Off " return dat diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index b2f9cb8bb063..47f9ab77c8cc 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -38,8 +38,6 @@ "Virology" = list(MAT_PLASMA, MAT_URANIUM, MAT_GOLD) ) // Variables - /// The currently inserted ID. - var/obj/item/card/id/inserted_id = null /// The number of unclaimed points. var/points = 0 /// Sheet multiplier applied when smelting ore. Updated by [/obj/machinery/proc/RefreshParts]. @@ -126,7 +124,6 @@ /obj/machinery/mineral/ore_redemption/Destroy() // Move any stuff inside us out var/turf/T = get_turf(src) - inserted_id?.forceMove(T) inserted_disk?.forceMove(T) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() @@ -151,10 +148,6 @@ if(!..()) return update_icon(UPDATE_ICON_STATE) - if(inserted_id && !(stat & NOPOWER)) - visible_message("The ID slot indicator light flickers on [src] as it spits out a card before powering down.") - inserted_id.forceMove(get_turf(src)) - inserted_id = null /obj/machinery/mineral/ore_redemption/update_icon_state() if(has_power()) @@ -194,7 +187,19 @@ return ..() if(istype(I, /obj/item/card/id)) - try_insert_id(user) + var/obj/item/card/id/ID = I + if(!points) + to_chat(usr, "There are no points to claim."); + return + if(anyone_claim || (req_access_claim in ID.access)) + ID.mining_points += points + ID.total_mining_points += points + to_chat(usr, "[points] Mining Points claimed. You have earned a total of [ID.total_mining_points] Mining Points this Shift!") + points = 0 + SStgui.update_uis(src) + else + to_chat(usr, "Required access not found.") + add_fingerprint(usr) return else if(istype(I, /obj/item/disk/design_disk)) @@ -258,7 +263,6 @@ var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) // General info - data["id"] = inserted_id ? list("name" = "[inserted_id.registered_name] ([inserted_id.assignment])", "points" = inserted_id.mining_points, "total_points" = inserted_id.total_mining_points) : null data["points"] = points data["disk"] = inserted_disk ? list( "name" = inserted_disk.name, @@ -301,18 +305,8 @@ . = TRUE switch(action) - if("claim") - if(!inserted_id || !points) - return - if(anyone_claim || (req_access_claim in inserted_id.access)) - inserted_id.mining_points += points - inserted_id.total_mining_points += points - to_chat(usr, "[points] Mining Points claimed. You have earned a total of [inserted_id.total_mining_points] Mining Points this Shift!") - points = 0 - else - to_chat(usr, "Required access not found.") if("sheet", "alloy") - if(!(check_access(inserted_id) || allowed(usr))) + if(!allowed(usr)) to_chat(usr, "Required access not found.") return FALSE var/id = params["id"] @@ -345,18 +339,6 @@ unload_mineral(A) else unload_mineral(result) - if("insert_id") - try_insert_id(usr) - if("eject_id") - if(!inserted_id) - return FALSE - if(ishuman(usr)) - usr.put_in_hands(inserted_id) - usr.visible_message("[usr] retrieves [inserted_id] from [src].", \ - "You retrieve [inserted_id] from [src].") - else - inserted_id.forceMove(get_turf(src)) - inserted_id = null if("eject_disk") if(!inserted_disk) return FALSE @@ -488,30 +470,6 @@ if(!supply_consoles[C.department] || length(supply_consoles[C.department] - mats_in_stock)) C.createMessage("Ore Redemption Machine", "New Minerals Available!", msg, RQ_NORMALPRIORITY) -/** - * Tries to insert the ID card held by the given user into the machine. - * - * Arguments: - * * user - The ID whose active hand to check for an ID card to insert. - */ -/obj/machinery/mineral/ore_redemption/proc/try_insert_id(mob/user) - . = FALSE - var/obj/item/card/id/I = user.get_active_hand() - if(!istype(I)) - return - if(inserted_id) - to_chat(user, "There is already an ID inside!") - return - if(!user.drop_item()) - return - I.forceMove(src) - inserted_id = I - SStgui.update_uis(src) - interact(user) - user.visible_message("[user] inserts [I] into [src].", \ - "You insert [I] into [src].") - return TRUE - /obj/machinery/mineral/ore_redemption/proc/try_refill_storage(mob/living/silicon/robot/robot) . = FALSE if(!istype(robot)) diff --git a/code/modules/mining/machine_stacking.dm b/code/modules/mining/machine_stacking.dm index ada5b502a6ba..9299a2bb9fb9 100644 --- a/code/modules/mining/machine_stacking.dm +++ b/code/modules/mining/machine_stacking.dm @@ -36,7 +36,7 @@ for(var/O in machine.stack_list) s = machine.stack_list[O] if(s.amount > 0) - dat += "[capitalize(s.name)]: [s.amount] Release
    " + dat += "[capitalize(s.name)]: [s.amount] Release
    " dat += "
    Stacking: [machine.stack_amt]

    " diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index 3512188f4e99..bbaf8aa8e724 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -45,20 +45,20 @@ if(chosen == mat_id) dat += "Chosen" else - dat += "Choose" + dat += "Choose" var/datum/material/M = materials.materials[chosen] dat += "

    Will produce [coinsToProduce] [lowertext(M.name)] coins if enough materials are available.
    " - dat += "-10 " - dat += "-5 " - dat += "-1 " - dat += "+1 " - dat += "+5 " - dat += "+10 " + dat += "-10 " + dat += "-5 " + dat += "-1 " + dat += "+1 " + dat += "+5 " + dat += "+10 " dat += "

    In total this machine produced [newCoins] coins." - dat += "
    Make coins" + dat += "
    Make coins" user << browse(dat, "window=mint") /obj/machinery/mineral/mint/Topic(href, href_list) diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index ed12dc875af8..fb455af71a1d 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -47,7 +47,7 @@ var/obj/item/stack/ore/O = type dat += "[initial(O.name)] - [assembled[type]]
    " - dat += "

    Empty box" + dat += "

    Empty box" var/datum/browser/popup = new(user, "orebox", name, 400, 400) popup.set_content(dat) popup.open(0) diff --git a/code/modules/mob/dead/observer/observer_base.dm b/code/modules/mob/dead/observer/observer_base.dm index a970301be260..8b158b8f18e6 100644 --- a/code/modules/mob/dead/observer/observer_base.dm +++ b/code/modules/mob/dead/observer/observer_base.dm @@ -36,6 +36,8 @@ GLOBAL_DATUM_INIT(ghost_crew_monitor, /datum/ui_module/crew_monitor/ghost, new) var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off ///toggle for ghost gas analyzer var/gas_analyzer = FALSE + ///toggle for ghost plant analyzer + var/plant_analyzer = FALSE var/datum/orbit_menu/orbit_menu /// The "color" their runechat would have had var/alive_runechat_color = "#FFFFFF" @@ -330,7 +332,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp A.overlays += source source.layer = old_layer source.plane = old_plane - to_chat(src, "(Click to re-enter)") + to_chat(src, "(Click to re-enter)") if(sound) SEND_SOUND(src, sound(sound)) @@ -585,6 +587,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, "Gas Analyzer enabled. Click on a pipe to analyze.") gas_analyzer = TRUE +/mob/dead/observer/verb/toggle_plant_anaylzer() + set name = "Toggle Plant Analyzer" + set desc = "Toggles wether you can anaylze plants and seeds on click" + set category = "Ghost" + + if(plant_analyzer) + to_chat(src, "Plant Analyzer disabled.") + plant_analyzer = FALSE + else + to_chat(src, "Plant Analyzer enabled. Click on a plant or seed to analyze.") + plant_analyzer = TRUE + /mob/dead/observer/verb/analyze_air() set name = "Analyze Air" set category = "Ghost" diff --git a/code/modules/mob/dead/observer/observer_say.dm b/code/modules/mob/dead/observer/observer_say.dm index 2f3c2dc68d2b..3b97ab5d8344 100644 --- a/code/modules/mob/dead/observer/observer_say.dm +++ b/code/modules/mob/dead/observer/observer_say.dm @@ -4,6 +4,9 @@ if(!message) return + if(GLOB.configuration.general.enable_ooc_emoji) + message = emoji_parse(message) + return say_dead(message) /mob/dead/observer/handle_track(message, verb = "says", mob/speaker = null, speaker_name, atom/follow_target, hard_to_hear) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index fe394afcaefa..ca9e337635bc 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -9,7 +9,7 @@ emp_act /mob/living/carbon/human/bullet_act(obj/item/projectile/P, def_zone) - if(!dna.species.bullet_act(P, src)) + if(!dna.species.bullet_act(P, src, def_zone)) add_attack_logs(P.firer, src, "hit by [P.type] but got deflected by species '[dna.species]'") P.reflect_back(src) //It has to be here, not on species. Why? Who knows. Testing showed me no reason why it doesn't work on species, and neither did tracing. It has to be here, or it gets qdel'd by bump. return -1 diff --git a/code/modules/mob/living/carbon/human/human_examine.dm b/code/modules/mob/living/carbon/human/human_examine.dm index ff929ce611b8..165353221e99 100644 --- a/code/modules/mob/living/carbon/human/human_examine.dm +++ b/code/modules/mob/living/carbon/human/human_examine.dm @@ -209,11 +209,11 @@ medical = R.fields["p_stat"] mental = R.fields["m_stat"] - var/medical_status = hasHUD(user, EXAMINE_HUD_MEDICAL_WRITE) ? "\[[medical]\]" : "\[[medical]\]" - var/mental_status = hasHUD(user, EXAMINE_HUD_MEDICAL_WRITE) ? "\[[mental]\]" : "\[[mental]\]" + var/medical_status = hasHUD(user, EXAMINE_HUD_MEDICAL_WRITE) ? "\[[medical]\]" : "\[[medical]\]" + var/mental_status = hasHUD(user, EXAMINE_HUD_MEDICAL_WRITE) ? "\[[mental]\]" : "\[[mental]\]" msg += "Physical status: [medical_status]\n" msg += "Mental Status: [mental_status]\n" - msg += "Medical records: \[View\] \[Add comment\]\n" + msg += "Medical records: \[View\] \[Add comment\]\n" if(hasHUD(user, EXAMINE_HUD_SECURITY_READ)) var/perpname = get_visible_name(TRUE) @@ -234,9 +234,9 @@ else commentLatest = "No entries." //If present but without entries (=target is recognized crew) - var/criminal_status = hasHUD(user, EXAMINE_HUD_SECURITY_WRITE) ? "\[[criminal]\]" : "\[[criminal]\]" + var/criminal_status = hasHUD(user, EXAMINE_HUD_SECURITY_WRITE) ? "\[[criminal]\]" : "\[[criminal]\]" msg += "Criminal status: [criminal_status]\n" - msg += "Security records: \[View comment log\] \[Add comment\]\n" + msg += "Security records: \[View comment log\] \[Add comment\]\n" msg += "Latest entry: [commentLatest]\n" diff --git a/code/modules/mob/living/carbon/human/human_mob.dm b/code/modules/mob/living/carbon/human/human_mob.dm index 36b183cf4c14..c79acbd6c07f 100644 --- a/code/modules/mob/living/carbon/human/human_mob.dm +++ b/code/modules/mob/living/carbon/human/human_mob.dm @@ -496,7 +496,7 @@ to_chat(usr, "Major Crimes: [R.fields["ma_crim"]]") to_chat(usr, "Details: [R.fields["ma_crim_d"]]") to_chat(usr, "Notes: [R.fields["notes"]]") - to_chat(usr, "\[View Comment Log\]") + to_chat(usr, "\[View Comment Log\]") read = 1 if(!read) @@ -524,7 +524,7 @@ else to_chat(usr, "No comments found") if(hasHUD(usr, EXAMINE_HUD_SECURITY_WRITE)) - to_chat(usr, "\[Add comment\]") + to_chat(usr, "\[Add comment\]") if(!read) to_chat(usr, "Unable to locate a data core entry for this person.") @@ -601,7 +601,7 @@ to_chat(usr, "Major Disabilities: [R.fields["ma_dis"]]") to_chat(usr, "Details: [R.fields["ma_dis_d"]]") to_chat(usr, "Notes: [R.fields["notes"]]") - to_chat(usr, "\[View Comment Log\]") + to_chat(usr, "\[View Comment Log\]") read = 1 if(!read) @@ -625,7 +625,7 @@ to_chat(usr, c) else to_chat(usr, "No comment found") - to_chat(usr, "\[Add comment\]") + to_chat(usr, "\[Add comment\]") if(!read) to_chat(usr, "Unable to locate a data core entry for this person.") diff --git a/code/modules/mob/living/carbon/human/species/diona_species.dm b/code/modules/mob/living/carbon/human/species/diona_species.dm index e68698ad4493..65ad87eadda9 100644 --- a/code/modules/mob/living/carbon/human/species/diona_species.dm +++ b/code/modules/mob/living/carbon/human/species/diona_species.dm @@ -111,24 +111,22 @@ H.adjustBruteLoss(2) ..() -/datum/species/diona/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H) - switch(P.type) - if(/obj/item/projectile/energy/floramut) - if(prob(15)) - H.rad_act(rand(30, 80)) - H.Weaken(10 SECONDS) - H.visible_message("[H] writhes in pain as [H.p_their()] vacuoles boil.", "You writhe in pain as your vacuoles boil!", "You hear the crunching of leaves.") - if(prob(80)) - randmutb(H) - domutcheck(H) - else - randmutg(H) - domutcheck(H) - else - H.adjustFireLoss(rand(5, 15)) - H.show_message("The radiation beam singes you!") - if(/obj/item/projectile/energy/florayield) - H.set_nutrition(min(H.nutrition + 30, NUTRITION_LEVEL_FULL)) +/datum/species/diona/bullet_act(obj/item/projectile/P, mob/living/carbon/human/H, def_zone) + if(istype(P, /obj/item/projectile/energy/floramut)) + P.nodamage = TRUE + H.Weaken(1 SECONDS) + if(prob(80)) + randmutb(H) + else + randmutg(H) + H.visible_message("[H] writhes for a moment as [H.p_their()] nymphs squirm and mutate.", "All of you squirm uncomfortably for a moment as you feel your genes changing.") + else if(istype(P, /obj/item/projectile/energy/florayield)) + P.nodamage = TRUE + var/obj/item/organ/external/organ = H.get_organ(check_zone(def_zone)) + if(!organ) + organ = H.get_organ("chest") + organ.heal_damage(5, 5) + H.visible_message("[H] seems invogorated as [P] hits [H.p_their()] [organ.name].", "Your [organ.name] greedily absorbs [P].") return TRUE /// Same name and everything; we want the same limitations on them; we just want their regeneration to kick in at all times and them to have special factions diff --git a/code/modules/mob/living/death.dm b/code/modules/mob/living/death.dm index e071470af7d5..fac9c031dc98 100644 --- a/code/modules/mob/living/death.dm +++ b/code/modules/mob/living/death.dm @@ -86,7 +86,7 @@ for(var/P in GLOB.dead_mob_list) var/mob/M = P if((M.client?.prefs.toggles2 & PREFTOGGLE_2_DEATHMESSAGE) && (isobserver(M) || M.stat == DEAD)) - to_chat(M, "[mind.name] has died at [area_name]. (JMP)") + to_chat(M, "[mind.name] has died at [area_name]. (JMP)") if(last_words) to_chat(M, "[p_their(TRUE)] last words were: \"[last_words]\"") diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index 8ada26d0baaa..955d72abde29 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -113,7 +113,10 @@ GLOBAL_LIST_EMPTY(channel_to_radio_key) if(sanitize) if(speaks_ooc) - message = sanitize(message) + if(GLOB.configuration.general.enable_ooc_emoji) + message = emoji_parse(sanitize(message)) + else + message = sanitize(message) else message = sanitize_for_ic(message) diff --git a/code/modules/mob/living/silicon/ai/ai_mob.dm b/code/modules/mob/living/silicon/ai/ai_mob.dm index 06d2bbbef4ff..f707fe927a95 100644 --- a/code/modules/mob/living/silicon/ai/ai_mob.dm +++ b/code/modules/mob/living/silicon/ai/ai_mob.dm @@ -296,8 +296,8 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( status_tab_data = show_borg_info(status_tab_data) /mob/living/silicon/ai/proc/ai_alerts() - var/list/dat = list("Current Station Alerts\n") - dat += "Close

    " + var/list/dat = list("Current Station Alerts\n") + dat += "Close

    " var/list/list/temp_alarm_list = GLOB.alarm_manager.alarms.Copy() for(var/cat in temp_alarm_list) if(!(cat in alarms_listend_for)) @@ -320,7 +320,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( for(var/cam in C) var/obj/machinery/camera/I = locateUID(cam) if(!QDELETED(I)) - dat2 += "[(dat2 == "") ? "" : " | "][I.c_tag]" + dat2 += "[(dat2 == "") ? "" : " | "][I.c_tag]" dat += "-- [area_name] ([(dat2 != "") ? dat2 : "No Camera"])" else dat += "-- [area_name] (No Camera)" @@ -834,7 +834,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( var/d var/area/bot_area - d += "Query network status
    " + d += "Query network status
    " d += "" for(var/mob/living/simple_animal/bot/Bot in GLOB.bots_list) @@ -844,8 +844,8 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( //If the bot is on, it will display the bot's current mode status. If the bot is not mode, it will just report "Idle". "Inactive if it is not on at all. d += "" d += "" - d += "" - d += "" + d += "" + d += "" d += "" d = format_text(d) @@ -884,14 +884,14 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( if(O) var/obj/machinery/camera/C = locateUID(O[1]) if(O.len == 1 && !QDELETED(C) && C.can_use()) - queueAlarm("--- [class] alarm detected in [A.name]! ([C.c_tag])", class) + queueAlarm("--- [class] alarm detected in [A.name]! ([C.c_tag])", class) else if(O && O.len) var/foo = 0 var/dat2 = "" for(var/thing in O) var/obj/machinery/camera/I = locateUID(thing) if(!QDELETED(I)) - dat2 += "[(!foo) ? "" : " | "][I.c_tag]" //I'm not fixing this shit... + dat2 += "[(!foo) ? "" : " | "][I.c_tag]" //I'm not fixing this shit... foo = 1 queueAlarm(text ("--- [] alarm detected in []! ([])", class, A.name, dat2), class) else @@ -1547,7 +1547,7 @@ GLOBAL_LIST_INIT(ai_verbs_default, list( /mob/living/silicon/ai/ghostize(can_reenter_corpse) var/old_turf = get_turf(eyeobj) . = ..() - if(isobserver(.)) + if(isobserver(.) && old_turf) var/mob/dead/observer/ghost = . ghost.forceMove(old_turf) diff --git a/code/modules/mob/living/silicon/ai/ai_say.dm b/code/modules/mob/living/silicon/ai/ai_say.dm index 99f16c1228fb..5f9535b43c18 100644 --- a/code/modules/mob/living/silicon/ai/ai_say.dm +++ b/code/modules/mob/living/silicon/ai/ai_say.dm @@ -99,7 +99,7 @@ GLOBAL_VAR_INIT(announcing_vox, 0) // Stores the time of the last announcement var/list/localdat = list() var/uid_cache = UID() // Saves proc jumping for(var/word in word_list) - localdat += "[word]" + localdat += "[word]" return localdat.Join(" / ") /mob/living/silicon/ai/proc/ai_announcement() diff --git a/code/modules/mob/living/silicon/pai/recruit.dm b/code/modules/mob/living/silicon/pai/recruit.dm index 47b33f22361a..fb46219f6e7d 100644 --- a/code/modules/mob/living/silicon/pai/recruit.dm +++ b/code/modules/mob/living/silicon/pai/recruit.dm @@ -354,7 +354,7 @@ GLOBAL_DATUM_INIT(paiController, /datum/paiController, new) // Global handler fo if(O.client && (ROLE_PAI in O.client.prefs.be_special)) if(player_old_enough_antag(O.client,ROLE_PAI)) if(check_recruit(O)) - to_chat(O, "A pAI card activated by [user.real_name] is looking for personalities. (Teleport | Sign Up)") + to_chat(O, "A pAI card activated by [user.real_name] is looking for personalities. (Teleport | Sign Up)") //question(O.client) /datum/paiController/proc/check_recruit(mob/dead/observer/O) diff --git a/code/modules/mob/living/silicon/silicon_mob.dm b/code/modules/mob/living/silicon/silicon_mob.dm index e2f7253cda58..9a374ea0f880 100644 --- a/code/modules/mob/living/silicon/silicon_mob.dm +++ b/code/modules/mob/living/silicon/silicon_mob.dm @@ -169,7 +169,7 @@ if(alarm_types_show["Power"]) msg += "POWER: [alarm_types_show["Power"]] alarms detected. - " - msg += "\[Show Alerts\]" + msg += "\[Show Alerts\]" var/msg_text = msg.Join("") to_chat(src, msg_text) @@ -192,7 +192,7 @@ if(alarm_types_clear["Power"]) msg += "POWER: [alarm_types_clear["Power"]] alarms cleared. - " - msg += "\[Show Alerts\]" + msg += "\[Show Alerts\]" var/msg_text = msg.Join("") to_chat(src, msg_text) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 6b97ad331db8..9c8819b2a11d 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -1011,9 +1011,9 @@ Pass a positive integer as an argument to override a bot's default speed. var/hack if(issilicon(user) || user.can_admin_interact()) // Allows silicons or admins to toggle the emag status of a bot. hack += "[emagged ? "Software compromised! Unit may exhibit dangerous or erratic behavior." : "Unit operating normally. Release safety lock?"]
    " - hack += "Harm Prevention Safety System: [emagged ? "DANGER" : "Engaged"]
    " + hack += "Harm Prevention Safety System: [emagged ? "DANGER" : "Engaged"]
    " else if(!locked) // Humans with access can use this option to hide a bot from the AI's remote control panel and PDA control. - hack += "Remote network control radio: [remote_disabled ? "Disconnected" : "Connected"]
    " + hack += "Remote network control radio: [remote_disabled ? "Disconnected" : "Connected"]
    " return hack /mob/living/simple_animal/bot/proc/showpai(mob/user) @@ -1023,9 +1023,9 @@ Pass a positive integer as an argument to override a bot's default speed. eject += "Personality card status: " if(paicard) if(client) - eject += "Active" + eject += "Active" else - eject += "Inactive" + eject += "Inactive" else if(!allow_pai || key) eject += "Unavailable" else @@ -1099,6 +1099,8 @@ Pass a positive integer as an argument to override a bot's default speed. to_chat(src, "0. [paicard.pai.pai_law0]") if(emagged) to_chat(src, "1. #$!@#$32K#$") + else if(HAS_TRAIT(src, TRAIT_CMAGGED)) + to_chat(src, "1. Be funny.") else to_chat(src, "1. You are a machine built to serve the station's crew and AI(s).") to_chat(src, "2. Your function is to [bot_purpose].") diff --git a/code/modules/mob/living/simple_animal/bot/honkbot.dm b/code/modules/mob/living/simple_animal/bot/honkbot.dm index 8f118b1a0591..00c6667b5e97 100644 --- a/code/modules/mob/living/simple_animal/bot/honkbot.dm +++ b/code/modules/mob/living/simple_animal/bot/honkbot.dm @@ -130,6 +130,29 @@ playsound(src, 'sound/machines/honkbot_evil_laugh.ogg', 75, 1, -1) // evil laughter update_icon() +/mob/living/simple_animal/bot/honkbot/cmag_act(mob/user) + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + return + if(locked || !open) + to_chat(user, "Unlock and open it with a screwdriver first!") + return FALSE + + ADD_TRAIT(src, TRAIT_CMAGGED, CLOWN_EMAG) + remote_disabled = TRUE + locked = TRUE + open = FALSE + bot_reset() + turn_on() + if(user) + to_chat(user, "You smear bananium ooze all over [src]'s circuitry!") + add_attack_logs(user, src, "Cmagged") + show_laws() + +/mob/living/simple_animal/bot/honkbot/examine(mob/user) + . = ..() + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + . += "Yellow ooze seems to be seeping from the case..." + /mob/living/simple_animal/bot/honkbot/bullet_act(obj/item/projectile/Proj) if((istype(Proj,/obj/item/projectile/beam)) || (istype(Proj,/obj/item/projectile/bullet) && (Proj.damage_type == BURN))||(Proj.damage_type == BRUTE) && (!Proj.nodamage && Proj.damage < health && ishuman(Proj.firer))) retaliate(Proj.firer) @@ -180,34 +203,57 @@ sensor_blink() addtimer(VARSET_CALLBACK(src, spam_flag, FALSE), cooldowntimehorn) +/mob/living/simple_animal/bot/honkbot/proc/cuff_callback(mob/living/carbon/C) + mode = BOT_ARREST + sleep(1 SECONDS) + playsound(loc, 'sound/weapons/cablecuff.ogg', 30, TRUE, -2) + C.visible_message("[src] is trying to put zipties on [C]!", + "[src] is trying to put zipties on you!") + if(!do_after(src, 6 SECONDS, target = C) || !on) + mode = BOT_IDLE + return + if(!C.handcuffed) + C.handcuffed = new /obj/item/restraints/handcuffs/twimsts(C) + C.update_handcuffed() + C.SetDeaf(0) + playsound(loc, pick('sound/voice/bgod.ogg', 'sound/voice/biamthelaw.ogg', 'sound/voice/bsecureday.ogg', 'sound/voice/bradio.ogg', 'sound/voice/bcreep.ogg'), 50, FALSE) + mode = BOT_IDLE + /mob/living/simple_animal/bot/honkbot/proc/stun_attack(mob/living/carbon/C) // airhorn stun - if(!spam_flag) - playsound(src, 'sound/items/AirHorn.ogg', 100, TRUE, -1) //HEEEEEEEEEEEENK!! - sensor_blink() - if(!spam_flag) - if(ishuman(C)) - var/mob/living/carbon/human/H = C - if(H.check_ear_prot() >= HEARING_PROTECTION_MAJOR) - return - C.SetStuttering(40 SECONDS) //stammer - C.Deaf(5 SECONDS) //far less damage than the H.O.N.K. - C.Jitter(100 SECONDS) - C.Weaken(10 SECONDS) - if(client) //prevent spam from players.. - spam_flag = TRUE - if(!emagged) //HONK once, then leave - threatlevel -= 6 - target = oldtarget_name - else // you really don't want to hit an emagged honkbot - threatlevel = 6 // will never let you go - addtimer(VARSET_CALLBACK(src, spam_flag, FALSE), cooldowntimehorn) - add_attack_logs(src, C, "honked by [src]") - C.visible_message("[src] has honked [C]!",\ - "[src] has honked you!") - else - C.Stuttering(40 SECONDS) - C.Stun(20 SECONDS) - addtimer(VARSET_CALLBACK(src, spam_flag, FALSE), cooldowntimehorn) + if(spam_flag) + return + playsound(src, 'sound/items/AirHorn.ogg', 100, TRUE, -1) //HEEEEEEEEEEEENK!! + sensor_blink() + + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + var/area/location = get_area(src) + speak("Arresting level 4 scumbag [C] in [location].", radio_channel) + + if(!ishuman(C)) + C.Stuttering(40 SECONDS) + C.Stun(20 SECONDS) + addtimer(VARSET_CALLBACK(src, spam_flag, FALSE), cooldowntimehorn) + return + var/mob/living/carbon/human/H = C + if(H.check_ear_prot() >= HEARING_PROTECTION_MAJOR) + return + C.SetStuttering(40 SECONDS) //stammer + C.Deaf(5 SECONDS) //far less damage than the H.O.N.K. + C.Jitter(100 SECONDS) + C.Weaken(10 SECONDS) + if(client) //prevent spam from players.. + spam_flag = TRUE + if(!emagged) //HONK once, then leave + threatlevel -= 6 + target = oldtarget_name + else // you really don't want to hit an emagged honkbot + threatlevel = 6 // will never let you go + addtimer(VARSET_CALLBACK(src, spam_flag, FALSE), cooldowntimehorn) + add_attack_logs(src, C, "honked by [src]") + C.visible_message("[src] has honked [C]!", + "[src] has honked you!") + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + INVOKE_ASYNC(src, PROC_REF(cuff_callback), C) /mob/living/simple_animal/bot/honkbot/handle_automated_action() @@ -237,9 +283,9 @@ honk_attack(target) else if(threatlevel >= 6) + target_lastloc = target.loc stun_attack(target) anchored = FALSE - target_lastloc = target.loc return try_chasing_target(target) @@ -278,6 +324,8 @@ if((C.name == oldtarget_name) && (world.time < last_found + 100)) continue + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + threatlevel = 6 if(threatlevel < 4) if(emagged) // actually emagged bike_horn() @@ -292,8 +340,13 @@ target = C oldtarget_name = C.name bike_horn() - speak("Honk!") - visible_message("[src] starts chasing [C.name]!") + if(HAS_TRAIT(src, TRAIT_CMAGGED)) + speak("Level 4 infraction alert!") + playsound(loc, pick('sound/voice/bcriminal.ogg', 'sound/voice/bjustice.ogg', 'sound/voice/bfreeze.ogg'), 50, FALSE) + visible_message("[src] points at [C.name]!") + else + speak("Honk!") + visible_message("[src] starts chasing [C.name]!") mode = BOT_HUNT INVOKE_ASYNC(src, PROC_REF(handle_automated_action)) return TRUE diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 34a63ac5db40..66251a3dd9e1 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -273,7 +273,7 @@ /mob/living/simple_animal/bot/medbot/process_scan(mob/living/carbon/human/H) if(buckled) if((last_warning + 300) < world.time) - speak("Movement restrained! Unit on standby!") + speak("Movement restrained! Unit on standby!") playsound(loc, 'sound/machines/buzz-two.ogg', 50, FALSE) last_warning = world.time return diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 6036614248d4..221ca0d017d1 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -305,31 +305,31 @@ dat += "Power level: [cell ? cell.percent() : 0]%" if(locked && !ai && !user.can_admin_interact()) - dat += " 
    Controls are locked
    Unlock Controls" + dat += " 
    Controls are locked
    Unlock Controls" else - dat += " 
    Controls are unlocked
    Lock Controls

    " - - dat += "Toggle Power
    " - dat += "Stop
    " - dat += "Proceed
    " - dat += "Return to Home
    " - dat += "Set Destination
    " - dat += "Set Bot ID
    " - dat += "Set Home
    " - dat += "Toggle Auto Return Home ([auto_return ? "On":"Off"])
    " - dat += "Toggle Auto Pickup Crate ([auto_pickup ? "On":"Off"])
    " - dat += "Toggle Delivery Reporting ([report_delivery ? "On" : "Off"])
    " + dat += " 
    Controls are unlocked
    Lock Controls

    " + + dat += "Toggle Power
    " + dat += "Stop
    " + dat += "Proceed
    " + dat += "Return to Home
    " + dat += "Set Destination
    " + dat += "Set Bot ID
    " + dat += "Set Home
    " + dat += "Toggle Auto Return Home ([auto_return ? "On":"Off"])
    " + dat += "Toggle Auto Pickup Crate ([auto_pickup ? "On":"Off"])
    " + dat += "Toggle Delivery Reporting ([report_delivery ? "On" : "Off"])
    " if(load) - dat += "Unload Now
    " + dat += "Unload Now
    " dat += "
    The maintenance hatch is closed.
    " else if(!ai) dat += "
    The maintenance hatch is open.

    " dat += "Power cell: " if(cell) - dat += "Installed
    " + dat += "Installed
    " else - dat += "Removed
    " + dat += "Removed
    " wires.Interact(user) else diff --git a/code/modules/mob/living/simple_animal/hostile/bees.dm b/code/modules/mob/living/simple_animal/hostile/bees.dm index 68bb9bc7b5f1..e501bf3d5284 100644 --- a/code/modules/mob/living/simple_animal/hostile/bees.dm +++ b/code/modules/mob/living/simple_animal/hostile/bees.dm @@ -7,7 +7,6 @@ #define BEE_POLLINATE_YIELD_CHANCE 33 #define BEE_POLLINATE_PEST_CHANCE 33 -#define BEE_POLLINATE_POTENCY_CHANCE 50 /mob/living/simple_animal/hostile/poison/bees name = "bee" @@ -212,11 +211,8 @@ Hydro.adjustHealth(growth*0.5) if(prob(BEE_POLLINATE_PEST_CHANCE)) Hydro.adjustPests(-10) - if(prob(BEE_POLLINATE_YIELD_CHANCE)) - Hydro.myseed.adjust_yield(1) + if(prob(BEE_POLLINATE_YIELD_CHANCE) && !Hydro.self_sustaining) Hydro.yieldmod = 2 - if(prob(BEE_POLLINATE_POTENCY_CHANCE)) - Hydro.myseed.adjust_potency(1) if(beehome) beehome.bee_resources = min(beehome.bee_resources + growth, 100) @@ -393,4 +389,3 @@ #undef BEE_DEFAULT_COLOUR #undef BEE_POLLINATE_YIELD_CHANCE #undef BEE_POLLINATE_PEST_CHANCE -#undef BEE_POLLINATE_POTENCY_CHANCE 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 daba2b30db15..02a22268efed 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider.dm @@ -65,7 +65,7 @@ icon_state = "nurse" icon_living = "nurse" icon_dead = "nurse_dead" - butcher_results = list(/obj/item/food/snacks/monstermeat/spidermeat= 2, /obj/item/food/snacks/monstermeat/spiderleg= 8, /obj/item/food/snacks/monstermeat/spidereggs= 4) + butcher_results = list(/obj/item/food/snacks/monstermeat/spidermeat = 2, /obj/item/food/snacks/monstermeat/spiderleg = 8, /obj/item/food/snacks/monstermeat/spidereggs = 4) maxHealth = 40 health = 40 diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 4f4862be4cc6..db9ea7ed9d0e 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -349,6 +349,11 @@ walk(src, 0) LoseAggro() +/// Shortcut proc to allow initiating combat slightly faster than waiting for normal processing. +/mob/living/simple_animal/hostile/proc/aggro_fast(known_target) + FindTarget(list(known_target), TRUE) + MoveToTarget(list(known_target)) + //////////////END HOSTILE MOB TARGETTING AND AGGRESSION//////////// /mob/living/simple_animal/hostile/death(gibbed) @@ -358,16 +363,6 @@ return FALSE LoseTarget() -/mob/living/simple_animal/hostile/proc/summon_backup(distance) - do_alert_animation(src) - playsound(loc, 'sound/machines/chime.ogg', 50, 1, -1) - for(var/mob/living/simple_animal/hostile/M in oview(distance, targets_from)) - if(faction_check_mob(M, TRUE)) - if(M.AIStatus == AI_OFF) - return - else - M.Goto(src,M.move_to_delay,M.minimum_distance) - /mob/living/simple_animal/hostile/proc/CheckFriendlyFire(atom/A) if(check_friendly_fire) for(var/turf/T in get_line(src,A)) // Not 100% reliable but this is faster than simulating actual trajectory diff --git a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm index b3260be8952c..84d615708625 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining/elites/elite.dm @@ -154,7 +154,7 @@ While using this makes the system rely on OnFire, it still gives options for tim /obj/structure/elite_tumor name = "pulsing tumor" - desc = "An odd, pulsing tumor sticking out of the ground. You feel compelled to reach out and touch it..." + desc = "An odd, pulsing tumor sticking out of the ground. You feel compelled to reach out and touch it..." resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF icon = 'icons/obj/lavaland/tumor.dmi' icon_state = "tumor" @@ -192,12 +192,12 @@ While using this makes the system rely on OnFire, it still gives options for tim "You reach for [src] with your arm... but nothing happens.") return activity = TUMOR_ACTIVE - user.visible_message("[src] convulses as [user]'s arm enters its radius. Uh-oh...", - "[src] convulses as your arm enters its radius. Your instincts tell you to step back.") + user.visible_message("[src] convulses as [user]'s arm enters its radius. Uh-oh...", + "[src] convulses as your arm enters its radius. Your instincts tell you to step back.") make_activator(user) if(boosted) mychild.playsound_local(get_turf(mychild), 'sound/magic/cult_spell.ogg', 40, 0) - to_chat(mychild, "Someone has activated your tumor. You will be returned to fight shortly, get ready!") + to_chat(mychild, "Someone has activated your tumor. You will be returned to fight shortly, get ready!") addtimer(CALLBACK(src, PROC_REF(return_elite)), 3 SECONDS) if(TUMOR_INACTIVE) if(HAS_TRAIT(src, TRAIT_ELITE_CHALLENGER)) @@ -219,12 +219,12 @@ While using this makes the system rely on OnFire, it still gives options for tim SEND_SOUND(elitemind, 'sound/magic/cult_spell.ogg') to_chat(elitemind, "You have been chosen to play as a Lavaland Elite.\nIn a few seconds, you will be summoned on Lavaland as a monster to fight your activator, in a fight to the death.\n\ Your attacks can be switched using the buttons on the top left of the HUD, and used by clicking on targets or tiles similar to a gun.\n\ - While the opponent might have an upper hand with powerful mining equipment and tools, you have great power normally limited by AI mobs.\n\ + While the opponent might have an upper hand with powerful mining equipment and tools, you have great power normally limited by AI mobs.\n\ If you want to win, you'll have to use your powers in creative ways to ensure the kill. It's suggested you try using them all as soon as possible.\n\ Should you win, you'll receive extra information regarding what to do after. Good luck!") addtimer(CALLBACK(src, PROC_REF(spawn_elite), elitemind), 10 SECONDS) else - visible_message("The stirring stops, and nothing emerges. Perhaps try again later.") + visible_message("The stirring stops, and nothing emerges. Perhaps try again later.") activity = TUMOR_INACTIVE clear_activator(user) @@ -237,7 +237,7 @@ While using this makes the system rely on OnFire, it still gives options for tim mychild.key = elitemind.key mychild.sentience_act() dust_if_respawnable(elitemind) - notify_ghosts("\A [mychild] has been awakened in \the [get_area(src)]!", enter_link="(Click to help)", source = mychild, action = NOTIFY_FOLLOW) + notify_ghosts("\A [mychild] has been awakened in \the [get_area(src)]!", enter_link="(Click to help)", source = mychild, action = NOTIFY_FOLLOW) icon_state = "tumor_popped" RegisterSignal(mychild, COMSIG_PARENT_QDELETING, PROC_REF(onEliteLoss)) INVOKE_ASYNC(src, PROC_REF(arena_checks)) @@ -252,7 +252,7 @@ While using this makes the system rely on OnFire, it still gives options for tim mychild.maxHealth = mychild.maxHealth * 2.5 mychild.health = mychild.maxHealth mychild.grab_ghost() - notify_ghosts("\A [mychild] has been challenged in \the [get_area(src)]!", enter_link="(Click to help)", source = mychild, action = NOTIFY_FOLLOW) + notify_ghosts("\A [mychild] has been challenged in \the [get_area(src)]!", enter_link="(Click to help)", source = mychild, action = NOTIFY_FOLLOW) INVOKE_ASYNC(src, PROC_REF(arena_checks)) AddComponent(/datum/component/proximity_monitor, ARENA_RADIUS) @@ -399,7 +399,7 @@ While using this makes the system rely on OnFire, it still gives options for tim SSblackbox.record_feedback("tally", "ai_controlled_elite_win", 1, mychild.name) if(times_won == 1) mychild.playsound_local(get_turf(mychild), 'sound/magic/cult_spell.ogg', 40, 0) - to_chat(mychild, "As the life in the activator's eyes fade, the forcefield around you dies out and you feel your power subside.\n\ Despite this inferno being your home, you feel as if you aren't welcome here anymore.\n\ Without any guidance, your purpose is now for you to decide.") to_chat(mychild, "Your max health has been halved, but can now heal by standing on your tumor. Note, it's your only way to heal.\n\ @@ -430,8 +430,8 @@ While using this makes the system rely on OnFire, it still gives options for tim E.revive() user.visible_message("[user] stabs [E] with [src], reviving it.") SEND_SOUND(E, 'sound/magic/cult_spell.ogg') - to_chat(E, "You have been revived by [user], and you owe [user] a great debt. Assist [user.p_them()] in achieving [user.p_their()] goals, regardless of risk.") - to_chat(E, "Note that you now share the loyalties of [user]. You are expected not to intentionally sabotage their faction unless commanded to!") + to_chat(E, "You have been revived by [user], and you owe [user] a great debt. Assist [user.p_them()] in achieving [user.p_their()] goals, regardless of risk.") + to_chat(E, "Note that you now share the loyalties of [user]. You are expected not to intentionally sabotage their faction unless commanded to!") if(user.mind.special_role) E.maxHealth = 300 E.health = 300 diff --git a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm index f9bf105509da..34a0463a577f 100644 --- a/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm +++ b/code/modules/mob/living/simple_animal/hostile/terror_spiders/terror_spiders.dm @@ -294,7 +294,7 @@ GLOBAL_LIST_EMPTY(ts_infected_list) notify_ghosts("[src] (player controlled) has appeared in [get_area(src)].") else if(ai_playercontrol_allowtype) var/image/alert_overlay = image('icons/mob/terrorspider.dmi', icon_state) - notify_ghosts("[src] has appeared in [get_area(src)].", enter_link = "(Click to control)", source = src, alert_overlay = alert_overlay, action = NOTIFY_ATTACK) + notify_ghosts("[src] has appeared in [get_area(src)].", enter_link = "(Click to control)", source = src, alert_overlay = alert_overlay, action = NOTIFY_ATTACK) /mob/living/simple_animal/hostile/poison/terror_spider/Destroy() GLOB.ts_spiderlist -= src diff --git a/code/modules/mob/mob_login_base.dm b/code/modules/mob/mob_login_base.dm index 82edfec0b47e..bae72a943d38 100644 --- a/code/modules/mob/mob_login_base.dm +++ b/code/modules/mob/mob_login_base.dm @@ -23,10 +23,10 @@ alert("You have logged in already with another key this round, please log out of this one NOW or risk being banned!") if(matches) if(M.client) - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)].", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)].") else - message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) + message_admins("Notice: [key_name_admin(src)] has the same [matches] as [key_name_admin(M)] (no longer logged in). ", 1) log_adminwarn("Notice: [key_name(src)] has the same [matches] as [key_name(M)] (no longer logged in).") /mob/Login() diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index fa40a2ef7316..7c389e5cd0dc 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -31,7 +31,7 @@ privacy_consent() /mob/new_player/proc/privacy_consent() - var/output = GLOB.join_tos + var/output = "[GLOB.join_tos]" // Dont blank out the other window. This one is read only. if(!GLOB.configuration.system.external_tos_handler) src << browse(null, "window=playersetup") diff --git a/code/modules/newscaster/obj/newspaper.dm b/code/modules/newscaster/obj/newspaper.dm index 2f6f48a0df98..f2afb5f0e3d0 100644 --- a/code/modules/newscaster/obj/newspaper.dm +++ b/code/modules/newscaster/obj/newspaper.dm @@ -43,7 +43,7 @@ return if(ishuman(user)) var/mob/living/carbon/human/human_user = user - var/dat = {""} + var/dat = {""} pages = 0 switch(screen) if(SCREEN_COVER) //Cover @@ -67,7 +67,7 @@ dat += "" if(scribble_page==curr_page) dat += "
    There is a small scribble near the end of this page... It reads: \"[scribble]\"" - dat+= "
    " + dat+= "
    " if(SCREEN_PAGE_INNER) // X channel pages inbetween. for(var/datum/feed_channel/NP in news_content) pages++ //Let's get it right again. @@ -94,7 +94,7 @@ dat += "" if(scribble_page==curr_page) dat += "
    There is a small scribble near the end of this page... It reads: \"[scribble]\"" - dat+= "

    " + dat+= "

    " if(SCREEN_PAGE_LAST) //Last page for(var/datum/feed_channel/NP in news_content) pages++ @@ -112,7 +112,7 @@ dat += "Apart from some uninteresting Classified ads, there's nothing on this page..." if(scribble_page==curr_page) dat += "
    There is a small scribble near the end of this page... It reads: \"[scribble]\"" - dat+= "
    " + dat+= "
    " else // No trailing punctuation so that it's easy to copy and paste the address if(GLOB.configuration.url.github_url) diff --git a/code/modules/paperwork/clipboard.dm b/code/modules/paperwork/clipboard.dm index de6a3e6df262..4029e767f613 100644 --- a/code/modules/paperwork/clipboard.dm +++ b/code/modules/paperwork/clipboard.dm @@ -66,14 +66,14 @@ /obj/item/clipboard/proc/showClipboard(mob/user) //Show them what's on the clipboard var/dat = "[src]" - dat += "[containedpen ? "Remove pen" : "Add pen"]

    " + dat += "[containedpen ? "Remove pen" : "Add pen"]

    " if(toppaper) - dat += "Remove[toppaper.name]

    " + dat += "Remove[toppaper.name]

    " for(var/obj/item/P in src) if(isPaperwork(P) == PAPERWORK && P != toppaper) - dat += "RemovePut on top[P.name]
    " + dat += "RemovePut on top[P.name]
    " if(isPaperwork(P) == PHOTO) - dat += "Remove[P.name]
    " + dat += "Remove[P.name]
    " var/datum/browser/popup = new(user, "clipboard", "[src]", 400, 400) popup.set_content(dat) popup.open() diff --git a/code/modules/paperwork/fax.dm b/code/modules/paperwork/fax.dm index 950b82e0119b..c8a08ca60696 100644 --- a/code/modules/paperwork/fax.dm +++ b/code/modules/paperwork/fax.dm @@ -30,8 +30,8 @@ GLOBAL_LIST_EMPTY(adminfaxes) return /datum/admins/proc/fax_panel(mob/living/user) - var/html = "Refresh" - html += "Create Fax" + var/html = "Refresh" + html += "Create Fax" html += "
    " html += "

    Admin Faxes

    " @@ -48,16 +48,16 @@ GLOBAL_LIST_EMPTY(adminfaxes) html += "
    " else html += "" - html += "" + html += "" if(!A.reply_to) if(A.from_department == "Administrator") html += "" else - html += "" + html += "" html += "" else html += "" - html += "" + html += "" html += "" html += "

    Name

    Status

    Location

    Control

    [Bot.on ? "[Bot.mode ? "[ Bot.mode_name[Bot.mode] ]": "Idle"]" : "Inactive"][bot_area.name]InterfaceCallInterfaceCall
    [ADMIN_PP(S,"[S.name]")]UnknownViewViewN/AReplyReplyN/AN/AOriginalOriginal
    " html += "" @@ -77,7 +77,7 @@ GLOBAL_LIST_EMPTY(adminfaxes) html += "
    [ADMIN_PP(S,"[S.name]")]UnknownViewView
    " html += "
    " diff --git a/code/modules/paperwork/faxmachine.dm b/code/modules/paperwork/faxmachine.dm index 5c7d18eb303e..51a6c0a13a5e 100644 --- a/code/modules/paperwork/faxmachine.dm +++ b/code/modules/paperwork/faxmachine.dm @@ -372,7 +372,7 @@ GLOBAL_LIST_EMPTY(fax_blacklist) return round((sendcooldown - world.time) / 10) /obj/machinery/photocopier/faxmachine/proc/message_admins(mob/sender, faxname, faxtype, obj/item/sent, font_colour="#9A04D1") - var/msg = "[faxname]: [key_name_admin(sender)] | REPLY: (RADIO) (FAX) ([ADMIN_SM(sender,"SM")]) | REJECT: (TEMPLATE) ([ADMIN_BSA(sender,"BSA")]) (EVILFAX) : Receiving '[sent.name]' via secure connection... view message" + var/msg = "[faxname]: [key_name_admin(sender)] | REPLY: (RADIO) (FAX) ([ADMIN_SM(sender,"SM")]) | REJECT: (TEMPLATE) ([ADMIN_BSA(sender,"BSA")]) (EVILFAX) : Receiving '[sent.name]' via secure connection... view message" var/fax_sound = sound('sound/effects/adminhelp.ogg') for(var/client/C in GLOB.admins) if(check_rights(R_EVENT, 0, C.mob)) diff --git a/code/modules/paperwork/folders.dm b/code/modules/paperwork/folders.dm index 0113e77452f8..d97c3d113150 100644 --- a/code/modules/paperwork/folders.dm +++ b/code/modules/paperwork/folders.dm @@ -46,16 +46,16 @@ return ..() /obj/item/folder/attack_self(mob/user as mob) - var/dat = {"[name]"} + var/dat = {"[name]"} for(var/obj/item/paper/P in src) - dat += "Remove - [P.name]
    " + dat += "Remove - [P.name]
    " for(var/obj/item/photo/Ph in src) - dat += "Remove - [Ph.name]
    " + dat += "Remove - [Ph.name]
    " for(var/obj/item/paper_bundle/Pa in src) - dat += "Remove - [Pa.name]
    " + dat += "Remove - [Pa.name]
    " for(var/obj/item/documents/doc in src) - dat += "Remove - [doc.name]
    " + dat += "Remove - [doc.name]
    " user << browse(dat, "window=folder") onclose(user, "folder") add_fingerprint(usr) diff --git a/code/modules/paperwork/paper.dm b/code/modules/paperwork/paper.dm index 4eee3e05dc93..dec1ff962b1e 100644 --- a/code/modules/paperwork/paper.dm +++ b/code/modules/paperwork/paper.dm @@ -261,10 +261,10 @@ /obj/item/paper/proc/updateinfolinks() info_links = info for(var/i in 1 to fields) - var/write_1 = "write" - var/write_2 = "\[a\]" + var/write_1 = "write" + var/write_2 = "\[a\]" addtofield(i, "[write_1][write_2]", 1) - info_links = info_links + "write" + "\[a\]" + info_links = info_links + "write" + "\[a\]" /obj/item/paper/proc/clearpaper() info = null diff --git a/code/modules/paperwork/paper_bundle.dm b/code/modules/paperwork/paper_bundle.dm index f23626c0e758..96f7b7ecf4f8 100644 --- a/code/modules/paperwork/paper_bundle.dm +++ b/code/modules/paperwork/paper_bundle.dm @@ -105,20 +105,20 @@ . += "It is too far away." /obj/item/paper_bundle/proc/show_content(mob/user as mob) - var/dat = {""} + var/dat = {""} var/obj/item/W = src[page] switch(screen) if(0) dat+= "
    " - dat+= "" - dat+= "

    " + dat+= "" + dat+= "

    " if(1) - dat+= "" - dat+= "" - dat+= "

    " + dat+= "" + dat+= "" + dat+= "

    " if(2) - dat+= "" - dat+= "

    " + dat+= "" + dat+= "

    " dat+= "
    " if(istype(src[page], /obj/item/paper)) var/obj/item/paper/P = W diff --git a/code/modules/pda/messenger.dm b/code/modules/pda/messenger.dm index 3f72ad3a376d..c83d85355848 100644 --- a/code/modules/pda/messenger.dm +++ b/code/modules/pda/messenger.dm @@ -199,7 +199,7 @@ PM.conversations.Add("[pda.UID()]") SStgui.update_uis(src) - PM.notify("Message from [pda.owner] ([pda.ownjob]), \"[t]\" (Reply)") + PM.notify("Message from [pda.owner] ([pda.ownjob]), \"[t]\" (Reply)") log_pda("(PDA: [src.name]) sent \"[t]\" to [P.name]", U) var/log_message = "sent PDA message \"[t]\" using [pda]" var/receiver diff --git a/code/modules/power/engines/singularity/emitter.dm b/code/modules/power/engines/singularity/emitter.dm index 1f0b631f71ea..096ccebc485c 100644 --- a/code/modules/power/engines/singularity/emitter.dm +++ b/code/modules/power/engines/singularity/emitter.dm @@ -132,7 +132,7 @@ investigate_log("turned on by [key_name(user)]", "singulo") to_chat(user, "You turn [src] [toggle].") - message_admins("Emitter turned [toggle] by [key_name_admin(user)] in ([x], [y], [z] - JMP)") + message_admins("Emitter turned [toggle] by [key_name_admin(user)] in ([x], [y], [z] - JMP)") log_game("Emitter turned [toggle] by [key_name(user)] in [x], [y], [z]") update_icon() diff --git a/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm b/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm index 63a890cf6570..c833b1340c90 100644 --- a/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/engines/singularity/particle_accelerator/particle_control.dm @@ -95,7 +95,7 @@ if(strength > strength_upper_limit) strength = strength_upper_limit else - message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - JMP)",0,1) + message_admins("PA Control Computer increased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - JMP)",0,1) log_game("PA Control Computer increased to [strength] by [key_name(usr)] in ([x],[y],[z])") investigate_log("increased to [strength] by [key_name(usr)]","singulo") @@ -108,7 +108,7 @@ if(strength < 0) strength = 0 else - message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - JMP)",0,1) + message_admins("PA Control Computer decreased to [strength] by [key_name_admin(usr)] in ([x],[y],[z] - JMP)",0,1) log_game("PA Control Computer decreased to [strength] by [key_name(usr)] in ([x],[y],[z])") investigate_log("decreased to [strength] by [key_name(usr)]","singulo") diff --git a/code/modules/power/engines/singularity/singularity.dm b/code/modules/power/engines/singularity/singularity.dm index 9fbc5c13cd2b..3fcf4600a749 100644 --- a/code/modules/power/engines/singularity/singularity.dm +++ b/code/modules/power/engines/singularity/singularity.dm @@ -156,7 +156,7 @@ last_warning = world.time var/count = locate(/obj/machinery/field/containment) in urange(30, src, 1) if(!count) - message_admins("A singularity has been created without containment fields active at [x], [y], [z] (JMP)") + message_admins("A singularity has been created without containment fields active at [x], [y], [z] (JMP)") investigate_log("was created. [count?"":"No containment fields were active"]","singulo") /obj/singularity/proc/do_dissipate() diff --git a/code/modules/power/engines/singularity/singulogen.dm b/code/modules/power/engines/singularity/singulogen.dm index 9c0e6a48e17d..e0d5cf2737db 100644 --- a/code/modules/power/engines/singularity/singulogen.dm +++ b/code/modules/power/engines/singularity/singulogen.dm @@ -14,7 +14,7 @@ /obj/machinery/the_singularitygen/process() var/turf/T = get_turf(src) if(src.energy >= 200) - message_admins("A [creation_type] has been created at [x], [y], [z] (JMP)") + message_admins("A [creation_type] has been created at [x], [y], [z] (JMP)") investigate_log("A [creation_type] has been created at [x], [y], [z]","singulo") var/obj/singularity/S = new creation_type(T, 50) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 362ca5202a3e..a2206f07dbb5 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -291,7 +291,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) if(generators_in_level() == 0) // And there's no other gravity generators on this z level alert = TRUE investigate_log("was brought online and is now producing gravity for this level.", "gravity") - message_admins("The gravity generator was brought online. ([src_area.name])") + message_admins("The gravity generator was brought online. ([src_area.name])") for(var/area/A in world) if(!is_station_level(A.z)) continue @@ -300,7 +300,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) else if(generators_in_level() == 1) // Turned off, and there is only one gravity generator on the Z level alert = TRUE investigate_log("was brought offline and there is now no gravity for this level.", "gravity") - message_admins("The gravity generator was brought offline with no backup generator. ([src_area.name])") + message_admins("The gravity generator was brought offline with no backup generator. ([src_area.name])") for(var/area/A in world) if(!is_station_level(A.z)) continue diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 03adc7cfc67e..63f179a18dc5 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -236,7 +236,7 @@ if(SSticker && SSticker.current_state == GAME_STATE_PLAYING) var/area/area = get_area(src) if(area) - message_admins("SMES deleted at ([area.name])") + message_admins("SMES deleted at ([area.name])") log_game("SMES deleted at ([area.name])") investigate_log("deleted at ([area.name])","singulo") if(terminal) diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index ed3abfcfec5b..6b52313e991a 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -171,13 +171,12 @@ if(flag) if(user.zone_selected == "mouth") - if(HAS_TRAIT(user, TRAIT_BADASS)) + if(target == user && HAS_TRAIT(user, TRAIT_BADASS)) // Check if we are blowing smoke off of our own gun, otherwise we are trying to execute someone user.visible_message("[user] blows smoke off of [src]'s barrel. What a badass.") else handle_suicide(user, target, params) return - //Exclude lasertag guns from the CLUMSY check. if(clumsy_check) if(istype(user)) diff --git a/code/modules/projectiles/guns/energy/special_eguns.dm b/code/modules/projectiles/guns/energy/special_eguns.dm index 5d5523489166..ef229890645b 100644 --- a/code/modules/projectiles/guns/energy/special_eguns.dm +++ b/code/modules/projectiles/guns/energy/special_eguns.dm @@ -71,6 +71,13 @@ selfcharge = TRUE can_holster = TRUE +/obj/item/gun/energy/floragun/pre_attack(atom/A, mob/living/user, params) + if(istype(A, /obj/machinery/hydroponics)) + // Calling afterattack from pre_attack looks stupid, but afterattack with proximity FALSE is what makes the gun fire, and we're returning FALSE to cancel the melee attack. + afterattack(A, user, FALSE, params) + return FALSE + return ..() + // Meteor Gun // /obj/item/gun/energy/meteorgun name = "meteor gun" diff --git a/code/modules/projectiles/guns/projectile/launchers.dm b/code/modules/projectiles/guns/projectile/launchers.dm index a69e2e6bb551..9c75e854f4b1 100644 --- a/code/modules/projectiles/guns/projectile/launchers.dm +++ b/code/modules/projectiles/guns/projectile/launchers.dm @@ -40,6 +40,7 @@ origin_tech = "combat=5" mag_type = /obj/item/ammo_box/magazine/m75 can_holster = TRUE // Override default automatic setting since it is a handgun sized gun + can_suppress = FALSE burst_size = 1 fire_delay = 0 actions_types = list() diff --git a/code/modules/projectiles/guns/syringe_gun.dm b/code/modules/projectiles/guns/syringe_gun.dm index 70a459e20a83..390e2693f849 100644 --- a/code/modules/projectiles/guns/syringe_gun.dm +++ b/code/modules/projectiles/guns/syringe_gun.dm @@ -414,4 +414,15 @@ user.adjustOxyLoss(20) return ..() +/obj/item/gun/syringe/blowgun/suicide_act(mob/user) + if(chambered.BB) + visible_message("[user] puts [src] to [user.p_their()] lips and inhales! It looks like [user.p_theyre()] trying to commit suicide!") + return BRUTELOSS + visible_message("[user] puts [src] to [user.p_their()] lips and begins blowing on it rapid-fire! It looks like [user.p_theyre()] trying to commit suicide!") + for(var/i in 1 to 6) + if(!use_tool(user, user, 0.5 SECONDS)) + return SHAME + var/action = pick("blows hard on [src].", "puffs out [user.p_their()] cheeks.", "tries to fire [src], but it's empty.", "utterly fails to use [src] as a straw.", "is unable to whistle through [src].", "has forgotten to attach a balloon to [src].", "accidentally left [src] on full auto.", "attempts a 360 no-scope.", "really blew it.", "definitely does not suck.", "finds [src] breathtaking.", "is no longer full of hot air.", "did not inhale.", "is determined to pass the breathalyzer test.", "has their lungs' regulator set to 150 kPa.", "has become a vent set to refill.") + visible_message("[user] [action]") + return OXYLOSS diff --git a/code/modules/projectiles/projectile/special_projectiles.dm b/code/modules/projectiles/projectile/special_projectiles.dm index d6ef8c8a422e..942fe1504e11 100644 --- a/code/modules/projectiles/projectile/special_projectiles.dm +++ b/code/modules/projectiles/projectile/special_projectiles.dm @@ -145,18 +145,17 @@ /obj/item/projectile/energy/floramut name = "alpha somatoray" icon_state = "energy" - damage = 0 - damage_type = TOX - nodamage = 1 + damage = 3 + damage_type = CLONE impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser flag = "energy" /obj/item/projectile/energy/florayield name = "beta somatoray" icon_state = "energy2" - damage = 0 - damage_type = TOX - nodamage = 1 + damage = 3 + damage_type = CLONE + impact_effect_type = /obj/effect/temp_visual/impact_effect/green_laser flag = "energy" /obj/item/projectile/energy/mindflayer diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index d2c61d1021ed..0b6092f06ed9 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -61,9 +61,10 @@ dispensable_reagents = list( "mutagen", "saltpetre", - "eznutriment", - "left4zednutriment", - "robustharvestnutriment", + "eznutrient", + "mutrient", + "left4zednutrient", + "robustharvestnutrient", "water", "atrazine", "pestkiller", @@ -608,9 +609,10 @@ dispensable_reagents = list( "mutagen", "saltpetre", - "eznutriment", - "left4zednutriment", - "robustharvestnutriment", + "eznutrient", + "mutrient", + "left4zednutrient", + "robustharvestnutrient", "water", "atrazine", "pestkiller", diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 3e718093317e..92f15a545471 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -247,10 +247,10 @@ user.set_machine(src) var/dat = "" if(temp_html) - dat = "[temp_html]

    Main Menu" + dat = "[temp_html]

    Main Menu" else if(!beaker) dat += "Please insert beaker.
    " - dat += "Close" + dat += "Close" else var/datum/reagents/R = beaker.reagents var/datum/reagent/blood/Blood = null @@ -285,14 +285,14 @@ D = GLOB.archive_diseases[A.GetDiseaseID()] if(D) if(D.name == "Unknown") - dat += "Name Disease
    " + dat += "Name Disease
    " else - dat += "Print release form
    " + dat += "Print release form
    " if(!D) CRASH("We weren't able to get the advance disease from the archive.") - dat += "Disease Agent: [D?"[D.agent] - Create virus culture bottle":"none"]
    " + dat += "Disease Agent: [D?"[D.agent] - Create virus culture bottle":"none"]
    " dat += "Common name: [(D.name||"none")]
    " dat += "Description: [(D.desc||"none")]
    " dat += "Spread: [(D.spread_text||"none")]
    " @@ -329,14 +329,14 @@ var/datum/disease/D = new type(0, null) disease_name = D.name - dat += "
  • [disease_name] - Create vaccine bottle
  • " + dat += "
  • [disease_name] - Create vaccine bottle
  • " dat += "
    " else dat += "nothing
    " else dat += "nothing
    " - dat += "
    Eject beaker[((R.total_volume&&R.reagent_list.len) ? "-- Empty and eject beaker":"")]
    " - dat += "Close" + dat += "
    Eject beaker[((R.total_volume&&R.reagent_list.len) ? "-- Empty and eject beaker":"")]
    " + dat += "Close" var/datum/browser/popup = new(user, "pandemic", name, 575, 400) popup.set_content(dat) diff --git a/code/modules/reagents/chemistry/reagents/misc_reagents.dm b/code/modules/reagents/chemistry/reagents/misc_reagents.dm index ad585ba96a17..c48798fa3042 100644 --- a/code/modules/reagents/chemistry/reagents/misc_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/misc_reagents.dm @@ -591,40 +591,51 @@ //////////////////////////////////Hydroponics stuff/////////////////////////////// -/datum/reagent/plantnutriment - name = "Generic nutriment" - id = "plantnutriment" - description = "Some kind of nutriment. You can't really tell what it is. You should probably report it, along with how you obtained it." +/datum/reagent/plantnutrient + name = "Generic nutrient" + id = "plantnutrient" + description = "Some kind of nutrient. You can't really tell what it is. You should probably report it, along with how you obtained it." color = "#000000" // RBG: 0, 0, 0 var/tox_prob = 0 + var/mutation_level = 0 taste_description = "puke" -/datum/reagent/plantnutriment/on_mob_life(mob/living/M) +/datum/reagent/plantnutrient/on_mob_life(mob/living/M) var/update_flags = STATUS_UPDATE_NONE if(prob(tox_prob)) update_flags |= M.adjustToxLoss(1*REAGENTS_EFFECT_MULTIPLIER, FALSE) return ..() | update_flags -/datum/reagent/plantnutriment/eznutriment +/datum/reagent/plantnutrient/eznutrient name = "E-Z-Nutrient" - id = "eznutriment" - description = "Cheap and extremely common type of plant nutriment." + id = "eznutrient" + description = "Cheap and boring nutrition for plants." + color = "#504700" // RBG: 80, 70, 0 + tox_prob = 5 + taste_description = "obscurity and toil" + +/datum/reagent/plantnutrient/mut + name = "Mutrient" + id = "mutrient" + description = "Plant nutrient designed to trigger mild genetic drift." color = "#376400" // RBG: 50, 100, 0 tox_prob = 10 - taste_description = "obscurity and toil" + mutation_level = 10 + taste_description = "change" -/datum/reagent/plantnutriment/left4zednutriment +/datum/reagent/plantnutrient/left4zednutrient name = "Left 4 Zed" - id = "left4zednutriment" - description = "Unstable nutriment that makes plants mutate more often than usual." + id = "left4zednutrient" + description = "Unstable nutrient that makes plants mutate strongly at the cost of minimal yield." color = "#2A1680" // RBG: 42, 128, 22 tox_prob = 25 + mutation_level = 15 taste_description = "evolution" -/datum/reagent/plantnutriment/robustharvestnutriment +/datum/reagent/plantnutrient/robustharvestnutrient name = "Robust Harvest" - id = "robustharvestnutriment" - description = "Very potent nutriment that prevents plants from mutating." + id = "robustharvestnutrient" + description = "Very potent nutrient that increases yield." color = "#9D9D00" // RBG: 157, 157, 0 tox_prob = 15 taste_description = "bountifulness" diff --git a/code/modules/reagents/chemistry/recipes/drinks_reactions.dm b/code/modules/reagents/chemistry/recipes/drinks_reactions.dm index 7481e9d6436f..3b529db3b8cb 100644 --- a/code/modules/reagents/chemistry/recipes/drinks_reactions.dm +++ b/code/modules/reagents/chemistry/recipes/drinks_reactions.dm @@ -1028,7 +1028,7 @@ name = "Islay Whiskey" id = "islaywhiskey" result = "islaywhiskey" - required_reagents = list("eznutriment" = 1, "whiskey" = 1, "nutriment" = 1) + required_reagents = list("eznutrient" = 1, "whiskey" = 1, "nutriment" = 1) result_amount = 3 mix_sound = 'sound/goonstation/misc/drinkfizz.ogg' diff --git a/code/modules/reagents/reagent_containers/chemical_bottle.dm b/code/modules/reagents/reagent_containers/chemical_bottle.dm index b48d4fe33794..66c0b505d783 100644 --- a/code/modules/reagents/reagent_containers/chemical_bottle.dm +++ b/code/modules/reagents/reagent_containers/chemical_bottle.dm @@ -83,18 +83,30 @@ icon_state = "bottle" list_reagents = list("mutagen" = 30) +/obj/item/reagent_containers/glass/bottle/ash + name = "ash bottle" + desc = "A small bottle of ash. The substance, not the person." + icon_state = "bottle" + list_reagents = list("ash" = 30) + /obj/item/reagent_containers/glass/bottle/ammonia name = "ammonia bottle" - desc = "A small bottle." + desc = "A small bottle of ammonia. Good for cleaning, but don't mix it with bleach." icon_state = "bottle" list_reagents = list("ammonia" = 30) /obj/item/reagent_containers/glass/bottle/diethylamine name = "diethylamine bottle" - desc = "A small bottle." + desc = "A small bottle of diethylamine. Good for plants, bad for people." icon_state = "round_bottle" list_reagents = list("diethylamine" = 30) +/obj/item/reagent_containers/glass/bottle/saltpetre + name = "saltpetre bottle" + desc = "A small bottle of saltpetre. Used in botany and to make gunpowder." + icon_state = "round_bottle" + list_reagents = list("saltpetre" = 30) + /obj/item/reagent_containers/glass/bottle/facid name = "fluorosulfuric acid bottle" desc = "A small bottle. Contains a small amount of Fluorosulfuric Acid" diff --git a/code/modules/research/designs/biogenerator_designs.dm b/code/modules/research/designs/biogenerator_designs.dm index 8ceaabe419d4..20e4a51febaa 100644 --- a/code/modules/research/designs/biogenerator_designs.dm +++ b/code/modules/research/designs/biogenerator_designs.dm @@ -99,6 +99,14 @@ build_path = /obj/item/reagent_containers/glass/bottle/nutrient/ez category = list("initial","Botany Chemicals") +/datum/design/mut_nut + name = "Mutrient" + id = "mut_nut" + build_type = BIOGENERATOR + materials = list(MAT_BIOMASS = 15) + build_path = /obj/item/reagent_containers/glass/bottle/nutrient/mut + category = list("initial", "Botany Chemicals") + /datum/design/l4z_nut name = "Left 4 Zed" id = "l4z_nut" diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 6f039a583dc1..20196a821e1c 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -580,7 +580,7 @@ //~~~~~~~~Admin logging proc, aka the Powergamer Alarm~~~~~~~~ /obj/machinery/r_n_d/experimentor/proc/warn_admins(mob/user, ReactionName) var/turf/T = get_turf(src) - message_admins("Experimentor reaction: [ReactionName] generated by [key_name_admin(user)] at ([T.x], [T.y], [T.z] - JMP)",0,1) + message_admins("Experimentor reaction: [ReactionName] generated by [key_name_admin(user)] at ([T.x], [T.y], [T.z] - JMP)",0,1) log_game("Experimentor reaction: [ReactionName] generated by [key_name(user)] in ([T.x], [T.y], [T.z])") #undef SCANTYPE_POKE diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 70832cb0d008..acb290118633 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -310,9 +310,9 @@ if(!atoms_share_level(get_turf(src), get_turf(S)) && !badmin) continue dat += "[S.name] || " - dat += "Access Rights | " - dat += "Data Management" - if(badmin) dat += " | Server-to-Server Transfer" + dat += "Access Rights | " + dat += "Data Management" + if(badmin) dat += " | Server-to-Server Transfer" dat += "
    " if(1) //Access rights menu @@ -320,7 +320,7 @@ dat += "Consoles with Upload Access
    " for(var/obj/machinery/computer/rdconsole/C in consoles) var/turf/console_turf = get_turf(C) - dat += "* [console_turf.loc]" //FYI, these are all numeric ids, eventually. + dat += "* [console_turf.loc]" //FYI, these are all numeric ids, eventually. if(C.id in temp_server.id_with_upload) dat += " (Remove)
    " else @@ -328,12 +328,12 @@ dat += "Consoles with Download Access
    " for(var/obj/machinery/computer/rdconsole/C in consoles) var/turf/console_turf = get_turf(C) - dat += "* [console_turf.loc]" + dat += "* [console_turf.loc]" if(C.id in temp_server.id_with_download) dat += " (Remove)
    " else dat += " (Add)
    " - dat += "
    Main Menu" + dat += "
    Main Menu" if(2) //Data Management menu dat += "[temp_server.name] Data Management

    " @@ -343,25 +343,25 @@ if(T.level <= 0) continue dat += "* [T.name] " - dat += "(Reset)
    " //FYI, these are all strings. + dat += "(Reset)
    " //FYI, these are all strings. dat += "Known Designs
    " for(var/I in temp_server.files.known_designs) var/datum/design/D = temp_server.files.known_designs[I] dat += "* [D.name] " - dat += "(Blacklist)
    " + dat += "(Blacklist)
    " if(length(temp_server.files.blacklisted_designs)) dat += "Blacklisted Designs
    " for(var/I in temp_server.files.blacklisted_designs) dat += "* [I] " - dat += "(Restore design)
    " - dat += "
    Main Menu" + dat += "(Restore design)
    " + dat += "
    Main Menu" if(3) //Server Data Transfer dat += "[temp_server.name] Server to Server Transfer

    " dat += "Send Data to what server?
    " for(var/obj/machinery/r_n_d/server/S in servers) - dat += "[S.name] (Transfer)
    " - dat += "
    Main Menu" + dat += "[S.name] (Transfer)
    " + dat += "
    Main Menu" user << browse("R&D Server Control
    [dat]", "window=server_control;size=575x400") onclose(user, "server_control") return diff --git a/code/modules/research/strange_objects.dm b/code/modules/research/strange_objects.dm index 21f1a1d467e5..9b33060c59c8 100644 --- a/code/modules/research/strange_objects.dm +++ b/code/modules/research/strange_objects.dm @@ -196,7 +196,7 @@ var/log_msg = "[RelicType] relic used by [key_name(user)] in ([T.x],[T.y],[T.z])" if(alert_admins) //For truly dangerous relics that may need an admin's attention. BWOINK! - message_admins("[RelicType] relic activated by [key_name_admin(user)] in ([T.x], [T.y], [T.z] - JMP)",0,1) + message_admins("[RelicType] relic activated by [key_name_admin(user)] in ([T.x], [T.y], [T.z] - JMP)",0,1) log_game(log_msg) investigate_log(log_msg, "experimentor") diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index 12f768c91af2..824574ac0113 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -904,7 +904,7 @@ next_request = world.time + 60 SECONDS //1 minute cooldown to_chat(usr, "Your request has been received by Centcom.") log_admin("[key_name(usr)] requested to move the transport ferry to Centcom.") - message_admins("FERRY: [key_name_admin(usr)] (Move Ferry) is requesting to move the transport ferry to Centcom.") + message_admins("FERRY: [key_name_admin(usr)] (Move Ferry) is requesting to move the transport ferry to Centcom.") return TRUE diff --git a/code/modules/shuttle/supply.dm b/code/modules/shuttle/supply.dm index 9fcc73e6fc6d..3bb670b18763 100644 --- a/code/modules/shuttle/supply.dm +++ b/code/modules/shuttle/supply.dm @@ -490,6 +490,22 @@ var/obj/item/paper/manifest/slip = AM + var/error = FALSE + if(/obj/item/stamp/denied in slip.stamped) + error = "Package [slip.ordernumber] rejected. A Nanotrasen supply department official will reach out to you in 2-3 business days." + SSblackbox.record_feedback("tally", "cargo manifests rejected", 1, "amount") + else if(!(/obj/item/stamp/granted in slip.stamped)) + error = "Received unstamped manifest for package [slip.ordernumber]. Remember to stamp all manifests before returning them." + SSblackbox.record_feedback("tally", "cargo manifests not stamped", 1, "amount") + + if(error) + var/datum/economy/line_item/item = new + item.account = SSeconomy.cargo_account + item.credits = 0 + item.reason = error + manifest.line_items += item + return + var/datum/economy/line_item/item = new item.account = SSeconomy.cargo_account item.credits = SSeconomy.credits_per_manifest diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index bf70e0ee7635..0e3461145a27 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -99,15 +99,15 @@ t += "
    No telepad located.
    Please add telepad data.

    " else if(inserted_gps) - t += "Eject GPS" - t += "Set GPS memory" + t += "Eject GPS" + t += "Set GPS memory" else t += "Eject GPS" t += "Set GPS memory" t += "
    [temp_msg]

    " - t += "Set Bearing" + t += "Set Bearing" t += "
    [rotation] degrees
    " - t += "Set Elevation" + t += "Set Elevation" t += "
    [angle] degrees
    " t += "Set Power" t += "
    " @@ -119,15 +119,15 @@ if(power == power_options[i]) t += "[power_options[i]]" continue - t += "[power_options[i]]" + t += "[power_options[i]]" t += "
    " - t += "Set Sector" + t += "Set Sector" t += "
    [z_co ? z_co : "NULL"]
    " - t += "
    Send" - t += " Receive" - t += "
    Recalibrate Crystals Eject Crystals" + t += "
    Send" + t += " Receive" + t += "
    Recalibrate Crystals Eject Crystals" // Information about the last teleport t += "
    " diff --git a/code/modules/tgui/tgui_panel/tgui_panel.dm b/code/modules/tgui/tgui_panel/tgui_panel.dm index 893d42b96612..9229de1da493 100644 --- a/code/modules/tgui/tgui_panel/tgui_panel.dm +++ b/code/modules/tgui/tgui_panel/tgui_panel.dm @@ -57,6 +57,7 @@ get_asset_datum(/datum/asset/simple/tgui_panel), )) window.send_asset(get_asset_datum(/datum/asset/simple/namespaced/fontawesome)) + window.send_asset(get_asset_datum(/datum/asset/spritesheet/emoji)) request_telemetry() addtimer(CALLBACK(src, PROC_REF(on_initialize_timed_out)), 5 SECONDS) @@ -67,7 +68,7 @@ */ /datum/tgui_panel/proc/on_initialize_timed_out() // Currently does nothing but sending a message to old chat. - SEND_TEXT(client, "Failed to load fancy chat, click HERE to attempt to reload it.") + SEND_TEXT(client, "Failed to load fancy chat, click HERE to attempt to reload it.") /** * private diff --git a/code/modules/tgui/tgui_panel/tgui_panel_external.dm b/code/modules/tgui/tgui_panel/tgui_panel_external.dm index c3c95f2e96a8..f51c974ae4a2 100644 --- a/code/modules/tgui/tgui_panel/tgui_panel_external.dm +++ b/code/modules/tgui/tgui_panel/tgui_panel_external.dm @@ -20,20 +20,20 @@ action = alert(src, "Did that work?", "", "Yes", "No, switch to old ui") if(action == "No, switch to old ui") winset(src, "output", "on-show=&is-disabled=0&is-visible=1") - winset(src, "browseroutput", "is-disabled=1;is-visible=0") + winset(src, "chat_panel", "is-disabled=1;is-visible=0") log_tgui(src, "Failed to fix.") /client/proc/nuke_chat() // Catch all solution (kick the whole thing in the pants) winset(src, "output", "on-show=&is-disabled=0&is-visible=1") - winset(src, "browseroutput", "is-disabled=1;is-visible=0") + winset(src, "chat_panel", "is-disabled=1;is-visible=0") if(!tgui_panel || !istype(tgui_panel)) log_tgui(src, "tgui_panel datum is missing") - tgui_panel = new(src, "browseroutput") + tgui_panel = new(src, "chat_panel") tgui_panel.initialize(force = TRUE) // Force show the panel to see if there are any errors winset(src, "output", "is-disabled=1&is-visible=0") - winset(src, "browseroutput", "is-disabled=0;is-visible=1") + winset(src, "chat_panel", "is-disabled=0;is-visible=1") /client/verb/refresh_tgui() set name = "Refresh TGUI" diff --git a/code/modules/tgui_input/say_modal/tgui_say_modal.dm b/code/modules/tgui_input/say_modal/tgui_say_modal.dm index bf5c9621fbc1..947c97496896 100644 --- a/code/modules/tgui_input/say_modal/tgui_say_modal.dm +++ b/code/modules/tgui_input/say_modal/tgui_say_modal.dm @@ -40,7 +40,7 @@ /datum/tgui_say/proc/initialize() set waitfor = FALSE // Sleep to defer initialization to after client constructor - sleep(3) + sleep(3 SECONDS) window.initialize( strict_mode = TRUE, fancy = TRUE, @@ -119,5 +119,8 @@ if("entry") handle_entry(payload) return TRUE + if("ready_state_error") + to_chat(client, "TGUI Say attempted to render before it was ready, please try again!") + return FALSE return FALSE diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index 7f234307d411..76f2504ef031 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -2,6 +2,7 @@ //Keep this sorted alphabetically #ifdef UNIT_TESTS +#include "games\test_cards.dm" #include "jobs\test_job_globals.dm" #include "aicard_icons.dm" #include "announcements.dm" diff --git a/code/modules/unit_tests/games/test_cards.dm b/code/modules/unit_tests/games/test_cards.dm new file mode 100644 index 000000000000..bde0b9f1f8bc --- /dev/null +++ b/code/modules/unit_tests/games/test_cards.dm @@ -0,0 +1,30 @@ +/datum/unit_test/card_deck/proc/validate_deck(obj/item/deck/deck) + var/list/card_count = list() + for(var/datum/playingcard/card in deck.cards) + if(card_count[card.name] == null) + card_count[card.name] = 1 + else if(card.name == "Joker") + card_count[card.name]++ + else + // duplicate card in deck + return FALSE + + if(length(card_count) != 53) // 2 Jokers, so 53 unique cards + return FALSE + return TRUE + + +/datum/unit_test/card_deck/Run() + // setup + var/loc = pick(block(run_loc_bottom_left, run_loc_top_right)) + var/obj/item/deck/cards/cards = new /obj/item/deck/cards(loc) + cards.build_decks() + + // is deck proper upon spawning + if(!validate_deck(cards)) + Fail("52 card deck not initialized correctly.") + + // is deck proper after shuffling + cards.deckshuffle() + if(!validate_deck(cards)) + Fail("52 card deck broken after shuffling.") diff --git a/code/modules/vote/vote_datum.dm b/code/modules/vote/vote_datum.dm index 69e164e5c0d4..a951bf74abb4 100644 --- a/code/modules/vote/vote_datum.dm +++ b/code/modules/vote/vote_datum.dm @@ -118,7 +118,7 @@ /datum/vote/proc/announce(start_text) to_chat(world, chat_box_purple( "[start_text]

    \ - Click here or type Vote to place your vote.
    \ + Click here or type Vote to place your vote.
    \ You have [GLOB.configuration.vote.vote_time / 10] seconds to vote.
    ")) SEND_SOUND(world, sound('sound/ambience/alarm4.ogg')) diff --git a/code/modules/world_topic/adminmsg.dm b/code/modules/world_topic/adminmsg.dm index fadceebdd3b3..95de4ef356f0 100644 --- a/code/modules/world_topic/adminmsg.dm +++ b/code/modules/world_topic/adminmsg.dm @@ -20,8 +20,8 @@ return json_encode(list("error" = "No client with that name on server")) var/sanitized = sanitize(input["msg"]) - var/message = "Discord PM from [input["sender"]]: [sanitized]" - var/amessage = "Discord PM from [input["sender"]] to [key_name_admin(C)]: [sanitized]" + var/message = "Discord PM from [input["sender"]]: [sanitized]" + var/amessage = "Discord PM from [input["sender"]] to [key_name_admin(C)]: [sanitized]" // THESE TWO VARS DO VERY DIFFERENT THINGS. DO NOT ATTEMPT TO COMBINE THEM C.received_discord_pm = world.time diff --git a/goon/browserassets/css/font-awesome.css b/goon/browserassets/css/font-awesome.css deleted file mode 100644 index 956b4cbafd8b..000000000000 --- a/goon/browserassets/css/font-awesome.css +++ /dev/null @@ -1,788 +0,0 @@ -@font-face{font-family:'FontAwesome';src:url('fontawesome-webfont.eot');src:url('fontawesome-webfont.eot') format('embedded-opentype'),url('fontawesome-webfont.woff') format('woff'),url('fontawesome-webfont.ttf') format('truetype'),url('fontawesome-webfont.svg') format('svg');font-weight:normal;font-style:normal;}[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;*margin-right:.3em;} -[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none;} -.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em;} -a [class^="icon-"],a [class*=" icon-"]{display:inline;} -[class^="icon-"].icon-fixed-width,[class*=" icon-"].icon-fixed-width{display:inline-block;width:1.1428571428571428em;text-align:right;padding-right:0.2857142857142857em;}[class^="icon-"].icon-fixed-width.icon-large,[class*=" icon-"].icon-fixed-width.icon-large{width:1.4285714285714286em;} -.icons-ul{margin-left:2.142857142857143em;list-style-type:none;}.icons-ul>li{position:relative;} -.icons-ul .icon-li{position:absolute;left:-2.142857142857143em;width:2.142857142857143em;text-align:center;line-height:inherit;} -[class^="icon-"].hide,[class*=" icon-"].hide{display:none;} -.icon-muted{color:#eeeeee;} -.icon-light{color:#ffffff;} -.icon-dark{color:#333333;} -.icon-border{border:solid 1px #eeeeee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} -.icon-2x{font-size:2em;}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} -.icon-3x{font-size:3em;}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;} -.icon-4x{font-size:4em;}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} -.icon-5x{font-size:5em;}.icon-5x.icon-border{border-width:5px;-webkit-border-radius:7px;-moz-border-radius:7px;border-radius:7px;} -.pull-right{float:right;} -.pull-left{float:left;} -[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em;} -[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em;} -[class^="icon-"],[class*=" icon-"]{display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0% 0%;background-repeat:repeat;margin-top:0;} -.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none;} -.btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em;} -.btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block;} -.nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em;} -.btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em;} -.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em;} -.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em;} -.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0;}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em;} -.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em;} -.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em;} -.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{line-height:inherit;} -.icon-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:-35%;}.icon-stack [class^="icon-"],.icon-stack [class*=" icon-"]{display:block;text-align:center;position:absolute;width:100%;height:100%;font-size:1em;line-height:inherit;*line-height:2em;} -.icon-stack .icon-stack-base{font-size:2em;*line-height:1em;} -.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear;} -a .icon-stack,a .icon-spin{display:inline-block;text-decoration:none;} -@-moz-keyframes spin{0%{-moz-transform:rotate(0deg);} 100%{-moz-transform:rotate(359deg);}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg);} 100%{-webkit-transform:rotate(359deg);}}@-o-keyframes spin{0%{-o-transform:rotate(0deg);} 100%{-o-transform:rotate(359deg);}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg);} 100%{-ms-transform:rotate(359deg);}}@keyframes spin{0%{transform:rotate(0deg);} 100%{transform:rotate(359deg);}}.icon-rotate-90:before{-webkit-transform:rotate(90deg);-moz-transform:rotate(90deg);-ms-transform:rotate(90deg);-o-transform:rotate(90deg);transform:rotate(90deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=1);} -.icon-rotate-180:before{-webkit-transform:rotate(180deg);-moz-transform:rotate(180deg);-ms-transform:rotate(180deg);-o-transform:rotate(180deg);transform:rotate(180deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=2);} -.icon-rotate-270:before{-webkit-transform:rotate(270deg);-moz-transform:rotate(270deg);-ms-transform:rotate(270deg);-o-transform:rotate(270deg);transform:rotate(270deg);filter:progid:DXImageTransform.Microsoft.BasicImage(rotation=3);} -.icon-flip-horizontal:before{-webkit-transform:scale(-1, 1);-moz-transform:scale(-1, 1);-ms-transform:scale(-1, 1);-o-transform:scale(-1, 1);transform:scale(-1, 1);} -.icon-flip-vertical:before{-webkit-transform:scale(1, -1);-moz-transform:scale(1, -1);-ms-transform:scale(1, -1);-o-transform:scale(1, -1);transform:scale(1, -1);} -a .icon-rotate-90:before,a .icon-rotate-180:before,a .icon-rotate-270:before,a .icon-flip-horizontal:before,a .icon-flip-vertical:before{display:inline-block;} -.icon-glass:before{content:"\f000";} -.icon-music:before{content:"\f001";} -.icon-search:before{content:"\f002";} -.icon-envelope-alt:before{content:"\f003";} -.icon-heart:before{content:"\f004";} -.icon-star:before{content:"\f005";} -.icon-star-empty:before{content:"\f006";} -.icon-user:before{content:"\f007";} -.icon-film:before{content:"\f008";} -.icon-th-large:before{content:"\f009";} -.icon-th:before{content:"\f00a";} -.icon-th-list:before{content:"\f00b";} -.icon-ok:before{content:"\f00c";} -.icon-remove:before{content:"\f00d";} -.icon-zoom-in:before{content:"\f00e";} -.icon-zoom-out:before{content:"\f010";} -.icon-power-off:before,.icon-off:before{content:"\f011";} -.icon-signal:before{content:"\f012";} -.icon-gear:before,.icon-cog:before{content:"\f013";} -.icon-trash:before{content:"\f014";} -.icon-home:before{content:"\f015";} -.icon-file-alt:before{content:"\f016";} -.icon-time:before{content:"\f017";} -.icon-road:before{content:"\f018";} -.icon-download-alt:before{content:"\f019";} -.icon-download:before{content:"\f01a";} -.icon-upload:before{content:"\f01b";} -.icon-inbox:before{content:"\f01c";} -.icon-play-circle:before{content:"\f01d";} -.icon-rotate-right:before,.icon-repeat:before{content:"\f01e";} -.icon-refresh:before{content:"\f021";} -.icon-list-alt:before{content:"\f022";} -.icon-lock:before{content:"\f023";} -.icon-flag:before{content:"\f024";} -.icon-headphones:before{content:"\f025";} -.icon-volume-off:before{content:"\f026";} -.icon-volume-down:before{content:"\f027";} -.icon-volume-up:before{content:"\f028";} -.icon-qrcode:before{content:"\f029";} -.icon-barcode:before{content:"\f02a";} -.icon-tag:before{content:"\f02b";} -.icon-tags:before{content:"\f02c";} -.icon-book:before{content:"\f02d";} -.icon-bookmark:before{content:"\f02e";} -.icon-print:before{content:"\f02f";} -.icon-camera:before{content:"\f030";} -.icon-font:before{content:"\f031";} -.icon-bold:before{content:"\f032";} -.icon-italic:before{content:"\f033";} -.icon-text-height:before{content:"\f034";} -.icon-text-width:before{content:"\f035";} -.icon-align-left:before{content:"\f036";} -.icon-align-center:before{content:"\f037";} -.icon-align-right:before{content:"\f038";} -.icon-align-justify:before{content:"\f039";} -.icon-list:before{content:"\f03a";} -.icon-indent-left:before{content:"\f03b";} -.icon-indent-right:before{content:"\f03c";} -.icon-facetime-video:before{content:"\f03d";} -.icon-picture:before{content:"\f03e";} -.icon-pencil:before{content:"\f040";} -.icon-map-marker:before{content:"\f041";} -.icon-adjust:before{content:"\f042";} -.icon-tint:before{content:"\f043";} -.icon-edit:before{content:"\f044";} -.icon-share:before{content:"\f045";} -.icon-check:before{content:"\f046";} -.icon-move:before{content:"\f047";} -.icon-step-backward:before{content:"\f048";} -.icon-fast-backward:before{content:"\f049";} -.icon-backward:before{content:"\f04a";} -.icon-play:before{content:"\f04b";} -.icon-pause:before{content:"\f04c";} -.icon-stop:before{content:"\f04d";} -.icon-forward:before{content:"\f04e";} -.icon-fast-forward:before{content:"\f050";} -.icon-step-forward:before{content:"\f051";} -.icon-eject:before{content:"\f052";} -.icon-chevron-left:before{content:"\f053";} -.icon-chevron-right:before{content:"\f054";} -.icon-plus-sign:before{content:"\f055";} -.icon-minus-sign:before{content:"\f056";} -.icon-remove-sign:before{content:"\f057";} -.icon-ok-sign:before{content:"\f058";} -.icon-question-sign:before{content:"\f059";} -.icon-info-sign:before{content:"\f05a";} -.icon-screenshot:before{content:"\f05b";} -.icon-remove-circle:before{content:"\f05c";} -.icon-ok-circle:before{content:"\f05d";} -.icon-ban-circle:before{content:"\f05e";} -.icon-arrow-left:before{content:"\f060";} -.icon-arrow-right:before{content:"\f061";} -.icon-arrow-up:before{content:"\f062";} -.icon-arrow-down:before{content:"\f063";} -.icon-mail-forward:before,.icon-share-alt:before{content:"\f064";} -.icon-resize-full:before{content:"\f065";} -.icon-resize-small:before{content:"\f066";} -.icon-plus:before{content:"\f067";} -.icon-minus:before{content:"\f068";} -.icon-asterisk:before{content:"\f069";} -.icon-exclamation-sign:before{content:"\f06a";} -.icon-gift:before{content:"\f06b";} -.icon-leaf:before{content:"\f06c";} -.icon-fire:before{content:"\f06d";} -.icon-eye-open:before{content:"\f06e";} -.icon-eye-close:before{content:"\f070";} -.icon-warning-sign:before{content:"\f071";} -.icon-plane:before{content:"\f072";} -.icon-calendar:before{content:"\f073";} -.icon-random:before{content:"\f074";} -.icon-comment:before{content:"\f075";} -.icon-magnet:before{content:"\f076";} -.icon-chevron-up:before{content:"\f077";} -.icon-chevron-down:before{content:"\f078";} -.icon-retweet:before{content:"\f079";} -.icon-shopping-cart:before{content:"\f07a";} -.icon-folder-close:before{content:"\f07b";} -.icon-folder-open:before{content:"\f07c";} -.icon-resize-vertical:before{content:"\f07d";} -.icon-resize-horizontal:before{content:"\f07e";} -.icon-bar-chart:before{content:"\f080";} -.icon-twitter-sign:before{content:"\f081";} -.icon-facebook-sign:before{content:"\f082";} -.icon-camera-retro:before{content:"\f083";} -.icon-key:before{content:"\f084";} -.icon-gears:before,.icon-cogs:before{content:"\f085";} -.icon-comments:before{content:"\f086";} -.icon-thumbs-up-alt:before{content:"\f087";} -.icon-thumbs-down-alt:before{content:"\f088";} -.icon-star-half:before{content:"\f089";} -.icon-heart-empty:before{content:"\f08a";} -.icon-signout:before{content:"\f08b";} -.icon-linkedin-sign:before{content:"\f08c";} -.icon-pushpin:before{content:"\f08d";} -.icon-external-link:before{content:"\f08e";} -.icon-signin:before{content:"\f090";} -.icon-trophy:before{content:"\f091";} -.icon-github-sign:before{content:"\f092";} -.icon-upload-alt:before{content:"\f093";} -.icon-lemon:before{content:"\f094";} -.icon-phone:before{content:"\f095";} -.icon-unchecked:before,.icon-check-empty:before{content:"\f096";} -.icon-bookmark-empty:before{content:"\f097";} -.icon-phone-sign:before{content:"\f098";} -.icon-twitter:before{content:"\f099";} -.icon-facebook:before{content:"\f09a";} -.icon-github:before{content:"\f09b";} -.icon-unlock:before{content:"\f09c";} -.icon-credit-card:before{content:"\f09d";} -.icon-rss:before{content:"\f09e";} -.icon-hdd:before{content:"\f0a0";} -.icon-bullhorn:before{content:"\f0a1";} -.icon-bell:before{content:"\f0a2";} -.icon-certificate:before{content:"\f0a3";} -.icon-hand-right:before{content:"\f0a4";} -.icon-hand-left:before{content:"\f0a5";} -.icon-hand-up:before{content:"\f0a6";} -.icon-hand-down:before{content:"\f0a7";} -.icon-circle-arrow-left:before{content:"\f0a8";} -.icon-circle-arrow-right:before{content:"\f0a9";} -.icon-circle-arrow-up:before{content:"\f0aa";} -.icon-circle-arrow-down:before{content:"\f0ab";} -.icon-globe:before{content:"\f0ac";} -.icon-wrench:before{content:"\f0ad";} -.icon-tasks:before{content:"\f0ae";} -.icon-filter:before{content:"\f0b0";} -.icon-briefcase:before{content:"\f0b1";} -.icon-fullscreen:before{content:"\f0b2";} -.icon-group:before{content:"\f0c0";} -.icon-link:before{content:"\f0c1";} -.icon-cloud:before{content:"\f0c2";} -.icon-beaker:before{content:"\f0c3";} -.icon-cut:before{content:"\f0c4";} -.icon-copy:before{content:"\f0c5";} -.icon-paperclip:before,.icon-paper-clip:before{content:"\f0c6";} -.icon-save:before{content:"\f0c7";} -.icon-sign-blank:before{content:"\f0c8";} -.icon-reorder:before{content:"\f0c9";} -.icon-list-ul:before{content:"\f0ca";} -.icon-list-ol:before{content:"\f0cb";} -.icon-strikethrough:before{content:"\f0cc";} -.icon-underline:before{content:"\f0cd";} -.icon-table:before{content:"\f0ce";} -.icon-magic:before{content:"\f0d0";} -.icon-truck:before{content:"\f0d1";} -.icon-pinterest:before{content:"\f0d2";} -.icon-pinterest-sign:before{content:"\f0d3";} -.icon-google-plus-sign:before{content:"\f0d4";} -.icon-google-plus:before{content:"\f0d5";} -.icon-money:before{content:"\f0d6";} -.icon-caret-down:before{content:"\f0d7";} -.icon-caret-up:before{content:"\f0d8";} -.icon-caret-left:before{content:"\f0d9";} -.icon-caret-right:before{content:"\f0da";} -.icon-columns:before{content:"\f0db";} -.icon-sort:before{content:"\f0dc";} -.icon-sort-down:before{content:"\f0dd";} -.icon-sort-up:before{content:"\f0de";} -.icon-envelope:before{content:"\f0e0";} -.icon-linkedin:before{content:"\f0e1";} -.icon-rotate-left:before,.icon-undo:before{content:"\f0e2";} -.icon-legal:before{content:"\f0e3";} -.icon-dashboard:before{content:"\f0e4";} -.icon-comment-alt:before{content:"\f0e5";} -.icon-comments-alt:before{content:"\f0e6";} -.icon-bolt:before{content:"\f0e7";} -.icon-sitemap:before{content:"\f0e8";} -.icon-umbrella:before{content:"\f0e9";} -.icon-paste:before{content:"\f0ea";} -.icon-lightbulb:before{content:"\f0eb";} -.icon-exchange:before{content:"\f0ec";} -.icon-cloud-download:before{content:"\f0ed";} -.icon-cloud-upload:before{content:"\f0ee";} -.icon-user-md:before{content:"\f0f0";} -.icon-stethoscope:before{content:"\f0f1";} -.icon-suitcase:before{content:"\f0f2";} -.icon-bell-alt:before{content:"\f0f3";} -.icon-coffee:before{content:"\f0f4";} -.icon-food:before{content:"\f0f5";} -.icon-file-text-alt:before{content:"\f0f6";} -.icon-building:before{content:"\f0f7";} -.icon-hospital:before{content:"\f0f8";} -.icon-ambulance:before{content:"\f0f9";} -.icon-medkit:before{content:"\f0fa";} -.icon-fighter-jet:before{content:"\f0fb";} -.icon-beer:before{content:"\f0fc";} -.icon-h-sign:before{content:"\f0fd";} -.icon-plus-sign-alt:before{content:"\f0fe";} -.icon-double-angle-left:before{content:"\f100";} -.icon-double-angle-right:before{content:"\f101";} -.icon-double-angle-up:before{content:"\f102";} -.icon-double-angle-down:before{content:"\f103";} -.icon-angle-left:before{content:"\f104";} -.icon-angle-right:before{content:"\f105";} -.icon-angle-up:before{content:"\f106";} -.icon-angle-down:before{content:"\f107";} -.icon-desktop:before{content:"\f108";} -.icon-laptop:before{content:"\f109";} -.icon-tablet:before{content:"\f10a";} -.icon-mobile-phone:before{content:"\f10b";} -.icon-circle-blank:before{content:"\f10c";} -.icon-quote-left:before{content:"\f10d";} -.icon-quote-right:before{content:"\f10e";} -.icon-spinner:before{content:"\f110";} -.icon-circle:before{content:"\f111";} -.icon-mail-reply:before,.icon-reply:before{content:"\f112";} -.icon-github-alt:before{content:"\f113";} -.icon-folder-close-alt:before{content:"\f114";} -.icon-folder-open-alt:before{content:"\f115";} -.icon-expand-alt:before{content:"\f116";} -.icon-collapse-alt:before{content:"\f117";} -.icon-smile:before{content:"\f118";} -.icon-frown:before{content:"\f119";} -.icon-meh:before{content:"\f11a";} -.icon-gamepad:before{content:"\f11b";} -.icon-keyboard:before{content:"\f11c";} -.icon-flag-alt:before{content:"\f11d";} -.icon-flag-checkered:before{content:"\f11e";} -.icon-terminal:before{content:"\f120";} -.icon-code:before{content:"\f121";} -.icon-reply-all:before{content:"\f122";} -.icon-mail-reply-all:before{content:"\f122";} -.icon-star-half-full:before,.icon-star-half-empty:before{content:"\f123";} -.icon-location-arrow:before{content:"\f124";} -.icon-crop:before{content:"\f125";} -.icon-code-fork:before{content:"\f126";} -.icon-unlink:before{content:"\f127";} -.icon-question:before{content:"\f128";} -.icon-info:before{content:"\f129";} -.icon-exclamation:before{content:"\f12a";} -.icon-superscript:before{content:"\f12b";} -.icon-subscript:before{content:"\f12c";} -.icon-eraser:before{content:"\f12d";} -.icon-puzzle-piece:before{content:"\f12e";} -.icon-microphone:before{content:"\f130";} -.icon-microphone-off:before{content:"\f131";} -.icon-shield:before{content:"\f132";} -.icon-calendar-empty:before{content:"\f133";} -.icon-fire-extinguisher:before{content:"\f134";} -.icon-rocket:before{content:"\f135";} -.icon-maxcdn:before{content:"\f136";} -.icon-chevron-sign-left:before{content:"\f137";} -.icon-chevron-sign-right:before{content:"\f138";} -.icon-chevron-sign-up:before{content:"\f139";} -.icon-chevron-sign-down:before{content:"\f13a";} -.icon-html5:before{content:"\f13b";} -.icon-css3:before{content:"\f13c";} -.icon-anchor:before{content:"\f13d";} -.icon-unlock-alt:before{content:"\f13e";} -.icon-bullseye:before{content:"\f140";} -.icon-ellipsis-horizontal:before{content:"\f141";} -.icon-ellipsis-vertical:before{content:"\f142";} -.icon-rss-sign:before{content:"\f143";} -.icon-play-sign:before{content:"\f144";} -.icon-ticket:before{content:"\f145";} -.icon-minus-sign-alt:before{content:"\f146";} -.icon-check-minus:before{content:"\f147";} -.icon-level-up:before{content:"\f148";} -.icon-level-down:before{content:"\f149";} -.icon-check-sign:before{content:"\f14a";} -.icon-edit-sign:before{content:"\f14b";} -.icon-external-link-sign:before{content:"\f14c";} -.icon-share-sign:before{content:"\f14d";} -.icon-compass:before{content:"\f14e";} -.icon-collapse:before{content:"\f150";} -.icon-collapse-top:before{content:"\f151";} -.icon-expand:before{content:"\f152";} -.icon-euro:before,.icon-eur:before{content:"\f153";} -.icon-gbp:before{content:"\f154";} -.icon-dollar:before,.icon-usd:before{content:"\f155";} -.icon-rupee:before,.icon-inr:before{content:"\f156";} -.icon-yen:before,.icon-jpy:before{content:"\f157";} -.icon-renminbi:before,.icon-cny:before{content:"\f158";} -.icon-won:before,.icon-krw:before{content:"\f159";} -.icon-bitcoin:before,.icon-btc:before{content:"\f15a";} -.icon-file:before{content:"\f15b";} -.icon-file-text:before{content:"\f15c";} -.icon-sort-by-alphabet:before{content:"\f15d";} -.icon-sort-by-alphabet-alt:before{content:"\f15e";} -.icon-sort-by-attributes:before{content:"\f160";} -.icon-sort-by-attributes-alt:before{content:"\f161";} -.icon-sort-by-order:before{content:"\f162";} -.icon-sort-by-order-alt:before{content:"\f163";} -.icon-thumbs-up:before{content:"\f164";} -.icon-thumbs-down:before{content:"\f165";} -.icon-youtube-sign:before{content:"\f166";} -.icon-youtube:before{content:"\f167";} -.icon-xing:before{content:"\f168";} -.icon-xing-sign:before{content:"\f169";} -.icon-youtube-play:before{content:"\f16a";} -.icon-dropbox:before{content:"\f16b";} -.icon-stackexchange:before{content:"\f16c";} -.icon-instagram:before{content:"\f16d";} -.icon-flickr:before{content:"\f16e";} -.icon-adn:before{content:"\f170";} -.icon-bitbucket:before{content:"\f171";} -.icon-bitbucket-sign:before{content:"\f172";} -.icon-tumblr:before{content:"\f173";} -.icon-tumblr-sign:before{content:"\f174";} -.icon-long-arrow-down:before{content:"\f175";} -.icon-long-arrow-up:before{content:"\f176";} -.icon-long-arrow-left:before{content:"\f177";} -.icon-long-arrow-right:before{content:"\f178";} -.icon-apple:before{content:"\f179";} -.icon-windows:before{content:"\f17a";} -.icon-android:before{content:"\f17b";} -.icon-linux:before{content:"\f17c";} -.icon-dribbble:before{content:"\f17d";} -.icon-skype:before{content:"\f17e";} -.icon-foursquare:before{content:"\f180";} -.icon-trello:before{content:"\f181";} -.icon-female:before{content:"\f182";} -.icon-male:before{content:"\f183";} -.icon-gittip:before{content:"\f184";} -.icon-sun:before{content:"\f185";} -.icon-moon:before{content:"\f186";} -.icon-archive:before{content:"\f187";} -.icon-bug:before{content:"\f188";} -.icon-vk:before{content:"\f189";} -.icon-weibo:before{content:"\f18a";} -.icon-renren:before{content:"\f18b";} - -.icon-large{font-size:1.3333333333333333em;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;vertical-align:middle;} -.nav [class^="icon-"],.nav [class*=" icon-"]{vertical-align:inherit;margin-top:-4px;padding-top:3px;margin-bottom:-4px;padding-bottom:3px;}.nav [class^="icon-"].icon-large,.nav [class*=" icon-"].icon-large{vertical-align:-25%;} -.nav-pills [class^="icon-"].icon-large,.nav-tabs [class^="icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large{line-height:.75em;margin-top:-7px;padding-top:5px;margin-bottom:-5px;padding-bottom:4px;} -.btn [class^="icon-"].pull-left,.btn [class*=" icon-"].pull-left,.btn [class^="icon-"].pull-right,.btn [class*=" icon-"].pull-right{vertical-align:inherit;} -.btn [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large{margin-top:-0.5em;} -a [class^="icon-"],a [class*=" icon-"]{cursor:pointer;} -.icon-glass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-music{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-search{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-envelope-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-heart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-user{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-film{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-th-large{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-th{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-th-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ok{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-remove{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-zoom-in{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-zoom-out{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-power-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-signal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cog{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gear{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-trash{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-home{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-time{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-road{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-download-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-inbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-play-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-repeat{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rotate-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-refresh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-lock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-headphones{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-volume-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-volume-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-volume-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-qrcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-barcode{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tag{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tags{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-book{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bookmark{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-print{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-camera{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-font{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bold{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-italic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-text-height{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-text-width{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-center{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-align-justify{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-indent-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-indent-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-facetime-video{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-picture{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pencil{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-map-marker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-adjust{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tint{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-edit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-share{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-move{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-step-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fast-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-backward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pause{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-stop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fast-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-step-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eject{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-minus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-remove-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ok-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-question-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-info-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-screenshot{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-remove-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ok-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ban-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-share-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mail-forward{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-small{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-asterisk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-exclamation-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gift{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-leaf{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fire{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eye-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eye-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-warning-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plane{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-calendar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-random{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comment{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-magnet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-retweet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-shopping-cart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-close{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-open{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-resize-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bar-chart{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-twitter-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-facebook-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-camera-retro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-key{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cogs{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gears{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comments{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-up-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-down-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-half{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-heart-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-signout{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-linkedin-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pushpin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-external-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-signin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-trophy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-github-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-upload-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-lemon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unchecked{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bookmark-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-phone-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-twitter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-facebook{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-github{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unlock{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-credit-card{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rss{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hdd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bullhorn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bell{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-certificate{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hand-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-globe{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-wrench{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tasks{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-filter{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-briefcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fullscreen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-group{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-link{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cloud{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-beaker{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cut{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-copy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-paper-clip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-paperclip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-save{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sign-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-reorder{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list-ul{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-list-ol{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-strikethrough{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-underline{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-table{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-magic{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-truck{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pinterest{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-pinterest-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-google-plus-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-google-plus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-money{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-caret-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-columns{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-envelope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-linkedin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-undo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rotate-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-legal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dashboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comment-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-comments-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bolt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sitemap{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-umbrella{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-paste{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-lightbulb{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-exchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cloud-download{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cloud-upload{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-user-md{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-stethoscope{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-suitcase{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bell-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-coffee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-food{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file-text-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-building{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-hospital{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ambulance{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-medkit{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fighter-jet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-beer{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-h-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-plus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-double-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-angle-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-desktop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-laptop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tablet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mobile-phone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle-blank{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-quote-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-quote-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-spinner{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-circle{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mail-reply{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-github-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-close-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-folder-open-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-expand-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-collapse-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-smile{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-frown{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-meh{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gamepad{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-keyboard{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flag-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flag-checkered{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-terminal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-code{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-mail-reply-all{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-half-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-star-half-full{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-location-arrow{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-crop{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-code-fork{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unlink{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-question{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-info{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-exclamation{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-superscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-subscript{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eraser{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-puzzle-piece{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-microphone{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-microphone-off{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-shield{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-calendar-empty{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-fire-extinguisher{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rocket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-maxcdn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-chevron-sign-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-html5{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-css3{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-anchor{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-unlock-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bullseye{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ellipsis-horizontal{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ellipsis-vertical{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rss-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-play-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-ticket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-minus-sign-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check-minus{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-level-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-level-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-check-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-edit-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-external-link-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-share-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-compass{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-collapse{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-collapse-top{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-expand{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-eur{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-euro{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gbp{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-usd{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dollar{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-inr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-rupee{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-jpy{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-yen{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-cny{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-renminbi{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-krw{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-won{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-btc{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bitcoin{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-file-text{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-alphabet{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-alphabet-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-attributes{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-attributes-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-order{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sort-by-order-alt{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-thumbs-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-youtube-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-youtube{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-xing{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-xing-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-youtube-play{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dropbox{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-stackexchange{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-instagram{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-flickr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-adn{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bitbucket{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bitbucket-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tumblr{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-tumblr-sign{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-down{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-up{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-left{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-long-arrow-right{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-apple{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-windows{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-android{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-linux{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-dribbble{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-skype{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-foursquare{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-trello{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-female{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-male{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-gittip{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-sun{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-moon{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-archive{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-bug{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-vk{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-weibo{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} -.icon-renren{*zoom:expression( this.runtimeStyle['zoom'] = '1', this.innerHTML = '');} diff --git a/goon/browserassets/css/fonts/LICENSE b/goon/browserassets/css/fonts/LICENSE deleted file mode 100644 index c44326a82324..000000000000 --- a/goon/browserassets/css/fonts/LICENSE +++ /dev/null @@ -1,11 +0,0 @@ -PxPlus IBM MDA Font (c) by VileR - -email - viler/ΑΤ/int10h/DΟТ/org -www - http://int10h.org -blog - http://8088mph.blogspot.com - -PxPlus IBM MDA Font is licensed under a -Creative Commons Attribution-ShareAlike 4.0 International License. - -You should have received a copy of the license along with this -work. If not, see . \ No newline at end of file diff --git a/goon/browserassets/css/fonts/PxPlus_IBM_MDA.ttf b/goon/browserassets/css/fonts/PxPlus_IBM_MDA.ttf deleted file mode 100644 index db3b7b20ab68..000000000000 Binary files a/goon/browserassets/css/fonts/PxPlus_IBM_MDA.ttf and /dev/null differ diff --git a/goon/browserassets/css/fonts/fontawesome-webfont.eot b/goon/browserassets/css/fonts/fontawesome-webfont.eot deleted file mode 100644 index 0662cb96bfb7..000000000000 Binary files a/goon/browserassets/css/fonts/fontawesome-webfont.eot and /dev/null differ diff --git a/goon/browserassets/css/fonts/fontawesome-webfont.svg b/goon/browserassets/css/fonts/fontawesome-webfont.svg deleted file mode 100644 index 2edb4ec34cbc..000000000000 --- a/goon/browserassets/css/fonts/fontawesome-webfont.svg +++ /dev/null @@ -1,399 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/goon/browserassets/css/fonts/fontawesome-webfont.ttf b/goon/browserassets/css/fonts/fontawesome-webfont.ttf deleted file mode 100644 index d3659246915c..000000000000 Binary files a/goon/browserassets/css/fonts/fontawesome-webfont.ttf and /dev/null differ diff --git a/goon/browserassets/css/fonts/fontawesome-webfont.woff b/goon/browserassets/css/fonts/fontawesome-webfont.woff deleted file mode 100644 index b9bd17e158d8..000000000000 Binary files a/goon/browserassets/css/fonts/fontawesome-webfont.woff and /dev/null differ diff --git a/goon/browserassets/html/adminOutput.html b/goon/browserassets/html/adminOutput.html deleted file mode 100644 index baf8bc00b3ba..000000000000 --- a/goon/browserassets/html/adminOutput.html +++ /dev/null @@ -1,104 +0,0 @@ - \ No newline at end of file diff --git a/goon/browserassets/html/saveInstructions.html b/goon/browserassets/html/saveInstructions.html deleted file mode 100644 index 90040b041a0f..000000000000 --- a/goon/browserassets/html/saveInstructions.html +++ /dev/null @@ -1,19 +0,0 @@ - - - -Save Instructions - - -

    Save Instructions

    -Due to the primitive nature of IE8, this file must be saved manually. To do so, simply follow these steps. (() indicates windows specific instuctions) -
      -
    1. Click anywhere below the line
    2. -
    3. Use the Select All shortcut (ctrl+A)
    4. -
    5. Use the Copy shortcut (ctrl+C)
    6. -
    7. Create a new text document (right click desktop or explorer -> new text document)
    8. -
    9. Click the document and paste to it (ctrl+v)
    10. -
    11. Save the document with the extension .html instead of .txt
    12. -
    -
    - - diff --git a/goon/browserassets/js/jquery.min.js b/goon/browserassets/js/jquery.min.js deleted file mode 100644 index c5c648255c15..000000000000 --- a/goon/browserassets/js/jquery.min.js +++ /dev/null @@ -1,9789 +0,0 @@ -/*! - * jQuery JavaScript Library v1.10.2 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03T13:48Z - */ -(function( window, undefined ) { - -// Can't do this because several apps including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// Support: Firefox 18+ -//"use strict"; -var - // The deferred used on DOM ready - readyList, - - // A central reference to the root jQuery(document) - rootjQuery, - - // Support: IE<10 - // For `typeof xmlNode.method` instead of `xmlNode.method !== undefined` - core_strundefined = typeof undefined, - - // Use the correct document accordingly with window argument (sandbox) - location = window.location, - document = window.document, - docElem = document.documentElement, - - // Map over jQuery in case of overwrite - _jQuery = window.jQuery, - - // Map over the $ in case of overwrite - _$ = window.$, - - // [[Class]] -> type pairs - class2type = {}, - - // List of deleted data cache ids, so we can reuse them - core_deletedIds = [], - - core_version = "1.10.2", - - // Save a reference to some core methods - core_concat = core_deletedIds.concat, - core_push = core_deletedIds.push, - core_slice = core_deletedIds.slice, - core_indexOf = core_deletedIds.indexOf, - core_toString = class2type.toString, - core_hasOwn = class2type.hasOwnProperty, - core_trim = core_version.trim, - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - return new jQuery.fn.init( selector, context, rootjQuery ); - }, - - // Used for matching numbers - core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, - - // Used for splitting on whitespace - core_rnotwhite = /\S+/g, - - // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE) - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - // Match a standalone tag - rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, - - // JSON RegExp - rvalidchars = /^[\],:{}\s]*$/, - rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g, - rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g, - rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }, - - // The ready event handler - completed = function( event ) { - - // readyState === "complete" is good enough for us to call the dom ready in oldIE - if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) { - detach(); - jQuery.ready(); - } - }, - // Clean-up method for dom ready events - detach = function() { - if ( document.addEventListener ) { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - - } else { - document.detachEvent( "onreadystatechange", completed ); - window.detachEvent( "onload", completed ); - } - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: core_version, - - constructor: jQuery, - init: function( selector, context, rootjQuery ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // scripts is true for back-compat - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE and Opera return items - // by name instead of ID - if ( elem.id !== match[2] ) { - return rootjQuery.find( selector ); - } - - // Otherwise, we inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return rootjQuery.ready( selector ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return core_slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num == null ? - - // Return a 'clean' array - this.toArray() : - - // Return just the object - ( num < 0 ? this[ this.length + num ] : this[ num ] ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - ready: function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; - }, - - slice: function() { - return this.pushStack( core_slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: core_push, - sort: [].sort, - splice: [].splice -}; - -// Give the init function the jQuery prototype for later instantiation -jQuery.fn.init.prototype = jQuery.fn; - -jQuery.extend = jQuery.fn.extend = function() { - var src, copyIsArray, copy, name, options, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - target = arguments[1] || {}; - // skip the boolean and the target - i = 2; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // extend jQuery itself if only one argument is passed - if ( length === i ) { - target = this; - --i; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - // Non-digits removed to match rinlinejQuery - expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ), - - noConflict: function( deep ) { - if ( window.$ === jQuery ) { - window.$ = _$; - } - - if ( deep && window.jQuery === jQuery ) { - window.jQuery = _jQuery; - } - - return jQuery; - }, - - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443). - if ( !document.body ) { - return setTimeout( jQuery.ready ); - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.trigger ) { - jQuery( document ).trigger("ready").off("ready"); - } - }, - - // See test/unit/core.js for details concerning isFunction. - // Since version 1.3, DOM methods and functions like alert - // aren't supported. They return false on IE (#2968). - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray || function( obj ) { - return jQuery.type(obj) === "array"; - }, - - isWindow: function( obj ) { - /* jshint eqeqeq: false */ - return obj != null && obj == obj.window; - }, - - isNumeric: function( obj ) { - return !isNaN( parseFloat(obj) ) && isFinite( obj ); - }, - - type: function( obj ) { - if ( obj == null ) { - return String( obj ); - } - return typeof obj === "object" || typeof obj === "function" ? - class2type[ core_toString.call(obj) ] || "object" : - typeof obj; - }, - - isPlainObject: function( obj ) { - var key; - - // Must be an Object. - // Because of IE, we also have to check the presence of the constructor property. - // Make sure that DOM nodes and window objects don't pass through, as well - if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - try { - // Not own constructor property must be Object - if ( obj.constructor && - !core_hasOwn.call(obj, "constructor") && - !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) { - return false; - } - } catch ( e ) { - // IE8,9 Will throw exceptions on certain host objects #9897 - return false; - } - - // Support: IE<9 - // Handle iteration over inherited properties before own properties. - if ( jQuery.support.ownLast ) { - for ( key in obj ) { - return core_hasOwn.call( obj, key ); - } - } - - // Own properties are enumerated firstly, so to speed up, - // if last one is own, then all properties are own. - for ( key in obj ) {} - - return key === undefined || core_hasOwn.call( obj, key ); - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - error: function( msg ) { - throw new Error( msg ); - }, - - // data: string of html - // context (optional): If specified, the fragment will be created in this context, defaults to document - // keepScripts (optional): If true, will include scripts passed in the html string - parseHTML: function( data, context, keepScripts ) { - if ( !data || typeof data !== "string" ) { - return null; - } - if ( typeof context === "boolean" ) { - keepScripts = context; - context = false; - } - context = context || document; - - var parsed = rsingleTag.exec( data ), - scripts = !keepScripts && []; - - // Single tag - if ( parsed ) { - return [ context.createElement( parsed[1] ) ]; - } - - parsed = jQuery.buildFragment( [ data ], context, scripts ); - if ( scripts ) { - jQuery( scripts ).remove(); - } - return jQuery.merge( [], parsed.childNodes ); - }, - - parseJSON: function( data ) { - // Attempt to parse using the native JSON parser first - if ( window.JSON && window.JSON.parse ) { - return window.JSON.parse( data ); - } - - if ( data === null ) { - return data; - } - - if ( typeof data === "string" ) { - - // Make sure leading/trailing whitespace is removed (IE can't handle it) - data = jQuery.trim( data ); - - if ( data ) { - // Make sure the incoming data is actual JSON - // Logic borrowed from http://json.org/json2.js - if ( rvalidchars.test( data.replace( rvalidescape, "@" ) - .replace( rvalidtokens, "]" ) - .replace( rvalidbraces, "")) ) { - - return ( new Function( "return " + data ) )(); - } - } - } - - jQuery.error( "Invalid JSON: " + data ); - }, - - // Cross-browser xml parsing - parseXML: function( data ) { - var xml, tmp; - if ( !data || typeof data !== "string" ) { - return null; - } - try { - if ( window.DOMParser ) { // Standard - tmp = new DOMParser(); - xml = tmp.parseFromString( data , "text/xml" ); - } else { // IE - xml = new ActiveXObject( "Microsoft.XMLDOM" ); - xml.async = "false"; - xml.loadXML( data ); - } - } catch( e ) { - xml = undefined; - } - if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) { - jQuery.error( "Invalid XML: " + data ); - } - return xml; - }, - - noop: function() {}, - - // Evaluates a script in a global context - // Workarounds based on findings by Jim Driscoll - // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context - globalEval: function( data ) { - if ( data && jQuery.trim( data ) ) { - // We use execScript on Internet Explorer - // We use an anonymous function so that context is window - // rather than jQuery in Firefox - ( window.execScript || function( data ) { - window[ "eval" ].call( window, data ); - } )( data ); - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Use native String.trim function wherever possible - trim: core_trim && !core_trim.call("\uFEFF\xA0") ? - function( text ) { - return text == null ? - "" : - core_trim.call( text ); - } : - - // Otherwise use our own trimming functionality - function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - core_push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - var len; - - if ( arr ) { - if ( core_indexOf ) { - return core_indexOf.call( arr, elem, i ); - } - - len = arr.length; - i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0; - - for ( ; i < len; i++ ) { - // Skip accessing in sparse arrays - if ( i in arr && arr[ i ] === elem ) { - return i; - } - } - } - - return -1; - }, - - merge: function( first, second ) { - var l = second.length, - i = first.length, - j = 0; - - if ( typeof l === "number" ) { - for ( ; j < l; j++ ) { - first[ i++ ] = second[ j ]; - } - } else { - while ( second[j] !== undefined ) { - first[ i++ ] = second[ j++ ]; - } - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, inv ) { - var retVal, - ret = [], - i = 0, - length = elems.length; - inv = !!inv; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - retVal = !!callback( elems[ i ], i ); - if ( inv !== retVal ) { - ret.push( elems[ i ] ); - } - } - - return ret; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret[ ret.length ] = value; - } - } - } - - // Flatten any nested arrays - return core_concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var args, proxy, tmp; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = core_slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - // Multifunctional method to get and set values of a collection - // The value/s can optionally be executed if it's a function - access: function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - length = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < length; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - length ? fn( elems[0], key ) : emptyGet; - }, - - now: function() { - return ( new Date() ).getTime(); - }, - - // A method for quickly swapping in/out CSS properties to get correct calculations. - // Note: this method belongs to the css module but it's needed here for the support module. - // If support gets modularized, this method should be moved back to the css module. - swap: function( elem, options, callback, args ) { - var ret, name, - old = {}; - - // Remember the old values, and insert the new ones - for ( name in options ) { - old[ name ] = elem.style[ name ]; - elem.style[ name ] = options[ name ]; - } - - ret = callback.apply( elem, args || [] ); - - // Revert the old values - for ( name in options ) { - elem.style[ name ] = old[ name ]; - } - - return ret; - } -}); - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // we once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - // Standards-based browsers support DOMContentLoaded - } else if ( document.addEventListener ) { - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - - // If IE event model is used - } else { - // Ensure firing before onload, maybe late but safe also for iframes - document.attachEvent( "onreadystatechange", completed ); - - // A fallback to window.onload, that will always work - window.attachEvent( "onload", completed ); - - // If IE and not a frame - // continually check to see if the document is ready - var top = false; - - try { - top = window.frameElement == null && document.documentElement; - } catch(e) {} - - if ( top && top.doScroll ) { - (function doScrollCheck() { - if ( !jQuery.isReady ) { - - try { - // Use the trick by Diego Perini - // http://javascript.nwbox.com/IEContentLoaded/ - top.doScroll("left"); - } catch(e) { - return setTimeout( doScrollCheck, 50 ); - } - - // detach all dom ready events - detach(); - - // and execute any waiting functions - jQuery.ready(); - } - })(); - } - } - } - return readyList.promise( obj ); -}; - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - var length = obj.length, - type = jQuery.type( obj ); - - if ( jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || type !== "function" && - ( length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj ); -} - -// All jQuery objects should point back to these -rootjQuery = jQuery(document); -/*! - * Sizzle CSS Selector Engine v1.10.2 - * http://sizzlejs.com/ - * - * Copyright 2013 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2013-07-03 - */ -(function( window, undefined ) { - -var i, - support, - cachedruns, - Expr, - getText, - isXML, - compile, - outermostContext, - sortInput, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + -(new Date()), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - hasDuplicate = false, - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - return 0; - } - return 0; - }, - - // General-purpose constants - strundefined = typeof undefined, - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf if we can't use a native one - indexOf = arr.indexOf || function( elem ) { - var i = 0, - len = this.length; - for ( ; i < len; i++ ) { - if ( this[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Acceptable operators http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")" + whitespace + - "*(?:([*^$|!~]?=)" + whitespace + "*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|(" + identifier + ")|)|)" + whitespace + "*\\]", - - // Prefer arguments quoted, - // then not containing pseudos/brackets, - // then attribute selectors/non-parenthetical expressions, - // then anything else - // These preferences are here to reduce the number of selectors - // needing tokenize in the PSEUDO preFilter - pseudos = ":(" + characterEncoding + ")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|" + attributes.replace( 3, 8 ) + ")*)|.*)\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rsibling = new RegExp( whitespace + "*[+~]" ), - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - // BMP codepoint - high < 0 ? - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - - if ( !selector || typeof selector !== "string" ) { - return results; - } - - if ( (nodeType = context.nodeType) !== 1 && nodeType !== 9 ) { - return []; - } - - if ( documentIsHTML && !seed ) { - - // Shortcuts - if ( (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName && context.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType === 9 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && context.parentNode || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key += " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Detect xml - * @param {Element|Object} elem An element or a document - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var doc = node ? node.ownerDocument || node : preferredDoc, - parent = doc.defaultView; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - - // Support tests - documentIsHTML = !isXML( doc ); - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent.attachEvent && parent !== parent.top ) { - parent.attachEvent( "onbeforeunload", function() { - setDocument(); - }); - } - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Check if getElementsByClassName can be trusted - support.getElementsByClassName = assert(function( div ) { - div.innerHTML = "
    "; - - // Support: Safari<4 - // Catch class over-caching - div.firstChild.className = "i"; - // Support: Opera<10 - // Catch gEBCN failure to find non-leading classes - return div.getElementsByClassName("i").length === 2; - }); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== strundefined && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [m] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== strundefined && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== strundefined ) { - return context.getElementsByTagName( tag ); - } - } : - function( tag, context ) { - var elem, - tmp = [], - i = 0, - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( typeof context.getElementsByClassName !== strundefined && documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - div.innerHTML = ""; - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - }); - - assert(function( div ) { - - // Support: Opera 10-12/IE8 - // ^= $= *= and empty values - // Should not select anything - // Support: Windows 8 Native Apps - // The type attribute is restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "t", "" ); - - if ( div.querySelectorAll("[t^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = rnative.test( docElem.contains ) || docElem.compareDocumentPosition ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = docElem.compareDocumentPosition ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var compare = b.compareDocumentPosition && a.compareDocumentPosition && a.compareDocumentPosition( b ); - - if ( compare ) { - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } - - // Not directly comparable, sort on existence of method - return a.compareDocumentPosition ? -1 : 1; - } : - function( a, b ) { - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - - // Parentless nodes are either documents or disconnected - } else if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf.call( sortInput, a ) - indexOf.call( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch(e) {} - } - - return Sizzle( expr, document, null, [elem] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val === undefined ? - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null : - val; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - for ( ; (node = elem[i]); i++ ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (see #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[5] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] && match[4] !== undefined ) { - match[2] = match[4]; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== strundefined && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf.call( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is only affected by element nodes and content nodes(including text(3), cdata(4)), - // not comment, processing instructions, or others - // Thanks to Diego Perini for the nodeName shortcut - // Greater than "@" means alpha characters (specifically not starting with "#" or "?") - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeName > "@" || elem.nodeType === 3 || elem.nodeType === 4 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - // IE6 and 7 will map elem.type to 'text' for new HTML5 types (search, etc) - // use getAttribute instead to test this case - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === elem.type ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -function tokenize( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( tokens = [] ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -} - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var data, cache, outerCache, - dirkey = dirruns + " " + doneName; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (cache = outerCache[ dir ]) && cache[0] === dirkey ) { - if ( (data = cache[1]) === true || data === cachedruns ) { - return data === true; - } - } else { - cache = outerCache[ dir ] = [ dirkey ]; - cache[1] = matcher( elem, context, xml ) || cachedruns; - if ( cache[1] === true ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf.call( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf.call( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - return ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - // A counter to specify which element is currently being matched - var matcherCachedRuns = 0, - bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, expandContext ) { - var elem, j, matcher, - setMatched = [], - matchedCount = 0, - i = "0", - unmatched = seed && [], - outermost = expandContext != null, - contextBackup = outermostContext, - // We must always have either seed elements or context - elems = seed || byElement && Expr.find["TAG"]( "*", expandContext && context.parentNode || context ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1); - - if ( outermost ) { - outermostContext = context !== document && context; - cachedruns = matcherCachedRuns; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - for ( ; (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - cachedruns = ++matcherCachedRuns; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, group /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !group ) { - group = tokenize( selector ); - } - i = group.length; - while ( i-- ) { - cached = matcherFromTokens( group[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - } - return cached; -}; - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function select( selector, context, results, seed ) { - var i, tokens, token, type, find, - match = tokenize( selector ); - - if ( !seed ) { - // Try to minimize operations if there is only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - } - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && context.parentNode || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - } - - // Compile and execute a filtering function - // Provide `match` to avoid retokenization if we modified the selector above - compile( selector, match )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) - ); - return results; -} - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome<14 -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - elem[ name ] === true ? name.toLowerCase() : null; - } - }); -} - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - -})( window ); -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Flag to know if list is currently firing - firing, - // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // First callback to fire (used internally by add and fireWith) - firingStart, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var action = tuple[ 0 ], - fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = core_slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value; - if( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // if we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); -jQuery.support = (function( support ) { - - var all, a, input, select, fragment, opt, eventName, isSupported, i, - div = document.createElement("div"); - - // Setup - div.setAttribute( "className", "t" ); - div.innerHTML = "
    a"; - - // Finish early in limited (non-browser) environments - all = div.getElementsByTagName("*") || []; - a = div.getElementsByTagName("a")[ 0 ]; - if ( !a || !a.style || !all.length ) { - return support; - } - - // First batch of tests - select = document.createElement("select"); - opt = select.appendChild( document.createElement("option") ); - input = div.getElementsByTagName("input")[ 0 ]; - - a.style.cssText = "top:1px;float:left;opacity:.5"; - - // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7) - support.getSetAttribute = div.className !== "t"; - - // IE strips leading whitespace when .innerHTML is used - support.leadingWhitespace = div.firstChild.nodeType === 3; - - // Make sure that tbody elements aren't automatically inserted - // IE will insert them into empty tables - support.tbody = !div.getElementsByTagName("tbody").length; - - // Make sure that link elements get serialized correctly by innerHTML - // This requires a wrapper element in IE - support.htmlSerialize = !!div.getElementsByTagName("link").length; - - // Get the style information from getAttribute - // (IE uses .cssText instead) - support.style = /top/.test( a.getAttribute("style") ); - - // Make sure that URLs aren't manipulated - // (IE normalizes it by default) - support.hrefNormalized = a.getAttribute("href") === "/a"; - - // Make sure that element opacity exists - // (IE uses filter instead) - // Use a regex to work around a WebKit issue. See #5145 - support.opacity = /^0.5/.test( a.style.opacity ); - - // Verify style float existence - // (IE uses styleFloat instead of cssFloat) - support.cssFloat = !!a.style.cssFloat; - - // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere) - support.checkOn = !!input.value; - - // Make sure that a selected-by-default option has a working selected property. - // (WebKit defaults to false instead of true, IE too, if it's in an optgroup) - support.optSelected = opt.selected; - - // Tests for enctype support on a form (#6743) - support.enctype = !!document.createElement("form").enctype; - - // Makes sure cloning an html5 element does not cause problems - // Where outerHTML is undefined, this still works - support.html5Clone = document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>"; - - // Will be defined later - support.inlineBlockNeedsLayout = false; - support.shrinkWrapBlocks = false; - support.pixelPosition = false; - support.deleteExpando = true; - support.noCloneEvent = true; - support.reliableMarginRight = true; - support.boxSizingReliable = true; - - // Make sure checked status is properly cloned - input.checked = true; - support.noCloneChecked = input.cloneNode( true ).checked; - - // Make sure that the options inside disabled selects aren't marked as disabled - // (WebKit marks them as disabled) - select.disabled = true; - support.optDisabled = !opt.disabled; - - // Support: IE<9 - try { - delete div.test; - } catch( e ) { - support.deleteExpando = false; - } - - // Check if we can trust getAttribute("value") - input = document.createElement("input"); - input.setAttribute( "value", "" ); - support.input = input.getAttribute( "value" ) === ""; - - // Check if an input maintains its value after becoming a radio - input.value = "t"; - input.setAttribute( "type", "radio" ); - support.radioValue = input.value === "t"; - - // #11217 - WebKit loses check when the name is after the checked attribute - input.setAttribute( "checked", "t" ); - input.setAttribute( "name", "t" ); - - fragment = document.createDocumentFragment(); - fragment.appendChild( input ); - - // Check if a disconnected checkbox will retain its checked - // value of true after appended to the DOM (IE6/7) - support.appendChecked = input.checked; - - // WebKit doesn't clone checked state correctly in fragments - support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<9 - // Opera does not clone events (and typeof div.attachEvent === undefined). - // IE9-10 clones events bound via attachEvent, but they don't trigger with .click() - if ( div.attachEvent ) { - div.attachEvent( "onclick", function() { - support.noCloneEvent = false; - }); - - div.cloneNode( true ).click(); - } - - // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event) - // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP) - for ( i in { submit: true, change: true, focusin: true }) { - div.setAttribute( eventName = "on" + i, "t" ); - - support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false; - } - - div.style.backgroundClip = "content-box"; - div.cloneNode( true ).style.backgroundClip = ""; - support.clearCloneStyle = div.style.backgroundClip === "content-box"; - - // Support: IE<9 - // Iteration over object's inherited properties before its own. - for ( i in jQuery( support ) ) { - break; - } - support.ownLast = i !== "0"; - - // Run tests that need a body at doc ready - jQuery(function() { - var container, marginDiv, tds, - divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;", - body = document.getElementsByTagName("body")[0]; - - if ( !body ) { - // Return for frameset docs that don't have a body - return; - } - - container = document.createElement("div"); - container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px"; - - body.appendChild( container ).appendChild( div ); - - // Support: IE8 - // Check if table cells still have offsetWidth/Height when they are set - // to display:none and there are still other visible table cells in a - // table row; if so, offsetWidth/Height are not reliable for use when - // determining if an element has been hidden directly using - // display:none (it is still safe to use offsets if a parent element is - // hidden; don safety goggles and see bug #4512 for more information). - div.innerHTML = "
    t
    "; - tds = div.getElementsByTagName("td"); - tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none"; - isSupported = ( tds[ 0 ].offsetHeight === 0 ); - - tds[ 0 ].style.display = ""; - tds[ 1 ].style.display = "none"; - - // Support: IE8 - // Check if empty table cells still have offsetWidth/Height - support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 ); - - // Check box-sizing and margin behavior. - div.innerHTML = ""; - div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;"; - - // Workaround failing boxSizing test due to offsetWidth returning wrong value - // with some non-1 values of body zoom, ticket #13543 - jQuery.swap( body, body.style.zoom != null ? { zoom: 1 } : {}, function() { - support.boxSizing = div.offsetWidth === 4; - }); - - // Use window.getComputedStyle because jsdom on node.js will break without it. - if ( window.getComputedStyle ) { - support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%"; - support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px"; - - // Check if div with explicit width and no margin-right incorrectly - // gets computed margin-right based on width of container. (#3333) - // Fails in WebKit before Feb 2011 nightlies - // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right - marginDiv = div.appendChild( document.createElement("div") ); - marginDiv.style.cssText = div.style.cssText = divReset; - marginDiv.style.marginRight = marginDiv.style.width = "0"; - div.style.width = "1px"; - - support.reliableMarginRight = - !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight ); - } - - if ( typeof div.style.zoom !== core_strundefined ) { - // Support: IE<8 - // Check if natively block-level elements act like inline-block - // elements when setting their display to 'inline' and giving - // them layout - div.innerHTML = ""; - div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1"; - support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 ); - - // Support: IE6 - // Check if elements with layout shrink-wrap their children - div.style.display = "block"; - div.innerHTML = "
    "; - div.firstChild.style.width = "5px"; - support.shrinkWrapBlocks = ( div.offsetWidth !== 3 ); - - if ( support.inlineBlockNeedsLayout ) { - // Prevent IE 6 from affecting layout for positioned elements #11048 - // Prevent IE from shrinking the body in IE 7 mode #12869 - // Support: IE<8 - body.style.zoom = 1; - } - } - - body.removeChild( container ); - - // Null elements to avoid leaks in IE - container = div = tds = marginDiv = null; - }); - - // Null elements to avoid leaks in IE - all = select = fragment = opt = a = input = null; - - return support; -})({}); - -var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/, - rmultiDash = /([A-Z])/g; - -function internalData( elem, name, data, pvt /* Internal Use Only */ ){ - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var ret, thisCache, - internalKey = jQuery.expando, - - // We have to handle DOM nodes and JS objects differently because IE6-7 - // can't GC object references properly across the DOM-JS boundary - isNode = elem.nodeType, - - // Only DOM nodes need the global jQuery cache; JS object data is - // attached directly to the object so GC can occur automatically - cache = isNode ? jQuery.cache : elem, - - // Only defining an ID for JS objects if its cache already exists allows - // the code to shortcut on the same path as a DOM node with no cache - id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey; - - // Avoid doing any more work than we need to when trying to get data on an - // object that has no data at all - if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && data === undefined && typeof name === "string" ) { - return; - } - - if ( !id ) { - // Only DOM nodes need a new unique ID for each element since their data - // ends up in the global cache - if ( isNode ) { - id = elem[ internalKey ] = core_deletedIds.pop() || jQuery.guid++; - } else { - id = internalKey; - } - } - - if ( !cache[ id ] ) { - // Avoid exposing jQuery metadata on plain JS objects when the object - // is serialized using JSON.stringify - cache[ id ] = isNode ? {} : { toJSON: jQuery.noop }; - } - - // An object can be passed to jQuery.data instead of a key/value pair; this gets - // shallow copied over onto the existing cache - if ( typeof name === "object" || typeof name === "function" ) { - if ( pvt ) { - cache[ id ] = jQuery.extend( cache[ id ], name ); - } else { - cache[ id ].data = jQuery.extend( cache[ id ].data, name ); - } - } - - thisCache = cache[ id ]; - - // jQuery data() is stored in a separate object inside the object's internal data - // cache in order to avoid key collisions between internal data and user-defined - // data. - if ( !pvt ) { - if ( !thisCache.data ) { - thisCache.data = {}; - } - - thisCache = thisCache.data; - } - - if ( data !== undefined ) { - thisCache[ jQuery.camelCase( name ) ] = data; - } - - // Check for both converted-to-camel and non-converted data property names - // If a data property was specified - if ( typeof name === "string" ) { - - // First Try to find as-is property data - ret = thisCache[ name ]; - - // Test for null|undefined property data - if ( ret == null ) { - - // Try to find the camelCased property - ret = thisCache[ jQuery.camelCase( name ) ]; - } - } else { - ret = thisCache; - } - - return ret; -} - -function internalRemoveData( elem, name, pvt ) { - if ( !jQuery.acceptData( elem ) ) { - return; - } - - var thisCache, i, - isNode = elem.nodeType, - - // See jQuery.data for more information - cache = isNode ? jQuery.cache : elem, - id = isNode ? elem[ jQuery.expando ] : jQuery.expando; - - // If there is already no cache entry for this object, there is no - // purpose in continuing - if ( !cache[ id ] ) { - return; - } - - if ( name ) { - - thisCache = pvt ? cache[ id ] : cache[ id ].data; - - if ( thisCache ) { - - // Support array or space separated string names for data keys - if ( !jQuery.isArray( name ) ) { - - // try the string as a key before any manipulation - if ( name in thisCache ) { - name = [ name ]; - } else { - - // split the camel cased version by spaces unless a key with the spaces exists - name = jQuery.camelCase( name ); - if ( name in thisCache ) { - name = [ name ]; - } else { - name = name.split(" "); - } - } - } else { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = name.concat( jQuery.map( name, jQuery.camelCase ) ); - } - - i = name.length; - while ( i-- ) { - delete thisCache[ name[i] ]; - } - - // If there is no data left in the cache, we want to continue - // and let the cache object itself get destroyed - if ( pvt ? !isEmptyDataObject(thisCache) : !jQuery.isEmptyObject(thisCache) ) { - return; - } - } - } - - // See jQuery.data for more information - if ( !pvt ) { - delete cache[ id ].data; - - // Don't destroy the parent cache unless the internal data object - // had been the only thing left in it - if ( !isEmptyDataObject( cache[ id ] ) ) { - return; - } - } - - // Destroy the cache - if ( isNode ) { - jQuery.cleanData( [ elem ], true ); - - // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080) - /* jshint eqeqeq: false */ - } else if ( jQuery.support.deleteExpando || cache != cache.window ) { - /* jshint eqeqeq: true */ - delete cache[ id ]; - - // When all else fails, null - } else { - cache[ id ] = null; - } -} - -jQuery.extend({ - cache: {}, - - // The following elements throw uncatchable exceptions if you - // attempt to add expando properties to them. - noData: { - "applet": true, - "embed": true, - // Ban all objects except for Flash (which handle expandos) - "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" - }, - - hasData: function( elem ) { - elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ]; - return !!elem && !isEmptyDataObject( elem ); - }, - - data: function( elem, name, data ) { - return internalData( elem, name, data ); - }, - - removeData: function( elem, name ) { - return internalRemoveData( elem, name ); - }, - - // For internal use only. - _data: function( elem, name, data ) { - return internalData( elem, name, data, true ); - }, - - _removeData: function( elem, name ) { - return internalRemoveData( elem, name, true ); - }, - - // A method for determining if a DOM node can handle the data expando - acceptData: function( elem ) { - // Do not set data on non-element because it will not be cleared (#8335). - if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) { - return false; - } - - var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ]; - - // nodes accept data unless otherwise specified; rejection can be conditional - return !noData || noData !== true && elem.getAttribute("classid") === noData; - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var attrs, name, - data = null, - i = 0, - elem = this[0]; - - // Special expections of .data basically thwart jQuery.access, - // so implement the relevant behavior ourselves - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = jQuery.data( elem ); - - if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) { - attrs = elem.attributes; - for ( ; i < attrs.length; i++ ) { - name = attrs[i].name; - - if ( name.indexOf("data-") === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - - dataAttr( elem, name, data[ name ] ); - } - } - jQuery._data( elem, "parsedAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - jQuery.data( this, key ); - }); - } - - return arguments.length > 1 ? - - // Sets one value - this.each(function() { - jQuery.data( this, key, value ); - }) : - - // Gets one value - // Try to fetch any internally stored data first - elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null; - }, - - removeData: function( key ) { - return this.each(function() { - jQuery.removeData( this, key ); - }); - } -}); - -function dataAttr( elem, key, data ) { - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - - var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - jQuery.data( elem, key, data ); - - } else { - data = undefined; - } - } - - return data; -} - -// checks a cache object for emptiness -function isEmptyDataObject( obj ) { - var name; - for ( name in obj ) { - - // if the public data object is empty, the private is still empty - if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) { - continue; - } - if ( name !== "toJSON" ) { - return false; - } - } - - return true; -} -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = jQuery._data( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray(data) ) { - queue = jQuery._data( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // not intended for public consumption - generates a queueHooks object, or returns the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return jQuery._data( elem, key ) || jQuery._data( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - jQuery._removeData( elem, type + "queue" ); - jQuery._removeData( elem, key ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - // Based off of the plugin by Clint Helfers, with permission. - // http://blindsignals.com/index.php/2009/07/jquery-delay/ - delay: function( time, type ) { - time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; - type = type || "fx"; - - return this.queue( type, function( next, hooks ) { - var timeout = setTimeout( next, time ); - hooks.stop = function() { - clearTimeout( timeout ); - }; - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while( i-- ) { - tmp = jQuery._data( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var nodeHook, boolHook, - rclass = /[\t\r\n\f]/g, - rreturn = /\r/g, - rfocusable = /^(?:input|select|textarea|button|object)$/i, - rclickable = /^(?:a|area)$/i, - ruseDefault = /^(?:checked|selected)$/i, - getSetAttribute = jQuery.support.getSetAttribute, - getSetInput = jQuery.support.input; - -jQuery.fn.extend({ - attr: function( name, value ) { - return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 ); - }, - - removeAttr: function( name ) { - return this.each(function() { - jQuery.removeAttr( this, name ); - }); - }, - - prop: function( name, value ) { - return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 ); - }, - - removeProp: function( name ) { - name = jQuery.propFix[ name ] || name; - return this.each(function() { - // try/catch handles cases where IE balks (such as removing a property on window) - try { - this[ name ] = undefined; - delete this[ name ]; - } catch( e ) {} - }); - }, - - addClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).addClass( value.call( this, j, this.className ) ); - }); - } - - if ( proceed ) { - // The disjunction here is for better compressibility (see removeClass) - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - " " - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - if ( cur.indexOf( " " + clazz + " " ) < 0 ) { - cur += clazz + " "; - } - } - elem.className = jQuery.trim( cur ); - - } - } - } - - return this; - }, - - removeClass: function( value ) { - var classes, elem, cur, clazz, j, - i = 0, - len = this.length, - proceed = arguments.length === 0 || typeof value === "string" && value; - - if ( jQuery.isFunction( value ) ) { - return this.each(function( j ) { - jQuery( this ).removeClass( value.call( this, j, this.className ) ); - }); - } - if ( proceed ) { - classes = ( value || "" ).match( core_rnotwhite ) || []; - - for ( ; i < len; i++ ) { - elem = this[ i ]; - // This expression is here for better compressibility (see addClass) - cur = elem.nodeType === 1 && ( elem.className ? - ( " " + elem.className + " " ).replace( rclass, " " ) : - "" - ); - - if ( cur ) { - j = 0; - while ( (clazz = classes[j++]) ) { - // Remove *all* instances - while ( cur.indexOf( " " + clazz + " " ) >= 0 ) { - cur = cur.replace( " " + clazz + " ", " " ); - } - } - elem.className = value ? jQuery.trim( cur ) : ""; - } - } - } - - return this; - }, - - toggleClass: function( value, stateVal ) { - var type = typeof value; - - if ( typeof stateVal === "boolean" && type === "string" ) { - return stateVal ? this.addClass( value ) : this.removeClass( value ); - } - - if ( jQuery.isFunction( value ) ) { - return this.each(function( i ) { - jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal ); - }); - } - - return this.each(function() { - if ( type === "string" ) { - // toggle individual class names - var className, - i = 0, - self = jQuery( this ), - classNames = value.match( core_rnotwhite ) || []; - - while ( (className = classNames[ i++ ]) ) { - // check each className given, space separated list - if ( self.hasClass( className ) ) { - self.removeClass( className ); - } else { - self.addClass( className ); - } - } - - // Toggle whole class name - } else if ( type === core_strundefined || type === "boolean" ) { - if ( this.className ) { - // store className if set - jQuery._data( this, "__className__", this.className ); - } - - // If the element has a class name or if we're passed "false", - // then remove the whole classname (if there was one, the above saved it). - // Otherwise bring back whatever was previously saved (if anything), - // falling back to the empty string if nothing was stored. - this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || ""; - } - }); - }, - - hasClass: function( selector ) { - var className = " " + selector + " ", - i = 0, - l = this.length; - for ( ; i < l; i++ ) { - if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) { - return true; - } - } - - return false; - }, - - val: function( value ) { - var ret, hooks, isFunction, - elem = this[0]; - - if ( !arguments.length ) { - if ( elem ) { - hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ]; - - if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) { - return ret; - } - - ret = elem.value; - - return typeof ret === "string" ? - // handle most common string cases - ret.replace(rreturn, "") : - // handle cases where value is null/undef or number - ret == null ? "" : ret; - } - - return; - } - - isFunction = jQuery.isFunction( value ); - - return this.each(function( i ) { - var val; - - if ( this.nodeType !== 1 ) { - return; - } - - if ( isFunction ) { - val = value.call( this, i, jQuery( this ).val() ); - } else { - val = value; - } - - // Treat null/undefined as ""; convert numbers to string - if ( val == null ) { - val = ""; - } else if ( typeof val === "number" ) { - val += ""; - } else if ( jQuery.isArray( val ) ) { - val = jQuery.map(val, function ( value ) { - return value == null ? "" : value + ""; - }); - } - - hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ]; - - // If set returns undefined, fall back to normal setting - if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) { - this.value = val; - } - }); - } -}); - -jQuery.extend({ - valHooks: { - option: { - get: function( elem ) { - // Use proper attribute retrieval(#6932, #12072) - var val = jQuery.find.attr( elem, "value" ); - return val != null ? - val : - elem.text; - } - }, - select: { - get: function( elem ) { - var value, option, - options = elem.options, - index = elem.selectedIndex, - one = elem.type === "select-one" || index < 0, - values = one ? null : [], - max = one ? index + 1 : options.length, - i = index < 0 ? - max : - one ? index : 0; - - // Loop through all the selected options - for ( ; i < max; i++ ) { - option = options[ i ]; - - // oldIE doesn't update selected after form reset (#2551) - if ( ( option.selected || i === index ) && - // Don't return options that are disabled or in a disabled optgroup - ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) && - ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) { - - // Get the specific value for the option - value = jQuery( option ).val(); - - // We don't need an array for one selects - if ( one ) { - return value; - } - - // Multi-Selects return an array - values.push( value ); - } - } - - return values; - }, - - set: function( elem, value ) { - var optionSet, option, - options = elem.options, - values = jQuery.makeArray( value ), - i = options.length; - - while ( i-- ) { - option = options[ i ]; - if ( (option.selected = jQuery.inArray( jQuery(option).val(), values ) >= 0) ) { - optionSet = true; - } - } - - // force browsers to behave consistently when non-matching value is set - if ( !optionSet ) { - elem.selectedIndex = -1; - } - return values; - } - } - }, - - attr: function( elem, name, value ) { - var hooks, ret, - nType = elem.nodeType; - - // don't get/set attributes on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - // Fallback to prop when attributes are not supported - if ( typeof elem.getAttribute === core_strundefined ) { - return jQuery.prop( elem, name, value ); - } - - // All attributes are lowercase - // Grab necessary hook if one is defined - if ( nType !== 1 || !jQuery.isXMLDoc( elem ) ) { - name = name.toLowerCase(); - hooks = jQuery.attrHooks[ name ] || - ( jQuery.expr.match.bool.test( name ) ? boolHook : nodeHook ); - } - - if ( value !== undefined ) { - - if ( value === null ) { - jQuery.removeAttr( elem, name ); - - } else if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) { - return ret; - - } else { - elem.setAttribute( name, value + "" ); - return value; - } - - } else if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) { - return ret; - - } else { - ret = jQuery.find.attr( elem, name ); - - // Non-existent attributes return null, we normalize to undefined - return ret == null ? - undefined : - ret; - } - }, - - removeAttr: function( elem, value ) { - var name, propName, - i = 0, - attrNames = value && value.match( core_rnotwhite ); - - if ( attrNames && elem.nodeType === 1 ) { - while ( (name = attrNames[i++]) ) { - propName = jQuery.propFix[ name ] || name; - - // Boolean attributes get special treatment (#10870) - if ( jQuery.expr.match.bool.test( name ) ) { - // Set corresponding property to false - if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - elem[ propName ] = false; - // Support: IE<9 - // Also clear defaultChecked/defaultSelected (if appropriate) - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = - elem[ propName ] = false; - } - - // See #9699 for explanation of this approach (setting first, then removal) - } else { - jQuery.attr( elem, name, "" ); - } - - elem.removeAttribute( getSetAttribute ? name : propName ); - } - } - }, - - attrHooks: { - type: { - set: function( elem, value ) { - if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) { - // Setting the type on a radio button after the value resets the value in IE6-9 - // Reset value to default in case type is set after value during creation - var val = elem.value; - elem.setAttribute( "type", value ); - if ( val ) { - elem.value = val; - } - return value; - } - } - } - }, - - propFix: { - "for": "htmlFor", - "class": "className" - }, - - prop: function( elem, name, value ) { - var ret, hooks, notxml, - nType = elem.nodeType; - - // don't get/set properties on text, comment and attribute nodes - if ( !elem || nType === 3 || nType === 8 || nType === 2 ) { - return; - } - - notxml = nType !== 1 || !jQuery.isXMLDoc( elem ); - - if ( notxml ) { - // Fix name and attach hooks - name = jQuery.propFix[ name ] || name; - hooks = jQuery.propHooks[ name ]; - } - - if ( value !== undefined ) { - return hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ? - ret : - ( elem[ name ] = value ); - - } else { - return hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ? - ret : - elem[ name ]; - } - }, - - propHooks: { - tabIndex: { - get: function( elem ) { - // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set - // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/ - // Use proper attribute retrieval(#12072) - var tabindex = jQuery.find.attr( elem, "tabindex" ); - - return tabindex ? - parseInt( tabindex, 10 ) : - rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ? - 0 : - -1; - } - } - } -}); - -// Hooks for boolean attributes -boolHook = { - set: function( elem, value, name ) { - if ( value === false ) { - // Remove boolean attributes when set to false - jQuery.removeAttr( elem, name ); - } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) { - // IE<8 needs the *property* name - elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name ); - - // Use defaultChecked and defaultSelected for oldIE - } else { - elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true; - } - - return name; - } -}; -jQuery.each( jQuery.expr.match.bool.source.match( /\w+/g ), function( i, name ) { - var getter = jQuery.expr.attrHandle[ name ] || jQuery.find.attr; - - jQuery.expr.attrHandle[ name ] = getSetInput && getSetAttribute || !ruseDefault.test( name ) ? - function( elem, name, isXML ) { - var fn = jQuery.expr.attrHandle[ name ], - ret = isXML ? - undefined : - /* jshint eqeqeq: false */ - (jQuery.expr.attrHandle[ name ] = undefined) != - getter( elem, name, isXML ) ? - - name.toLowerCase() : - null; - jQuery.expr.attrHandle[ name ] = fn; - return ret; - } : - function( elem, name, isXML ) { - return isXML ? - undefined : - elem[ jQuery.camelCase( "default-" + name ) ] ? - name.toLowerCase() : - null; - }; -}); - -// fix oldIE attroperties -if ( !getSetInput || !getSetAttribute ) { - jQuery.attrHooks.value = { - set: function( elem, value, name ) { - if ( jQuery.nodeName( elem, "input" ) ) { - // Does not return so that setAttribute is also used - elem.defaultValue = value; - } else { - // Use nodeHook if defined (#1954); otherwise setAttribute is fine - return nodeHook && nodeHook.set( elem, value, name ); - } - } - }; -} - -// IE6/7 do not support getting/setting some attributes with get/setAttribute -if ( !getSetAttribute ) { - - // Use this for any attribute in IE6/7 - // This fixes almost every IE6/7 issue - nodeHook = { - set: function( elem, value, name ) { - // Set the existing or create a new attribute node - var ret = elem.getAttributeNode( name ); - if ( !ret ) { - elem.setAttributeNode( - (ret = elem.ownerDocument.createAttribute( name )) - ); - } - - ret.value = value += ""; - - // Break association with cloned elements by also using setAttribute (#9646) - return name === "value" || value === elem.getAttribute( name ) ? - value : - undefined; - } - }; - jQuery.expr.attrHandle.id = jQuery.expr.attrHandle.name = jQuery.expr.attrHandle.coords = - // Some attributes are constructed with empty-string values when not defined - function( elem, name, isXML ) { - var ret; - return isXML ? - undefined : - (ret = elem.getAttributeNode( name )) && ret.value !== "" ? - ret.value : - null; - }; - jQuery.valHooks.button = { - get: function( elem, name ) { - var ret = elem.getAttributeNode( name ); - return ret && ret.specified ? - ret.value : - undefined; - }, - set: nodeHook.set - }; - - // Set contenteditable to false on removals(#10429) - // Setting to empty string throws an error as an invalid value - jQuery.attrHooks.contenteditable = { - set: function( elem, value, name ) { - nodeHook.set( elem, value === "" ? false : value, name ); - } - }; - - // Set width and height to auto instead of 0 on empty string( Bug #8150 ) - // This is for removals - jQuery.each([ "width", "height" ], function( i, name ) { - jQuery.attrHooks[ name ] = { - set: function( elem, value ) { - if ( value === "" ) { - elem.setAttribute( name, "auto" ); - return value; - } - } - }; - }); -} - - -// Some attributes require a special call on IE -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !jQuery.support.hrefNormalized ) { - // href/src property should get the full normalized URL (#10299/#12915) - jQuery.each([ "href", "src" ], function( i, name ) { - jQuery.propHooks[ name ] = { - get: function( elem ) { - return elem.getAttribute( name, 4 ); - } - }; - }); -} - -if ( !jQuery.support.style ) { - jQuery.attrHooks.style = { - get: function( elem ) { - // Return undefined in the case of empty string - // Note: IE uppercases css property names, but if we were to .toLowerCase() - // .cssText, that would destroy case senstitivity in URL's, like in "background" - return elem.style.cssText || undefined; - }, - set: function( elem, value ) { - return ( elem.style.cssText = value + "" ); - } - }; -} - -// Safari mis-reports the default selected property of an option -// Accessing the parent's selectedIndex property fixes it -if ( !jQuery.support.optSelected ) { - jQuery.propHooks.selected = { - get: function( elem ) { - var parent = elem.parentNode; - - if ( parent ) { - parent.selectedIndex; - - // Make sure that it also works with optgroups, see #5701 - if ( parent.parentNode ) { - parent.parentNode.selectedIndex; - } - } - return null; - } - }; -} - -jQuery.each([ - "tabIndex", - "readOnly", - "maxLength", - "cellSpacing", - "cellPadding", - "rowSpan", - "colSpan", - "useMap", - "frameBorder", - "contentEditable" -], function() { - jQuery.propFix[ this.toLowerCase() ] = this; -}); - -// IE6/7 call enctype encoding -if ( !jQuery.support.enctype ) { - jQuery.propFix.enctype = "encoding"; -} - -// Radios and checkboxes getter/setter -jQuery.each([ "radio", "checkbox" ], function() { - jQuery.valHooks[ this ] = { - set: function( elem, value ) { - if ( jQuery.isArray( value ) ) { - return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 ); - } - } - }; - if ( !jQuery.support.checkOn ) { - jQuery.valHooks[ this ].get = function( elem ) { - // Support: Webkit - // "" is returned instead of "on" if a value isn't specified - return elem.getAttribute("value") === null ? "on" : elem.value; - }; - } -}); -var rformElems = /^(?:input|select|textarea)$/i, - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - var tmp, events, t, handleObjIn, - special, eventHandle, handleObj, - handlers, type, namespaces, origType, - elemData = jQuery._data( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ? - jQuery.event.dispatch.apply( eventHandle.elem, arguments ) : - undefined; - }; - // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events - eventHandle.elem = elem; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener/attachEvent if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - // Bind the global event handler to the element - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - - } else if ( elem.attachEvent ) { - elem.attachEvent( "on" + type, eventHandle ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - // Nullify elem to prevent memory leaks in IE - elem = null; - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - var j, handleObj, tmp, - origCount, t, events, - special, handlers, type, - namespaces, origType, - elemData = jQuery.hasData( elem ) && jQuery._data( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( core_rnotwhite ) || [""]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - - // removeData also checks for emptiness and clears the expando if empty - // so use it instead of delete - jQuery._removeData( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - var handle, ontype, cur, - bubbleType, special, tmp, i, - eventPath = [ elem || document ], - type = core_hasOwn.call( event, "type" ) ? event.type : event, - namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) { - event.preventDefault(); - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Can't use an .isFunction() check here because IE6/7 fails that test. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - try { - elem[ type ](); - } catch ( e ) { - // IE<9 dies on focus/blur to hidden element (#1486,#12518) - // only reproducible on winXP IE8 native, not IE9 in IE8 mode - } - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, ret, handleObj, matched, j, - handlerQueue = [], - args = core_slice.call( arguments ), - handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or - // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var sel, handleObj, matches, i, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - /* jshint eqeqeq: false */ - for ( ; cur != this; cur = cur.parentNode || this ) { - /* jshint eqeqeq: true */ - - // Don't check non-elements (#13208) - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.nodeType === 1 && (cur.disabled !== true || event.type !== "click") ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: IE<9 - // Fix target property (#1925) - if ( !event.target ) { - event.target = originalEvent.srcElement || document; - } - - // Support: Chrome 23+, Safari? - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - // Support: IE<9 - // For mouse/key events, metaKey==false if it's undefined (#3368, #11328) - event.metaKey = !!event.metaKey; - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "), - - fixHooks: {}, - - keyHooks: { - props: "char charCode key keyCode".split(" "), - filter: function( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var body, eventDoc, doc, - button = original.button, - fromElement = original.fromElement; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add relatedTarget, if necessary - if ( !event.relatedTarget && fromElement ) { - event.relatedTarget = fromElement === event.target ? original.toElement : fromElement; - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - try { - this.focus(); - return false; - } catch ( e ) { - // Support: IE<9 - // If we error on focus to hidden element (#1486, #12518), - // let .trigger() run the handlers - } - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( jQuery.nodeName( this, "input" ) && this.type === "checkbox" && this.click ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Even when returnValue equals to undefined Firefox will still show alert - if ( event.result !== undefined ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = document.removeEventListener ? - function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } - } : - function( elem, type, handle ) { - var name = "on" + type; - - if ( elem.detachEvent ) { - - // #8545, #7054, preventing memory leaks for custom events in IE6-8 - // detachEvent needed property on element, by name of that event, to properly expose it to GC - if ( typeof elem[ name ] === core_strundefined ) { - elem[ name ] = null; - } - - elem.detachEvent( name, handle ); - } - }; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = ( src.defaultPrevented || src.returnValue === false || - src.getPreventDefault && src.getPreventDefault() ) ? returnTrue : returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - if ( !e ) { - return; - } - - // If preventDefault exists, run it on the original event - if ( e.preventDefault ) { - e.preventDefault(); - - // Support: IE - // Otherwise set the returnValue property of the original event to false - } else { - e.returnValue = false; - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - if ( !e ) { - return; - } - // If stopPropagation exists, run it on the original event - if ( e.stopPropagation ) { - e.stopPropagation(); - } - - // Support: IE - // Set the cancelBubble property of the original event to true - e.cancelBubble = true; - }, - stopImmediatePropagation: function() { - this.isImmediatePropagationStopped = returnTrue; - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// IE submit delegation -if ( !jQuery.support.submitBubbles ) { - - jQuery.event.special.submit = { - setup: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Lazy-add a submit handler when a descendant form may potentially be submitted - jQuery.event.add( this, "click._submit keypress._submit", function( e ) { - // Node name check avoids a VML-related crash in IE (#9807) - var elem = e.target, - form = jQuery.nodeName( elem, "input" ) || jQuery.nodeName( elem, "button" ) ? elem.form : undefined; - if ( form && !jQuery._data( form, "submitBubbles" ) ) { - jQuery.event.add( form, "submit._submit", function( event ) { - event._submit_bubble = true; - }); - jQuery._data( form, "submitBubbles", true ); - } - }); - // return undefined since we don't need an event listener - }, - - postDispatch: function( event ) { - // If form was submitted by the user, bubble the event up the tree - if ( event._submit_bubble ) { - delete event._submit_bubble; - if ( this.parentNode && !event.isTrigger ) { - jQuery.event.simulate( "submit", this.parentNode, event, true ); - } - } - }, - - teardown: function() { - // Only need this for delegated form submit events - if ( jQuery.nodeName( this, "form" ) ) { - return false; - } - - // Remove delegated handlers; cleanData eventually reaps submit handlers attached above - jQuery.event.remove( this, "._submit" ); - } - }; -} - -// IE change delegation and checkbox/radio fix -if ( !jQuery.support.changeBubbles ) { - - jQuery.event.special.change = { - - setup: function() { - - if ( rformElems.test( this.nodeName ) ) { - // IE doesn't fire change on a check/radio until blur; trigger it on click - // after a propertychange. Eat the blur-change in special.change.handle. - // This still fires onchange a second time for check/radio after blur. - if ( this.type === "checkbox" || this.type === "radio" ) { - jQuery.event.add( this, "propertychange._change", function( event ) { - if ( event.originalEvent.propertyName === "checked" ) { - this._just_changed = true; - } - }); - jQuery.event.add( this, "click._change", function( event ) { - if ( this._just_changed && !event.isTrigger ) { - this._just_changed = false; - } - // Allow triggered, simulated change events (#11500) - jQuery.event.simulate( "change", this, event, true ); - }); - } - return false; - } - // Delegated event; lazy-add a change handler on descendant inputs - jQuery.event.add( this, "beforeactivate._change", function( e ) { - var elem = e.target; - - if ( rformElems.test( elem.nodeName ) && !jQuery._data( elem, "changeBubbles" ) ) { - jQuery.event.add( elem, "change._change", function( event ) { - if ( this.parentNode && !event.isSimulated && !event.isTrigger ) { - jQuery.event.simulate( "change", this.parentNode, event, true ); - } - }); - jQuery._data( elem, "changeBubbles", true ); - } - }); - }, - - handle: function( event ) { - var elem = event.target; - - // Swallow native change events from checkbox/radio, we already triggered them above - if ( this !== elem || event.isSimulated || event.isTrigger || (elem.type !== "radio" && elem.type !== "checkbox") ) { - return event.handleObj.handler.apply( this, arguments ); - } - }, - - teardown: function() { - jQuery.event.remove( this, "._change" ); - - return !rformElems.test( this.nodeName ); - } - }; -} - -// Create "bubbling" focus and blur events -if ( !jQuery.support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler while someone wants focusin/focusout - var attaches = 0, - handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - if ( attaches++ === 0 ) { - document.addEventListener( orig, handler, true ); - } - }, - teardown: function() { - if ( --attaches === 0 ) { - document.removeEventListener( orig, handler, true ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var type, origFn; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); -var isSimple = /^.[^:#\[\.,]*$/, - rparentsprev = /^(?:parents|prev(?:Until|All))/, - rneedsContext = jQuery.expr.match.needsContext, - // methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - ret = [], - self = this, - len = self.length; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - - has: function( target ) { - var i, - targets = jQuery( target, this ), - len = targets.length; - - return this.filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - ret = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - cur = ret.push( cur ); - break; - } - } - } - - return this.pushStack( ret.length > 1 ? jQuery.unique( ret ) : ret ); - }, - - // Determine the position of an element within - // the matched set of elements - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1; - } - - // index in selector - if ( typeof elem === "string" ) { - return jQuery.inArray( this[0], jQuery( elem ) ); - } - - // Locate the position of the desired element - return jQuery.inArray( - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[0] : elem, this ); - }, - - add: function( selector, context ) { - var set = typeof selector === "string" ? - jQuery( selector, context ) : - jQuery.makeArray( selector && selector.nodeType ? [ selector ] : selector ), - all = jQuery.merge( this.get(), set ); - - return this.pushStack( jQuery.unique(all) ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - do { - cur = cur[ dir ]; - } while ( cur && cur.nodeType !== 1 ); - - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return jQuery.nodeName( elem, "iframe" ) ? - elem.contentDocument || elem.contentWindow.document : - jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var ret = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - ret = jQuery.filter( selector, ret ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - ret = jQuery.unique( ret ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - ret = ret.reverse(); - } - } - - return this.pushStack( ret ); - }; -}); - -jQuery.extend({ - filter: function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); - }, - - dir: function( elem, dir, until ) { - var matched = [], - cur = elem[ dir ]; - - while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) { - if ( cur.nodeType === 1 ) { - matched.push( cur ); - } - cur = cur[dir]; - } - return matched; - }, - - sibling: function( n, elem ) { - var r = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - r.push( n ); - } - } - - return r; - } -}); - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( isSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( jQuery.inArray( elem, qualifier ) >= 0 ) !== not; - }); -} -function createSafeFragment( document ) { - var list = nodeNames.split( "|" ), - safeFrag = document.createDocumentFragment(); - - if ( safeFrag.createElement ) { - while ( list.length ) { - safeFrag.createElement( - list.pop() - ); - } - } - return safeFrag; -} - -var nodeNames = "abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|" + - "header|hgroup|mark|meter|nav|output|progress|section|summary|time|video", - rinlinejQuery = / jQuery\d+="(?:null|\d+)"/g, - rnoshimcache = new RegExp("<(?:" + nodeNames + ")[\\s/>]", "i"), - rleadingWhitespace = /^\s+/, - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rtbody = /\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - option: [ 1, "" ], - legend: [ 1, "
    ", "
    " ], - area: [ 1, "", "" ], - param: [ 1, "", "" ], - thead: [ 1, "", "
    " ], - tr: [ 2, "", "
    " ], - col: [ 2, "", "
    " ], - td: [ 3, "", "
    " ], - - // IE6-8 can't serialize link, script, style, or any html5 (NoScope) tags, - // unless wrapped in a div with non-breaking characters in front of it. - _default: jQuery.support.htmlSerialize ? [ 0, "", "" ] : [ 1, "X
    ", "
    " ] - }, - safeFragment = createSafeFragment( document ), - fragmentDiv = safeFragment.appendChild( document.createElement("div") ); - -wrapMap.optgroup = wrapMap.option; -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -jQuery.fn.extend({ - text: function( value ) { - return jQuery.access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().append( ( this[0] && this[0].ownerDocument || document ).createTextNode( value ) ); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - // keepData is for internal use only--do not document - remove: function( selector, keepData ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - } - - // Remove any remaining nodes - while ( elem.firstChild ) { - elem.removeChild( elem.firstChild ); - } - - // If this is a select, ensure that it displays empty (#12336) - // Support: IE<9 - if ( elem.options && jQuery.nodeName( elem, "select" ) ) { - elem.options.length = 0; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map( function () { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return jQuery.access( this, function( value ) { - var elem = this[0] || {}, - i = 0, - l = this.length; - - if ( value === undefined ) { - return elem.nodeType === 1 ? - elem.innerHTML.replace( rinlinejQuery, "" ) : - undefined; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - ( jQuery.support.htmlSerialize || !rnoshimcache.test( value ) ) && - ( jQuery.support.leadingWhitespace || !rleadingWhitespace.test( value ) ) && - !wrapMap[ ( rtagName.exec( value ) || ["", ""] )[1].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for (; i < l; i++ ) { - // Remove element nodes and prevent memory leaks - elem = this[i] || {}; - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch(e) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var - // Snapshot the DOM in case .domManip sweeps something relevant into its fragment - args = jQuery.map( this, function( elem ) { - return [ elem.nextSibling, elem.parentNode ]; - }), - i = 0; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - var next = args[ i++ ], - parent = args[ i++ ]; - - if ( parent ) { - // Don't use the snapshot next if it has moved (#13810) - if ( next && next.parentNode !== parent ) { - next = this.nextSibling; - } - jQuery( this ).remove(); - parent.insertBefore( elem, next ); - } - // Allow new content to include elements from the context set - }, true ); - - // Force removal if there was no new content (e.g., from empty arguments) - return i ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback, allowIntersection ) { - - // Flatten any nested arrays - args = core_concat.apply( [], args ); - - var first, node, hasScripts, - scripts, doc, fragment, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[0], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || !( l <= 1 || typeof value !== "string" || jQuery.support.checkClone || !rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[0] = value.call( this, index, self.html() ); - } - self.domManip( args, callback, allowIntersection ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, !allowIntersection && this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[i], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !jQuery._data( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Hope ajax is available... - jQuery._evalUrl( node.src ); - } else { - jQuery.globalEval( ( node.text || node.textContent || node.innerHTML || "" ).replace( rcleanScript, "" ) ); - } - } - } - } - - // Fix #11809: Avoid leaking memory - fragment = first = null; - } - } - - return this; - } -}); - -// Support: IE<8 -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType === 1 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (jQuery.find.attr( elem, "type" ) !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - if ( match ) { - elem.type = match[1]; - } else { - elem.removeAttribute("type"); - } - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var elem, - i = 0; - for ( ; (elem = elems[i]) != null; i++ ) { - jQuery._data( elem, "globalEval", !refElements || jQuery._data( refElements[i], "globalEval" ) ); - } -} - -function cloneCopyEvent( src, dest ) { - - if ( dest.nodeType !== 1 || !jQuery.hasData( src ) ) { - return; - } - - var type, i, l, - oldData = jQuery._data( src ), - curData = jQuery._data( dest, oldData ), - events = oldData.events; - - if ( events ) { - delete curData.handle; - curData.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - - // make the cloned public data object a copy from the original - if ( curData.data ) { - curData.data = jQuery.extend( {}, curData.data ); - } -} - -function fixCloneNodeIssues( src, dest ) { - var nodeName, e, data; - - // We do not need to do anything for non-Elements - if ( dest.nodeType !== 1 ) { - return; - } - - nodeName = dest.nodeName.toLowerCase(); - - // IE6-8 copies events bound via attachEvent when using cloneNode. - if ( !jQuery.support.noCloneEvent && dest[ jQuery.expando ] ) { - data = jQuery._data( dest ); - - for ( e in data.events ) { - jQuery.removeEvent( dest, e, data.handle ); - } - - // Event data gets referenced instead of copied if the expando gets copied too - dest.removeAttribute( jQuery.expando ); - } - - // IE blanks contents when cloning scripts, and tries to evaluate newly-set text - if ( nodeName === "script" && dest.text !== src.text ) { - disableScript( dest ).text = src.text; - restoreScript( dest ); - - // IE6-10 improperly clones children of object elements using classid. - // IE10 throws NoModificationAllowedError if parent is null, #12132. - } else if ( nodeName === "object" ) { - if ( dest.parentNode ) { - dest.outerHTML = src.outerHTML; - } - - // This path appears unavoidable for IE9. When cloning an object - // element in IE9, the outerHTML strategy above is not sufficient. - // If the src has innerHTML and the destination does not, - // copy the src.innerHTML into the dest.innerHTML. #10324 - if ( jQuery.support.html5Clone && ( src.innerHTML && !jQuery.trim(dest.innerHTML) ) ) { - dest.innerHTML = src.innerHTML; - } - - } else if ( nodeName === "input" && manipulation_rcheckableType.test( src.type ) ) { - // IE6-8 fails to persist the checked state of a cloned checkbox - // or radio button. Worse, IE6-7 fail to give the cloned element - // a checked appearance if the defaultChecked value isn't also set - - dest.defaultChecked = dest.checked = src.checked; - - // IE6-7 get confused and end up setting the value of a cloned - // checkbox/radio button to an empty string instead of "on" - if ( dest.value !== src.value ) { - dest.value = src.value; - } - - // IE6-8 fails to return the selected option to the default selected - // state when cloning options - } else if ( nodeName === "option" ) { - dest.defaultSelected = dest.selected = src.defaultSelected; - - // IE6-8 fails to set the defaultValue to the correct value when - // cloning other types of input fields - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - i = 0, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone(true); - jQuery( insert[i] )[ original ]( elems ); - - // Modern browsers can apply jQuery collections as arrays, but oldIE needs a .get() - core_push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - -function getAll( context, tag ) { - var elems, elem, - i = 0, - found = typeof context.getElementsByTagName !== core_strundefined ? context.getElementsByTagName( tag || "*" ) : - typeof context.querySelectorAll !== core_strundefined ? context.querySelectorAll( tag || "*" ) : - undefined; - - if ( !found ) { - for ( found = [], elems = context.childNodes || context; (elem = elems[i]) != null; i++ ) { - if ( !tag || jQuery.nodeName( elem, tag ) ) { - found.push( elem ); - } else { - jQuery.merge( found, getAll( elem, tag ) ); - } - } - } - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], found ) : - found; -} - -// Used in buildFragment, fixes the defaultChecked property -function fixDefaultChecked( elem ) { - if ( manipulation_rcheckableType.test( elem.type ) ) { - elem.defaultChecked = elem.checked; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var destElements, node, clone, i, srcElements, - inPage = jQuery.contains( elem.ownerDocument, elem ); - - if ( jQuery.support.html5Clone || jQuery.isXMLDoc(elem) || !rnoshimcache.test( "<" + elem.nodeName + ">" ) ) { - clone = elem.cloneNode( true ); - - // IE<=8 does not properly clone detached, unknown element nodes - } else { - fragmentDiv.innerHTML = elem.outerHTML; - fragmentDiv.removeChild( clone = fragmentDiv.firstChild ); - } - - if ( (!jQuery.support.noCloneEvent || !jQuery.support.noCloneChecked) && - (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - // Fix all IE cloning issues - for ( i = 0; (node = srcElements[i]) != null; ++i ) { - // Ensure that the destination node is not null; Fixes #9587 - if ( destElements[i] ) { - fixCloneNodeIssues( node, destElements[i] ); - } - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0; (node = srcElements[i]) != null; i++ ) { - cloneCopyEvent( node, destElements[i] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - destElements = srcElements = node = null; - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var j, elem, contains, - tmp, tag, tbody, wrap, - l = elems.length, - - // Ensure a safe fragment - safe = createSafeFragment( context ), - - nodes = [], - i = 0; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || safe.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || ["", ""] )[1].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - - tmp.innerHTML = wrap[1] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[2]; - - // Descend through wrappers to the right content - j = wrap[0]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Manually add leading whitespace removed by IE - if ( !jQuery.support.leadingWhitespace && rleadingWhitespace.test( elem ) ) { - nodes.push( context.createTextNode( rleadingWhitespace.exec( elem )[0] ) ); - } - - // Remove IE's autoinserted from table fragments - if ( !jQuery.support.tbody ) { - - // String was a , *may* have spurious - elem = tag === "table" && !rtbody.test( elem ) ? - tmp.firstChild : - - // String was a bare or - wrap[1] === "
    " && !rtbody.test( elem ) ? - tmp : - 0; - - j = elem && elem.childNodes.length; - while ( j-- ) { - if ( jQuery.nodeName( (tbody = elem.childNodes[j]), "tbody" ) && !tbody.childNodes.length ) { - elem.removeChild( tbody ); - } - } - } - - jQuery.merge( nodes, tmp.childNodes ); - - // Fix #12392 for WebKit and IE > 9 - tmp.textContent = ""; - - // Fix #12392 for oldIE - while ( tmp.firstChild ) { - tmp.removeChild( tmp.firstChild ); - } - - // Remember the top-level container for proper cleanup - tmp = safe.lastChild; - } - } - } - - // Fix #11356: Clear elements from fragment - if ( tmp ) { - safe.removeChild( tmp ); - } - - // Reset defaultChecked for any radios and checkboxes - // about to be appended to the DOM in IE 6/7 (#8060) - if ( !jQuery.support.appendChecked ) { - jQuery.grep( getAll( nodes, "input" ), fixDefaultChecked ); - } - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( safe.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - tmp = null; - - return safe; - }, - - cleanData: function( elems, /* internal */ acceptData ) { - var elem, type, id, data, - i = 0, - internalKey = jQuery.expando, - cache = jQuery.cache, - deleteExpando = jQuery.support.deleteExpando, - special = jQuery.event.special; - - for ( ; (elem = elems[i]) != null; i++ ) { - - if ( acceptData || jQuery.acceptData( elem ) ) { - - id = elem[ internalKey ]; - data = id && cache[ id ]; - - if ( data ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - - // Remove cache only if it was not already removed by jQuery.event.remove - if ( cache[ id ] ) { - - delete cache[ id ]; - - // IE does not allow us to delete expando properties from nodes, - // nor does it have a removeAttribute function on Document nodes; - // we must handle all of these cases - if ( deleteExpando ) { - delete elem[ internalKey ]; - - } else if ( typeof elem.removeAttribute !== core_strundefined ) { - elem.removeAttribute( internalKey ); - - } else { - elem[ internalKey ] = null; - } - - core_deletedIds.push( id ); - } - } - } - } - }, - - _evalUrl: function( url ) { - return jQuery.ajax({ - url: url, - type: "GET", - dataType: "script", - async: false, - global: false, - "throws": true - }); - } -}); -jQuery.fn.extend({ - wrapAll: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapAll( html.call(this, i) ); - }); - } - - if ( this[0] ) { - // The elements to wrap the target around - var wrap = jQuery( html, this[0].ownerDocument ).eq(0).clone(true); - - if ( this[0].parentNode ) { - wrap.insertBefore( this[0] ); - } - - wrap.map(function() { - var elem = this; - - while ( elem.firstChild && elem.firstChild.nodeType === 1 ) { - elem = elem.firstChild; - } - - return elem; - }).append( this ); - } - - return this; - }, - - wrapInner: function( html ) { - if ( jQuery.isFunction( html ) ) { - return this.each(function(i) { - jQuery(this).wrapInner( html.call(this, i) ); - }); - } - - return this.each(function() { - var self = jQuery( this ), - contents = self.contents(); - - if ( contents.length ) { - contents.wrapAll( html ); - - } else { - self.append( html ); - } - }); - }, - - wrap: function( html ) { - var isFunction = jQuery.isFunction( html ); - - return this.each(function(i) { - jQuery( this ).wrapAll( isFunction ? html.call(this, i) : html ); - }); - }, - - unwrap: function() { - return this.parent().each(function() { - if ( !jQuery.nodeName( this, "body" ) ) { - jQuery( this ).replaceWith( this.childNodes ); - } - }).end(); - } -}); -var iframe, getStyles, curCSS, - ralpha = /alpha\([^)]*\)/i, - ropacity = /opacity\s*=\s*([^)]*)/, - rposition = /^(top|right|bottom|left)$/, - // swappable if display is none or starts with table except "table", "table-cell", or "table-caption" - // see here for display values: https://developer.mozilla.org/en-US/docs/CSS/display - rdisplayswap = /^(none|table(?!-c[ea]).+)/, - rmargin = /^margin/, - rnumsplit = new RegExp( "^(" + core_pnum + ")(.*)$", "i" ), - rnumnonpx = new RegExp( "^(" + core_pnum + ")(?!px)[a-z%]+$", "i" ), - rrelNum = new RegExp( "^([+-])=(" + core_pnum + ")", "i" ), - elemdisplay = { BODY: "block" }, - - cssShow = { position: "absolute", visibility: "hidden", display: "block" }, - cssNormalTransform = { - letterSpacing: 0, - fontWeight: 400 - }, - - cssExpand = [ "Top", "Right", "Bottom", "Left" ], - cssPrefixes = [ "Webkit", "O", "Moz", "ms" ]; - -// return a css property mapped to a potentially vendor prefixed property -function vendorPropName( style, name ) { - - // shortcut for names that are not vendor prefixed - if ( name in style ) { - return name; - } - - // check for vendor prefixed names - var capName = name.charAt(0).toUpperCase() + name.slice(1), - origName = name, - i = cssPrefixes.length; - - while ( i-- ) { - name = cssPrefixes[ i ] + capName; - if ( name in style ) { - return name; - } - } - - return origName; -} - -function isHidden( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); -} - -function showHide( elements, show ) { - var display, elem, hidden, - values = [], - index = 0, - length = elements.length; - - for ( ; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - - values[ index ] = jQuery._data( elem, "olddisplay" ); - display = elem.style.display; - if ( show ) { - // Reset the inline display of this element to learn if it is - // being hidden by cascaded rules or not - if ( !values[ index ] && display === "none" ) { - elem.style.display = ""; - } - - // Set elements which have been overridden with display: none - // in a stylesheet to whatever the default browser style is - // for such an element - if ( elem.style.display === "" && isHidden( elem ) ) { - values[ index ] = jQuery._data( elem, "olddisplay", css_defaultDisplay(elem.nodeName) ); - } - } else { - - if ( !values[ index ] ) { - hidden = isHidden( elem ); - - if ( display && display !== "none" || !hidden ) { - jQuery._data( elem, "olddisplay", hidden ? display : jQuery.css( elem, "display" ) ); - } - } - } - } - - // Set the display of most of the elements in a second loop - // to avoid the constant reflow - for ( index = 0; index < length; index++ ) { - elem = elements[ index ]; - if ( !elem.style ) { - continue; - } - if ( !show || elem.style.display === "none" || elem.style.display === "" ) { - elem.style.display = show ? values[ index ] || "" : "none"; - } - } - - return elements; -} - -jQuery.fn.extend({ - css: function( name, value ) { - return jQuery.access( this, function( elem, name, value ) { - var len, styles, - map = {}, - i = 0; - - if ( jQuery.isArray( name ) ) { - styles = getStyles( elem ); - len = name.length; - - for ( ; i < len; i++ ) { - map[ name[ i ] ] = jQuery.css( elem, name[ i ], false, styles ); - } - - return map; - } - - return value !== undefined ? - jQuery.style( elem, name, value ) : - jQuery.css( elem, name ); - }, name, value, arguments.length > 1 ); - }, - show: function() { - return showHide( this, true ); - }, - hide: function() { - return showHide( this ); - }, - toggle: function( state ) { - if ( typeof state === "boolean" ) { - return state ? this.show() : this.hide(); - } - - return this.each(function() { - if ( isHidden( this ) ) { - jQuery( this ).show(); - } else { - jQuery( this ).hide(); - } - }); - } -}); - -jQuery.extend({ - // Add in style property hooks for overriding the default - // behavior of getting and setting a style property - cssHooks: { - opacity: { - get: function( elem, computed ) { - if ( computed ) { - // We should always get a number back from opacity - var ret = curCSS( elem, "opacity" ); - return ret === "" ? "1" : ret; - } - } - } - }, - - // Don't automatically add "px" to these possibly-unitless properties - cssNumber: { - "columnCount": true, - "fillOpacity": true, - "fontWeight": true, - "lineHeight": true, - "opacity": true, - "order": true, - "orphans": true, - "widows": true, - "zIndex": true, - "zoom": true - }, - - // Add in properties whose names you wish to fix before - // setting or getting the value - cssProps: { - // normalize float css property - "float": jQuery.support.cssFloat ? "cssFloat" : "styleFloat" - }, - - // Get and set the style property on a DOM Node - style: function( elem, name, value, extra ) { - // Don't set styles on text and comment nodes - if ( !elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style ) { - return; - } - - // Make sure that we're working with the right name - var ret, type, hooks, - origName = jQuery.camelCase( name ), - style = elem.style; - - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // Check if we're setting a value - if ( value !== undefined ) { - type = typeof value; - - // convert relative number strings (+= or -=) to relative numbers. #7345 - if ( type === "string" && (ret = rrelNum.exec( value )) ) { - value = ( ret[1] + 1 ) * ret[2] + parseFloat( jQuery.css( elem, name ) ); - // Fixes bug #9237 - type = "number"; - } - - // Make sure that NaN and null values aren't set. See: #7116 - if ( value == null || type === "number" && isNaN( value ) ) { - return; - } - - // If a number was passed in, add 'px' to the (except for certain CSS properties) - if ( type === "number" && !jQuery.cssNumber[ origName ] ) { - value += "px"; - } - - // Fixes #8908, it can be done more correctly by specifing setters in cssHooks, - // but it would mean to define eight (for every problematic property) identical functions - if ( !jQuery.support.clearCloneStyle && value === "" && name.indexOf("background") === 0 ) { - style[ name ] = "inherit"; - } - - // If a hook was provided, use that value, otherwise just set the specified value - if ( !hooks || !("set" in hooks) || (value = hooks.set( elem, value, extra )) !== undefined ) { - - // Wrapped to prevent IE from throwing errors when 'invalid' values are provided - // Fixes bug #5509 - try { - style[ name ] = value; - } catch(e) {} - } - - } else { - // If a hook was provided get the non-computed value from there - if ( hooks && "get" in hooks && (ret = hooks.get( elem, false, extra )) !== undefined ) { - return ret; - } - - // Otherwise just get the value from the style object - return style[ name ]; - } - }, - - css: function( elem, name, extra, styles ) { - var num, val, hooks, - origName = jQuery.camelCase( name ); - - // Make sure that we're working with the right name - name = jQuery.cssProps[ origName ] || ( jQuery.cssProps[ origName ] = vendorPropName( elem.style, origName ) ); - - // gets hook for the prefixed version - // followed by the unprefixed version - hooks = jQuery.cssHooks[ name ] || jQuery.cssHooks[ origName ]; - - // If a hook was provided get the computed value from there - if ( hooks && "get" in hooks ) { - val = hooks.get( elem, true, extra ); - } - - // Otherwise, if a way to get the computed value exists, use that - if ( val === undefined ) { - val = curCSS( elem, name, styles ); - } - - //convert "normal" to computed value - if ( val === "normal" && name in cssNormalTransform ) { - val = cssNormalTransform[ name ]; - } - - // Return, converting to number if forced or a qualifier was provided and val looks numeric - if ( extra === "" || extra ) { - num = parseFloat( val ); - return extra === true || jQuery.isNumeric( num ) ? num || 0 : val; - } - return val; - } -}); - -// NOTE: we've included the "window" in window.getComputedStyle -// because jsdom on node.js will break without it. -if ( window.getComputedStyle ) { - getStyles = function( elem ) { - return window.getComputedStyle( elem, null ); - }; - - curCSS = function( elem, name, _computed ) { - var width, minWidth, maxWidth, - computed = _computed || getStyles( elem ), - - // getPropertyValue is only needed for .css('filter') in IE9, see #12537 - ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined, - style = elem.style; - - if ( computed ) { - - if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) { - ret = jQuery.style( elem, name ); - } - - // A tribute to the "awesome hack by Dean Edwards" - // Chrome < 17 and Safari 5.0 uses "computed value" instead of "used value" for margin-right - // Safari 5.1.7 (at least) returns percentage for a larger set of values, but width seems to be reliably pixels - // this is against the CSSOM draft spec: http://dev.w3.org/csswg/cssom/#resolved-values - if ( rnumnonpx.test( ret ) && rmargin.test( name ) ) { - - // Remember the original values - width = style.width; - minWidth = style.minWidth; - maxWidth = style.maxWidth; - - // Put in the new values to get a computed value out - style.minWidth = style.maxWidth = style.width = ret; - ret = computed.width; - - // Revert the changed values - style.width = width; - style.minWidth = minWidth; - style.maxWidth = maxWidth; - } - } - - return ret; - }; -} else if ( document.documentElement.currentStyle ) { - getStyles = function( elem ) { - return elem.currentStyle; - }; - - curCSS = function( elem, name, _computed ) { - var left, rs, rsLeft, - computed = _computed || getStyles( elem ), - ret = computed ? computed[ name ] : undefined, - style = elem.style; - - // Avoid setting ret to empty string here - // so we don't default to auto - if ( ret == null && style && style[ name ] ) { - ret = style[ name ]; - } - - // From the awesome hack by Dean Edwards - // http://erik.eae.net/archives/2007/07/27/18.54.15/#comment-102291 - - // If we're not dealing with a regular pixel number - // but a number that has a weird ending, we need to convert it to pixels - // but not position css attributes, as those are proportional to the parent element instead - // and we can't measure the parent instead because it might trigger a "stacking dolls" problem - if ( rnumnonpx.test( ret ) && !rposition.test( name ) ) { - - // Remember the original values - left = style.left; - rs = elem.runtimeStyle; - rsLeft = rs && rs.left; - - // Put in the new values to get a computed value out - if ( rsLeft ) { - rs.left = elem.currentStyle.left; - } - style.left = name === "fontSize" ? "1em" : ret; - ret = style.pixelLeft + "px"; - - // Revert the changed values - style.left = left; - if ( rsLeft ) { - rs.left = rsLeft; - } - } - - return ret === "" ? "auto" : ret; - }; -} - -function setPositiveNumber( elem, value, subtract ) { - var matches = rnumsplit.exec( value ); - return matches ? - // Guard against undefined "subtract", e.g., when used as in cssHooks - Math.max( 0, matches[ 1 ] - ( subtract || 0 ) ) + ( matches[ 2 ] || "px" ) : - value; -} - -function augmentWidthOrHeight( elem, name, extra, isBorderBox, styles ) { - var i = extra === ( isBorderBox ? "border" : "content" ) ? - // If we already have the right measurement, avoid augmentation - 4 : - // Otherwise initialize for horizontal or vertical properties - name === "width" ? 1 : 0, - - val = 0; - - for ( ; i < 4; i += 2 ) { - // both box models exclude margin, so add it if we want it - if ( extra === "margin" ) { - val += jQuery.css( elem, extra + cssExpand[ i ], true, styles ); - } - - if ( isBorderBox ) { - // border-box includes padding, so remove it if we want content - if ( extra === "content" ) { - val -= jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - } - - // at this point, extra isn't border nor margin, so remove border - if ( extra !== "margin" ) { - val -= jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } else { - // at this point, extra isn't content, so add padding - val += jQuery.css( elem, "padding" + cssExpand[ i ], true, styles ); - - // at this point, extra isn't content nor padding, so add border - if ( extra !== "padding" ) { - val += jQuery.css( elem, "border" + cssExpand[ i ] + "Width", true, styles ); - } - } - } - - return val; -} - -function getWidthOrHeight( elem, name, extra ) { - - // Start with offset property, which is equivalent to the border-box value - var valueIsBorderBox = true, - val = name === "width" ? elem.offsetWidth : elem.offsetHeight, - styles = getStyles( elem ), - isBorderBox = jQuery.support.boxSizing && jQuery.css( elem, "boxSizing", false, styles ) === "border-box"; - - // some non-html elements return undefined for offsetWidth, so check for null/undefined - // svg - https://bugzilla.mozilla.org/show_bug.cgi?id=649285 - // MathML - https://bugzilla.mozilla.org/show_bug.cgi?id=491668 - if ( val <= 0 || val == null ) { - // Fall back to computed then uncomputed css if necessary - val = curCSS( elem, name, styles ); - if ( val < 0 || val == null ) { - val = elem.style[ name ]; - } - - // Computed unit is not pixels. Stop here and return. - if ( rnumnonpx.test(val) ) { - return val; - } - - // we need the check for style in case a browser which returns unreliable values - // for getComputedStyle silently falls back to the reliable elem.style - valueIsBorderBox = isBorderBox && ( jQuery.support.boxSizingReliable || val === elem.style[ name ] ); - - // Normalize "", auto, and prepare for extra - val = parseFloat( val ) || 0; - } - - // use the active box-sizing model to add/subtract irrelevant styles - return ( val + - augmentWidthOrHeight( - elem, - name, - extra || ( isBorderBox ? "border" : "content" ), - valueIsBorderBox, - styles - ) - ) + "px"; -} - -// Try to determine the default display value of an element -function css_defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - // Use the already-created iframe if possible - iframe = ( iframe || - jQuery("